javascript MDL-22398 Fixed issue if custommenu was init but not shown
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user