Ticket #4930: 4930.patch
File 4930.patch, 8.4 KB (added by , 14 years ago) |
---|
-
_source/skins/kama/skin.js
203 203 }; 204 204 })() ); 205 205 206 CKEDITOR.on( 'dialogPluginReady',function()206 (function() 207 207 { 208 CKEDITOR.dialog.on( 'resize', function( evt ) 209 { 210 var data = evt.data, 211 width = data.width, 212 height = data.height, 213 dialog = data.dialog, 214 contents = dialog.parts.contents; 208 CKEDITOR.dialog ? dialogSetup() : CKEDITOR.on( 'dialogPluginReady', dialogSetup ); 215 209 216 if ( data.skin != 'kama' ) 217 return; 210 function dialogSetup() 211 { 212 CKEDITOR.dialog.on( 'resize', function( evt ) 213 { 214 var data = evt.data, 215 width = data.width, 216 height = data.height, 217 dialog = data.dialog, 218 contents = dialog.parts.contents; 218 219 219 contents.setStyles( 220 { 221 width : width + 'px', 222 height : height + 'px' 223 }); 220 if ( data.skin != 'kama' ) 221 return; 224 222 225 // Fix the size of the elements which have flexible lengths.226 setTimeout( function()227 {228 var innerDialog = dialog.parts.dialog.getChild( [ 0, 0, 0 ] ),229 body = innerDialog.getChild( 0);223 contents.setStyles( 224 { 225 width : width + 'px', 226 height : height + 'px' 227 }); 230 228 231 // tc 232 var el = innerDialog.getChild( 2 ); 233 el.setStyle( 'width', ( body.$.offsetWidth ) + 'px' ); 229 // Fix the size of the elements which have flexible lengths. 230 setTimeout( function() 231 { 232 var innerDialog = dialog.parts.dialog.getChild( [ 0, 0, 0 ] ), 233 body = innerDialog.getChild( 0 ); 234 234 235 // bc236 el = innerDialog.getChild( 7);237 el.setStyle( 'width', ( body.$.offsetWidth - 28) + 'px' );235 // tc 236 var el = innerDialog.getChild( 2 ); 237 el.setStyle( 'width', ( body.$.offsetWidth ) + 'px' ); 238 238 239 // ml240 el = innerDialog.getChild( 4);241 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14) + 'px' );239 // bc 240 el = innerDialog.getChild( 7 ); 241 el.setStyle( 'width', ( body.$.offsetWidth - 28 ) + 'px' ); 242 242 243 // mr 244 el = innerDialog.getChild( 5 ); 245 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 246 }, 247 100 ); 248 } ); 249 } ); 243 // ml 244 el = innerDialog.getChild( 4 ); 245 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 250 246 247 // mr 248 el = innerDialog.getChild( 5 ); 249 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 250 }, 251 100 ); 252 }); 253 } 254 })(); 255 251 256 /** 252 257 * The base user interface color to be used by the editor. Not all skins are 253 258 * compatible with this setting. -
_source/skins/office2003/skin.js
23 23 }; 24 24 })() ); 25 25 26 CKEDITOR.on( 'dialogPluginReady',function()26 (function() 27 27 { 28 CKEDITOR.dialog.on( 'resize', function( evt ) 29 { 30 var data = evt.data, 31 width = data.width, 32 height = data.height, 33 dialog = data.dialog, 34 contents = dialog.parts.contents; 28 CKEDITOR.dialog ? dialogSetup() : CKEDITOR.on( 'dialogPluginReady', dialogSetup ); 35 29 36 if ( data.skin != 'office2003' ) 37 return; 30 function dialogSetup() 31 { 32 CKEDITOR.dialog.on( 'resize', function( evt ) 33 { 34 var data = evt.data, 35 width = data.width, 36 height = data.height, 37 dialog = data.dialog, 38 contents = dialog.parts.contents; 38 39 39 contents.setStyles( 40 { 41 width : width + 'px', 42 height : height + 'px' 43 }); 40 if ( data.skin != 'office2003' ) 41 return; 44 42 45 if ( !CKEDITOR.env.ie ) 46 return; 43 contents.setStyles( 44 { 45 width : width + 'px', 46 height : height + 'px' 47 }); 47 48 48 // Fix the size of the elements which have flexible lengths. 49 var fixSize = function() 50 { 51 var innerDialog = dialog.parts.dialog.getChild( [ 0, 0, 0 ] ), 52 body = innerDialog.getChild( 0 ); 49 if ( !CKEDITOR.env.ie ) 50 return; 53 51 54 // tc 55 var el = innerDialog.getChild( 2 ); 56 el.setStyle( 'width', ( body.$.offsetWidth ) + 'px' ); 52 // Fix the size of the elements which have flexible lengths. 53 var fixSize = function() 54 { 55 var innerDialog = dialog.parts.dialog.getChild( [ 0, 0, 0 ] ), 56 body = innerDialog.getChild( 0 ); 57 57 58 // bc59 el = innerDialog.getChild( 7);60 el.setStyle( 'width', ( body.$.offsetWidth - 28) + 'px' );58 // tc 59 var el = innerDialog.getChild( 2 ); 60 el.setStyle( 'width', ( body.$.offsetWidth ) + 'px' ); 61 61 62 // ml63 el = innerDialog.getChild( 4);64 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14) + 'px' );62 // bc 63 el = innerDialog.getChild( 7 ); 64 el.setStyle( 'width', ( body.$.offsetWidth - 28 ) + 'px' ); 65 65 66 // mr 67 el = innerDialog.getChild( 5 ); 68 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 69 }; 70 setTimeout( fixSize, 100 ); 66 // ml 67 el = innerDialog.getChild( 4 ); 68 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 71 69 72 // Ensure size is correct for RTL mode. (#4003) 73 if ( evt.editor.lang.dir == 'rtl' ) 74 setTimeout( fixSize, 1000 ); 75 } ); 76 } ); 70 // mr 71 el = innerDialog.getChild( 5 ); 72 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 73 }; 74 setTimeout( fixSize, 100 ); 75 76 // Ensure size is correct for RTL mode. (#4003) 77 if ( evt.editor.lang.dir == 'rtl' ) 78 setTimeout( fixSize, 1000 ); 79 }); 80 } 81 })(); -
_source/skins/v2/skin.js
23 23 }; 24 24 })() ); 25 25 26 CKEDITOR.on( 'dialogPluginReady',function()26 (function() 27 27 { 28 CKEDITOR.dialog.on( 'resize', function( evt ) 29 { 30 var data = evt.data, 31 width = data.width, 32 height = data.height, 33 dialog = data.dialog, 34 contents = dialog.parts.contents; 28 CKEDITOR.dialog ? dialogSetup() : CKEDITOR.on( 'dialogPluginReady', dialogSetup ); 35 29 36 if ( data.skin != 'v2' ) 37 return; 30 function dialogSetup() 31 { 32 CKEDITOR.dialog.on( 'resize', function( evt ) 33 { 34 var data = evt.data, 35 width = data.width, 36 height = data.height, 37 dialog = data.dialog, 38 contents = dialog.parts.contents; 38 39 39 contents.setStyles( 40 { 41 width : width + 'px', 42 height : height + 'px' 43 }); 40 if ( data.skin != 'v2' ) 41 return; 44 42 45 if ( !CKEDITOR.env.ie ) 46 return; 43 contents.setStyles( 44 { 45 width : width + 'px', 46 height : height + 'px' 47 }); 47 48 48 // Fix the size of the elements which have flexible lengths. 49 setTimeout( function() 50 { 51 var innerDialog = dialog.parts.dialog.getChild( [ 0, 0, 0 ] ), 52 body = innerDialog.getChild( 0 ); 49 if ( !CKEDITOR.env.ie ) 50 return; 53 51 54 // tc 55 var el = innerDialog.getChild( 2 ); 56 el.setStyle( 'width', ( body.$.offsetWidth ) + 'px' ); 52 // Fix the size of the elements which have flexible lengths. 53 setTimeout( function() 54 { 55 var innerDialog = dialog.parts.dialog.getChild( [ 0, 0, 0 ] ), 56 body = innerDialog.getChild( 0 ); 57 57 58 // bc59 el = innerDialog.getChild( 7);60 el.setStyle( 'width', ( body.$.offsetWidth - 28) + 'px' );58 // tc 59 var el = innerDialog.getChild( 2 ); 60 el.setStyle( 'width', ( body.$.offsetWidth ) + 'px' ); 61 61 62 // ml63 el = innerDialog.getChild( 4);64 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14) + 'px' );62 // bc 63 el = innerDialog.getChild( 7 ); 64 el.setStyle( 'width', ( body.$.offsetWidth - 28 ) + 'px' ); 65 65 66 // mr 67 el = innerDialog.getChild( 5 ); 68 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 69 }, 70 100 ); 71 } ); 72 } ); 66 // ml 67 el = innerDialog.getChild( 4 ); 68 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 69 70 // mr 71 el = innerDialog.getChild( 5 ); 72 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 73 }, 74 100 ); 75 }); 76 } 77 })();