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

Commit cc88f7f

Browse files
author
constantinol
committed
flag is now called Come Back and functions properly. still has bug, so it needs to be altered for individual questions
1 parent 8897061 commit cc88f7f

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

runestone/timed/js/timed.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export default class Timed extends RunestoneBase {
267267
this.flagContainer = document.createElement("li");
268268
this.flagButton = document.createElement("button");
269269
$(this.flagButton).addClass("class1");
270-
this.flagButton.innerHTML = "Flag";
270+
this.flagButton.innerHTML = "Come Back";
271271
$(this.flagButton).attr("aria-labelledby", "Flag");
272272
$(this.flagButton).attr("tabindex", "5");
273273
$(this.flagButton).attr("role", "button");
@@ -387,10 +387,15 @@ export default class Timed extends RunestoneBase {
387387

388388
async handleFlag(event) {
389389
var target = $(event.target).text()
390-
if (target.match(/Flag/)) {
390+
if (target.match(/Come Back/)) {
391391
$("ul#pageNums > ul > li:eq(" + this.currentQuestionIndex + ")"
392392
).addClass("flagcolor");
393-
}
393+
this.flagButton.innerHTML = "Done";
394+
} else {
395+
$("ul#pageNums > ul > li:eq(" + this.currentQuestionIndex + ")"
396+
).removeClass("flagcolor");
397+
this.flagButton.innerHTML = "Come Back";
398+
}
394399
}
395400

396401
async handleNumberedNav(event) {

0 commit comments

Comments
 (0)