Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "task-list"]
path = task-list
url = https://github.com/OSRS-Taskman/task-list
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@ See live version - https://www.osrstaskapp.com/

## Initial Setup ###

### Initialie Submodules
`git submodule update --init`

### Install latest Python 3 version ###
`https://www.python.org/downloads/`

### Create a virtualenv ###
`python3 -m venv /path/`

### Activate virtualenv ###
### Activate virtualenv (Linux) ###
`source /path/bin/activate`

### Activate virtualenv (Windows) ###
`/path/Scripts/Activate.ps1`

### Create a sendgrind API account for free ###
https://sendgrid.com/en-us

Expand All @@ -27,9 +33,6 @@ export SENDGRID_API_KEY=192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d5472
export SECRET_KEY=192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf
```

### Clone dev branch ###
The dev branch has changes suitable for development, which includes using a local database.

### Install dependencies ###
`pip install -r requirements.txt`

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


### Release version will use a MongoDB Atlas Cluster.
### Release version will use a MongoDB Atlas Cluster.


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

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

33 changes: 16 additions & 17 deletions static/js/task.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(window).on('load', function(){
$(window).on('load', function(){
var frameSpeed = 1000,
frameContainer = $('#frame-container'),
frames = $('.frame',frameContainer ),
Expand All @@ -11,10 +11,10 @@ $(window).on('load', function(){
showFrame = function (n){
if (n != frameCount){
return frames.hide().eq(n).show() && messages.hide().eq(n).show();

}
return frames.eq(frameCount).show() && messages.eq(messageCount).show();

},
nextFrame = function(){
if (index == frameCount){
Expand Down Expand Up @@ -51,7 +51,7 @@ $(document).on('click', '#start', function(){
imageLink.href = data.link;
imageLink.setAttribute('data-tip', data.tip);
message.innerHTML = data.name;
image.src = "/static/assets/" + data.image;
image.src = data.image;
document.getElementById("start").disabled = true;
document.getElementById("complete").disabled = false;
}, 6000);
Expand Down Expand Up @@ -163,7 +163,7 @@ $(document).on('click', '#easy_complete', function(){
task.innerHTML = "You have no easy task!";
image.src = "/static/assets/Cake_of_guidance_detail.png";
imagePreview.src = "/static/assets/Cake_of_guidance_detail.png";


});
});
Expand Down Expand Up @@ -246,7 +246,7 @@ $(document).on('click', '#master_complete', function(){
type : 'POST'

});

});

$(document).ready(function(){
Expand All @@ -267,9 +267,9 @@ $(document).ready(function(){
}
var elementTarget = this;
var parent = elementTarget.parentElement;



$('form').submit(false);
req = $.ajax({
url : '/update_completed/',
Expand All @@ -288,7 +288,7 @@ $(document).ready(function(){
else {
updatePercent.innerHTML = data[tier] + '%';
}

for (const child of elementTarget.children) {
if (child.tagName === 'DIV') {
$(child).addClass('square-complete');
Expand Down Expand Up @@ -317,7 +317,7 @@ $(document).ready(function(){
}
var elementTarget = this;
var parent = elementTarget.parentElement;


$('form').submit(false);
req = $.ajax({
Expand All @@ -338,7 +338,7 @@ $(document).ready(function(){
console.log(tier)
updatePercent.innerHTML = data[tier] + '%';
}

for (const child of elementTarget.children) {
if (child.tagName === 'DIV') {
$(child).addClass('square-incomplete');
Expand Down Expand Up @@ -487,7 +487,7 @@ $(document).on('click', '.missing-easy', function(){
else {
tasks[i].style.display = 'none';
}

}
});

Expand All @@ -503,7 +503,7 @@ $(document).on('click', '.missing-medium', function(){
else {
tasks[i].style.display = 'none';
}

}
});

Expand All @@ -520,7 +520,7 @@ $(document).on('click', '.missing-hard', function(){
else {
tasks[i].style.display = 'none';
}

}
});

Expand All @@ -535,7 +535,6 @@ $(document).on('click', '.missing-elite', function(){
else {
tasks[i].style.display = 'none';
}

}
});

1 change: 1 addition & 0 deletions task-list
Submodule task-list added at 9be445
Loading