mirror of
https://github.com/flynx/pWiki.git
synced 2026-01-04 09:01:07 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
406d386f64
commit
80de3e4449
@ -234,7 +234,7 @@ $(() => {
|
|||||||
Wiki.__wiki_data = localStorage['wiki-data'] ?
|
Wiki.__wiki_data = localStorage['wiki-data'] ?
|
||||||
JSON.parse(localStorage['wiki-data'])
|
JSON.parse(localStorage['wiki-data'])
|
||||||
: data
|
: data
|
||||||
Wiki.__wiki_data.__proto__ = BaseData
|
Wiki.__wiki_data.__proto__ = data
|
||||||
|
|
||||||
Wiki.location = localStorage['wiki-location'] || Wiki.location
|
Wiki.location = localStorage['wiki-location'] || Wiki.location
|
||||||
|
|
||||||
|
|||||||
17
wiki.js
17
wiki.js
@ -100,7 +100,11 @@ var BaseData = {
|
|||||||
// }
|
// }
|
||||||
var data = {
|
var data = {
|
||||||
'Templates/EmptyPage': {
|
'Templates/EmptyPage': {
|
||||||
text: 'This page is empty.<br><br>WikiHome',
|
text: 'Page [@include(./path)] is empty.' +'<br><br>'
|
||||||
|
+'Links to this page:' +'<br>'
|
||||||
|
+'@include(./links)' +'<br><br>'
|
||||||
|
+'---' +'<br>'
|
||||||
|
+'WikiHome',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
data.__proto__ = BaseData
|
data.__proto__ = BaseData
|
||||||
@ -188,10 +192,13 @@ var Wiki = {
|
|||||||
// NOTE: changing this will move the page to the new path and change
|
// NOTE: changing this will move the page to the new path and change
|
||||||
// .location acordingly...
|
// .location acordingly...
|
||||||
// NOTE: same applies to path parts below...
|
// NOTE: same applies to path parts below...
|
||||||
//
|
// NOTE: changing path will update all the links to the moving page.
|
||||||
// XXX use a template for the redirect page...
|
// NOTE: if a link can't be updated without a conflit then it is left
|
||||||
|
// unchanged, and a redirect page will be created.
|
||||||
get path(){
|
get path(){
|
||||||
return this.location },
|
return this.location },
|
||||||
|
// XXX should lik updating be part of this???
|
||||||
|
// XXX use a template for the redirect page...
|
||||||
set path(value){
|
set path(value){
|
||||||
value = this.resolveDotPath(value)
|
value = this.resolveDotPath(value)
|
||||||
|
|
||||||
@ -432,7 +439,9 @@ var Wiki = {
|
|||||||
|
|
||||||
// NOTE: this may be null...
|
// NOTE: this may be null...
|
||||||
return p
|
return p
|
||||||
|| (!no_default ? this.acquire('./'+this.__default_page__) : null)
|
|| ((!no_default && title != this.__default_page__) ?
|
||||||
|
this.acquire('./'+this.__default_page__)
|
||||||
|
: null)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user