mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-17 16:41:39 +00:00
found a potential special case....
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d4448fdf3e
commit
c4b77f231f
@ -178,6 +178,11 @@ object.Constructor('BasePage', {
|
|||||||
args == '' ?
|
args == '' ?
|
||||||
'.'
|
'.'
|
||||||
: '.:'+ args },
|
: '.:'+ args },
|
||||||
|
// helper...
|
||||||
|
get argstr(){
|
||||||
|
return pwpath.obj2args(this.args) },
|
||||||
|
set argstr(value){
|
||||||
|
this.args = value },
|
||||||
|
|
||||||
// NOTE: these are mostly here as helpers to be accessed via page
|
// NOTE: these are mostly here as helpers to be accessed via page
|
||||||
// actions...
|
// actions...
|
||||||
@ -1449,12 +1454,15 @@ object.Constructor('Page', BasePage, {
|
|||||||
console.warn('UNKNOWN RENDER TEMPLATE: '+ tpl_name)
|
console.warn('UNKNOWN RENDER TEMPLATE: '+ tpl_name)
|
||||||
return this.get(this.NOT_FOUND_TEMPLATE_ERROR).parse() }
|
return this.get(this.NOT_FOUND_TEMPLATE_ERROR).parse() }
|
||||||
|
|
||||||
// render template in context of page...
|
|
||||||
var depends = this.depends = new Set([tpl])
|
var depends = this.depends = new Set([tpl])
|
||||||
var state = {depends}
|
|
||||||
// do the parse...
|
// do the parse...
|
||||||
|
// NOTE: we render the template in context of page...
|
||||||
return this
|
return this
|
||||||
.parse(this.get('/'+tpl).raw, state) }).call(this) },
|
.parse(
|
||||||
|
this.get(
|
||||||
|
'/'+tpl,
|
||||||
|
{args: this.args}).raw,
|
||||||
|
{depends}) }).call(this) },
|
||||||
set text(value){
|
set text(value){
|
||||||
this.__update__({text: value}) },
|
this.__update__({text: value}) },
|
||||||
//this.onTextUpdate(value) },
|
//this.onTextUpdate(value) },
|
||||||
@ -1735,11 +1743,16 @@ module.System = {
|
|||||||
text: '@include(.:$ARGS isolated join="@source(file-separator)")' },
|
text: '@include(.:$ARGS isolated join="@source(file-separator)")' },
|
||||||
// XXX /rootpath here is not relative -- makes reuse harder...
|
// XXX /rootpath here is not relative -- makes reuse harder...
|
||||||
_view: {
|
_view: {
|
||||||
|
// XXX can we avoid explicitly passing args to ./location ????
|
||||||
|
// i.e.:
|
||||||
|
// <a href="#@source(./location)">@source(./path)</a>
|
||||||
|
// instead of (current):
|
||||||
|
// <a href="#@source(./location:$ARGS)">@source(./path)</a>
|
||||||
text: object.doc`
|
text: object.doc`
|
||||||
<slot name="header">
|
<slot name="header">
|
||||||
<a href="#/list">☰</a>
|
<a href="#/list">☰</a>
|
||||||
@source(./path/!)
|
<a href="#@source(./location)">@source(./path)</a>
|
||||||
<a href="#@source(./path/!)/_edit">✎</a>
|
<a href="#@source(./path)/_edit">✎</a>
|
||||||
</slot>
|
</slot>
|
||||||
<hr>
|
<hr>
|
||||||
<slot name="content"></slot>
|
<slot name="content"></slot>
|
||||||
@ -1816,6 +1829,7 @@ module.System = {
|
|||||||
|
|
||||||
// XXX debug...
|
// XXX debug...
|
||||||
_path: {text: '@source(./path join=" ")'},
|
_path: {text: '@source(./path join=" ")'},
|
||||||
|
_location: {text: '@source(./location join=" ")'},
|
||||||
|
|
||||||
|
|
||||||
list: {
|
list: {
|
||||||
|
|||||||
@ -220,7 +220,7 @@ require(['./browser'], function(browser){
|
|||||||
// separates the navigate and load events...
|
// separates the navigate and load events...
|
||||||
logTime(
|
logTime(
|
||||||
this.refresh(),
|
this.refresh(),
|
||||||
this.path) })
|
this.location) })
|
||||||
.onLoad(function(evt){
|
.onLoad(function(evt){
|
||||||
var that = this
|
var that = this
|
||||||
// stop spinner...
|
// stop spinner...
|
||||||
@ -241,7 +241,7 @@ require(['./browser'], function(browser){
|
|||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
logTime(
|
logTime(
|
||||||
that.refresh(),
|
that.refresh(),
|
||||||
that.path) }, REFRESH_DELAY) }) } })
|
that.location) }, REFRESH_DELAY) }) } })
|
||||||
|
|
||||||
// wait for stuff to finish...
|
// wait for stuff to finish...
|
||||||
browser.setup.then(function(){
|
browser.setup.then(function(){
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
* XXX can we avoid explicitly passing args to ./location ????
|
||||||
|
* i.e.:
|
||||||
|
* <a href="#@source(./location)">@source(./path)</a>
|
||||||
|
* instead of (current):
|
||||||
|
* <a href="#@source(./location:$ARGS)">@source(./path)</a>
|
||||||
* XXX BUG:
|
* XXX BUG:
|
||||||
* /System/info
|
* /System/info
|
||||||
* and:
|
* and:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user