mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-31 02:50: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, | 			: undefined, | ||||||
| 	// XXX key to store data under...
 | 	// XXX key to store data under...
 | ||||||
| 	// 		....if undefined then each page will be stored as a root path...
 | 	// 		....if undefined then each page will be stored as a root path...
 | ||||||
| 	__path__: undefined, | 	__key__: 'pWiki-data', | ||||||
| 
 | 
 | ||||||
| 	__data: undefined, | 	__data: undefined, | ||||||
| 	get data(){ | 	get data(){ | ||||||
| 		return this.__path__ ? | 		return this.__key__ ? | ||||||
| 			(this.__data = this.__data  | 			(this.__data = this.__data  | ||||||
| 				?? JSON.parse(this.__store__[this.__path__])) | 				?? JSON.parse(this.__store__[this.__key__])) | ||||||
| 			: this.__store__ }, | 			: this.__store__ }, | ||||||
| 	 | 	 | ||||||
| 	//__paths__: function(path){},
 | 	//__paths__: function(path){},
 | ||||||
| 	//__exists__: function(path){},
 | 	//__exists__: function(path){},
 | ||||||
| 	__get__: function(path){ | 	__get__: function(path){ | ||||||
| 		return this.__path__ ? | 		return this.__key__ ? | ||||||
| 			this.data[path] | 			this.data[path] | ||||||
| 			// XXX CACHE...
 | 			// XXX CACHE...
 | ||||||
| 			: JSON.parse(this.data[path]) }, | 			: JSON.parse(this.data[path]) }, | ||||||
| 	// XXX *time...
 | 	// XXX *time...
 | ||||||
| 	__set__: function(path, data){ | 	__set__: function(path, data){ | ||||||
| 		this.data[path] = this.__path__ ? | 		this.data[path] = this.__key__ ? | ||||||
| 			data | 			data | ||||||
| 			// XXX CACHE...
 | 			// XXX CACHE...
 | ||||||
| 			: JSON.stringify(data) }, | 			: JSON.stringify(data) }, | ||||||
| 	__update__: function(){ | 	__update__: function(){ | ||||||
|  | 		// XXX
 | ||||||
| 	}, | 	}, | ||||||
| 	delete: function(){}, | 	delete: function(){}, | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user