Changeset 1130


Ignore:
Timestamp:
11/28/2007 09:39:56 AM (8 years ago)
Author:
fredck
Message:

Reverted [1129] as a much simpler solution can be found for #1583.

Location:
FCKeditor/trunk/editor/_source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fckpanel.js

    r1129 r1130  
    2727        this.IsRTL                      = ( FCKLang.Dir == 'rtl' ) ;
    2828        this.IsContextMenu      = false ;
    29         this.PanelListId        = parseInt(Math.random() * 0x100000000);
    30         this.ShowTimestamp      = 0 ;
    3129        this._LockCounter       = 0 ;
    3230
     
    127125        var iMainWidth ;
    128126        var eMainNode = this.MainNode ;
    129         FCK.ToolbarSet.CurrentInstance.OpenedPanels[this.PanelListId] = this ;
    130         this.ShowTimestamp = (new Date()).getTime() ;
    131127
    132128        if ( this._Popup )
     
    169165        {
    170166                // Be sure we'll not have more than one Panel opened at the same time.
    171                 /*
    172167                if ( FCKPanel._OpenedPanel )
    173168                        FCKPanel._OpenedPanel.Hide() ;
    174                 */
    175169
    176170                // Do not fire OnBlur while the panel is opened.
     
    263257                this._IFrame.contentWindow.focus() ;
    264258
    265                 //FCKPanel._OpenedPanel = this ;
     259                FCKPanel._OpenedPanel = this ;
    266260        }
    267261
     
    296290                        FCKTools.RunFunction( this.OnHide, this ) ;
    297291        }
    298 
    299         delete FCK.ToolbarSet.CurrentInstance.OpenedPanels[this.PanelListId] ;
    300292}
    301293
     
    344336}
    345337
    346 function FCKPanel_Global_OnClick( e, panelList )
    347 {
    348         var currentTimestamp = (new Date()).getTime() ;
    349         for ( var i in panelList )
    350         {
    351                 // The timestamp check is needed because of a possible race condition,
    352                 // in which the global onclick handler is called right after FCKPanel.Show().
    353                 if ( panelList[i].ShowTimestamp < currentTimestamp - 100 )
    354                         FCKPanel_Window_OnBlur( e, panelList[i] ) ;
    355         }
    356 }
    357 
    358 FCKPanel_Global_OnBlur = FCKPanel_Global_OnClick ;
    359 
    360338function CheckPopupOnHide( forceHide )
    361339{
     
    375353        this.Document = null ;
    376354        this.MainNode = null ;
    377         delete FCK.ToolbarSet.CurrentInstance.OpenedPanels[this.PanelListId] ;
    378 }
     355}
  • FCKeditor/trunk/editor/_source/internals/fck.js

    r1129 r1130  
    3131        Toolbar                 : null,
    3232        HasFocus                : false,
    33         DataProcessor           : new FCKDataProcessor(),
    34         OpenedPanels            : {},
     33        DataProcessor   : new FCKDataProcessor(),
    3534
    3635        AttachToOnSelectionChange : function( functionPointer )
     
    883882        FCKCommands.GetCommand( 'ShowBlocks' ).RestoreState() ;
    884883
    885         FCKTools.AddEventListenerEx( FCK.EditorDocument, 'click', FCKPanel_Global_OnClick, FCK.ToolbarSet.CurrentInstance.OpenedPanels ) ;
    886         FCKTools.AddEventListenerEx( FCK.EditorDocument, 'blur', FCKPanel_Global_OnBlur, FCK.ToolbarSet.CurrentInstance.OpenedPanels ) ;
    887 
    888884        // Check if it is not a startup call, otherwise complete the startup.
    889885        if ( FCK.Status != FCK_STATUS_NOTLOADED )
     
    892888        if ( FCKConfig.Debug )
    893889                FCKDebug._GetWindow() ;
    894 
    895         FCKTools.AddEventListenerEx( document, 'click', FCKPanel_Global_OnClick, FCK.ToolbarSet.CurrentInstance.OpenedPanels );
    896         FCKTools.AddEventListenerEx( document, 'blur', FCKPanel_Global_OnBlur, FCK.ToolbarSet.CurrentInstance.OpenedPanels ) ;
    897890
    898891        FCK.SetStatus( FCK_STATUS_ACTIVE ) ;
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy