mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
Fixed #212: backward compatibility of admin menu third party plugins
This commit is contained in:
@@ -348,19 +348,21 @@ $(document).ready(function()
|
|||||||
$(this).closest("li").removeClass("active");
|
$(this).closest("li").removeClass("active");
|
||||||
$(this).switchClass( "link-active", "link", 0 );
|
$(this).switchClass( "link-active", "link", 0 );
|
||||||
});
|
});
|
||||||
var id = $(this).attr("href"), hash = id.substr(1), form = $('.admin-menu')[0]; // FIXME - a better way to detect the page form
|
var id = $(this).attr("href"), hash = id.split('#')[1], form = $('.admin-menu')[0]; // FIXME - a better way to detect the page form
|
||||||
|
|
||||||
$(this).switchClass( "link", "link-active", 30 );
|
$(this).switchClass( "link", "link-active", 30 );
|
||||||
$(this).closest("li").addClass("active");
|
$(this).closest("li").addClass("active");
|
||||||
$(id).removeClass('e-hideme').show({
|
$(id).removeClass('e-hideme').show({
|
||||||
effect: "slide"
|
effect: "slide"
|
||||||
});
|
});
|
||||||
// 'remember' the active navigation pane
|
// 'remember' the active navigation pane
|
||||||
|
if(hash) {
|
||||||
window.location.hash = 'nav-' + hash;
|
window.location.hash = 'nav-' + hash;
|
||||||
if(form) {
|
if(form) {
|
||||||
$(form).attr('action', $(form).attr('action').split('#')[0] + '#nav-' + hash);
|
$(form).attr('action', $(form).attr('action').split('#')[0] + '#nav-' + hash);
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
return false; //FIXME See admin/prefs navigation.
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// plugin navigation hash
|
// plugin navigation hash
|
||||||
|
Reference in New Issue
Block a user