Changeset 612

Show
Ignore:
Timestamp:
2007-08-01 11:57:56 (3 years ago)
Author:
martinkou
Message:

Fix for #338 : Fixed the issue where dropped data objects are pasted outside of the editor window in IE.
Fix for #338 : Added the FCKConfig.ShowDropDialog option.

Location:
FCKeditor/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fck_gecko.js

    r610 r612  
    5555                                FCK.InsertHtml( text ) ; 
    5656                        } 
    57                         else 
     57                        else if ( FCKConfig.ShowDropDialog ) 
    5858                                FCK.PasteAsPlainText() ; 
    5959                } 
    60                 else 
     60                else if ( FCKConfig.ShowDropDialog ) 
    6161                        FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.Paste, 'dialog/fck_paste.html', 400, 330, 'Security' ) ; 
    6262                evt.preventDefault() ; 
  • FCKeditor/trunk/editor/_source/internals/fck_ie.js

    r610 r612  
    105105        var evt = FCK.EditorWindow.event ; 
    106106        if ( FCKConfig.ForcePasteAsPlainText ) 
    107                 FCK.PasteAsPlainText( evt.dataTransfer.getData( 'Text' ) ) ; 
     107        { 
     108                if ( FCK._CheckIsPastingEnabled() || FCKConfig.ShowDropDialog ) 
     109                        FCK.PasteAsPlainText( evt.dataTransfer.getData( 'Text' ) ) ; 
     110        } 
    108111        else 
    109                 FCKTools.RunFunction( FCKDialog.OpenDialog, FCKDialog, ['FCKDialog_Paste', FCKLang.Paste, 'dialog/fck_paste.html', 400, 330, 'Security'] ) ; 
     112        { 
     113                if ( FCKConfig.ShowDropDialog )  
     114                        FCKTools.RunFunction( FCKDialog.OpenDialog,  
     115                                FCKDialog, ['FCKDialog_Paste', FCKLang.Paste, 'dialog/fck_paste.html', 400, 330, 'Security'] ) ; 
     116        } 
    110117        evt.returnValue = false ; 
    111118        evt.cancelBubble = true ; 
    112 } 
    113  
    114 function Doc_CancelDragDefault() 
    115 { 
    116         if ( FCK._MouseDownFlag )  
    117                 return ; 
    118         FCK.EditorWindow.event.returnValue = false ; 
    119119} 
    120120 
     
    129129 
    130130        // Intercept drop operations 
    131         this.EditorDocument.body.attachEvent( 'ondragenter', Doc_CancelDragDefault ) ; 
    132         this.EditorDocument.body.attachEvent( 'ondragover', Doc_CancelDragDefault ) ; 
    133131        this.EditorDocument.body.attachEvent( 'ondrop', Doc_OnDrop ) ; 
    134132 
  • FCKeditor/trunk/fckconfig.js

    r591 r612  
    7979FCKConfig.ForcePasteAsPlainText = false ; 
    8080FCKConfig.AutoDetectPasteFromWord = true ;      // IE only. 
     81FCKConfig.ShowDropDialog = true ; 
    8182FCKConfig.ForceSimpleAmpersand  = false ; 
    8283FCKConfig.TabSpaces             = 0 ;