Ticket #3238: 3238.patch
File 3238.patch, 3.2 KB (added by , 14 years ago) |
---|
-
_source/plugins/dialog/plugin.js
121 121 editor : editor, 122 122 element : themeBuilt.element, 123 123 name : dialogName, 124 contentSize : { width : 0, height : 0 },125 124 size : { width : 0, height : 0 }, 126 125 updateSize : false, 127 126 contents : {}, … … 144 143 }; 145 144 146 145 this.parts = themeBuilt.parts; 146 this.contentSize = { width : 0, height : 0 }; 147 147 148 148 // Call the CKEDITOR.event constructor to initialize this instance. 149 149 CKEDITOR.event.call( this ); … … 436 436 { 437 437 return function( width, height ) 438 438 { 439 if ( this. _.contentSize && this._.contentSize.width == width && this._.contentSize.height == height )439 if ( this.contentSize && this.contentSize.width == width && this.contentSize.height == height ) 440 440 return; 441 441 442 442 CKEDITOR.dialog.fire( 'resize', … … 447 447 height : height 448 448 }, this._.editor ); 449 449 450 this. _.contentSize = { width : width, height : height };450 this.contentSize = { width : width, height : height }; 451 451 this._.updateSize = true; 452 452 }; 453 453 })(), … … 463 463 if ( !this._.updateSize ) 464 464 return this._.size; 465 465 var element = this._.element.getFirst(); 466 var size = this._.size = { width : element.$.offsetWidth || 0, height : element.$.offsetHeight || 0}; 466 var size = this._.size = CKEDITOR.dialog.fire( 'getSize', 467 { 468 dialog : this, 469 skin : this._.editor.skinName 470 }, this._.editor ); 467 471 468 // If either the offsetWidth or offsetHeight is 0, the element isn't visible. 469 this._.updateSize = !size.width || !size.height; 470 472 this._.updateSize = false; 471 473 return size; 472 474 }, 473 475 -
_source/skins/office2003/skin.js
69 69 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 70 70 }, 71 71 0 ); 72 73 evt.stop(); 72 74 }); 75 76 CKEDITOR.dialog.on( 'getSize', function( evt ) 77 { 78 var dialog = evt.data.dialog, skin = evt.data.skin; 79 if ( skin != 'office2003' ) 80 return; 81 82 var dx = 54; 83 var dy = dialog.getPageCount() < 2 ? 96 : 119; 84 85 evt.stop(); 86 evt.data = { width : dialog.contentSize.width + dx, height : dialog.contentSize.height + dy }; 87 } ); 73 88 } -
_source/skins/v2/skin.js
69 69 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 70 70 }, 71 71 0 ); 72 }); 72 73 evt.stop(); 74 } ); 75 76 CKEDITOR.dialog.on( 'getSize', function( evt ) 77 { 78 var dialog = evt.data.dialog, skin = evt.data.skin; 79 if ( skin != 'v2' ) 80 return; 81 82 var dx = 54; 83 var dy = dialog.getPageCount() < 2 ? 96 : 119; 84 85 evt.stop(); 86 evt.data = { width : dialog.contentSize.width + dx, height : dialog.contentSize.height + dy }; 87 } ); 73 88 }