@@ -33,35 +33,24 @@ $(document).ready(function() {
3333
3434 $ ( "#executeBtn" ) . attr ( 'disabled' , false ) ;
3535 $ ( "#executeBtn" ) . click ( function ( ) {
36- if ( localTesting ) {
37- renderPyCodeOutput ( $ ( "#pyInput" ) . val ( ) ) ;
38-
39- processTrace ( data_test_trace ) ;
40-
41- $ ( "#pyInputPane" ) . hide ( ) ;
42- $ ( "#pyOutputPane" ) . show ( ) ;
43- appMode = 'visualize' ;
44- }
45- else {
46- $ ( '#executeBtn' ) . html ( "Please wait ... processing your code" ) ;
47- $ ( '#executeBtn' ) . attr ( 'disabled' , true ) ;
48- $ ( "#pyOutputPane" ) . hide ( ) ;
49-
50- $ . post ( "cgi-bin/web_exec.py" ,
51- { user_script : $ ( "#pyInput" ) . val ( ) } ,
52- function ( traceData ) {
53- renderPyCodeOutput ( $ ( "#pyInput" ) . val ( ) ) ;
54- processTrace ( traceData ) ;
55-
56- $ ( "#pyInputPane" ) . hide ( ) ;
57- $ ( "#pyOutputPane" ) . show ( ) ;
58- appMode = 'visualize' ;
59-
60- $ ( '#executeBtn' ) . html ( "Visualize execution" ) ;
61- $ ( '#executeBtn' ) . attr ( 'disabled' , false ) ;
62- } ,
63- "json" ) ;
64- }
36+ $ ( '#executeBtn' ) . html ( "Please wait ... processing your code" ) ;
37+ $ ( '#executeBtn' ) . attr ( 'disabled' , true ) ;
38+ $ ( "#pyOutputPane" ) . hide ( ) ;
39+
40+ $ . post ( "cgi-bin/web_exec.py" ,
41+ { user_script : $ ( "#pyInput" ) . val ( ) } ,
42+ function ( traceData ) {
43+ renderPyCodeOutput ( $ ( "#pyInput" ) . val ( ) ) ;
44+ processTrace ( traceData ) ;
45+
46+ $ ( "#pyInputPane" ) . hide ( ) ;
47+ $ ( "#pyOutputPane" ) . show ( ) ;
48+ appMode = 'visualize' ;
49+
50+ $ ( '#executeBtn' ) . html ( "Visualize execution" ) ;
51+ $ ( '#executeBtn' ) . attr ( 'disabled' , false ) ;
52+ } ,
53+ "json" ) ;
6554 } ) ;
6655
6756
0 commit comments