Ticket #6390: 6390_2.patch
File 6390_2.patch, 2.8 KB (added by , 13 years ago) |
---|
-
_source/core/scriptloader.js
16 16 CKEDITOR.scriptLoader = (function() 17 17 { 18 18 var uniqueScripts = {}, 19 waitingList = {}; 19 waitingList = {}, 20 isBusy = 0; 20 21 21 22 return /** @lends CKEDITOR.scriptLoader */ { 22 23 /** … … 90 91 91 92 if ( --scriptCount <= 0 ) 92 93 { 93 showBusy && CKEDITOR.document.getDocumentElement().removeStyle( 'cursor' );94 isBusy = 0, showBusy && CKEDITOR.document.getDocumentElement().removeStyle( 'cursor' ); 94 95 doCallback( success ); 95 96 } 96 97 }; … … 172 173 CKEDITOR.fire( 'download', url ); // @Packager.RemoveLine 173 174 }; 174 175 175 showBusy && CKEDITOR.document.getDocumentElement().setStyle( 'cursor', 'wait' );176 isBusy = 1, showBusy && CKEDITOR.document.getDocumentElement().setStyle( 'cursor', 'wait' ); 176 177 for ( var i = 0 ; i < scriptCount ; i++ ) 177 178 { 178 179 loadScript( scriptUrl[ i ] ); … … 195 196 196 197 // Append it to <head>. 197 198 script.appendTo( CKEDITOR.document.getHead() ); 199 }, 200 201 /** 202 * Whether loading queue is not empty. 203 * @return {Boolean} 204 */ 205 checkBusy : function() 206 { 207 return isBusy; 198 208 } 199 209 }; 200 210 })(); -
_source/plugins/dialog/plugin.js
2913 2913 */ 2914 2914 openDialog : function( dialogName, callback ) 2915 2915 { 2916 if ( CKEDITOR.scriptLoader.checkBusy() ) 2917 return null; 2918 2916 2919 var dialogDefinitions = CKEDITOR.dialog._.dialogDefinitions[ dialogName ], 2917 2920 dialogSkin = this.skin.dialog; 2918 2921 … … 2933 2936 else if ( dialogDefinitions == 'failed' ) 2934 2937 throw new Error( '[CKEDITOR.dialog.openDialog] Dialog "' + dialogName + '" failed when loading definition.' ); 2935 2938 2936 // Not loaded? Load the .js file first. 2937 var body = CKEDITOR.document.getBody(), 2938 cursor = body.$.style.cursor, 2939 me = this; 2939 var me = this; 2940 2940 2941 body.setStyle( 'cursor', 'wait' );2942 2943 2941 function onDialogFileLoaded( success ) 2944 2942 { 2945 2943 var dialogDefinition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ], … … 2954 2952 CKEDITOR.dialog._.dialogDefinitions[ dialogName ] = 'failed'; 2955 2953 2956 2954 me.openDialog( dialogName, callback ); 2957 body.setStyle( 'cursor', cursor );2958 2955 } 2959 2956 2960 2957 if ( typeof dialogDefinitions == 'string' ) 2961 2958 { 2962 2959 var loadDefinition = 1; 2963 CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( dialogDefinitions ), onDialogFileLoaded );2960 CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( dialogDefinitions ), onDialogFileLoaded, null, 0, 1 ); 2964 2961 } 2965 2962 2966 2963 CKEDITOR.skins.load( this, 'dialog', onDialogFileLoaded );