Commit 34c5a495 authored by Antoine Cellerier's avatar Antoine Cellerier

add some help and feedback

parent beea254b
......@@ -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();"/>
......
......@@ -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>
......@@ -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 -->
......
......@@ -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 );
}
Markdown is supported
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