* : it's now possible to enter a batch of commands or export the VLM
authorAntoine Cellerier <dionoea@videolan.org>
Fri, 27 Jan 2006 13:48:28 +0000 (13:48 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Fri, 27 Jan 2006 13:48:28 +0000 (13:48 +0000)
     configuration

share/http/dialogs/vlm
share/http/js/vlm.js
share/http/vlm_export.html [new file with mode: 0644]

index 910008d..499843b 100644 (file)
@@ -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>
 
index 835040c..bc7b5a8 100644 (file)
@@ -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;
diff --git a/share/http/vlm_export.html b/share/http/vlm_export.html
new file mode 100644 (file)
index 0000000..66a4c15
--- /dev/null
@@ -0,0 +1,11 @@
+## <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>