Skip to content

Commit c88ec96

Browse files
committed
blaub
1 parent a337ad9 commit c88ec96

2 files changed

Lines changed: 7 additions & 18 deletions

File tree

‎v3/js/opt-office-mix.js‎

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ var _lastSavedAppState = undefined; // nasty global
4949

5050

5151
function executeCode(forceStartingInstr, forceRawInputLst) {
52-
$('#loadingPane').html('Executing code ... takes up to 10 seconds.').show();
53-
5452
if (forceRawInputLst !== undefined) {
5553
rawInputLst = forceRawInputLst; // UGLY global across modules, FIXME
5654
}
@@ -103,9 +101,9 @@ function executeCode(forceStartingInstr, forceRawInputLst) {
103101

104102
function officeMixFinishSuccessfulExecution() {
105103
updateAppDisplayForMix('display'); // do this first
106-
$('#loadingPane').hide();
107104

108-
$("#vizBtn").hide();
105+
$("#executeBtn").attr('disabled', false);
106+
$("#executeBtn").hide();
109107

110108
if (_savedCurInstr !== undefined) {
111109
myVisualizer.renderStep(_savedCurInstr);
@@ -145,16 +143,6 @@ function getConfigurationFromData(dat) {
145143
}
146144

147145

148-
// override setFronendError in opt-frontend-common.js
149-
// NB: this file must be included AFTER opt-frontend-common.js
150-
function setFronendError(lines) {
151-
var errorStr = lines.map(htmlspecialchars).join('<br/>');
152-
$('#loadingPane').html(errorStr).show();
153-
//$("#frontendErrorOutput").html(errorStr);
154-
//$("#frontendErrorOutput").show();
155-
}
156-
157-
158146
// a wrapper for getAppState() that caches the value of the current
159147
// execution trace if we're in display mode
160148
function getAppStateWithTraceCache() {
@@ -175,7 +163,8 @@ function getAppStateWithTraceCache() {
175163

176164
function enterOPTEditCodeMode() {
177165
updateAppDisplayForMix('edit');
178-
$("#vizBtn").html("Visualize Execution").show();
166+
$("#executeBtn").html("Visualize Execution").show();
167+
$("#executeBtn").attr('disabled', false);
179168

180169
// https://groups.google.com/forum/#!msg/ace-discuss/TQHqey_NkBg/q9x_tLrvsXoJ
181170
pyInputAceEditor.resize(); // weird hack that's necessary to refresh the editor's latest text values. #weird
@@ -374,7 +363,7 @@ function mixLazyExecuteCode() {
374363
officeMixFinishSuccessfulExecution();
375364
} else {
376365
// cache miss
377-
executeCodeFromScratch(); // ends with officeMixFinishSuccessfulExecution
366+
executeCodeFromScratch(); // ends with officeMixFinishSuccessfulExecution or handleUncaughtExceptionFunc
378367
}
379368
}
380369

@@ -390,7 +379,7 @@ $(document).ready(function() {
390379

391380
$('#pythonVersionSelector').change(setAceMode);
392381

393-
$("#vizBtn").click(function() {
382+
$("#executeBtn").click(function() {
394383
mixLazyExecuteCode();
395384
});
396385

‎v3/opt-office-mix.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
<div id="footer">
112112

113113
<p>
114-
<button id="vizBtn" class="bigBtn">???</button>
114+
<button id="executeBtn" class="bigBtn">???</button>
115115
</p>
116116

117117
<p>

0 commit comments

Comments
 (0)