LBF custom template (nation notes) fancybox replace.
[openemr.git] / library / custom_template / ckeditor / _source / skins / v2 / skin.js
blob77f4754b23636b475ec0ede3e576438e0ba0ae51
1 /*
2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.html or http://ckeditor.com/license
4 */
6 CKEDITOR.skins.add( 'v2', (function()
8         return {
9                 editor          : { css : [ 'editor.css' ] },
10                 dialog          : { css : [ 'dialog.css' ] },
11                 templates       : { css : [ 'templates.css' ] },
12                 margins         : [ 0, 14, 18, 14 ]
13         };
14 })() );
16 (function()
18         CKEDITOR.dialog ? dialogSetup() : CKEDITOR.on( 'dialogPluginReady', dialogSetup );
20         function dialogSetup()
21         {
22                 CKEDITOR.dialog.on( 'resize', function( evt )
23                         {
24                                 var data = evt.data,
25                                         width = data.width,
26                                         height = data.height,
27                                         dialog = data.dialog,
28                                         contents = dialog.parts.contents;
30                                 if ( data.skin != 'v2' )
31                                         return;
33                                 contents.setStyles(
34                                         {
35                                                 width : width + 'px',
36                                                 height : height + 'px'
37                                         });
39                                 if ( !CKEDITOR.env.ie )
40                                         return;
42                                 // Fix the size of the elements which have flexible lengths.
43                                 setTimeout( function()
44                                         {
45                                                 var innerDialog = dialog.parts.dialog.getChild( [ 0, 0, 0 ] ),
46                                                         body = innerDialog.getChild( 0 ),
47                                                         bodyWidth = body.getSize( 'width' );
48                                                 height += body.getChild( 0 ).getSize( 'height' ) + 1;
50                                                 // tc
51                                                 var el = innerDialog.getChild( 2 );
52                                                 el.setSize( 'width', bodyWidth );
54                                                 // bc
55                                                 el = innerDialog.getChild( 7 );
56                                                 el.setSize( 'width', bodyWidth - 28 );
58                                                 // ml
59                                                 el = innerDialog.getChild( 4 );
60                                                 el.setSize( 'height', height );
62                                                 // mr
63                                                 el = innerDialog.getChild( 5 );
64                                                 el.setSize( 'height', height );
65                                         },
66                                         100 );
67                         });
68         }
69 })();