]> git.sesse.net Git - vlc/commitdiff
add some help and feedback
authorAntoine Cellerier <dionoea@videolan.org>
Sat, 18 Mar 2006 17:42:37 +0000 (17:42 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sat, 18 Mar 2006 17:42:37 +0000 (17:42 +0000)
share/http/dialogs/input
share/http/dialogs/mosaic
share/http/dialogs/sout
share/http/js/mosaic.js

index 9975633462857b9351e4d560ff142a99fbd8b581..e9100a7a1239d97c9657238e6f30cd5794f3de36 100644 (file)
@@ -36,6 +36,7 @@ This dialog needs the following dialogs to be fully functional: browse
     <vlc id="if" param1="page value 'vlm' strcmp 0 =" />
       <input type="text" name="input_mrl" id="input_mrl" size="60" onkeypress="if( event.keyCode == 13 ) vlm_input_change();"/>
       <input type="button" value="Ok" onclick="vlm_input_change();" />
+      <input type="button" value="Cancel" onclick="hide('input');" />
       <input type="hidden" id="input_dest" value="" />
     <vlc id="else" />
       <input type="text" name="input_mrl" id="input_mrl" size="60" onkeypress="if( event.keyCode == 13 ) in_play();"/>
index f53ea0a8c6d84419f7a773ca0a58d63a967279af..fe6371869344d1dc1ad57b9851d75dbcb1746ca5 100644 (file)
@@ -89,12 +89,18 @@ sout.
     <b>Item:</b><br/>
     <label for="mosaic_input_name">Name:</label> <input type="text" id="mosaic_input_name" value="" class="mosaic_itm" />
     <label for="mosaic_input">Input:</label> <input type="text" id="mosaic_input" value="" class="mosaic_itm" /> <input type="button" value="Edit" onclick="vlm_input_edit( 'mosaic_input' );" /> <input type="button" value="Add to input list" onclick="mosaic_add_input();" /><br/>
-    <b>Stream:</b><br/>
-    <label for="mosaic_output">Output:</label> <input type="text" id="mosaic_output" value="" size="60" onvlur="mosaic_code_update();" /> <input type="button" value="Edit" onclick="vlm_output_edit( 'mosaic_output' );" />
+    <b>Stream:</b> (leave this empty to display locally)<br/>
+    <label for="mosaic_output">Output:</label> <input type="text" id="mosaic_output" value="" size="60" onvlur="mosaic_code_update();" /> <input type="button" value="Edit" onclick="vlm_output_edit( 'mosaic_output' );" /><br/>
+    <div id="mosaic_feedback"></div>
   </div>
   <div  id="mosaic_list" class="popup" style="display: none; background: url('images/white.png') repeat;">[<a href="javascript:hide('mosaic_list');">hide</a>] - Select a stream:<br/><div id="mosaic_list_content"></div></div>
+  <div class="controls">
+    Click on each of the cells to asign inputs. (<a href="javascript:document.getElementById('mosaic_list').value='';show('mosaic_list');">Show input list</a>)
+  </div>
   <div id="mosaic_layout" class="mosaic_bg"></div>
   <textarea id="mosaic_code" cols="80" rows="30"></textarea>
-  <input type="button" value="Let's go!" onclick="mosaic_batch(document.getElementById('mosaic_code').value);" />
-  <input type="button" value="Stop" onclick="mosaic_stop()" />
+  <div class="controls">
+    <input type="button" value="Let's go!" onclick="mosaic_batch(document.getElementById('mosaic_code').value);" />
+    <input type="button" value="Stop" onclick="mosaic_stop()" />
+  </div>
 </div>
index d5f14d1b0cebd9184828891616d7f22563037041..bf5e34155f4b4c9868b0e831605acb25db475c70 100644 (file)
@@ -37,12 +37,13 @@ Note that the sout chain is used and sent to VLC by the input dialog
     <vlc id="if" param1="page value 'vlm' strcmp 0 =" />
       <input type="text" name="sout_mrl" id="sout_mrl" size="60" onkeypress="if( event.keyCode == 13 ) vlm_output_change();"/>
       <br/>
-      <input type="submit" value="Ok" onclick="vlm_output_change();" />
+      <input type="button" value="Ok" onclick="vlm_output_change();" />
+      <input type="button" value="Cancel" onclick="hide('sout');" />
       <input type="hidden" id="sout_dest" />
     <vlc id="else" />
       <input type="text" name="sout_mrl" id="sout_mrl" size="60" onkeypress="if( event.keyCode == 13 ) save_sout();" />
       <br/>
-      <input type="submit" value="Save" onclick="save_sout();" />
+      <input type="button" value="Save" onclick="save_sout();" />
     <vlc id="end" />
     <input type="button" value="Cancel" onclick="reset_sout();"/>
     <input type="hidden" id="sout_old_mrl" value="" /> <!-- FIXME -->
index ed135a8009501ae9b00befb0dd068127112b4b45..52e009571c0aef0bdb44f56c1eb2c9ac3b4af0a1 100644 (file)
@@ -134,6 +134,8 @@ function mosaic_add_input()
     streams[ addunderscores( value('mosaic_input_name') ) ] =
         value('mosaic_input');
 
+    mosaic_feedback( addunderscores( value('mosaic_input_name') ) + " ( " + value('mosaic_input') + " ) added to input list.", true );
+
     var mlist = document.getElementById( "mosaic_list_content" );
     while( mlist.hasChildNodes() )
         mlist.removeChild( mlist.firstChild );
@@ -146,12 +148,12 @@ function mosaic_add_input()
         minput.setAttribute( 'href', 'javascript:mosaic_elt_select(\''+name+'\');');
         minput.setAttribute( 'id', name );
         minput.setAttribute( 'value', mrl );
-        minput.setAttribute( 'title', mrl );
         
         var minputtxt = document.createTextNode( name );
 
         minput.appendChild( minputtxt );
         mlist.appendChild( minput );
+        mlist.appendChild( document.createTextNode( " ( "+mrl+" )" ) );
         mlist.appendChild( document.createElement( 'br' ) );
     }
 }
@@ -159,9 +161,13 @@ function mosaic_add_input()
 function mosaic_elt_select( id )
 {
     hide( 'mosaic_list' );
-    document.getElementById( document.getElementById( 'mosaic_list' ).value ).value = id;
-    cells[ document.getElementById( 'mosaic_list' ).value ] = id;
-    mosaic_code_update();
+    var ml = document.getElementById( 'mosaic_list' ).value;
+    if( ml )
+    {
+        document.getElementById( ml ).value = id;
+        cells[ ml ] = id;
+        mosaic_code_update();
+    }
 }
 
 function mosaic_elt_choose( id )
@@ -305,4 +311,21 @@ function mosaic_stop()
         }
     }
     mosaic_batch( cmd );
-}   
+}
+
+function mosaic_feedback( msg, ok )
+{
+    var f = document.getElementById( "mosaic_feedback" );
+    while( f.hasChildNodes() )
+        f.removeChild( f.firstChild );
+
+    f.style.fontWeight = "bold";
+    if( ok )
+        f.style.color = "#0f0";
+    else
+        f.style.color = "#f00";
+
+    var t = document.createTextNode( ( ok ? "Info: " : "Error: " ) + msg );
+    f.appendChild( t );
+
+}