/*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
*/\r
CKEDITOR.scriptLoader = (function()\r
{\r
- var uniqueScripts = {};\r
- var waitingList = {};\r
+ var uniqueScripts = {},\r
+ waitingList = {};\r
\r
return /** @lends CKEDITOR.scriptLoader */ {\r
/**\r
* the callback call. Default to {@link CKEDITOR}.\r
* @param {Boolean} [noCheck] Indicates that the script must be loaded\r
* anyway, not checking if it has already loaded.\r
+ * @param {Boolean} [showBusy] Changes the cursor of the document while\r
++ * the script is loaded.\r
* @example\r
* CKEDITOR.scriptLoader.load( '/myscript.js' );\r
* @example\r
* alert( 'Number of failures: ' + failed.length );\r
* });\r
*/\r
- load : function( scriptUrl, callback, scope, noCheck )\r
+ load : function( scriptUrl, callback, scope, noCheck, showBusy )\r
{\r
var isString = ( typeof scriptUrl == 'string' );\r
\r
( success ? completed : failed ).push( url );\r
\r
if ( --scriptCount <= 0 )\r
+ {\r
+ showBusy && CKEDITOR.document.getDocumentElement().removeStyle( 'cursor' );\r
doCallback( success );\r
+ }\r
};\r
\r
var onLoad = function( url, success )\r
CKEDITOR.fire( 'download', url ); // @Packager.RemoveLine\r
};\r
\r
+ showBusy && CKEDITOR.document.getDocumentElement().setStyle( 'cursor', 'wait' );\r
for ( var i = 0 ; i < scriptCount ; i++ )\r
{\r
loadScript( scriptUrl[ i ] );\r