@@ -91,7 +91,7 @@ function officeMixFinishSuccessfulExecution() {
9191 $ ( '#pyOutputPane #editCodeLinkDiv' ) . hide ( ) ; // don't have explicit "Edit code" link
9292 $ ( '#loadingPane' ) . hide ( ) ;
9393
94- $ ( "#toggleModebtn" ) . html ( "Edit" ) ;
94+ $ ( "#toggleModebtn" ) . html ( "Edit code " ) ;
9595}
9696
9797
@@ -145,12 +145,13 @@ function officeMixEnterViewMode(firstTime) {
145145 pyInputSetValue ( savedAppState . code ) ;
146146 }
147147 }
148-
149- executeCodeFromScratch ( ) ;
150148 }
151149 } ) ;
152150
153- $ ( "#footer" ) . hide ( ) ;
151+ executeCodeFromScratch ( ) ; // unconditionally execute since it's more reliable
152+
153+ // on second thought, don't hide this
154+ //$("#toggleModebtn").hide();
154155}
155156
156157function officeMixEnterEditMode ( firstTime ) {
@@ -186,9 +187,8 @@ function officeMixEnterEditMode(firstTime) {
186187 }
187188 } ) ;
188189
189- $ ( "#toggleModebtn" ) . html ( "Preview" ) ;
190+ $ ( "#toggleModebtn" ) . html ( "Visualize code" ) . show ( ) ;
190191 enterEditMode ( ) ;
191- $ ( "#footer" ) . show ( ) ;
192192}
193193
194194function saveCurrentConfiguration ( ) {
@@ -206,7 +206,7 @@ $(document).ready(function() {
206206 if ( appMode == 'edit' ) {
207207 executeCodeFromScratch ( ) ;
208208 } else {
209- $ ( "#toggleModebtn" ) . html ( "Preview " ) ;
209+ $ ( "#toggleModebtn" ) . html ( "Visualize code " ) ;
210210 enterEditMode ( ) ;
211211 }
212212 } ) ;
@@ -299,4 +299,6 @@ $(document).ready(function() {
299299 Labs . on ( Labs . Core . EventTypes . Deactivate , function ( ) {
300300 } ) ;
301301 } ) ;
302+
303+ pyInputSetValue ( 'x = "world"\nprint("hello " + x)' )
302304} ) ;
0 commit comments