2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
6 CKEDITOR.skins.add( 'office2003', (function()
\r
10 if ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 )
\r
12 // For IE6, we need to preload some images, otherwhise they will be
\r
13 // downloaded several times (CSS background bug).
\r
14 preload.push( 'icons.png', 'images/sprites_ie6.png', 'images/dialog_sides.gif' );
\r
19 editor : { css : [ 'editor.css' ] },
\r
20 dialog : { css : [ 'dialog.css' ] },
\r
21 templates : { css : [ 'templates.css' ] },
\r
22 margins : [ 0, 14, 18, 14 ]
\r
28 CKEDITOR.dialog ? dialogSetup() : CKEDITOR.on( 'dialogPluginReady', dialogSetup );
\r
30 function dialogSetup()
\r
32 CKEDITOR.dialog.on( 'resize', function( evt )
\r
34 var data = evt.data,
\r
36 height = data.height,
\r
37 dialog = data.dialog,
\r
38 contents = dialog.parts.contents;
\r
40 if ( data.skin != 'office2003' )
\r
45 width : width + 'px',
\r
46 height : height + 'px'
\r
49 if ( !CKEDITOR.env.ie )
\r
52 // Fix the size of the elements which have flexible lengths.
\r
53 var fixSize = function()
\r
55 var innerDialog = dialog.parts.dialog.getChild( [ 0, 0, 0 ] ),
\r
56 body = innerDialog.getChild( 0 );
\r
59 var el = innerDialog.getChild( 2 );
\r
60 el.setStyle( 'width', ( body.$.offsetWidth ) + 'px' );
\r
63 el = innerDialog.getChild( 7 );
\r
64 el.setStyle( 'width', ( body.$.offsetWidth - 28 ) + 'px' );
\r
67 el = innerDialog.getChild( 4 );
\r
68 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' );
\r
71 el = innerDialog.getChild( 5 );
\r
72 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' );
\r
74 setTimeout( fixSize, 100 );
\r
76 // Ensure size is correct for RTL mode. (#4003)
\r
77 if ( evt.editor.lang.dir == 'rtl' )
\r
78 setTimeout( fixSize, 1000 );
\r