mirror of
https://github.com/moodle/moodle.git
synced 2025-07-23 23:31:58 +02:00
navigation MDL-22398 Added custom menu to Moodle core. Will document in theme's forum
This commit is contained in:
@@ -1518,3 +1518,24 @@ M.util.help_icon = {
|
||||
this.Y = Y;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom menu namespace
|
||||
*/
|
||||
M.core_custom_menu = {
|
||||
/**
|
||||
* This method is used to initialise a custom menu given the id that belongs
|
||||
* to the custom menu's root node.
|
||||
*
|
||||
* @param {YUI} Y
|
||||
* @param {string} nodeid
|
||||
*/
|
||||
init : function(Y, nodeid) {
|
||||
// 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user