mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-31 11:00:08 +00:00 
			
		
		
		
	tweaking + notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									4db50f0c25
								
							
						
					
					
						commit
						ca03007ede
					
				
							
								
								
									
										28
									
								
								pwiki2.js
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								pwiki2.js
									
									
									
									
									
								
							| @ -2059,30 +2059,34 @@ object.Constructor('Page', BasePage, { | |||||||
| 			__delete__: function(){ return this }, | 			__delete__: function(){ return this }, | ||||||
| 		}, | 		}, | ||||||
| 		data) }, | 		data) }, | ||||||
| 	// XXX EXPERIMENTAL...
 |  | ||||||
| 	// XXX should we be able to change path/location here???
 | 	// XXX should we be able to change path/location here???
 | ||||||
|  | 	// XXX EXPERIMENTAL...
 | ||||||
| 	virtual: function(text){ | 	virtual: function(text){ | ||||||
| 		var that = this | 		var that = this | ||||||
| 		return Object.assign({ | 		return { | ||||||
| 			__proto__: this, | 			__proto__: this, | ||||||
| 
 | 			// make the location read-only...
 | ||||||
|  | 			get location(){ | ||||||
|  | 				// NOTE: since we are not providing this as a basis for 
 | ||||||
|  | 				// 		inheritance we do not need to properly access 
 | ||||||
|  | 				// 		the parent prop...
 | ||||||
|  | 				// 		...otherwise use:
 | ||||||
|  | 				// 			object.parentProperty(..)
 | ||||||
|  | 				return this.__proto__.location }, | ||||||
| 			__update__: function(data){  | 			__update__: function(data){  | ||||||
| 				Object.assign(this.data, data) | 				Object.assign(this.data, data) | ||||||
| 				return this }, | 				return this }, | ||||||
| 			__delete__: function(){ return this }, | 			__delete__: function(){ return this }, | ||||||
| 
 |  | ||||||
| 			// NOTE: we need to proxy .clone(..) back to parent so as to 
 | 			// NOTE: we need to proxy .clone(..) back to parent so as to 
 | ||||||
| 			// 		avoid overloading .data in the children too...
 | 			// 		avoid overloading .data in the children too...
 | ||||||
| 			// XXX STUB...
 |  | ||||||
| 			clone: function(...args){ | 			clone: function(...args){ | ||||||
| 				return that.clone(...args) }, | 				return that.clone(...args) }, | ||||||
| 
 |  | ||||||
| 			data: { | 			data: { | ||||||
| 				ctime: Date.now(), | 				ctime: Date.now(), | ||||||
| 				mtime: Date.now(), | 				mtime: Date.now(), | ||||||
| 				text, | 				text, | ||||||
| 			}, | 			}, | ||||||
| 		}) }, | 		} }, | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -2158,14 +2162,12 @@ var System = { | |||||||
| 	links: function(){ | 	links: function(){ | ||||||
| 		// XXX
 | 		// XXX
 | ||||||
| 		return '' }, | 		return '' }, | ||||||
| 	// XXX links to current page...
 | 	// XXX links to pages...
 | ||||||
| 	to: function(){ | 	to: function(){ | ||||||
| 		// XXX
 | 		return (this.get('..').data || {}).to ?? [] }, | ||||||
| 		return '' }, | 	// XXX pages linking to us...
 | ||||||
| 	// XXX links from current page...
 |  | ||||||
| 	'from': function(){ | 	'from': function(){ | ||||||
| 		// XXX
 | 		return (this.get('..').data || {})['from'] ?? [] }, | ||||||
| 		return '' }, |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 	// actions...
 | 	// actions...
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user