diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-01-13 22:50:51 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-01-13 22:50:51 +0100 |
commit | 641278c624a3a0c06856656255f648f2cf4f6a92 (patch) | |
tree | 49c47c4c61dd0704e89cfd75681bc16f171e7ad5 /static | |
parent | Add debug buttons in popup for dumping xcal and jcal. (diff) | |
parent | Document (vcompenent control). (diff) | |
download | calp-641278c624a3a0c06856656255f648f2cf4f6a92.tar.gz calp-641278c624a3a0c06856656255f648f2cf4f6a92.tar.xz |
Merge branch 'doc' into jcal
Diffstat (limited to '')
-rw-r--r-- | static/clock.js | 6 | ||||
-rw-r--r-- | static/input_list.js | 4 | ||||
-rw-r--r-- | static/script.js | 7 |
3 files changed, 10 insertions, 7 deletions
diff --git a/static/clock.js b/static/clock.js index 40382faa..b7777a08 100644 --- a/static/clock.js +++ b/static/clock.js @@ -16,14 +16,14 @@ class Timebar extends Clock { update(now) { - if (! (this.start_time <= now.getTime() && now.getTime() < this.end_time)) - return; + // if (! (this.start_time <= now.getTime() && now.getTime() < this.end_time)) + // return; var event_area = document.getElementById(now.format("~Y-~m-~d")) if (event_area) { if (this.bar_object) { - this.bar_object.parentNode.removeChild(bar_object) + this.bar_object.parentNode.removeChild(this.bar_object) } else { this.bar_object = makeElement ('div', { id: 'bar', diff --git a/static/input_list.js b/static/input_list.js index 4430154a..a7a446f3 100644 --- a/static/input_list.js +++ b/static/input_list.js @@ -9,6 +9,7 @@ */ +/* private */ function transferListeners(old_unit, new_unit) { for (let [o, n] of zip([old_unit, ...old_unit.querySelectorAll("*")], [new_unit, ...new_unit.querySelectorAll("*")])) { @@ -22,6 +23,7 @@ function transferListeners(old_unit, new_unit) { } +/* private */ function advance_final(input_list) { let old_unit = input_list.unit; let new_unit = old_unit.cloneNode(true); @@ -31,7 +33,7 @@ function advance_final(input_list) { } - +/* private */ function update_inline_list () { /* can target self */ diff --git a/static/script.js b/static/script.js index 596caf6d..6b7ddcd9 100644 --- a/static/script.js +++ b/static/script.js @@ -228,8 +228,8 @@ function place_in_edit_mode (event) { } window.onload = function () { - let start_time = document.querySelector("meta[name='start-time']").content; - let end_time = document.querySelector("meta[name='end-time']").content; + // let start_time = document.querySelector("meta[name='start-time']").content; + // let end_time = document.querySelector("meta[name='end-time']").content; const button_updater = new ButtonUpdater( document.getElementById("today-button"), @@ -239,9 +239,10 @@ window.onload = function () { const sch = new SmallcalCellHighlight( document.querySelector('.small-calendar')) - const timebar = new Timebar(start_time, end_time); + const timebar = new Timebar(/*start_time, end_time*/); timebar.update(new Date); + sch.update(new Date); window.setInterval(() => { let d = new Date; timebar.update(d); |