Changeset 17884 for misc/runpugs
- Timestamp:
- 09/17/07 17:44:19 (14 months ago)
- Location:
- misc/runpugs/htdocs
- Files:
-
- 3 modified
-
runpugs.css (modified) (4 diffs)
-
runpugs/index.html (modified) (3 diffs)
-
runpugs/runpugs.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
misc/runpugs/htdocs/runpugs.css
r17872 r17884 1 1 body { 2 font:1 4px arial,helvetica,clean,sans-serif;2 font:13px arial,helvetica,clean,sans-serif; 3 3 width:100%; 4 4 margin-left:10%;margin-right:10%; margin-top: 0px; … … 104 104 .cc { 105 105 font-family: 'Courier New', Monaco, Courier, monospace; 106 font-size: 1 4px;106 font-size: 13px; 107 107 color: white; 108 108 background-color: black; 109 padding: 5px; 110 width:100%; 109 padding: 0px; 110 margin: 0px; 111 width: 100%; 111 112 line-height:normal; 112 113 height:24em; 113 114 overflow: auto; 114 border: 1px solid white;115 /*border: 1px solid white;*/ 115 116 } 116 117 pre { … … 154 155 span.cursorOn { 155 156 font-family: 'Courier New', Monaco, Courier, monospace; 156 font-size: 1 4px;157 font-size: 13px; 157 158 display:inline; 158 159 background: white; … … 170 171 span.cursorOff { 171 172 font-family: 'Courier New', Monaco, Courier, monospace; 172 font-size: 1 4px;173 font-size: 13px; 173 174 display:inline; 174 175 background: black; -
misc/runpugs/htdocs/runpugs/index.html
r17872 r17884 39 39 </div> 40 40 <div id='status'></div> 41 <div class='note' style='padding: 5px '>42 <p>This live web terminal runs the <a href="http://www.pugscode.org/">Pugs</a>41 <div class='note' style='padding: 5px;'> 42 This live web terminal runs the <a href="http://www.pugscode.org/">Pugs</a> 43 43 interpreter for <a href="http://dev.perl.org/perl6/">Perl 6</a>. 44 44 This is the development version, featuring asynchronous jQuery AJAX, 45 mod_perl and preloaded pugs sessions. </p>45 mod_perl and preloaded pugs sessions. 46 46 <h2>Instructions</h2> 47 < p><code>runpugs</code> presents the pugs interactive shell. <code>runpugs</code>-specific commands:</p>47 <code>runpugs</code> presents the pugs interactive shell. <code>runpugs</code>-specific commands: 48 48 <dl> 49 49 <dt><code>help</code></dt><dd> displays the Pugs shell help (same as … … 58 58 </p> 59 59 <h2>Restrictions</h2> 60 <p>Because this is a web terminal, a number of restrictions apply. 61 Please <a href="http://feather.perl6.nl/%7Eandara/runpugs/">read the documentation</a> for more information.</p> 62 <p class="copyright"> 63 © Copyright 2006 by Wim.Vanderbauwhede. Contact me @ gmail.com<br/> 64 Enhanced web terminal by Ahmad.Zawawi. Contact me @ gmail.com 65 </p> 60 Because this is a web terminal, a number of restrictions apply. 61 Please <a href="http://feather.perl6.nl/%7Eandara/runpugs/">read the documentation</a> for more information. 62 <br/> 66 63 </div> 67 64 </form> 68 65 </div> 69 <iframe src="/perl/runpugs.pl" id="scratch" name="scratch" style="visibility:hidden" 70 width="700px" height="1px" onLoad="getreply()"></iframe> 66 <span class="copyright">© Copyright 2006 by Wim.Vanderbauwhede. Contact me @ gmail.com<br/> 67 Enhanced web terminal by Ahmad.Zawawi. Contact me @ gmail.com 68 </span> 71 69 <hr/> 72 70 <a href="http://validator.w3.org/check?uri=referer"> … … 74 72 alt="Valid XHTML 1.0!" height="31" width="88" border="0" /> 75 73 </a> 74 <iframe src="/perl/runpugs.pl" id="scratch" name="scratch" style="visibility:hidden" 75 width="700px" height="1px" onLoad="getreply()"></iframe> 76 76 </body> 77 77 </html> -
misc/runpugs/htdocs/runpugs/runpugs.js
r17872 r17884 122 122 if(keyCode == 13) { 123 123 //enter 124 var sessCmds=document.terminal.cmd.value + "\n" + prompt +cmd;125 var tmpCmds=sessCmds.split( 'pugs> ');124 var sessCmds=document.terminal.cmd.value + cmd; 125 var tmpCmds=sessCmds.split(prompt); 126 126 var tmpCmd=tmpCmds[tmpCmds.length-1]; 127 127 if($.trim(tmpCmd) != "") { … … 247 247 sessionid=scratchpad.terminal.sessionid.value; 248 248 document.terminal.cmd.value=reply; 249 250 cmds = reply.replace(/ /g,' ').split(/\r\n|\n|\r/g); 249 250 if(scratchpad.terminal.prompt) { 251 //safely assign prompt... 252 var val = scratchpad.terminal.prompt.value; 253 if(val && val.length == 'pugs> '.length) { 254 prompt = val; 255 } 256 } 257 258 //escape html from whitespace and html entities 259 //and then split lines 260 cmds = 261 reply.replace(/&/g,'&') 262 .replace(/ /g,' ') 263 .replace(/</g,'<') 264 .replace(/>/g,'>') 265 .replace(/"/g,'"') 266 .split(/\r\n|\n|\r/g); 251 267 updateConsole(); 252 268 cmd = ""; 253 269 curpos=0; 254 moveCursor();270 //moveCursor(); 255 271 showCmd(); 256 272 }
