Ticket #582: clipboardmessage.patch

File clipboardmessage.patch, 1.4 KB (added by Richard Lovejoy <xinha@…>, 14 years ago)
  • htmlarea.js

    diff -ur xinha-nightly/htmlarea.js xinha-new/htmlarea.js
    old new  
    273273  // enable the 'Target' field in the Make Link dialog 
    274274  this.makeLinkShowsTarget = true; 
    275275 
     276  // message (and optional url) to show if we get an exception 
     277  // when doing cut/copy/paste in gecko based browsers 
     278  this.geckoClipboardSecurityMessage = "The Paste button does not work in Mozilla based web browsers (technical security reasons). Press CTRL-V on your keyboard to paste directly."; 
     279  this.geckoClipboardSecurityUrl = null; 
     280 
    276281  // CharSet of the iframe, default is the charset of the document 
    277282  this.charSet = HTMLArea.is_gecko ? document.characterSet : document.charset; 
    278283 
     
    35323537        this._wordClean(); 
    35333538    } catch (e) { 
    35343539      if (HTMLArea.is_gecko) { 
    3535         alert(HTMLArea._lc("The Paste button does not work in Mozilla based web browsers (technical security reasons). Press CTRL-V on your keyboard to paste directly.")); 
     3540        var clipboardMessage = this.config.geckoClipboardSecurityMessage; 
     3541        if ( this.config.geckoClipboardSecurityUrl != null ) { 
     3542          if ( confirm( HTMLArea._lc(clipboardMessage) ) ) { 
     3543            window.open( this.config.geckoClipboardSecurityUrl ); 
     3544          } 
     3545        } else { 
     3546          alert(HTMLArea._lc(clipboardMessage)); 
     3547        } 
    35363548      } 
    35373549    } 
    35383550    break;