Skip to content

Commit d3a2a46

Browse files
authored
Merge pull request #55 from rmobis/master
use unified task list
2 parents 54bc2fc + 0effd4f commit d3a2a46

24 files changed

Lines changed: 346 additions & 74609 deletions

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "task-list"]
2+
path = task-list
3+
url = https://github.com/OSRS-Taskman/task-list

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,21 @@ See live version - https://www.osrstaskapp.com/
66

77
## Initial Setup ###
88

9+
### Initialie Submodules
10+
`git submodule update --init`
11+
912
### Install latest Python 3 version ###
1013
`https://www.python.org/downloads/`
1114

1215
### Create a virtualenv ###
1316
`python3 -m venv /path/`
1417

15-
### Activate virtualenv ###
18+
### Activate virtualenv (Linux) ###
1619
`source /path/bin/activate`
1720

21+
### Activate virtualenv (Windows) ###
22+
`/path/Scripts/Activate.ps1`
23+
1824
### Create a sendgrind API account for free ###
1925
https://sendgrid.com/en-us
2026

@@ -27,9 +33,6 @@ export SENDGRID_API_KEY=192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d5472
2733
export SECRET_KEY=192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf
2834
```
2935

30-
### Clone dev branch ###
31-
The dev branch has changes suitable for development, which includes using a local database.
32-
3336
### Install dependencies ###
3437
`pip install -r requirements.txt`
3538

@@ -41,7 +44,7 @@ Alternatively, if you use Docker, you can run a Mongo DB instance using `docker
4144
In mongoDB Compass or CLI, connect to `mongodb://localhost:27017/`
4245

4346

44-
### Release version will use a MongoDB Atlas Cluster.
47+
### Release version will use a MongoDB Atlas Cluster.
4548

4649

4750
### Test it ###
@@ -51,4 +54,3 @@ Run `python taskapp.py`
5154
or `source dev.sh && python taskapp.py`
5255

5356
Open `http://127.0.0.1:5000/` on a browser to open the app
54-

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-

task-list

Submodule task-list added at 9be4451

0 commit comments

Comments
 (0)