mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-30 02:20:08 +00:00
bugfix -- revise...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
6c7bb94e95
commit
c5577fb8c9
@ -64,6 +64,10 @@ module.BasePage =
|
|||||||
object.Constructor('BasePage', {
|
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,
|
||||||
@ -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(dom instanceof Element){
|
if(typeof(Element) != 'undefined'){
|
||||||
this.dom = dom
|
if(dom instanceof Element){
|
||||||
} else {
|
this.dom = dom
|
||||||
args.unshift(dom) }
|
} else {
|
||||||
|
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