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 @@ +