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

Commit c2c8b3f

Browse files
committed
Handle disabling buttons on logout event when we are waiting for an ajax response.
1 parent 07202a4 commit c2c8b3f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
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+
});

0 commit comments

Comments
 (0)