1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

Fixed #212: backward compatibility of admin menu third party plugins

This commit is contained in:
SecretR
2013-05-07 16:11:32 +03:00
parent 009f3fe72a
commit ebcf1e0169

View File

@@ -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
window.location.hash = 'nav-' + hash; if(hash) {
if(form) { window.location.hash = 'nav-' + hash;
$(form).attr('action', $(form).attr('action').split('#')[0] + '#nav-' + hash); if(form) {
} $(form).attr('action', $(form).attr('action').split('#')[0] + '#nav-' + hash);
}
return false; //FIXME See admin/prefs navigation. return false;
}
}); });
// plugin navigation hash // plugin navigation hash