summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activePage.es16
-rw-r--r--zalmy.appcache2
-rw-r--r--zalmy.es8
3 files changed, 18 insertions, 8 deletions
diff --git a/activePage.es b/activePage.es
index d93ad4f..09f5ef0 100644
--- a/activePage.es
+++ b/activePage.es
@@ -107,7 +107,23 @@ export class ActivePage {
this.display();
}
+ /**
+ * Display current item
+ *
+ * @param new_date String with ISO formatted date (optional)
+ * or Number with the relative distance of the day from the date
+ * currently displayed.
+ *
+ * Displays the Losungen for the given date (or today if not defined)
+ */
display() {
+ // first scroll then switch to avoid blinking of the page
+ window.scroll(0, 0);
+
+ var visibleElems = document.getElementsByClassName("visible");
+ Array.prototype.forEach.call(visibleElems, function(e) {
+ e.classList.remove("visible");
+ });
}
/**
diff --git a/zalmy.appcache b/zalmy.appcache
index d2a3b96..ffc5cb8 100644
--- a/zalmy.appcache
+++ b/zalmy.appcache
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# v27 - 2015-09-12
+# v28 - 2015-09-23
index.html
activePage.js
activePage.js.map
diff --git a/zalmy.es b/zalmy.es
index aa433c1..a40a0c2 100644
--- a/zalmy.es
+++ b/zalmy.es
@@ -55,15 +55,9 @@ export class Psalm extends ActivePage
* Displays the particular Psalm
*/
display() {
- // first scroll then switch to avoid blinking of the page
- window.scroll(0, 0);
+ super.display();
- var visibleElems = document.getElementsByClassName("visible");
- Array.prototype.forEach.call(visibleElems, function(e) {
- e.classList.remove("visible");
- });
console.log("cur_psalm = " + this.cur_psalm);
-
let psalm_id = `Ps.${this.cur_psalm}`;
console.log(`psalm_id = ${psalm_id}`);
document.getElementById(psalm_id).parentElement.