-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented Options page. Events can now be edited or deleted.
- Loading branch information
1 parent
6f1619d
commit 2bcf35b
Showing
11 changed files
with
2,791 additions
and
38 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
function masterFn() { | ||
var capp = new countApp(); | ||
restoreCountdowns(document.getElementById('timers'), 0); | ||
document.getElementById('add-button').addEventListener('click', saveEvent); | ||
} | ||
|
||
capp.restoreCountdowns(document.getElementById('timers'), 0); | ||
document.getElementById('add-button').addEventListener('click', capp.saveEvents); | ||
function buttonEventAdder() { | ||
var editButtons = document.getElementsByClassName('edit-ev'); | ||
var deleteButtons = document.getElementsByClassName('delete-ev'); | ||
|
||
for(var i=0; i < editButtons.length; i++) { | ||
editButtons[i].addEventListener('click', editEvent); | ||
|
||
// Always will be same number of delete & edit buttons | ||
deleteButtons[i].addEventListener('click', deleteEvent); | ||
} | ||
} | ||
|
||
// waits until initial document without stylesheet and other resources is load | ||
var fnList = [buttonEventAdder]; | ||
|
||
// Checks if document is fully loaded every 0.5 second | ||
setInterval(function() { | ||
if (document.readyState == "complete") { | ||
for(var i = 0; i < fnList.length; i++) { | ||
fnList[i](); | ||
} | ||
} | ||
}, 500); | ||
|
||
// waits until initial document with stylesheet and other resources is loaded | ||
document.addEventListener('DOMContentLoaded', masterFn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
function masterFn() { | ||
var capp = new countApp(); | ||
|
||
capp.restoreCountdowns(document.body, 1); | ||
restoreCountdowns(document.body, 1); | ||
} | ||
|
||
// waits until initial document without stylesheet and other resources is load | ||
document.addEventListener('DOMContentLoaded', masterFn); |