2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
\r
3 * Copyright (C) 2003-2010 Frederico Caldeira Knabben
\r
5 * == BEGIN LICENSE ==
\r
7 * Licensed under the terms of any of the following licenses at your
\r
10 * - GNU General Public License Version 2 or later (the "GPL")
\r
11 * http://www.gnu.org/licenses/gpl.html
\r
13 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
\r
14 * http://www.gnu.org/licenses/lgpl.html
\r
16 * - Mozilla Public License Version 1.1 or later (the "MPL")
\r
17 * http://www.mozilla.org/MPL/MPL-1.1.html
\r
24 // IE6 doens't handle absolute positioning properly (it is always in quirks
\r
25 // mode). This function fixes the sizes and positions of many elements that
\r
26 // compose the skin (this is skin specific).
\r
27 var fixSizes = window.DoResizeFixes = function()
\r
29 var fckDlg = window.document.body ;
\r
31 for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ )
\r
33 var child = fckDlg.childNodes[i] ;
\r
34 switch ( child.className )
\r
37 child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 ) ; // -left -right
\r
38 child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 ) ; // -bottom -top
\r
43 child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 + 4 ) ; // -left -right + 4
\r
44 child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 + 4 ) ; // -bottom -top + 4
\r
48 child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ;
\r
52 child.style.width = Math.max( 0, fckDlg.clientWidth - 16 - 16 ) ;
\r
56 child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ;
\r
60 child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ;
\r
61 child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ;
\r
65 child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ;
\r
69 child.style.left = Math.max( 0, fckDlg.clientWidth - 30 ) ;
\r
70 child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ;
\r
74 child.style.width = Math.max( 0, fckDlg.clientWidth - 30 - 30 ) ;
\r
75 child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ;
\r
81 var closeButtonOver = function()
\r
83 this.style.backgroundPosition = '-16px -687px' ;
\r
86 var closeButtonOut = function()
\r
88 this.style.backgroundPosition = '-16px -651px' ;
\r
91 var fixCloseButton = function()
\r
93 var closeButton = document.getElementById ( 'closeButton' ) ;
\r
95 closeButton.onmouseover = closeButtonOver ;
\r
96 closeButton.onmouseout = closeButtonOut ;
\r
99 var onLoad = function()
\r
104 window.attachEvent( 'onresize', fixSizes ) ;
\r
105 window.detachEvent( 'onload', onLoad ) ;
\r
108 window.attachEvent( 'onload', onLoad ) ;
\r