aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2014-11-30 09:25:47 +0100
committerMatěj Cepl <mcepl@redhat.com>2014-11-30 09:43:10 +0100
commita549540ed004f792b972713c478d882a1052e6e0 (patch)
tree05dcc9d3d7f83ef61c778044f2dff216a0e62cfd
parent5d1b9b66cb068123f51d5a9122fcb1c961ae9a01 (diff)
downloadhesla-a549540ed004f792b972713c478d882a1052e6e0.tar.gz
add toISODateString interface
-rw-r--r--hesla.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/hesla.ts b/hesla.ts
index 30acf43..6c7dd96 100644
--- a/hesla.ts
+++ b/hesla.ts
@@ -94,12 +94,8 @@ export class Hesla extends ap.ActivePage {
* Displays the Losungen for the given date (or today if not defined)
*/
display(date:any = this.cur_watchword) {
- // if (this.cur_section !== null) {
- // document.getElementById(this.cur_section.toISODateString()).style.display = 'none';
- // }
console.log("cur_section = " + this.cur_section);
- // document.getElementById(this.cur_section.toISODateString()).style.display = 'block';
document.getElementById(this.cur_section.toISODateString()).classList.add("visible");
}
@@ -107,7 +103,7 @@ export class Hesla extends ap.ActivePage {
* Hides the current Losungen
*/
hide() {
- document.getElementById(this.cur_watchword).classList.remove('visible');
+ document.getElementById(this.cur_watchword.toISODateString()).classList.remove('visible');
}
shiftDate(shift: number) {
@@ -139,7 +135,8 @@ export class Hesla extends ap.ActivePage {
old_basename = window.location.pathname.split("/").slice(-1)[0];
console.log('old_basename = ' + old_basename);
- if (localStorage.language && (localStorage.language === "de")) {
+ if (localStorage.getItem("language") &&
+ (localStorage.getItem("language") === "de")) {
new_basename = "index_de.html";
}