source: branches/2.2/filemanager/tp/ckeditor/_source/skins/v2/skin.js @ 3019

Revision 3019, 1.8 KB checked in by amuller, 14 years ago (diff)

Ticket #1135 - Corrigindo CSS e adicionando filemanager

Line 
1/*
2Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.html or http://ckeditor.com/license
4*/
5
6CKEDITOR.skins.add( 'v2', (function()
7{
8        var preload = [];
9
10        if ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 )
11        {
12                // For IE6, we need to preload some images, otherwhise they will be
13                // downloaded several times (CSS background bug).
14                preload.push( 'icons.png', 'images/sprites_ie6.png', 'images/dialog_sides.gif' );
15        }
16
17        return {
18                preload         : preload,
19                editor          : { css : [ 'editor.css' ] },
20                dialog          : { css : [ 'dialog.css' ] },
21                templates       : { css : [ 'templates.css' ] },
22                margins         : [ 0, 14, 18, 14 ]
23        };
24})() );
25
26if ( CKEDITOR.dialog )
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                                standardsMode = !CKEDITOR.env.quirk;
35
36                        if ( data.skin != 'v2' )
37                                return;
38
39                        dialog.parts.contents.setStyles(
40                                {
41                                        width : width + 'px',
42                                        height : height + 'px'
43                                });
44
45                        if ( !CKEDITOR.env.ie )
46                                return;
47
48                        // Fix the size of the elements which have flexible lengths.
49                        setTimeout( function()
50                                {
51                                        var content = dialog.parts.contents,
52                                                body = content.getParent(),
53                                                innerDialog = body.getParent();
54
55                                        // tc
56                                        var el = innerDialog.getChild( 2 );
57                                        el.setStyle( 'width', ( body.$.offsetWidth ) + 'px' );
58
59                                        // bc
60                                        el = innerDialog.getChild( 7 );
61                                        el.setStyle( 'width', ( body.$.offsetWidth - 28 ) + 'px' );
62
63                                        // ml
64                                        el = innerDialog.getChild( 4 );
65                                        el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' );
66
67                                        // mr
68                                        el = innerDialog.getChild( 5 );
69                                        el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' );
70                                },
71                                100 );
72                });
73}
Note: See TracBrowser for help on using the repository browser.