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
|
* @param {string} nodeid
|
||||||
*/
|
*/
|
||||||
init : function(Y, nodeid) {
|
init : function(Y, nodeid) {
|
||||||
Y.use('node-menunav', function(Y) {
|
var node = Y.one('#'+nodeid);
|
||||||
// Get the node
|
if (node) {
|
||||||
var node = Y.one('#'+nodeid);
|
Y.use('node-menunav', function(Y) {
|
||||||
// Remove the javascript-disabled class.... obviously javascript is enabled.
|
// Get the node
|
||||||
node.removeClass('javascript-disabled');
|
// Remove the javascript-disabled class.... obviously javascript is enabled.
|
||||||
// Initialise the menunav plugin
|
node.removeClass('javascript-disabled');
|
||||||
node.plug(Y.Plugin.NodeMenuNav);
|
// Initialise the menunav plugin
|
||||||
});
|
node.plug(Y.Plugin.NodeMenuNav);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue