mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
+5
-11
@@ -206,17 +206,10 @@ __PluginManager__.register('menu',function(module, exports, require) {
|
||||
* @return {Menu} | null
|
||||
*/
|
||||
Menu.prototype.getParentMenu = function() {
|
||||
if(this.getParent() && this.getParent().kitMenuItem) {
|
||||
return this.getParent().kitMenuItem.getMenu();
|
||||
var p = this.getParent();
|
||||
if(p instanceof Element && p.hasOwnProperty('kit') && p.kit.menuItem instanceof MenuItemClass) {
|
||||
return p.kit.menuItem.getMenu();
|
||||
}
|
||||
return undefined;
|
||||
if(
|
||||
this.getParent() && (this.getParent() instanceof Element) &&
|
||||
this.getParent().hasOwnProperty('kitMenuItem') && (this.getParent().kitMenuItem instanceof MenuItemClass)
|
||||
) {
|
||||
return this.getParent().kitMenuItem.getMenu();
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
Menu.prototype.getParentMenuNode = function() {
|
||||
var parentMenu = this.getParentMenu(),
|
||||
@@ -586,7 +579,8 @@ __PluginManager__.register('menu',function(module, exports, require) {
|
||||
this.node = document.createElement('a');
|
||||
this.node.style.position = 'relative';
|
||||
this.node.dataset.parentId = this.parentId;
|
||||
this.node.kitMenuItem = this;
|
||||
this.node.kit = this.node.kit || {};
|
||||
this.node.kit.menuItem = this;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user