Fix various object scoping issues. Still not context more/helper menus...

This commit is contained in:
Colin Kuskie 2011-10-01 19:53:46 -07:00
parent d3b4a6d984
commit f20302cc63

View file

@ -1020,6 +1020,7 @@ WebGUI.Admin.prototype.showHelperMenu
context : [ elem, 'tl', 'bl' ], context : [ elem, 'tl', 'bl' ],
effect: { effect: YAHOO.widget.ContainerEffect.FADE, duration:0.25 } effect: { effect: YAHOO.widget.ContainerEffect.FADE, duration:0.25 }
} ); } );
this.helperMenu = helperMenu;
this.helperMenu.render( document.body ); this.helperMenu.render( document.body );
this.helperMenu.show(); this.helperMenu.show();
this.helperMenu.focus(); this.helperMenu.focus();
@ -1505,7 +1506,7 @@ WebGUI.Admin.AssetTable.prototype.addMenuOpenHandler
= function ( elem, assetId, helpers ) { = function ( elem, assetId, helpers ) {
var self = this; var self = this;
YAHOO.util.Event.addListener( elem, "click", function(){ YAHOO.util.Event.addListener( elem, "click", function(){
self.showHelperMenu( elem, assetId, helpers ); self.admin.showHelperMenu( elem, assetId, helpers );
} ); } );
}; };
@ -2215,14 +2216,14 @@ WebGUI.Admin.Tree.prototype.onDataReturnInitializeTable
elItem.className = "clickable"; elItem.className = "clickable";
var self = this; var self = this;
var crumbMenu = function () { var crumbMenu = function () {
self.showHelperMenu( elItem, currentAssetId, currentHelpers ); self.admin.showHelperMenu( elItem, currentAssetId, currentHelpers );
}; };
YAHOO.util.Event.addListener( elItem, "click", crumbMenu, this, true ); YAHOO.util.Event.addListener( elItem, "click", crumbMenu, this, true );
elItem.appendChild( document.createTextNode( oResponse.meta.currentAsset.title ) ); elItem.appendChild( document.createTextNode( oResponse.meta.currentAsset.title ) );
elCrumb.appendChild( elItem ); elCrumb.appendChild( elItem );
// TODO: Update current asset // TODO: Update current asset
window.admin.navigate( oResponse.meta.currentAsset.assetId ); window.admin.navigate( currentAssetId );
// TODO Hide loading screen // TODO Hide loading screen
}; };