diff --git a/browser.js b/browser.js index 3b5b1be..e4655b2 100755 --- a/browser.js +++ b/browser.js @@ -51,8 +51,11 @@ Promise.all([ store.next.update( pwpath.sanitize(pwpath.SYSTEM_PATH), Object.create(basestore.BaseStore).load(page.System)), + store.next.update('.templates', + Object.create(basestore.BaseStore).load(page.Templates)), store.update('.config', Object.create(basestore.BaseStore).load(page.Config)), + store.update('Test', Object.create(basestore.BaseStore).load(page.Test)), diff --git a/pwiki/page.js b/pwiki/page.js index 98c24e8..8d9a16a 100755 --- a/pwiki/page.js +++ b/pwiki/page.js @@ -226,20 +226,12 @@ object.Constructor('BasePage', { to : '../'+to) }, - /*/ XXX TITLE / EXPERIMENTAL... - // NOTE: .__title is intentionally not persistent... - __title: undefined, - get title(){ - return this.__title - ?? this.name }, - set title(value){ - this.__title = value - this.__update__({title: value}) }, - //*/ + // XXX TITLE / EXPERIMENTAL... get title(){ return pwpath.decodeElem(this.name) }, set title(value){ this.name = pwpath.encodeElem(value) }, + //*/ get isPattern(){ return this.path.includes('*') }, @@ -1529,7 +1521,7 @@ object.Constructor('Page', BasePage, { throw new Error('NOT FOUND ERROR: '+ this.location) } var path = pwpath.split(this.path) - path.at(-1)[0] == '_' + ;(path.at(-1) ?? '')[0] == '_' || path.push(this.PAGE_TEMPLATE) var tpl = pwpath.join(path) var tpl_name = path.pop() @@ -1756,20 +1748,6 @@ object.Constructor('pWikiPageElement', Page, { object.parentProperty(pWikiPageElement.prototype, 'location') .set.call(this, value) }, - /*/ XXX this is not persistent, is this what we want??? - // XXX should this default to .path or to .name??? - get title(){ - return this.dom.getAttribute('title') - || (this.dom.querySelector('h1') || {}).innerText - || this.path - || object.parentProperty(pWikiPageElement.prototype, 'title') - .get.call(this) }, - set title(value){ - this.dom.setAttribute('title', value) - object.parentProperty(pWikiPageElement.prototype, 'title') - .set.call(this, value) }, - //*/ - // events... // __pWikiLoadedDOMEvent: new Event('pwikiloaded'), @@ -1837,21 +1815,21 @@ module.System = { text: '@include(.:$ARGS isolated join="@source(file-separator)")' }, _view: { text: object.doc` - + - - [@source(./location/!)] + + [@source(./location/!)]
- +
- + -