File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636
3737# liveModeHeader {
3838 margin-left : 3px ;
39- margin-bottom : 12 px ;
39+ margin-bottom : 15 px ;
4040 color : # 888;
4141}
4242
Original file line number Diff line number Diff line change @@ -426,12 +426,19 @@ function experimentalPopUpSyntaxErrorSurvey() {
426426
427427
428428function initAceAndOptions ( ) {
429- if ( $ ( '#pythonVersionSelector' ) . val ( ) === 'java' ) {
429+ var v = $ ( '#pythonVersionSelector' ) . val ( ) ;
430+ if ( v === 'java' ) {
430431 $ ( "#javaOptionsPane" ) . show ( ) ;
431432 } else {
432433 $ ( "#javaOptionsPane" ) . hide ( ) ;
433434 }
434435 setAceMode ( ) ; // update syntax highlighting mode
436+
437+ if ( v === 'js' || v == '2' || v == '3' ) {
438+ $ ( "#liveModeBtn" ) . show ( ) ;
439+ } else {
440+ $ ( "#liveModeBtn" ) . hide ( ) ;
441+ }
435442}
436443
437444
@@ -701,4 +708,11 @@ $(document).ready(function() {
701708 $ ( this ) . hide ( ) ;
702709 return false ;
703710 } ) ;
711+
712+ $ ( "#liveModeBtn" ) . click ( function ( ) {
713+ var myArgs = getAppState ( ) ;
714+ var urlStr = $ . param . fragment ( 'live.html' , myArgs , 2 /* clobber all */ ) ;
715+ //window.location = urlStr; // open in same tab
716+ window . open ( urlStr ) ; // open in new tab (TODO: what about pop-up blockers?)
717+ } ) ;
704718} ) ;
Original file line number Diff line number Diff line change 162162
163163< p >
164164< button id ="executeBtn " class ="bigBtn " type ="button "> Visualize Execution</ button >
165+ < button style ="margin-left: 20px; " id ="liveModeBtn " class ="bigBtn " type ="button "> Live Programming Mode < font color ="#e93f34 "> (NEW!)</ font > </ button >
165166</ p >
166167
167168
You can’t perform that action at this time.
0 commit comments