Index: fckdialog.html =================================================================== --- fckdialog.html (revision 3576) +++ fckdialog.html (revision 3577) @@ -20,6 +20,8 @@ * == END LICENSE == * * This page is used by all dialog box as the container. + * + * Patch by Aperto for IE9 -->
@@ -92,7 +94,8 @@ if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) document.write( '<' + 'script type="text/javascript" src="' + FCKConfig.SkinPath + 'fck_dialog_ie6.js"><' + '\/script>' ) ; -FCKTools.RegisterDollarFunction( window ) ; +//funktioniert nicht mehr mit IE9 +//FCKTools.RegisterDollarFunction( window ) ; // Resize related functions. var Sizer = function() @@ -110,17 +113,17 @@ // Fit the dialog container's layout to the inner iframe's external size. RefreshContainerSize : function() { - var frmMain = $( 'frmMain' ) ; + var frmMain = document.getElementById( 'frmMain' ) ; if ( frmMain ) { // Get the container size. - var height = $( 'contents' ).offsetHeight ; + var height = document.getElementById( 'contents' ).offsetHeight ; // Subtract the size of other elements. - height -= $( 'TitleArea' ).offsetHeight ; - height -= $( 'TabsRow' ).offsetHeight ; - height -= $( 'PopupButtons' ).offsetHeight ; + height -= document.getElementById( 'TitleArea' ).offsetHeight ; + height -= document.getElementById( 'TabsRow' ).offsetHeight ; + height -= document.getElementById( 'PopupButtons' ).offsetHeight ; frmMain.style.height = Math.max( height, 0 ) + 'px' ; } @@ -149,7 +152,7 @@ { if ( bAutoSize ) { - var frmMain = $( 'frmMain' ) ; + var frmMain = document.getElementById( 'frmMain' ) ; var innerDoc = frmMain.contentWindow.document ; var isStrict = FCKTools.IsStrictMode( innerDoc ) ; @@ -193,7 +196,7 @@ } /** - * IE6 has a similar bug where it sometimes thinks $('contents') has an + * IE6 has a similar bug where it sometimes thinks document.getElementById('contents') has an * offsetHeight of 0 (#2114). */ if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) @@ -222,7 +225,7 @@ var updateThrobber = function() { - var throbberParent = $( 'throbberBlock' ) ; + var throbberParent = document.getElementById( 'throbberBlock' ) ; var throbberBlocks = throbberParent.childNodes ; var lastClass = throbberParent.lastChild.className ; @@ -245,7 +248,7 @@ return ; } - var throbberParent = $( 'throbberBlock' ) ; + var throbberParent = document.getElementById( 'throbberBlock' ) ; if (throbberParent.childNodes.length == 0) { @@ -256,7 +259,7 @@ } // Center the throbber. - var frm = $( 'contents' ) ; + var frm = document.getElementById( 'contents' ) ; var frmCoords = FCKTools.GetDocumentPosition( window, frm ) ; var x = frmCoords.x + ( frm.offsetWidth - throbberParent.offsetWidth ) / 2 ; var y = frmCoords.y + ( frm.offsetHeight - throbberParent.offsetHeight ) / 2 ; @@ -267,8 +270,8 @@ throbberParent.style.visibility = '' ; // Hide tabs and buttons: - $( 'Tabs' ).style.visibility = 'hidden' ; - $( 'PopupButtons' ).style.visibility = 'hidden' ; + document.getElementById( 'Tabs' ).style.visibility = 'hidden' ; + document.getElementById( 'PopupButtons' ).style.visibility = 'hidden' ; // Setup the animation interval. timer = setInterval( updateThrobber, 100 ) ; @@ -282,11 +285,11 @@ timer = null ; } - $( 'throbberBlock' ).style.visibility = 'hidden' ; + document.getElementById( 'throbberBlock' ).style.visibility = 'hidden' ; // Show tabs and buttons: - $( 'Tabs' ).style.visibility = '' ; - $( 'PopupButtons' ).style.visibility = '' ; + document.getElementById( 'Tabs' ).style.visibility = '' ; + document.getElementById( 'PopupButtons' ).style.visibility = '' ; } } ; }() ; @@ -412,7 +415,7 @@ // Move the focus to the Cancel button so even if the dialog contains a // contentEditable element the selection is properly restored in the editor #2496 window.focus() ; - $( 'btnCancel' ).focus() ; + document.getElementById( 'btnCancel' ).focus() ; FCK.Selection.Restore() ; }, @@ -446,9 +449,9 @@ for ( var sCode in oTabs ) { if ( sCode == tabCode ) - $( oTabs[sCode] ).className = 'PopupTabSelected' ; + document.getElementById( oTabs[sCode] ).className = 'PopupTabSelected' ; else - $( oTabs[sCode] ).className = 'PopupTab' ; + document.getElementById( oTabs[sCode] ).className = 'PopupTab' ; } if ( typeof( window.frames["frmMain"].OnDialogTabChange ) == 'function' ) @@ -465,7 +468,7 @@ if ( typeof( oTabs[ tabCode ] ) != 'undefined' ) return ; - var eTabsRow = $( 'Tabs' ) ; + var eTabsRow = document.getElementById( 'Tabs' ) ; var oCell = eTabsRow.insertCell( eTabsRow.cells.length - 1 ) ; oCell.noWrap = true ; @@ -480,13 +483,13 @@ if ( startHidden ) oDiv.style.display = 'none' ; - eTabsRow = $( 'TabsRow' ) ; + eTabsRow = document.getElementById( 'TabsRow' ) ; oCell.appendChild( oDiv ) ; if ( eTabsRow.style.display == 'none' ) { - var eTitleArea = $( 'TitleArea' ) ; + var eTitleArea = document.getElementById( 'TitleArea' ) ; eTitleArea.className = 'PopupTitle' ; oDiv.className = 'PopupTabSelected' ; @@ -505,14 +508,14 @@ window.SetTabVisibility = function( tabCode, isVisible ) { - var oTab = $( oTabs[ tabCode ] ) ; + var oTab = document.getElementById( oTabs[ tabCode ] ) ; oTab.style.display = isVisible ? '' : 'none' ; if ( ! isVisible && oTab.className == 'PopupTabSelected' ) { for ( var sCode in oTabs ) { - if ( $( oTabs[sCode] ).style.display != 'none' ) + if ( document.getElementById( oTabs[sCode] ).style.display != 'none' ) { setSelectedTab( sCode ) ; break ; @@ -578,7 +581,7 @@ // Program entry point. window.Init = function() { - $( 'contents' ).dir = langDir; + document.getElementById( 'contents' ).dir = langDir; // Start the throbber timer. Throbber.Show( 1000 ) ; @@ -589,7 +592,7 @@ FCKTools.DisableSelection( document.body ) ; // Make the title area draggable. - var titleElement = $( 'header' ) ; + var titleElement = document.getElementById( 'header' ) ; titleElement.onmousedown = DragAndDrop.MouseDownHandler ; // Connect mousemove and mouseup events from dialog frame and outer window to dialog dragging logic. @@ -605,7 +608,7 @@ var currentParent = ParentDialog() ; while ( currentParent ) { - var blockerFrame = currentParent.contentWindow.$( 'blocker' ) ; + var blockerFrame = currentParent.contentWindow.document.getElementById( 'blocker' ) ; if ( blockerFrame.readyState == 'complete' ) DragAndDrop.RegisterHandlers( blockerFrame.contentWindow ) ; else @@ -648,7 +651,7 @@ E.FCKLanguageManager.TranslatePage( document ) ; // Create the IFRAME that holds the dialog contents. - $( 'innerContents' ).innerHTML = '