mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
minor tweak...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c56d0af9f1
commit
61b67674a2
11
pwiki2.js
11
pwiki2.js
@ -421,29 +421,30 @@ module.localStorageStore = {
|
||||
: undefined,
|
||||
// XXX key to store data under...
|
||||
// ....if undefined then each page will be stored as a root path...
|
||||
__path__: undefined,
|
||||
__key__: 'pWiki-data',
|
||||
|
||||
__data: undefined,
|
||||
get data(){
|
||||
return this.__path__ ?
|
||||
return this.__key__ ?
|
||||
(this.__data = this.__data
|
||||
?? JSON.parse(this.__store__[this.__path__]))
|
||||
?? JSON.parse(this.__store__[this.__key__]))
|
||||
: this.__store__ },
|
||||
|
||||
//__paths__: function(path){},
|
||||
//__exists__: function(path){},
|
||||
__get__: function(path){
|
||||
return this.__path__ ?
|
||||
return this.__key__ ?
|
||||
this.data[path]
|
||||
// XXX CACHE...
|
||||
: JSON.parse(this.data[path]) },
|
||||
// XXX *time...
|
||||
__set__: function(path, data){
|
||||
this.data[path] = this.__path__ ?
|
||||
this.data[path] = this.__key__ ?
|
||||
data
|
||||
// XXX CACHE...
|
||||
: JSON.stringify(data) },
|
||||
__update__: function(){
|
||||
// XXX
|
||||
},
|
||||
delete: function(){},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user