mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-31 02:50:08 +00:00 
			
		
		
		
	bugfix -- revise...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									6c7bb94e95
								
							
						
					
					
						commit
						c5577fb8c9
					
				| @ -65,6 +65,10 @@ object.Constructor('BasePage', { | |||||||
| 	// root page used to clone new instances via the .clone(..) method...
 | 	// root page used to clone new instances via the .clone(..) method...
 | ||||||
| 	//root: undefined,
 | 	//root: undefined,
 | ||||||
| 
 | 
 | ||||||
|  | 	// a base page to be used as a base for cloning if root is of a 
 | ||||||
|  | 	// different "class"...
 | ||||||
|  | 	//__clone_base__: undefined,
 | ||||||
|  | 	 | ||||||
| 	// NOTE: this can be inherited...
 | 	// NOTE: this can be inherited...
 | ||||||
| 	//store: undefined,
 | 	//store: undefined,
 | ||||||
| 	//__store: undefined,
 | 	//__store: undefined,
 | ||||||
| @ -412,7 +416,10 @@ object.Constructor('BasePage', { | |||||||
| 				// 		the common root...
 | 				// 		the common root...
 | ||||||
| 				// 		this will make all the non-shadowed attrs set on the
 | 				// 		this will make all the non-shadowed attrs set on the
 | ||||||
| 				// 		root visible to all sub-pages.
 | 				// 		root visible to all sub-pages.
 | ||||||
| 				: Object.create(this.root ?? this), | 				: Object.create( | ||||||
|  | 					(this.root || {}).__clone_base__ | ||||||
|  | 						?? this.root  | ||||||
|  | 						?? this), | ||||||
| 			{ | 			{ | ||||||
| 				root: this.root ?? this, | 				root: this.root ?? this, | ||||||
| 				location: this.location,  | 				location: this.location,  | ||||||
| @ -1197,10 +1204,13 @@ object.Constructor('pWikiPageElement', Page, { | |||||||
| 
 | 
 | ||||||
| 	// handle dom as first argument...
 | 	// handle dom as first argument...
 | ||||||
| 	__init__: function(dom, ...args){ | 	__init__: function(dom, ...args){ | ||||||
|  | 		if(typeof(Element) != 'undefined'){ | ||||||
| 			if(dom instanceof Element){ | 			if(dom instanceof Element){ | ||||||
| 				this.dom = dom | 				this.dom = dom | ||||||
| 			} else { | 			} else { | ||||||
| 			args.unshift(dom) } | 				args.unshift(dom) } } | ||||||
|  | 		// XXX is this the correct way to go???
 | ||||||
|  | 		this.__clone_base__ = this.clone() | ||||||
| 		return object.parentCall(pWikiPageElement.prototype.__init__, this, ...args) }, | 		return object.parentCall(pWikiPageElement.prototype.__init__, this, ...args) }, | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -6,6 +6,10 @@ | |||||||
| * 		pwiki.get(..).get(..)			-> pWikiPageElement object | * 		pwiki.get(..).get(..)			-> pWikiPageElement object | ||||||
| * 		pwiki.get(..).get(..).get(..)	-> Page object | * 		pwiki.get(..).get(..).get(..)	-> Page object | ||||||
| * 		... | * 		... | ||||||
|  | * 		..the problem here is trivial, we are doing  Object.construct(this.root)  | ||||||
|  | * 		in clone -- the question is what are we going to clone if .root | ||||||
|  | * 		is of a different type (without ending up with long inheritance | ||||||
|  | * 		chains)??? | ||||||
| * | * | ||||||
| * XXX BUG: .get('/*').raw hangs... | * XXX BUG: .get('/*').raw hangs... | ||||||
| * XXX add action to reset overloaded (bootstrap) pages... | * XXX add action to reset overloaded (bootstrap) pages... | ||||||
| @ -26,6 +30,7 @@ | |||||||
| * 		- editor and interactivity | * 		- editor and interactivity | ||||||
| * 		- migrate bootstrap | * 		- migrate bootstrap | ||||||
| * 		- store topology | * 		- store topology | ||||||
|  | * 		- sync and sync conf | ||||||
| * 	- markdown										-- DONE | * 	- markdown										-- DONE | ||||||
| * 	- WikiWord										-- DONE | * 	- WikiWord										-- DONE | ||||||
| * 	- dom filter mechanics							-- DONE | * 	- dom filter mechanics							-- DONE | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user