mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
javascript MDL-22398 Fixed issue if custommenu was init but not shown
This commit is contained in:
parent
2a12d9eeb0
commit
242b78f73b
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user