Skip to content

Commit 1d01624

Browse files
committed
update to use new unified task list structure
1 parent 0306554 commit 1d01624

9 files changed

Lines changed: 262 additions & 393 deletions

File tree

static/js/task.js

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(window).on('load', function(){
1+
$(window).on('load', function(){
22
var frameSpeed = 1000,
33
frameContainer = $('#frame-container'),
44
frames = $('.frame',frameContainer ),
@@ -11,10 +11,10 @@ $(window).on('load', function(){
1111
showFrame = function (n){
1212
if (n != frameCount){
1313
return frames.hide().eq(n).show() && messages.hide().eq(n).show();
14-
14+
1515
}
1616
return frames.eq(frameCount).show() && messages.eq(messageCount).show();
17-
17+
1818
},
1919
nextFrame = function(){
2020
if (index == frameCount){
@@ -51,7 +51,7 @@ $(document).on('click', '#start', function(){
5151
imageLink.href = data.link;
5252
imageLink.setAttribute('data-tip', data.tip);
5353
message.innerHTML = data.name;
54-
image.src = "/static/assets/" + data.image;
54+
image.src = data.image;
5555
document.getElementById("start").disabled = true;
5656
document.getElementById("complete").disabled = false;
5757
}, 6000);
@@ -163,7 +163,7 @@ $(document).on('click', '#easy_complete', function(){
163163
task.innerHTML = "You have no easy task!";
164164
image.src = "/static/assets/Cake_of_guidance_detail.png";
165165
imagePreview.src = "/static/assets/Cake_of_guidance_detail.png";
166-
166+
167167

168168
});
169169
});
@@ -246,7 +246,7 @@ $(document).on('click', '#master_complete', function(){
246246
type : 'POST'
247247

248248
});
249-
249+
250250
});
251251

252252
$(document).ready(function(){
@@ -267,9 +267,9 @@ $(document).ready(function(){
267267
}
268268
var elementTarget = this;
269269
var parent = elementTarget.parentElement;
270-
271-
272-
270+
271+
272+
273273
$('form').submit(false);
274274
req = $.ajax({
275275
url : '/update_completed/',
@@ -288,7 +288,7 @@ $(document).ready(function(){
288288
else {
289289
updatePercent.innerHTML = data[tier] + '%';
290290
}
291-
291+
292292
for (const child of elementTarget.children) {
293293
if (child.tagName === 'DIV') {
294294
$(child).addClass('square-complete');
@@ -317,7 +317,7 @@ $(document).ready(function(){
317317
}
318318
var elementTarget = this;
319319
var parent = elementTarget.parentElement;
320-
320+
321321

322322
$('form').submit(false);
323323
req = $.ajax({
@@ -338,7 +338,7 @@ $(document).ready(function(){
338338
console.log(tier)
339339
updatePercent.innerHTML = data[tier] + '%';
340340
}
341-
341+
342342
for (const child of elementTarget.children) {
343343
if (child.tagName === 'DIV') {
344344
$(child).addClass('square-incomplete');
@@ -487,7 +487,7 @@ $(document).on('click', '.missing-easy', function(){
487487
else {
488488
tasks[i].style.display = 'none';
489489
}
490-
490+
491491
}
492492
});
493493

@@ -503,7 +503,7 @@ $(document).on('click', '.missing-medium', function(){
503503
else {
504504
tasks[i].style.display = 'none';
505505
}
506-
506+
507507
}
508508
});
509509

@@ -520,7 +520,7 @@ $(document).on('click', '.missing-hard', function(){
520520
else {
521521
tasks[i].style.display = 'none';
522522
}
523-
523+
524524
}
525525
});
526526

@@ -535,7 +535,6 @@ $(document).on('click', '.missing-elite', function(){
535535
else {
536536
tasks[i].style.display = 'none';
537537
}
538-
538+
539539
}
540540
});
541-

0 commit comments

Comments
 (0)