+/*\r
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+For licensing, see LICENSE.html or http://ckeditor.com/license\r
+*/\r
+\r
+CKEDITOR.skins.add( 'v2', (function()\r
+{\r
+ var preload = [];\r
+\r
+ if ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 )\r
+ {\r
+ // For IE6, we need to preload some images, otherwhise they will be\r
+ // downloaded several times (CSS background bug).\r
+ preload.push( 'icons.png', 'images/sprites_ie6.png', 'images/dialog_sides.gif' );\r
+ }\r
+\r
+ return {\r
+ preload : preload,\r
+ editor : { css : [ 'editor.css' ] },\r
+ dialog : { css : [ 'dialog.css' ] },\r
+ templates : { css : [ 'templates.css' ] },\r
+ margins : [ 0, 14, 18, 14 ]\r
+ };\r
+})() );\r
+\r
+if ( CKEDITOR.dialog )\r
+{\r
+ CKEDITOR.dialog.on( 'resize', function( evt )\r
+ {\r
+ var data = evt.data,\r
+ width = data.width,\r
+ height = data.height,\r
+ dialog = data.dialog,\r
+ standardsMode = !CKEDITOR.env.quirk;\r
+\r
+ if ( data.skin != 'v2' )\r
+ return;\r
+\r
+ dialog.parts.contents.setStyles(\r
+ {\r
+ width : width + 'px',\r
+ height : height + 'px'\r
+ });\r
+\r
+ if ( !CKEDITOR.env.ie )\r
+ return;\r
+\r
+ // Fix the size of the elements which have flexible lengths.\r
+ setTimeout( function()\r
+ {\r
+ var content = dialog.parts.contents,\r
+ body = content.getParent(),\r
+ innerDialog = body.getParent();\r
+\r
+ // tc\r
+ var el = innerDialog.getChild( 2 );\r
+ el.setStyle( 'width', ( body.$.offsetWidth ) + 'px' );\r
+\r
+ // bc\r
+ el = innerDialog.getChild( 7 );\r
+ el.setStyle( 'width', ( body.$.offsetWidth - 28 ) + 'px' );\r
+\r
+ // ml\r
+ el = innerDialog.getChild( 4 );\r
+ el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' );\r
+\r
+ // mr\r
+ el = innerDialog.getChild( 5 );\r
+ el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' );\r
+ },\r
+ 100 );\r
+ });\r
+}\r