Changeset 1434
- Timestamp:
- 2008-01-28 03:47:17 (2 years ago)
- Location:
- FCKeditor/trunk
- Files:
-
- 6 modified
-
editor/_source/classes/fckpanel.js (modified) (5 diffs)
-
editor/_source/classes/fcktoolbarpanelbutton.js (modified) (3 diffs)
-
editor/_source/commandclasses/fcktextcolorcommand.js (modified) (1 diff)
-
editor/_source/internals/fck.js (modified) (1 diff)
-
editor/_source/internals/fcktoolbarset.js (modified) (1 diff)
-
_whatsnew.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/_source/classes/fckpanel.js
r1387 r1434 65 65 } ) ; 66 66 67 if ( this._Window == window.parent && window.frameElement ) 68 { 69 var scrollPos = null ; 70 if ( FCKBrowserInfo.IsGecko && FCK && FCK.EditorDocument ) 71 scrollPos = [ FCK.EditorDocument.body.scrollLeft, FCK.EditorDocument.body.scrollTop ] ; 72 window.frameElement.parentNode.insertBefore( oIFrame, window.frameElement ) ; 73 if ( scrollPos ) 74 { 75 var restoreFunc = function() 76 { 77 FCK.EditorDocument.body.scrollLeft = scrollPos[0] ; 78 FCK.EditorDocument.body.scrollTop = scrollPos[1] ; 79 } 80 setTimeout( restoreFunc, 500 ) ; 81 } 82 } 83 else 84 this._Window.document.body.appendChild( oIFrame ) ; 67 this._Window.document.body.appendChild( oIFrame ) ; 85 68 86 69 var oIFrameWindow = oIFrame.contentWindow ; … … 196 179 197 180 // Be sure we'll not have more than one Panel opened at the same time. 198 if ( FCKPanel._OpenedPanel ) 199 FCKPanel._OpenedPanel.Hide() ; 181 // Do not unlock focus manager here because we're displaying another floating panel 182 // instead of returning the editor to a "no panel" state (Bug #1514). 183 if ( FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel && 184 FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel != this ) 185 FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel.Hide( false, true ) ; 200 186 201 187 FCKDomTools.SetElementStyles( eMainNode, … … 262 248 } 263 249 264 if ( x < 0 )265 x = 0 ;266 267 250 // Set the context menu DIV in the specified location. 268 251 FCKDomTools.SetElementStyles( this._IFrame, … … 272 255 } ) ; 273 256 274 var iWidth = iMainWidth ; 275 var iHeight = eMainNode.offsetHeight ; 276 277 this._IFrame.width = iWidth ; 278 this._IFrame.height = iHeight ; 279 280 // Move the focus to the IFRAME so we catch the "onblur". 281 this._IFrame.contentWindow.focus() ; 282 283 FCKPanel._OpenedPanel = this ; 284 } 285 286 this._IsOpened = true ; 257 var me = this ; 258 var resizeFunc = function() 259 { 260 var iWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ; 261 var iHeight = eMainNode.offsetHeight ; 262 me._IFrame.width = iWidth ; 263 me._IFrame.height = iHeight ; 264 265 // Move the focus to the IFRAME so we catch the "onblur". 266 me._IFrame.contentWindow.focus() ; 267 me._IsOpened = true ; 268 } 269 setTimeout( resizeFunc, 1 ) ; 270 271 FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel = this ; 272 } 287 273 288 274 FCKTools.RunFunction( this.OnShow, this ) ; 289 275 } 290 276 291 FCKPanel.prototype.Hide = function( ignoreOnHide )277 FCKPanel.prototype.Hide = function( ignoreOnHide, ignoreFocusManagerUnlock ) 292 278 { 293 279 if ( this._Popup ) … … 299 285 300 286 // Enable the editor to fire the "OnBlur". 301 if ( typeof( FCKFocusManager ) != 'undefined' )287 if ( typeof( FCKFocusManager ) != 'undefined' && !ignoreFocusManagerUnlock ) 302 288 FCKFocusManager.Unlock() ; 303 289 -
FCKeditor/trunk/editor/_source/classes/fcktoolbarpanelbutton.js
r798 r1434 49 49 50 50 var oPanel = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName )._Panel ; 51 this.RegisterPanel( oPanel ) ; 52 } 53 54 FCKToolbarPanelButton.prototype.RegisterPanel = function( oPanel ) 55 { 56 if ( oPanel._FCKToolbarPanelButton ) 57 return ; 58 51 59 oPanel._FCKToolbarPanelButton = this ; 52 60 … … 55 63 eLineDiv.style.top = '0px' ; 56 64 57 var eLine = this.LineImg= eLineDiv.appendChild( oPanel.Document.createElement( 'IMG' ) ) ;65 var eLine = oPanel._FCKToolbarPanelButtonLineDiv = eLineDiv.appendChild( oPanel.Document.createElement( 'IMG' ) ) ; 58 66 eLine.className = 'TB_ConnectionLine' ; 59 67 eLine.style.position = 'absolute' ; … … 75 83 oButton._UIButton.ChangeState( FCK_TRISTATE_ON ) ; 76 84 77 oButton.LineImg.style.width = ( e.offsetWidth - 2 ) + 'px' ;85 // oButton.LineImg.style.width = ( e.offsetWidth - 2 ) + 'px' ; 78 86 79 FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oButton.CommandName ).Execute( 0, e.offsetHeight - 1, e ) ; // -1 to be over the border 87 var oCommand = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oButton.CommandName ) ; 88 var oPanel = oCommand._Panel ; 89 oPanel._FCKToolbarPanelButtonLineDiv.style.width = ( e.offsetWidth - 2 ) + 'px' ; 90 oCommand.Execute( 0, e.offsetHeight - 1, e ) ; // -1 to be over the border 80 91 } 81 92 -
FCKeditor/trunk/editor/_source/commandclasses/fcktextcolorcommand.js
r1398 r1434 43 43 this._Panel.MainNode.className = 'FCK_Panel' ; 44 44 this._CreatePanelBody( this._Panel.Document, this._Panel.MainNode ) ; 45 FCK.ToolbarSet.ToolbarItems.GetItem( this.Name ).RegisterPanel( this._Panel ) ; 45 46 46 47 FCKTools.DisableSelection( this._Panel.Document.body ) ; -
FCKeditor/trunk/editor/_source/internals/fck.js
r1402 r1434 33 33 DataProcessor : new FCKDataProcessor(), 34 34 35 GetInstanceObject : (function() 36 { 37 var w = window ; 38 return function( name ) 39 { 40 return w[name] ; 41 } 42 })(), 43 35 44 AttachToOnSelectionChange : function( functionPointer ) 36 45 { -
FCKeditor/trunk/editor/_source/internals/fcktoolbarset.js
r1070 r1434 108 108 109 109 oToolbarSet.CurrentInstance = FCK ; 110 if ( !oToolbarSet.ToolbarItems ) 111 oToolbarSet.ToolbarItems = FCKToolbarItems ; 110 112 111 113 FCK.AttachToOnSelectionChange( oToolbarSet.RefreshItemsState ) ; -
FCKeditor/trunk/_whatsnew.html
r1409 r1434 65 65 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1707">#1707</a>] The editor 66 66 no longer hangs when operating on documents imported from Microsoft Word.</li> 67 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1514">#1514</a>] Floating panels 68 attached to a shared toolbar among multiple FCKeditor instances are no longer misplaced 69 when the editing areas are absolutely or relatively positioned.</li> 67 70 </ul> 68 71 <p>