Merge branch 'MDL-44361-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Damyon Wiese
2014-03-05 11:36:16 +08:00
2046 changed files with 16260 additions and 15707 deletions

View File

@ -667,34 +667,25 @@ M.util.js_pending = function(uniqid) {
return M.util.pending_js.length;
};
// Start this asap.
M.util.js_pending('init');
/**
* Register listeners for Y.io start/end so we can wait for them in behat.
*/
M.util.js_watch_io = function() {
YUI.add('moodle-core-io', function(Y) {
Y.on('io:start', function(id) {
M.util.js_pending('io:' + id);
});
Y.on('io:end', function(id) {
M.util.js_complete('io:' + id);
});
YUI.add('moodle-core-io', function(Y) {
Y.on('io:start', function(id) {
M.util.js_pending('io:' + id);
});
YUI.applyConfig({
modules: {
'moodle-core-io': {
after: ['io-base']
},
'io-base': {
requires: ['moodle-core-io'],
}
}
Y.on('io:end', function(id) {
M.util.js_complete('io:' + id);
});
};
// Start this asap.
M.util.js_pending('init');
M.util.js_watch_io();
}, '@VERSION@', {
condition: {
trigger: 'io-base',
when: 'after'
}
});
/**
* Unregister any long running javascript code by unique identifier.