Sha256: 4acc0677ea80f4dae82a59d7097390917d3b0c4461badf98ccafd8a3f4136740

Contents?: true

Size: 1.96 KB

Versions: 62

Compression:

Stored size: 1.96 KB

Contents

/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.skins.add( 'v2', (function()
{
	var preload = [];

	if ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 )
	{
		// For IE6, we need to preload some images, otherwhise they will be
		// downloaded several times (CSS background bug).
		preload.push( 'icons.png', 'images/sprites_ie6.png', 'images/dialog_sides.gif' );
	}

	return {
		preload		: preload,
		editor		: { css : [ 'editor.css' ] },
		dialog		: { css : [ 'dialog.css' ] },
		templates	: { css : [ 'templates.css' ] },
		margins		: [ 0, 14, 18, 14 ]
	};
})() );

(function()
{
	CKEDITOR.dialog ? dialogSetup() : CKEDITOR.on( 'dialogPluginReady', dialogSetup );

	function dialogSetup()
	{
		CKEDITOR.dialog.on( 'resize', function( evt )
			{
				var data = evt.data,
					width = data.width,
					height = data.height,
					dialog = data.dialog,
					contents = dialog.parts.contents;

				if ( data.skin != 'v2' )
					return;

				contents.setStyles(
					{
						width : width + 'px',
						height : height + 'px'
					});

				if ( !CKEDITOR.env.ie )
					return;

				// Fix the size of the elements which have flexible lengths.
				setTimeout( function()
					{
						var innerDialog = dialog.parts.dialog.getChild( [ 0, 0, 0 ] ),
							body = innerDialog.getChild( 0 );

						// tc
						var el = innerDialog.getChild( 2 );
						el.setStyle( 'width', ( body.$.offsetWidth ) + 'px' );

						// bc
						el = innerDialog.getChild( 7 );
						el.setStyle( 'width', ( body.$.offsetWidth - 28 ) + 'px' );

						// ml
						el = innerDialog.getChild( 4 );
						el.setStyle( 'height', ( height + body.getChild(0).$.offsetHeight ) + 'px' );

						// mr
						el = innerDialog.getChild( 5 );
						el.setStyle( 'height', ( height + body.getChild(0).$.offsetHeight ) + 'px' );
					},
					100 );
			});
	}
})();

Version data entries

62 entries across 62 versions & 7 rubygems

Version Path
blog_logic-1.4.2 public/javascripts/ckeditor/_source/skins/v2/skin.js
editorial_logic-1.4.2 public/javascripts/ckeditor/_source/skins/v2/skin.js
site_logic-1.9.4 public/javascripts/ckeditor/_source/skins/v2/skin.js
site_logic-1.9.3 public/javascripts/ckeditor/_source/skins/v2/skin.js
blog_logic-1.4.1 public/javascripts/ckeditor/_source/skins/v2/skin.js
ppc_logic-0.8.0 public/javascripts/ckeditor/_source/skins/v2/skin.js
editorial_logic-1.4.1 public/javascripts/ckeditor/_source/skins/v2/skin.js
blog_logic-1.4.0 public/javascripts/ckeditor/_source/skins/v2/skin.js
editorial_logic-1.4.0 public/javascripts/ckeditor/_source/skins/v2/skin.js
blog_logic-1.3.1 public/javascripts/ckeditor/_source/skins/v2/skin.js
blog_logic-1.3.0 public/javascripts/ckeditor/_source/skins/v2/skin.js
blog_logic-1.2.4 public/javascripts/ckeditor/_source/skins/v2/skin.js
site_logic-1.9.2 public/javascripts/ckeditor/_source/skins/v2/skin.js
blog_logic-1.2.3 public/javascripts/ckeditor/_source/skins/v2/skin.js
blog_logic-1.2.2 public/javascripts/ckeditor/_source/skins/v2/skin.js
blog_logic-1.2.1 public/javascripts/ckeditor/_source/skins/v2/skin.js
editorial_logic-1.3.3 public/javascripts/ckeditor/_source/skins/v2/skin.js
site_logic-1.9.1 public/javascripts/ckeditor/_source/skins/v2/skin.js
blog_logic-1.2.0 public/javascripts/ckeditor/_source/skins/v2/skin.js
blog_logic-1.1.9 public/javascripts/ckeditor/_source/skins/v2/skin.js