mirror of
https://github.com/moodle/moodle.git
synced 2025-07-25 00:02:18 +02:00
MDL-34741 use proper default YUI_config
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
// Global M object is initilised in inline javascript
|
||||
|
||||
/**
|
||||
* Add module to list of available modules that can be laoded from YUI.
|
||||
* Add module to list of available modules that can be loaded from YUI.
|
||||
* @param {Array} modules
|
||||
*/
|
||||
M.yui.add_module = function(modules) {
|
||||
for (var modname in modules) {
|
||||
M.yui.loader.modules[modname] = modules[modname];
|
||||
YUI_config.modules[modname] = modules[modname];
|
||||
}
|
||||
};
|
||||
/**
|
||||
@@ -182,7 +182,7 @@ M.util.CollapsibleRegion.prototype.icon = null;
|
||||
* @param String the value to set it to.
|
||||
*/
|
||||
M.util.set_user_preference = function(name, value) {
|
||||
YUI(M.yui.loader).use('io', function(Y) {
|
||||
YUI().use('io', function(Y) {
|
||||
var url = M.cfg.wwwroot + '/lib/ajax/setuserpref.php?sesskey=' +
|
||||
M.cfg.sesskey + '&pref=' + encodeURI(name) + '&value=' + encodeURI(value);
|
||||
|
||||
@@ -215,7 +215,7 @@ M.util.show_confirm_dialog = function(e, args) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
YUI(M.yui.loader).use('yui2-container', 'yui2-event', function(Y) {
|
||||
YUI().use('yui2-container', 'yui2-event', function(Y) {
|
||||
var simpledialog = new YAHOO.widget.SimpleDialog('confirmdialog',
|
||||
{width: '300px',
|
||||
fixedcenter: true,
|
||||
@@ -410,7 +410,7 @@ M.util.init_select_autosubmit = function(Y, formid, selectid, nothing) {
|
||||
* Attach handler to url_select
|
||||
*/
|
||||
M.util.init_url_select = function(Y, formid, selectid, nothing) {
|
||||
YUI(M.yui.loader).use('node', function(Y) {
|
||||
YUI().use('node', function(Y) {
|
||||
Y.on('change', function() {
|
||||
if ((nothing == false && Y.Lang.isBoolean(nothing)) || Y.one('#'+selectid).get('value') != nothing) {
|
||||
window.location = M.cfg.wwwroot+Y.one('#'+selectid).get('value');
|
||||
|
Reference in New Issue
Block a user