Merge branch 'MDL-32654-master-2' of git://git.luns.net.uk/moodle

Conflicts:
	course/yui/toolboxes/toolboxes.js
This commit is contained in:
Sam Hemelryk
2012-05-09 09:32:01 +12:00
4 changed files with 58 additions and 53 deletions

View File

@@ -834,6 +834,31 @@ M.util.add_lightbox = function(Y, node) {
return lightbox;
}
/**
* Appends a hidden spinner element to the specified node.
*
* @param {YUI} Y
* @param {Node} the node the spinner should be added to
* @return {Node} created spinner node
*/
M.util.add_spinner = function(Y, node) {
var WAITICON = {'pix':"i/loading_small",'component':'moodle'};
// Check if spinner is already there
if (node.one('.spinner')) {
return node.one('.spinner');
}
var spinner = Y.Node.create('<img />')
.setAttribute('src', M.util.image_url(WAITICON.pix, WAITICON.component))
.addClass('spinner')
.addClass('iconsmall')
.hide();
node.append(spinner);
return spinner;
}
//=== old legacy JS code, hopefully to be replaced soon by M.xx.yy and YUI3 code ===
function checkall() {