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