Changeset 14449 for misc/runpugs/data

Show
Ignore:
Timestamp:
10/22/06 01:37:16 (2 years ago)
Author:
andara
Message:

[runpugs]
-new UI with more terminal-like behaviour ("runpugs2")
-plumbing to support non-interactive scripts

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • misc/runpugs/data/runpugs2.html

    r14430 r14449  
    2222return true; 
    2323} 
     24 
     25function select_enter() 
     26{ 
     27document.terminal.cmdline.value=document.terminal.hist.options[document.terminal.hist.selectedIndex].value; 
     28document.terminal.hist.selectedIndex=0; 
     29document.terminal.cmdline.focus(); 
     30} 
     31 
     32function select_enter_OFF(myfield,e) 
     33{ 
     34var keycode; 
     35if (window.event) keycode = window.event.keyCode; 
     36else if (e) keycode = e.which; 
     37else return true; 
     38if (keycode == 13) 
     39{ 
     40//document.terminal.submit(); 
     41document.terminal.cmdline.value=document.terminal.hist.options[document.terminal.hist.selectedIndex].value; 
     42return false; 
     43} 
     44else 
     45return true; 
     46} 
    2447</script> 
    2548</head> 
     
    3255href="http://feather.perl6.nl/~andara/runpugs/">info page</a>. 
    3356</p> 
    34 <form style="text-align: center" id="term" name="terminal" 
     57<form style="text-align: left" id="term" name="terminal" 
    3558action="/cgi-bin/runpugs2" method="POST">                   
    3659                                
    3760<input type="hidden" name="testing" value="_TESTING_"> 
     61<input type="hidden" name="prompt" value="_PROMPTW_"> 
    3862<input type="hidden" name="sessionid" value=""> 
    3963<input type="hidden"    name="action" value="runpugs"> 
    40 <!--<textarea id="history" name="history"  rows="1" cols="1" 
    41 style="overflow: hidden; border: 0px; width: 0px; 
    42 font-size:0px">_CMD_</textarea>--> 
    43 <label for="cmd">Interactive Pugs Session<br> 
     64<!--<label for="cmd">Interactive Pugs Session<br>--> 
     65<h2>Interactive Pugs Session</h2> 
     66<div id="termwindow"> 
     67<select name="history" id="hist" onChange="select_enter()"><!--onKeyPress="return 
     68select_enter(this,event)">--> 
     69<option value="">--- Recent commands ---</option> 
    4470_HIST_ 
    45 <textarea id="cmd" name="cmd" rows="24" cols="80" wrap="virtual" onKeyPress="return submitenter(this,event)"> 
    46 pugs&gt;&nbsp; 
     71</select> 
     72<br> 
     73<!-- 
     74<span class="prompt"> 
     75_PROMPTW_ 
     76</span> 
     77<span class="termfont"> 
     78_CMDW_ 
     79</span> 
     80<br> 
     81--> 
     82<textarea readonly id="output" name="output" rows="_NROWS_" cols="80" wrap="virtual"> 
     83_REPLYW_ 
    4784</textarea> 
     85<br> 
     86<label for="cmdline"><span class="prompt"> 
     87_NPROMPTW_ 
     88</span> 
     89<input type="text" size="74" id="cmdline" name="cmdline" value="" 
     90onKeyPress="return submitenter(this,event)"> 
    4891</label> 
     92</div> 
    4993<br> 
    5094<input id="enter" type="submit" value="Submit">&nbsp;&nbsp;&nbsp; 
     
    5296<script language="JavaScript"> 
    5397document.terminal.enter.style.display='none'; 
    54 document.terminal.cmd.focus() 
     98document.terminal.cmdline.focus() 
     99document.terminal.output.scrollTop =document.terminal.output.scrollHeight; 
     100if (document.terminal.output.rows==1) { 
     101//document.terminal.output.style.height="2ex"; 
     102} 
    55103</script> 
    56104<p class="copyright">&copy; Copyright 2006 by Wim Vanderbauwhede</p>