committing before switching

This commit is contained in:
ablwr 2014-08-10 13:21:58 -04:00
parent bc18c291a7
commit 87a9c81432
4 changed files with 79 additions and 14 deletions

View File

@ -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())
});
});

View File

@ -0,0 +1,38 @@
<div id="file_names">
<div class="well">
<fieldset>
<legend>Input</legend>
<div class="form-group">
<label class="control-label" for="input_name">Input</label>
<div class="controls">
<input type="text" name="input_name" id="input_name" placeholder="input" />
</div>
</div>
<br/>
</fieldset>
</div>
</div>
<div class="well">
<fieldset>
<legend>Output</legend>
<div class="form-group">
<label class="control-label" for="output_name">Output</label>
<div class="controls">
<output type="text" name="output_name" id="output_name" placeholder="output" />
</div>
</div>
<br/>
<input type="button" class="btn btn-large btn-primary" name="display_generate" id="add_subtitles_generate" value="Generate" />
</fieldset>
</div>
<div class="well">
<fieldset>
<legend>Your command line:</legend>
<textarea name="command_line" id="command_line" rows="3" cols="100"></textarea>
</fieldset>
</div>
</div> <!-- container -->

View File

@ -1,4 +1,5 @@
<div id="file_names">
<div class="well">
<fieldset>
<legend>Input and Output</legend>
@ -15,7 +16,7 @@
</div>
</div>
<br/>
<input type="button" class="btn btn-large btn-primary" name="generate" id="generate" value="Generate" />
<input type="button" class="btn btn-large btn-primary" name="generate" id="web_generate" value="Generate" />
</fieldset>
</div>
</div>

View File

@ -11,8 +11,12 @@
<li>
<div id="show_display_info">Display info</div>
</li>
<li>Export for web</li>
<li>Add subtitles track</li>
<li>
<div id="show_web">Export for web</div>
</li>
<li>
<div id="show_add_subtitles">Add subtitles track</div>
</li>
<li>Remove audio track</li>
<li>Add audio track</li>
</ul>
@ -22,13 +26,11 @@
<div id="formloader">
<div class="display_info" style="display:none;">
<%= render "display_info" %>
</div>
<div class="web" style="display:none;">
<%= render "web" %>
</div>
<div class="add_subtitles" style="display:none;">
<%= render "add_subtitles" %>
</div>
</div>
</div>
<%#= render "web" %>
<script>
$( "#show_display_info" ).click(function() {
$( ".display_info" ).toggle();
});
</script>