From 3e6874575185303a1897d5f64079c812761f1ec6 Mon Sep 17 00:00:00 2001 From: secretr Date: Mon, 27 Apr 2009 10:47:06 +0000 Subject: [PATCH] admin side navigation - added 'active' class support for the link container (admin.js rewrite/cleanup is coming soon) --- e107_files/jslib/core/admin.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/e107_files/jslib/core/admin.js b/e107_files/jslib/core/admin.js index caee49391..77e5c76c8 100644 --- a/e107_files/jslib/core/admin.js +++ b/e107_files/jslib/core/admin.js @@ -8,8 +8,8 @@ * e107 Admin Helper * * $Source: /cvs_backup/e107_0.8/e107_files/jslib/core/admin.js,v $ - * $Revision: 1.15 $ - * $Date: 2009-01-17 22:48:14 $ + * $Revision: 1.16 $ + * $Date: 2009-04-27 10:47:06 $ * $Author: secretr $ * */ @@ -266,21 +266,24 @@ e107Admin.AdminMenu = { show = $(show); if(!show) return false; if(this.activeTab && this.activeTab.identify() != show.identify()) { - if(container) $(container).select('a.link-active[href^=#])').each(function (element) { element.removeClassName('link-active').addClassName('link') }); + if(container) $(container).select('a.link-active[href^=#])').each(function (element) { element.removeClassName('link-active').addClassName('link'); element.up().removeClassName('active'); }); this.activeTab.hide(); this.activeTab = show; this.activeTab.removeClassName('e-hideme').show(); if(bar) this.activeBar = bar; this.activeBar.removeClassName('link').addClassName('link-active'); + this.activeBar.up().addClassName('active'); return true; } else if(!this.activeTab) { //init - if(container) $(container).select('a.link-active[href^=#])').each(function (element) { element.removeClassName('link-active').addClassName('link') }); + if(container) $(container).select('a.link-active[href^=#])').each(function (element) { element.removeClassName('link-active').addClassName('link'); element.up().removeClassName('active'); }); this.activeTab = show.removeClassName('e-hideme').show(); if(bar) this.activeBar = bar.removeClassName('link').addClassName('link-active'); + this.activeBar.up().addClassName('active'); return true; } else if(!this.activeBar && this.activeTab) {//only bar is unknown - if(container) $(container).select('a.link-active[href^=#])').each(function (element) { element.removeClassName('link-active').addClassName('link') }); + if(container) $(container).select('a.link-active[href^=#])').each(function (element) { element.removeClassName('link-active').addClassName('link'); element.up().removeClassName('active'); }); if(bar) this.activeBar = bar.removeClassName('link').addClassName('link-active'); + this.activeBar.up().addClassName('active'); return true; } return false;