From 0647287d0ea53289375b9f12766926a4beafdbc6 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Thu, 15 Jul 2010 21:53:11 -0500 Subject: [PATCH] remove kludge by updating location manually --- www/extras/admin/admin.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/www/extras/admin/admin.js b/www/extras/admin/admin.js index 2d2495fb3..78316c3e6 100644 --- a/www/extras/admin/admin.js +++ b/www/extras/admin/admin.js @@ -38,6 +38,10 @@ WebGUI.Admin = function(cfg){ self.newContentBar = new WebGUI.Admin.AdminBar( "newContentBar" ); self.locationBar = new WebGUI.Admin.LocationBar( self.cfg.locationBarId ); self.afterNavigate.subscribe( self.locationBar.afterNavigate, self.locationBar ); + if ( self.currentAssetDef ) { + self.locationBar.navigate( self.currentAssetDef ); + } + self.tree = new WebGUI.Admin.Tree(); self.tabBar = new YAHOO.widget.TabView( self.cfg.tabBarId ); // Keep track of View and Tree tabs @@ -171,12 +175,6 @@ WebGUI.Admin.prototype.makeGotoAsset */ WebGUI.Admin.prototype.navigate = function ( assetDef ) { - // Defer until the locationBar is created - if ( !this.locationBar ) { - var self = this; // Scope correction - return setTimeout( function(){ self.navigate( assetDef ) }, 1000 ); - } - // Don't do the same asset twice if ( this.currentAssetDef && this.currentAssetDef.assetId == assetDef.assetId ) { // But still fire the event