Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 3bec098

Browse files
committed
Merge pull request #38 from RunestoneInteractive/master
getting up to date
2 parents 636492f + 4d5db5b commit 3bec098

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

runestone/activecode/js/activecode.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,5 +1360,15 @@ $(document).ready(function() {
13601360

13611361
});
13621362

1363+
// This seems a bit hacky and possibly brittle, but its hard to know how long it will take to
1364+
// figure out the login/logout status of the user. Sometimes its immediate, and sometimes its
1365+
// long. So to be safe we'll do it both ways..
13631366
var loggedout;
13641367
$(document).bind("runestone:logout",function() { loggedout=true;})
1368+
$(document).bind("runestone:logout",function() {
1369+
for (k in edList) {
1370+
if (edList.hasOwnProperty(k)) {
1371+
edList[k].disableSaveLoad();
1372+
}
1373+
}
1374+
});

runestone/codelens/js/codelens.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@
1212
return the buttons, but I'm having a hard time thinking of any other use for that besides mine.
1313
*/
1414
function attachLoggers(codelens, divid) {
15+
rb = new RunestoneBase();
1516
codelens.domRoot.find("#jmpFirstInstr").click(function () {
16-
logBookEvent({'event': 'codelens', 'act': 'first', 'div_id': divid});
17+
rb.logBookEvent({'event': 'codelens', 'act': 'first', 'div_id': divid});
1718
});
1819
codelens.domRoot.find("#jmpLastInstr").click(function () {
19-
logBookEvent({'event': 'codelens', 'act': 'last', 'div_id': divid});
20+
rb.logBookEvent({'event': 'codelens', 'act': 'last', 'div_id': divid});
2021
});
2122
codelens.domRoot.find("#jmpStepBack").click(function () {
22-
logBookEvent({'event': 'codelens', 'act': 'back', 'div_id': divid});
23+
rb.logBookEvent({'event': 'codelens', 'act': 'back', 'div_id': divid});
2324
});
2425
codelens.domRoot.find("#jmpStepFwd").click(function () {
25-
logBookEvent({'event': 'codelens', 'act': 'fwd', 'div_id': divid});
26+
rb.logBookEvent({'event': 'codelens', 'act': 'fwd', 'div_id': divid});
2627
});
2728
codelens.domRoot.find("#executionSlider").bind('slide', function (evt, ui) {
28-
logBookEvent({'event': 'codelens', 'act': 'slide', 'div_id': divid});
29+
rb.logBookEvent({'event': 'codelens', 'act': 'slide', 'div_id': divid});
2930
});
3031

3132
}

0 commit comments

Comments
 (0)