From df3b0a2f728f40b3a7cd7b9c8466027d70e34898 Mon Sep 17 00:00:00 2001 From: lsces Date: Sat, 7 Jun 2014 07:55:00 +0100 Subject: Upgrade to version 4.3 --- plugins/about/dialogs/about.js | 80 +-- plugins/about/dialogs/logo_ckeditor.png | Bin 2759 -> 6757 bytes plugins/clipboard/dialogs/paste.js | 239 +------ plugins/colordialog/dialogs/colordialog.js | 353 +--------- plugins/dialog/dialogDefinition.js | 1010 +--------------------------- plugins/div/dialogs/div.js | 466 +------------ plugins/find/dialogs/find.js | 809 +--------------------- plugins/flash/dialogs/flash.js | 692 +------------------ plugins/forms/dialogs/button.js | 108 +-- plugins/forms/dialogs/checkbox.js | 138 +--- plugins/forms/dialogs/form.js | 159 +---- plugins/forms/dialogs/hiddenfield.js | 93 +-- plugins/forms/dialogs/radio.js | 123 +--- 13 files changed, 132 insertions(+), 4138 deletions(-) mode change 100644 => 100755 plugins/about/dialogs/about.js mode change 100644 => 100755 plugins/about/dialogs/logo_ckeditor.png mode change 100644 => 100755 plugins/clipboard/dialogs/paste.js mode change 100644 => 100755 plugins/colordialog/dialogs/colordialog.js mode change 100644 => 100755 plugins/dialog/dialogDefinition.js mode change 100644 => 100755 plugins/div/dialogs/div.js mode change 100644 => 100755 plugins/find/dialogs/find.js mode change 100644 => 100755 plugins/flash/dialogs/flash.js mode change 100644 => 100755 plugins/forms/dialogs/button.js mode change 100644 => 100755 plugins/forms/dialogs/checkbox.js mode change 100644 => 100755 plugins/forms/dialogs/form.js mode change 100644 => 100755 plugins/forms/dialogs/hiddenfield.js mode change 100644 => 100755 plugins/forms/dialogs/radio.js diff --git a/plugins/about/dialogs/about.js b/plugins/about/dialogs/about.js old mode 100644 new mode 100755 index 8c1f2e1..d9b8194 --- a/plugins/about/dialogs/about.js +++ b/plugins/about/dialogs/about.js @@ -1,73 +1,7 @@ -/** - * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.html or http://ckeditor.com/license - */ - -CKEDITOR.dialog.add( 'about', function( editor ) { - var lang = editor.lang.about; - - return { - title: CKEDITOR.env.ie ? lang.dlgTitle : lang.title, - minWidth: 390, - minHeight: 230, - contents: [ - { - id: 'tab1', - label: '', - title: '', - expand: true, - padding: 0, - elements: [ - { - type: 'html', - html: '' + - '
' + - '' + - '

' + - 'CKEditor ' + CKEDITOR.version + ' (revision ' + CKEDITOR.revision + ')
' + - 'http://ckeditor.com' + - '

' + - '

' + - lang.help.replace( '$1', '' + lang.userGuide + '' ) + - '

' + - '

' + - lang.moreInfo + '
' + - 'http://ckeditor.com/about/license' + - '

' + - '

' + - lang.copy.replace( '$1', 'CKSource - Frederico Knabben' ) + - '

' + - '
' - } - ] - } - ], - buttons: [ CKEDITOR.dialog.cancelButton ] - }; -}); +/* + Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.dialog.add("about",function(a){var a=a.lang.about,b=CKEDITOR.plugins.get("about").path+"dialogs/"+(CKEDITOR.env.hidpi?"hidpi/":"")+"logo_ckeditor.png";return{title:CKEDITOR.env.ie?a.dlgTitle:a.title,minWidth:390,minHeight:230,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[{type:"html",html:'

CKEditor '+CKEDITOR.version+" (revision "+CKEDITOR.revision+')
http://ckeditor.com

'+a.help.replace("$1",''+ +a.userGuide+"")+"

"+a.moreInfo+'
http://ckeditor.com/about/license

'+a.copy.replace("$1",'CKSource - Frederico Knabben')+"

"}]}],buttons:[CKEDITOR.dialog.cancelButton]}}); \ No newline at end of file diff --git a/plugins/about/dialogs/logo_ckeditor.png b/plugins/about/dialogs/logo_ckeditor.png old mode 100644 new mode 100755 index ad01902..f186eb8 Binary files a/plugins/about/dialogs/logo_ckeditor.png and b/plugins/about/dialogs/logo_ckeditor.png differ diff --git a/plugins/clipboard/dialogs/paste.js b/plugins/clipboard/dialogs/paste.js old mode 100644 new mode 100755 index 892c6c3..0c7e256 --- a/plugins/clipboard/dialogs/paste.js +++ b/plugins/clipboard/dialogs/paste.js @@ -1,228 +1,11 @@ -/** - * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.html or http://ckeditor.com/license - */ - -CKEDITOR.dialog.add( 'paste', function( editor ) { - var lang = editor.lang.clipboard; - - function onPasteFrameLoad( win ) { - var doc = new CKEDITOR.dom.document( win.document ), - body = doc.getBody(), - script = doc.getById( 'cke_actscrpt' ); - - script && script.remove(); - - body.setAttribute( 'contenteditable', true ); - - // IE before version 8 will leave cursor blinking inside the document after - // editor blurred unless we clean up the selection. (#4716) - if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) { - doc.getWindow().on( 'blur', function() { - doc.$.selection.empty(); - }); - } - - doc.on( 'keydown', function( e ) { - var domEvent = e.data, - key = domEvent.getKeystroke(), - processed; - - switch ( key ) { - case 27: - this.hide(); - processed = 1; - break; - - case 9: - case CKEDITOR.SHIFT + 9: - this.changeFocus( 1 ); - processed = 1; - } - - processed && domEvent.preventDefault(); - }, this ); - - editor.fire( 'ariaWidget', new CKEDITOR.dom.element( win.frameElement ) ); - - // Handle pending focus. - if ( doc.getWindow().getFrame().removeCustomData( 'pendingFocus' ) ) - body.focus(); - } - - // If pasteDialogCommit wasn't canceled by e.g. editor.getClipboardData - // then fire paste event. - // Do not use editor#paste, because it would start from beforePaste event. - editor.on( 'pasteDialogCommit', function( evt ) { - if ( evt.data ) - editor.fire( 'paste', { type: 'auto', dataValue: evt.data } ); - }, null, null, 1000 ); - - return { - title: lang.title, - - minWidth: CKEDITOR.env.ie && CKEDITOR.env.quirks ? 370 : 350, - minHeight: CKEDITOR.env.quirks ? 250 : 245, - onShow: function() { - // FIREFOX BUG: Force the browser to render the dialog to make the to-be- - // inserted iframe editable. (#3366) - this.parts.dialog.$.offsetHeight; - - this.setupContent(); - - // Set dialog title to the custom value (set e.g. in editor.openDialog callback) and reset this value. - // If custom title not set, use default one. - this.parts.title.setHtml( this.customTitle || lang.title ); - this.customTitle = null; - }, - - onLoad: function() { - if ( ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) && editor.lang.dir == 'rtl' ) - this.parts.contents.setStyle( 'overflow', 'hidden' ); - }, - - onOk: function() { - this.commitContent(); - }, - - contents: [ - { - id: 'general', - label: editor.lang.common.generalTab, - elements: [ - { - type: 'html', - id: 'securityMsg', - html: '
' + lang.securityMsg + '
' - }, - { - type: 'html', - id: 'pasteMsg', - html: '
' + lang.pasteMsg + '
' - }, - { - type: 'html', - id: 'editing_area', - style: 'width:100%;height:100%', - html: '', - focus: function() { - var iframe = this.getInputElement(), - doc = iframe.getFrameDocument(), - body = doc.getBody(); - - // Frame content may not loaded at the moment. - if ( !body || body.isReadOnly() ) - iframe.setCustomData( 'pendingFocus', 1 ); - else - body.focus(); - }, - setup: function() { - var dialog = this.getDialog(); - var htmlToLoad = '' + - '' + - '' + - ''; - - var src = - CKEDITOR.env.air ? - 'javascript:void(0)' : - CKEDITOR.env.ie ? - 'javascript:void((function(){' + encodeURIComponent( - 'document.open();' + - '(' + CKEDITOR.tools.fixDomain + ')();' + - 'document.close();' - ) + '})())"' - : ''; - - var iframe = CKEDITOR.dom.element.createFromHtml( '' ); - - iframe.on( 'load', function( e ) { - e.removeListener(); - - var doc = iframe.getFrameDocument(); - doc.write( htmlToLoad ); - - editor.focusManager.add( doc.getBody() ); - - if ( CKEDITOR.env.air ) - onPasteFrameLoad.call( this, doc.getWindow().$ ); - }, dialog ); - - iframe.setCustomData( 'dialog', dialog ); - - var container = this.getElement(); - container.setHtml( '' ); - container.append( iframe ); - - // IE need a redirect on focus to make - // the cursor blinking inside iframe. (#5461) - if ( CKEDITOR.env.ie ) { - var focusGrabber = CKEDITOR.dom.element.createFromHtml( '' ); - focusGrabber.on( 'focus', function() { - // Since fixDomain is called in src attribute, - // IE needs some slight delay to correctly move focus. - setTimeout( function() { - iframe.$.contentWindow.focus(); - } ); - } ); - container.append( focusGrabber ); - - // Override focus handler on field. - this.focus = function() { - focusGrabber.focus(); - this.fire( 'focus' ); - }; - } - - this.getInputElement = function() { - return iframe; - }; - - // Force container to scale in IE. - if ( CKEDITOR.env.ie ) { - container.setStyle( 'display', 'block' ); - container.setStyle( 'height', ( iframe.$.offsetHeight + 2 ) + 'px' ); - } - }, - commit: function( data ) { - var editor = this.getDialog().getParentEditor(), - body = this.getInputElement().getFrameDocument().getBody(), - bogus = body.getBogus(), - html; - bogus && bogus.remove(); - - // Saving the contents so changes until paste is complete will not take place (#7500) - html = body.getHtml(); - - // Opera needs some time to think about what has happened and what it should do now. - setTimeout( function() { - editor.fire( 'pasteDialogCommit', html ); - }, 0 ); - } - } - ] - } - ] - }; -}); - -/** - * Internal event to pass paste dialog's data to the listeners. - * - * @private - * @event pasteDialogCommit - * @member CKEDITOR.editor - * @param {CKEDITOR.editor} editor This editor instance. - */ +/* + Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.dialog.add("paste",function(c){function h(a){var b=new CKEDITOR.dom.document(a.document),f=b.getBody(),d=b.getById("cke_actscrpt");d&&d.remove();f.setAttribute("contenteditable",!0);if(CKEDITOR.env.ie&&8>CKEDITOR.env.version)b.getWindow().on("blur",function(){b.$.selection.empty()});b.on("keydown",function(a){var a=a.data,b;switch(a.getKeystroke()){case 27:this.hide();b=1;break;case 9:case CKEDITOR.SHIFT+9:this.changeFocus(1),b=1}b&&a.preventDefault()},this);c.fire("ariaWidget",new CKEDITOR.dom.element(a.frameElement)); +b.getWindow().getFrame().removeCustomData("pendingFocus")&&f.focus()}var e=c.lang.clipboard;c.on("pasteDialogCommit",function(a){a.data&&c.fire("paste",{type:"auto",dataValue:a.data})},null,null,1E3);return{title:e.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?370:350,minHeight:CKEDITOR.env.quirks?250:245,onShow:function(){this.parts.dialog.$.offsetHeight;this.setupContent();this.parts.title.setHtml(this.customTitle||e.title);this.customTitle=null},onLoad:function(){(CKEDITOR.env.ie7Compat|| +CKEDITOR.env.ie6Compat)&&"rtl"==c.lang.dir&&this.parts.contents.setStyle("overflow","hidden")},onOk:function(){this.commitContent()},contents:[{id:"general",label:c.lang.common.generalTab,elements:[{type:"html",id:"securityMsg",html:'
'+e.securityMsg+"
"},{type:"html",id:"pasteMsg",html:'
'+e.pasteMsg+"
"},{type:"html",id:"editing_area",style:"width:100%;height:100%",html:"",focus:function(){var a=this.getInputElement(), +b=a.getFrameDocument().getBody();!b||b.isReadOnly()?a.setCustomData("pendingFocus",1):b.focus()},setup:function(){var a=this.getDialog(),b='