javascript MDL-22398 Fixed issue if custommenu was init but not shown

This commit is contained in:
Sam Hemelryk 2010-05-11 07:16:23 +00:00
parent 2a12d9eeb0
commit 242b78f73b

View File

@ -1531,13 +1531,15 @@ M.core_custom_menu = {
* @param {string} nodeid
*/
init : function(Y, nodeid) {
Y.use('node-menunav', function(Y) {
// Get the node
var node = Y.one('#'+nodeid);
// Remove the javascript-disabled class.... obviously javascript is enabled.
node.removeClass('javascript-disabled');
// Initialise the menunav plugin
node.plug(Y.Plugin.NodeMenuNav);
});
var node = Y.one('#'+nodeid);
if (node) {
Y.use('node-menunav', function(Y) {
// Get the node
// Remove the javascript-disabled class.... obviously javascript is enabled.
node.removeClass('javascript-disabled');
// Initialise the menunav plugin
node.plug(Y.Plugin.NodeMenuNav);
});
}
}
}