diff options
| author | Martin Ridgers <[email protected]> | 2024-09-19 10:43:36 +0200 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2024-09-24 10:57:34 +0200 |
| commit | c50994fdd64fb752cb949172c1693401762c0399 (patch) | |
| tree | 109a7d7675a62e1a33d3dcd5e766ac0a15c13881 /src | |
| parent | add_section() is provided by Page base (diff) | |
| download | zen-c50994fdd64fb752cb949172c1693401762c0399.tar.xz zen-c50994fdd64fb752cb949172c1693401762c0399.zip | |
Added a Page.set_title() to replace free zen_title()
Diffstat (limited to 'src')
| -rw-r--r-- | src/zenserver/frontend/html/zen.js | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/zenserver/frontend/html/zen.js b/src/zenserver/frontend/html/zen.js index 3d2241f4c..e9bf97447 100644 --- a/src/zenserver/frontend/html/zen.js +++ b/src/zenserver/frontend/html/zen.js @@ -239,12 +239,6 @@ async function zen_fetch(resource, method="GET") } //////////////////////////////////////////////////////////////////////////////// -function zen_title(name) -{ - document.title = "zen - " + name; -} - -//////////////////////////////////////////////////////////////////////////////// function zen_flatten(object, ret=null, prefix="") { if (ret == null) @@ -277,6 +271,11 @@ class Page this._sectormatron = new Sectormatron(parent); } + set_title(name) + { + document.title = "zen - " + name; + } + get_param(name, fallback=undefined) { var ret = this._params.get(name); @@ -296,7 +295,7 @@ class Entry extends Page { async main() { - zen_title("oplog entry"); + this.set_title("oplog entry"); const project = this.get_param("project"); const oplog = this.get_param("oplog"); @@ -325,7 +324,7 @@ class Oplog extends Page async main() { - zen_title("oplog"); + this.set_title("oplog"); const project = this.get_param("project"); const oplog = this.get_param("oplog"); @@ -390,7 +389,7 @@ class Project extends Page { async main() { - zen_title("project"); + this.set_title("project"); // info var section = this.add_section("info"); @@ -489,7 +488,7 @@ class Start extends Page { async main() { - zen_title("main"); + this.set_title("main"); var section = this.add_section("projects"); |