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