]> git.sesse.net Git - vlc/commitdiff
Add hide/show vlm helper button. Original idea by Albert (http://forum.videolan.org...
authorAntoine Cellerier <dionoea@videolan.org>
Fri, 24 Mar 2006 13:11:17 +0000 (13:11 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Fri, 24 Mar 2006 13:11:17 +0000 (13:11 +0000)
share/http/dialogs/vlm
share/http/js/vlm.js

index 24861401aa2440b85c841120e302034b3783974c..82045becfefaee8c543a89fa55b9b44cdd1521a1 100644 (file)
@@ -44,17 +44,22 @@ sout and vlmelements .
     <br />
     <span id="vlm_error"></span>
     <br />
-    <button id="btn_broadcast" onclick="hide_vlm_add();show('vlm_add_broadcast');update_vlm_add_broadcast();" onmouseover="button_over(this);" onmouseout="button_out(this);">
-      Broadcast
-    </button>
-    <button id="btn_vod" onclick="hide_vlm_add();show('vlm_add_vod');update_vlm_add_vod();" onmouseover="button_over(this);" onmouseout="button_out(this);">
-      Video on Demand
-    </button>
-    <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
+    <span id="vlm_helper_controls">
+      <button id="btn_broadcast" onclick="hide_vlm_add();show('vlm_add_broadcast');update_vlm_add_broadcast();" onmouseover="button_over(this);" onmouseout="button_out(this);">
+        Broadcast
+      </button>
+      <button id="btn_vod" onclick="hide_vlm_add();show('vlm_add_vod');update_vlm_add_vod();" onmouseover="button_over(this);" onmouseout="button_out(this);">
+        Video on Demand
+      </button>
+      <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>
+    </span>
+    <button id="btn_vlm_helper_toggle" onclick="toggle_show_vlm_helper();" onmouseover="button_over(this);" onmouseout="button_out(this);">
+      Hide VLM helper
     </button>
   </div>
   <div id="vlm_helper" class="helper" >
index 8a985f87a0013d5e1a4fc7e7ba0ebe0ca013f560..2082c7bbe399ec07c122ee585e8074b28c01efd7 100644 (file)
@@ -28,6 +28,27 @@ function addunderscores( str ){ return str.replace(/\'|\"| /g, '_'); }
  * Input dialog functions
  *********************************************************************/
 
+function toggle_show_vlm_helper()
+{
+    var vlmh = document.getElementById( "vlm_helper" );
+    var vlmhctrl = document.getElementById( "vlm_helper_controls" );
+    var btn = document.getElementById( "btn_vlm_helper_toggle" );
+    if( vlmh.style.display == 'block' || vlmh.style.display == '')
+    {
+        vlmh.style.display = 'none';
+        vlmhctrl.style.display = 'none';
+        btn.removeChild( btn.firstChild );
+        btn.appendChild( document.createTextNode( 'Show VLM helper' ) );
+    }
+    else
+    {
+        vlmh.style.display = 'block';
+        vlmhctrl.style.display = 'inline';
+        btn.removeChild( btn.firstChild );
+        btn.appendChild( document.createTextNode( 'Hide VLM helper' ) );
+    }
+}
+
 function vlm_input_edit( dest )
 {
     document.getElementById( 'input_dest' ).value = dest;