From 089d4f379242a717275149a55f72d0e230ac8e29 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Thu, 15 Jul 2010 15:57:30 -0500 Subject: [PATCH] add afterNavigate event to Admin object --- www/extras/admin/admin.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/extras/admin/admin.js b/www/extras/admin/admin.js index 3d20d1d3c..fc67a6504 100644 --- a/www/extras/admin/admin.js +++ b/www/extras/admin/admin.js @@ -25,6 +25,9 @@ WebGUI.Admin = function(cfg){ this.cfg.adminBarId = "adminBar"; } + // Custom events + this.afterNavigate = new YAHOO.util.CustomEvent( "afterNavigate", this ); + // Private methods var self = this; // Initialize these things AFTER the i18n is fetched @@ -169,6 +172,8 @@ WebGUI.Admin.prototype.navigate = function ( assetDef ) { // Don't do the same asset twice if ( this.currentAssetDef && this.currentAssetDef.assetId == assetDef.assetId ) { + // But still fire the event + this.afterNavigate.fire( assetDef ); return; } @@ -185,6 +190,9 @@ WebGUI.Admin.prototype.navigate this.currentAssetDef = assetDef; this.treeDirty = 1; } + + // Fire event + this.afterNavigate.fire( assetDef ); }; /**