mirror of
https://github.com/moodle/moodle.git
synced 2025-01-30 03:58:34 +01:00
navigation MDL-22398 Fixed module declaration for custom menu that was reincluding javascript-static
This commit is contained in:
parent
007e52c6e5
commit
d7bd9acd9c
@ -1531,11 +1531,13 @@ M.core_custom_menu = {
|
||||
* @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);
|
||||
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);
|
||||
});
|
||||
}
|
||||
}
|
@ -2214,14 +2214,8 @@ END;
|
||||
// Increment the menu count. This is used for ID's that get worked with
|
||||
// in JavaScript as is essential
|
||||
$menucount++;
|
||||
// Setup the module for this so we get what we need.
|
||||
$module = array(
|
||||
'name' => 'custom_menu',
|
||||
'fullpath' => '/lib/javascript-static.js',
|
||||
'requires' => array('node-menunav')
|
||||
);
|
||||
// Initialise this custom menu
|
||||
$this->page->requires->js_init_call('M.core_custom_menu.init', array('custom_menu_'.$menucount), false, $module);
|
||||
$this->page->requires->js_init_call('M.core_custom_menu.init', array('custom_menu_'.$menucount));
|
||||
// Build the root nodes as required by YUI
|
||||
$content = html_writer::start_tag('div', array('id'=>'custom_menu_'.$menucount, 'class'=>'yui3-menu yui3-menu-horizontal javascript-disabled'));
|
||||
$content .= html_writer::start_tag('div', array('class'=>'yui3-menu-content'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user