mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
javascript MDL-22398 Fixed issue if custommenu was init but not shown
This commit is contained in:
parent
2a12d9eeb0
commit
242b78f73b
1 changed files with 10 additions and 8 deletions
|
@ -1531,13 +1531,15 @@ M.core_custom_menu = {
|
|||
* @param {string} nodeid
|
||||
*/
|
||||
init : function(Y, nodeid) {
|
||||
var node = Y.one('#'+nodeid);
|
||||
if (node) {
|
||||
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);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue