Commit 758190ee authored by dionoea's avatar dionoea
Browse files

* : it's now possible to enter a batch of commands or export the VLM

     configuration
parent 75f733bc
......@@ -51,6 +51,9 @@ sout and vlmelements .
<button id="btn_schedule" onclick="hide_vlm_add();show('vlm_add_schedule');update_vlm_add_schedule();" onmouseover="button_over(this);" onmouseout="button_out(this);">
Schedule
</button>
<button id="btn_other" onclick="hide_vlm_add();show('vlm_add_other');update_vlm_add_other();" onmouseover="button_over(this);" onmouseout="button_out(this);">
Other
</button>
</div>
<div id="vlm_helper" class="helper" >
<div id="vlm_add_broadcast" style="display: block">
......@@ -134,6 +137,12 @@ sout and vlmelements .
<label for="vlm_schedule_repeat_times">Number of repetitions (use 0 to repeat endlessly):</label>
<input type="text" id="vlm_schedule_repeat_times" size="8" disabled="disabled" value="0" onchange="update_vlm_add_schedule();" />
</div>
<div id="vlm_add_other" style="display: none">
<input type="button" id="btn_import" onclick="vlm_batch(document.getElementById('vlm_batch_text').value);" value="Send command batch" />
<input type="button" id="btn_export" onclick="document.location.assign('vlm_export.html');" value="Export VLM commands (new page)" />
<br/>
<textarea cols="70" rows="20" id="vlm_batch_text">#paste your VLM commands here</textarea>
</div>
</div>
</div>
......
......@@ -59,6 +59,7 @@ function hide_vlm_add()
document.getElementById( 'vlm_add_broadcast' ).style.display = 'none';
document.getElementById( 'vlm_add_vod' ).style.display = 'none';
document.getElementById( 'vlm_add_schedule' ).style.display = 'none';
document.getElementById( 'vlm_add_other' ).style.display = 'none';
}
function toggle_schedule_date()
......@@ -246,6 +247,12 @@ function update_vlm_add_schedule()
}
}
function update_vlm_add_other()
{
cmd = document.getElementById( 'vlm_command' );
cmd.value = "";
}
function clear_vlm_add()
{
document.getElementById( 'vlm_command' ).value = "";
......@@ -657,6 +664,17 @@ function vlm_option( name, option )
vlm_cmd( value( 'vlm_command' ) );
}
function vlm_batch( batch )
{
var i;
var commands = batch.split( '\n' );
for( i = 0; i < commands.length; i++ )
{
document.getElementById( 'vlm_command' ).value = commands[i];
vlm_cmd( value( 'vlm_command' ) );
}
}
function vlm_schedule_append( name )
{
act = document.getElementById( 'vlm_elt_' + name + '_action' ).value;
......
## <pre>
##
## <a href="vlm.html">VLM HTTP interface</a>
## This file can be loaded as is in VLM.
## Comments starting with "##" were added by the HTTP interface.
## You can remove them if you want to.
##
<vlc id="value" param1="; export vlm_cmd vlm_value" />
##
## end of export
## </pre>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment