Ticket #3401: 3401_2.patch
File 3401_2.patch, 2.9 KB (added by , 13 years ago) |
---|
-
_source/plugins/image/dialogs/image.js
145 145 146 146 var imageDialog = function( editor, dialogType ) 147 147 { 148 var previewPreloader; 149 148 150 var onImgLoadEvent = function() 149 151 { 150 152 // Image is ready. … … 358 360 var doc = this._.element.getDocument(); 359 361 this.addFocusable( doc.getById( 'btnResetSize' ), 5 ); 360 362 this.addFocusable( doc.getById( 'btnLockSizes' ), 5 ); 363 previewPreloader = new CKEDITOR.dom.element( 'img', editor.document ) 361 364 }, 362 365 onHide : function() 363 366 { … … 422 425 original.on( 'error', onImgLoadErrorEvent, dialog ); 423 426 original.on( 'abort', onImgLoadErrorEvent, dialog ); 424 427 original.setAttribute( 'src', newUrl ); 425 dialog.preview.setAttribute( 'src', newUrl ); 426 428 // Query the preloader to figure out the url impacted by based href. 429 previewPreloader.setAttribute( 'src', newUrl ); 430 dialog.preview.setAttribute( 'src', previewPreloader.$.src ); 427 431 updatePreview( dialog ); 428 432 } 429 433 // Dont show preview if no URL given. -
_source/plugins/flash/dialogs/flash.js
173 173 var makeObjectTag = !editor.config.flashEmbedTagOnly, 174 174 makeEmbedTag = editor.config.flashAddEmbedTag || editor.config.flashEmbedTagOnly; 175 175 176 var previewAreaHtml = '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.image.preview ) +'<br>' + 176 var previewPreloader, 177 previewAreaHtml = '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.image.preview ) +'<br>' + 177 178 '<div id="FlashPreviewLoader" style="display:none"><div class="loading"> </div></div>' + 178 179 '<div id="FlashPreviewBox"></div></div>'; 179 180 … … 279 280 editor.insertElement( newFakeImage ); 280 281 }, 281 282 283 onLoad : function () 284 { 285 previewPreloader = new CKEDITOR.dom.element( 'img', editor.document ) 286 }, 287 282 288 onHide : function() 283 289 { 284 290 if ( this.preview ) … … 318 324 { 319 325 var dialog = this.getDialog(), 320 326 updatePreview = function( src ){ 321 327 // Query the preloader to figure out the url impacted by based href. 328 previewPreloader.setAttribute( 'src', src ); 322 329 dialog.preview.setHtml( '<embed height="100%" width="100%" src="' 323 + CKEDITOR.tools.htmlEncode( src )330 + CKEDITOR.tools.htmlEncode( previewPreloader.$.src ) 324 331 + '" type="application/x-shockwave-flash"></embed>' ); 325 332 }; 326 333 // Preview element