From 87a9c814326f1d9a4feae8046de859bce4484004 Mon Sep 17 00:00:00 2001 From: ablwr Date: Sun, 10 Aug 2014 13:21:58 -0400 Subject: [PATCH] committing before switching --- app/assets/javascripts/forms.js | 28 ++++++++++++++++-- app/views/forms/_add_subtitles.html.erb | 38 +++++++++++++++++++++++++ app/views/forms/_web.html.erb | 3 +- app/views/forms/index.html.erb | 24 +++++++++------- 4 files changed, 79 insertions(+), 14 deletions(-) create mode 100644 app/views/forms/_add_subtitles.html.erb diff --git a/app/assets/javascripts/forms.js b/app/assets/javascripts/forms.js index 8ff14ee..ccfa4be 100644 --- a/app/assets/javascripts/forms.js +++ b/app/assets/javascripts/forms.js @@ -1,9 +1,21 @@ $(document).ready(function() { - + + $( "#show_display_info" ).click(function() { + $( ".display_info" ).toggle(); + }); + + $( "#show_web" ).click(function() { + $( ".web" ).toggle(); + }); + + $( "#show_add_subtitles" ).click(function() { + $( ".add_subtitles" ).toggle(); + }); + $('#generate').click(function(){ $('#command_line').val("ffmpeg" + " -i " + $('#input_name').val() + - " -o " + $('#output_name').val()) + " " + $('#output_name').val()) }); $('#display_generate').click(function(){ @@ -11,4 +23,16 @@ $(document).ready(function() { " -i " + $('#input_name').val()) }); + $('#web_generate').click(function(){ + $('#web_command_line').val("ffmpeg" + + " -i " + $('#input_name').val()) + }); + + $('#add_subtitles_generate').click(function(){ + $('#command_line').val("ffmpeg" + + " -i " + $('#input_name').val() + + " " + $('#output_name').val()) + }); + + }); \ No newline at end of file diff --git a/app/views/forms/_add_subtitles.html.erb b/app/views/forms/_add_subtitles.html.erb new file mode 100644 index 0000000..bd919f2 --- /dev/null +++ b/app/views/forms/_add_subtitles.html.erb @@ -0,0 +1,38 @@ +
+
+
+ Input +
+ +
+ +
+
+
+
+
+
+ +
+
+ Output +
+ +
+ +
+
+
+ +
+
+ +
+
+ Your command line: + +
+
+ + + \ No newline at end of file diff --git a/app/views/forms/_web.html.erb b/app/views/forms/_web.html.erb index df3d316..9d44936 100644 --- a/app/views/forms/_web.html.erb +++ b/app/views/forms/_web.html.erb @@ -1,4 +1,5 @@
+
Input and Output @@ -15,7 +16,7 @@

- + diff --git a/app/views/forms/index.html.erb b/app/views/forms/index.html.erb index fba89e7..6436624 100644 --- a/app/views/forms/index.html.erb +++ b/app/views/forms/index.html.erb @@ -11,8 +11,12 @@
  • Display info
  • -
  • Export for web
  • -
  • Add subtitles track
  • +
  • +
    Export for web
    +
  • +
  • +
    Add subtitles track
    +
  • Remove audio track
  • Add audio track
  • @@ -22,13 +26,11 @@
    + +
    - - -<%#= render "web" %> - - \ No newline at end of file