mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 18:10:09 +00:00
minor tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d13cdef574
commit
c353621589
@ -1343,6 +1343,7 @@ object.Constructor('pWikiPageElement', Page, {
|
|||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// System pages/actions...
|
// System pages/actions...
|
||||||
|
// XXX move this to a more appropriate module...
|
||||||
|
|
||||||
var System =
|
var System =
|
||||||
module.System = {
|
module.System = {
|
||||||
@ -1420,21 +1421,18 @@ module.System = {
|
|||||||
+'</macro>'},
|
+'</macro>'},
|
||||||
//*/
|
//*/
|
||||||
edit: {
|
edit: {
|
||||||
text:
|
text: object.doc`
|
||||||
//'@include(PageTemplate)'
|
@include(_view)
|
||||||
'@include(_view)'
|
<slot name="header">@source(../path)</slot>
|
||||||
+'<slot name="header">@source(../path)</slot>'
|
<slot name="content">
|
||||||
+'<slot name="content">'
|
<macro src=".." join="@source(file-separator)">
|
||||||
// XXX for some reason this is not called...
|
<pre class="editor"
|
||||||
+'<macro src=".." join="@source(file-separator)">'
|
wikiwords="no"
|
||||||
+'<pre class="editor" '
|
contenteditable
|
||||||
+'wikiwords="no" '
|
oninput="saveContent(\'@source(./path)\', this.innerText)"
|
||||||
+'contenteditable '
|
><quote filter="quote-tags" src="."/></pre>
|
||||||
+'oninput="saveContent(\'@source(./path)\', this.innerText)">'
|
</macro>
|
||||||
+'<quote filter="quote-tags" src="."/>'
|
</slot>`},
|
||||||
+'</pre>'
|
|
||||||
+'</macro>'
|
|
||||||
+'</slot>'},
|
|
||||||
|
|
||||||
// XXX this does not yet work...
|
// XXX this does not yet work...
|
||||||
// XXX "_test" breaks differently than "test"
|
// XXX "_test" breaks differently than "test"
|
||||||
@ -1559,11 +1557,17 @@ module.System = {
|
|||||||
return p.title
|
return p.title
|
||||||
?? p.name },
|
?? p.name },
|
||||||
ctime: async function(){
|
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(){
|
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(){
|
type: async function(){
|
||||||
return await this.get('..').type },
|
return await this.get('..').type },
|
||||||
isAction: async function(){
|
isAction: async function(){
|
||||||
@ -1606,7 +1610,7 @@ module.System = {
|
|||||||
// show info about the delete operation...
|
// show info about the delete operation...
|
||||||
return target.get('DeletingPage').text },
|
return target.get('DeletingPage').text },
|
||||||
|
|
||||||
/*/ XXX EXPERIMENTAL
|
/*/ XXX EXPERIMENTAL -- page management...
|
||||||
// move page one level up...
|
// move page one level up...
|
||||||
moveUp: function(){
|
moveUp: function(){
|
||||||
var target = this.get('..')
|
var target = this.get('..')
|
||||||
@ -1653,9 +1657,6 @@ module.System = {
|
|||||||
return '' },
|
return '' },
|
||||||
//*/
|
//*/
|
||||||
|
|
||||||
//
|
|
||||||
test_path: function(){
|
|
||||||
},
|
|
||||||
|
|
||||||
// XXX System/back
|
// XXX System/back
|
||||||
// XXX System/forward
|
// XXX System/forward
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user