From c35362158909a617a0d9c7945d7e7ea1b7261b63 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 22 Aug 2022 00:30:14 +0300 Subject: [PATCH] minor tweaking... Signed-off-by: Alex A. Naanou --- pwiki/page.js | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/pwiki/page.js b/pwiki/page.js index 9839984..986625a 100755 --- a/pwiki/page.js +++ b/pwiki/page.js @@ -1343,6 +1343,7 @@ object.Constructor('pWikiPageElement', Page, { //--------------------------------------------------------------------- // System pages/actions... +// XXX move this to a more appropriate module... var System = module.System = { @@ -1420,21 +1421,18 @@ module.System = { +''}, //*/ edit: { - text: - //'@include(PageTemplate)' - '@include(_view)' - +'@source(../path)' - +'' - // XXX for some reason this is not called... - +'' - +'
'
-						+''
-					+'
' - +'
' - +'
'}, + text: object.doc` + @include(_view) + @source(../path) + + +
+
+
`}, // XXX this does not yet work... // XXX "_test" breaks differently than "test" @@ -1559,11 +1557,17 @@ module.System = { return p.title ?? p.name }, ctime: async function(){ - return (await this.get('..').data).ctime }, + var date = (await this.get('..').data).ctime + return date ? + (new Date(date)).getTimeStamp() + : date }, mtime: async function(){ - return (await this.get('..').data).mtime }, + var date = (await this.get('..').data).mtime + return date ? + (new Date(date)).getTimeStamp() + : date }, - // XXX EXPERIMENTAL... + // XXX EXPERIMENTAL -- page types... type: async function(){ return await this.get('..').type }, isAction: async function(){ @@ -1606,7 +1610,7 @@ module.System = { // show info about the delete operation... return target.get('DeletingPage').text }, - /*/ XXX EXPERIMENTAL + /*/ XXX EXPERIMENTAL -- page management... // move page one level up... moveUp: function(){ var target = this.get('..') @@ -1653,9 +1657,6 @@ module.System = { return '' }, //*/ - // - test_path: function(){ - }, // XXX System/back // XXX System/forward