mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-18 03:38:49 +00:00
chore(npm): Update CKEditor to version 4.20.0
This commit is contained in:
178
UI/WebServerResources/js/vendor/angular-material.js
vendored
178
UI/WebServerResources/js/vendor/angular-material.js
vendored
@@ -6135,95 +6135,95 @@ function InterimElementProvider() {
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name material.core.liveannouncer
|
||||
* @description
|
||||
* AngularJS Material Live Announcer to provide accessibility for Voice Readers.
|
||||
*/
|
||||
MdLiveAnnouncer.$inject = ["$timeout"];
|
||||
angular
|
||||
.module('material.core')
|
||||
.service('$mdLiveAnnouncer', MdLiveAnnouncer);
|
||||
|
||||
/**
|
||||
* @ngdoc service
|
||||
* @name $mdLiveAnnouncer
|
||||
* @module material.core.liveannouncer
|
||||
*
|
||||
* @description
|
||||
*
|
||||
* Service to announce messages to supported screenreaders.
|
||||
*
|
||||
* > The `$mdLiveAnnouncer` service is internally used for components to provide proper accessibility.
|
||||
*
|
||||
* <hljs lang="js">
|
||||
* module.controller('AppCtrl', function($mdLiveAnnouncer) {
|
||||
* // Basic announcement (Polite Mode)
|
||||
* $mdLiveAnnouncer.announce('Hey Google');
|
||||
*
|
||||
* // Custom announcement (Assertive Mode)
|
||||
* $mdLiveAnnouncer.announce('Hey Google', 'assertive');
|
||||
* });
|
||||
* </hljs>
|
||||
*
|
||||
*/
|
||||
function MdLiveAnnouncer($timeout) {
|
||||
/** @private @const @type {!angular.$timeout} */
|
||||
this._$timeout = $timeout;
|
||||
|
||||
/** @private @const @type {!HTMLElement} */
|
||||
this._liveElement = this._createLiveElement();
|
||||
|
||||
/** @private @const @type {!number} */
|
||||
this._announceTimeout = 100;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdLiveAnnouncer#announce
|
||||
* @description Announces messages to supported screenreaders.
|
||||
* @param {string} message Message to be announced to the screenreader
|
||||
* @param {'off'|'polite'|'assertive'} politeness The politeness of the announcer element.
|
||||
*/
|
||||
MdLiveAnnouncer.prototype.announce = function(message, politeness) {
|
||||
if (!politeness) {
|
||||
politeness = 'polite';
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
self._liveElement.textContent = '';
|
||||
self._liveElement.setAttribute('aria-live', politeness);
|
||||
|
||||
// This 100ms timeout is necessary for some browser + screen-reader combinations:
|
||||
// - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout.
|
||||
// - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a
|
||||
// second time without clearing and then using a non-zero delay.
|
||||
// (using JAWS 17 at time of this writing).
|
||||
self._$timeout(function() {
|
||||
self._liveElement.textContent = message;
|
||||
}, self._announceTimeout, false);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a live announcer element, which listens for DOM changes and announces them
|
||||
* to the screenreaders.
|
||||
* @returns {!HTMLElement}
|
||||
* @private
|
||||
*/
|
||||
MdLiveAnnouncer.prototype._createLiveElement = function() {
|
||||
var liveEl = document.createElement('div');
|
||||
|
||||
liveEl.classList.add('md-visually-hidden');
|
||||
liveEl.setAttribute('role', 'status');
|
||||
liveEl.setAttribute('aria-atomic', 'true');
|
||||
liveEl.setAttribute('aria-live', 'polite');
|
||||
|
||||
document.body.appendChild(liveEl);
|
||||
|
||||
return liveEl;
|
||||
};
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name material.core.liveannouncer
|
||||
* @description
|
||||
* AngularJS Material Live Announcer to provide accessibility for Voice Readers.
|
||||
*/
|
||||
MdLiveAnnouncer.$inject = ["$timeout"];
|
||||
angular
|
||||
.module('material.core')
|
||||
.service('$mdLiveAnnouncer', MdLiveAnnouncer);
|
||||
|
||||
/**
|
||||
* @ngdoc service
|
||||
* @name $mdLiveAnnouncer
|
||||
* @module material.core.liveannouncer
|
||||
*
|
||||
* @description
|
||||
*
|
||||
* Service to announce messages to supported screenreaders.
|
||||
*
|
||||
* > The `$mdLiveAnnouncer` service is internally used for components to provide proper accessibility.
|
||||
*
|
||||
* <hljs lang="js">
|
||||
* module.controller('AppCtrl', function($mdLiveAnnouncer) {
|
||||
* // Basic announcement (Polite Mode)
|
||||
* $mdLiveAnnouncer.announce('Hey Google');
|
||||
*
|
||||
* // Custom announcement (Assertive Mode)
|
||||
* $mdLiveAnnouncer.announce('Hey Google', 'assertive');
|
||||
* });
|
||||
* </hljs>
|
||||
*
|
||||
*/
|
||||
function MdLiveAnnouncer($timeout) {
|
||||
/** @private @const @type {!angular.$timeout} */
|
||||
this._$timeout = $timeout;
|
||||
|
||||
/** @private @const @type {!HTMLElement} */
|
||||
this._liveElement = this._createLiveElement();
|
||||
|
||||
/** @private @const @type {!number} */
|
||||
this._announceTimeout = 100;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdLiveAnnouncer#announce
|
||||
* @description Announces messages to supported screenreaders.
|
||||
* @param {string} message Message to be announced to the screenreader
|
||||
* @param {'off'|'polite'|'assertive'} politeness The politeness of the announcer element.
|
||||
*/
|
||||
MdLiveAnnouncer.prototype.announce = function(message, politeness) {
|
||||
if (!politeness) {
|
||||
politeness = 'polite';
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
self._liveElement.textContent = '';
|
||||
self._liveElement.setAttribute('aria-live', politeness);
|
||||
|
||||
// This 100ms timeout is necessary for some browser + screen-reader combinations:
|
||||
// - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout.
|
||||
// - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a
|
||||
// second time without clearing and then using a non-zero delay.
|
||||
// (using JAWS 17 at time of this writing).
|
||||
self._$timeout(function() {
|
||||
self._liveElement.textContent = message;
|
||||
}, self._announceTimeout, false);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a live announcer element, which listens for DOM changes and announces them
|
||||
* to the screenreaders.
|
||||
* @returns {!HTMLElement}
|
||||
* @private
|
||||
*/
|
||||
MdLiveAnnouncer.prototype._createLiveElement = function() {
|
||||
var liveEl = document.createElement('div');
|
||||
|
||||
liveEl.classList.add('md-visually-hidden');
|
||||
liveEl.setAttribute('role', 'status');
|
||||
liveEl.setAttribute('aria-atomic', 'true');
|
||||
liveEl.setAttribute('aria-live', 'polite');
|
||||
|
||||
document.body.appendChild(liveEl);
|
||||
|
||||
return liveEl;
|
||||
};
|
||||
|
||||
})();
|
||||
(function(){
|
||||
|
||||
118
UI/WebServerResources/js/vendor/ckeditor/ckeditor.js
vendored
118
UI/WebServerResources/js/vendor/ckeditor/ckeditor.js
vendored
@@ -2,7 +2,7 @@
|
||||
Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
||||
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license/
|
||||
*/
|
||||
(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,d={timestamp:"M6K9",version:"4.19.1",revision:"445cf24ebd",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var h=c[d].src.match(a);if(h){b=h[1];break}}-1==b.indexOf(":/")&&"//"!=b.slice(0,2)&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+
|
||||
(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,d={timestamp:"M8SC",version:"4.20.0",revision:"cb4a59c665",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var h=c[d].src.match(a);if(h){b=h[1];break}}-1==b.indexOf(":/")&&"//"!=b.slice(0,2)&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+
|
||||
b:location.href.match(/^[^\?]*\/(?:)/)[0]+b);if(!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return b}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);return a=this.appendTimestamp(a)},appendTimestamp:function(a){if(!this.timestamp||"/"===a.charAt(a.length-1)||/[&?]t=/.test(a))return a;var b=0<=a.indexOf("?")?"\x26":"?";return a+b+"t\x3d"+this.timestamp},
|
||||
domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),window.removeEventListener("load",a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),window.detachEvent("onload",a),b())}catch(c){}}function b(){for(var a;a=c.shift();)a()}var c=[];return function(b){function e(){try{document.documentElement.doScroll("left")}catch(b){setTimeout(e,1);return}a()}c.push(b);"complete"===document.readyState&&
|
||||
setTimeout(a,1);if(1==c.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);b=!1;try{b=!window.frameElement}catch(d){}document.documentElement.doScroll&&b&&e()}}}()},b=window.CKEDITOR_GETURL;if(b){var c=d.getUrl;d.getUrl=function(a){return b.call(d,a)||c.call(d,a)}}return d}());
|
||||
@@ -530,8 +530,8 @@ CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function
|
||||
else{var d=this,b=d.config.stylesCombo_stylesSet||d.config.stylesSet;if(!1===b)a(null);else if(b instanceof Array)d._.stylesDefinitions=b,a(b);else{b||(b="default");var b=b.split(":"),c=b[0];CKEDITOR.stylesSet.addExternal(c,b[1]?b.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(c,function(b){d._.stylesDefinitions=b[c];a(d._.stylesDefinitions)})}}}});
|
||||
(function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var a=CKEDITOR.getUrl("vendor/promise.js");if("function"===typeof window.define&&window.define.amd&&"function"===typeof window.require)return window.require([a],function(a){CKEDITOR.tools.promise=a});CKEDITOR.scriptLoader.load(a,function(d){if(!d)return CKEDITOR.error("no-vendor-lib",{path:a});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}})();
|
||||
(function(){function a(a,f,e){a.once("selectionCheck",function(a){if(!d){var c=a.data.getRanges()[0];e.equals(c)?a.cancel():f.equals(c)&&(b=!0)}},null,null,-1)}var d=!0,b=!1;CKEDITOR.dom.selection.setupEditorOptimization=function(a){a.on("selectionCheck",function(a){a.data&&!b&&a.data.optimizeInElementEnds();b=!1});a.on("contentDom",function(){var b=a.editable();b&&(b.attachListener(b,"keydown",function(a){this._.shiftPressed=a.data.$.shiftKey},this),b.attachListener(b,"keyup",function(a){this._.shiftPressed=
|
||||
a.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var b=this.getRanges()[0],f=this.root.editor,e;if(this.root.editor._.shiftPressed||this.isFake||b.isCollapsed||b.startContainer.equals(b.endContainer))e=!1;else if(0===b.endOffset)e=!0;else{e=b.startContainer.type===CKEDITOR.NODE_TEXT;var k=b.endContainer.type===CKEDITOR.NODE_TEXT,h=e?b.startContainer.getLength():b.startContainer.getChildCount();e=b.startOffset===h||e^k}e&&(e=b.clone(),b.shrink(CKEDITOR.SHRINK_TEXT,
|
||||
!1,{skipBogus:!CKEDITOR.env.webkit}),d=!1,a(f,b,e),b.select(),d=!0)}})();
|
||||
a.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var b=this.getRanges()[0],f=this.root.editor,e;if(this.root.editor._.shiftPressed||this.isFake||b.isCollapsed||b.startContainer.equals(b.endContainer)||(b.endContainer.is?b.endContainer.is("li"):b.endContainer.getParent().is&&b.endContainer.getParent().is("li")))e=!1;else if(0===b.endOffset)e=!0;else{e=b.startContainer.type===CKEDITOR.NODE_TEXT;var k=b.endContainer.type===CKEDITOR.NODE_TEXT,h=e?b.startContainer.getLength():
|
||||
b.startContainer.getChildCount();e=b.startOffset===h||e^k}e&&(e=b.clone(),b.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),d=!1,a(f,b,e),b.select(),d=!0)}})();
|
||||
(function(){function a(a,c){if(b(a))a=Math.round(c*(parseFloat(a)/100));else if("string"===typeof a&&a.match(/^\d+$/gm)||"string"===typeof a&&a.match(/^\d+(?:deg)?$/gm))a=parseInt(a,10);return a}function d(a,c){b(a)?a=c*(parseFloat(a)/100):"string"===typeof a&&a.match(/^\d?\.\d+/gm)&&(a=parseFloat(a));return a}function b(a){return"string"===typeof a&&a.match(/^((\d*\.\d+)|(\d+))%{1}$/gm)}function c(a,b,c){return!isNaN(a)&&a>=b&&a<=c}function f(a){a=a.toString(16);return 1==a.length?"0"+a:a}CKEDITOR.tools.color=
|
||||
CKEDITOR.tools.createClass({$:function(a,b){this._.initialColorCode=a;this._.defaultValue=b;this._.parseInput(a)},proto:{getHex:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatHexString(a[0],a[1],a[2])},getHexWithAlpha:function(){if(!this._.isValidColor)return this._.defaultValue;var a=Math.round(this._.alpha*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);return this._.formatHexString(this._.red,
|
||||
this._.green,this._.blue,a)},getRgb:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatRgbString("rgb",a[0],a[1],a[2])},getRgba:function(){return this._.isValidColor?this._.formatRgbString("rgba",this._.red,this._.green,this._.blue,this._.alpha):this._.defaultValue},getHsl:function(){var a=0===this._.alpha||1===this._.alpha;if(!this._.isValidColor)return this._.defaultValue;this._.type===
|
||||
@@ -686,10 +686,10 @@ c.setStyle("overflow-y","hidden");var d=a.window.getViewPaneSize().height,b;n.ap
|
||||
200,p=a.config.autoGrow_maxHeight||Infinity,k=!a.config.autoGrow_maxHeight;a.addCommand("autogrow",{exec:g,modes:{wysiwyg:1},readOnly:1,canUndo:!1,editorFocus:!1});var t={contentDom:1,key:1,selectionChange:1,insertElement:1,mode:1},q;for(q in t)a.on(q,function(d){"wysiwyg"==d.editor.mode&&setTimeout(function(){var b=a.getCommand("maximize");!a.window||b&&b.state==CKEDITOR.TRISTATE_ON?l=null:(g(),k||g())},100)});a.on("afterCommandExec",function(a){"maximize"==a.data.name&&"wysiwyg"==a.editor.mode&&
|
||||
(a.data.command.state==CKEDITOR.TRISTATE_ON?c.removeStyle("overflow-y"):g())});a.on("contentDom",m);m();a.config.autoGrow_onStartup&&a.editable().isVisible()&&a.execCommand("autogrow")}CKEDITOR.plugins.add("autogrow",{init:function(a){if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE)a.on("instanceReady",function(){a.editable().isInline()?a.ui.space("contents").setStyle("height","auto"):h(a)})}})})();CKEDITOR.plugins.add("base64image",{lang:"af ar bg bn bs ca cs cy da de el en en-au en-ca en-gb eo es et eu fa fi fo fr fr-ca gl gu he hi hr hu id is it ja ka km ko ku lt lv mk mn ms nb nl no pl pt pt-br ro ru si sk sl sq sr sr-latn sv th tr ug uk vi zh zh-cn".split(" "),requires:"dialog",icons:"base64image",hidpi:!0,init:function(a){a.ui.addButton("base64image",{label:a.lang.common.image,command:"base64imageDialog",toolbar:"insert"});CKEDITOR.dialog.add("base64imageDialog",this.path+"dialogs/base64image.js");
|
||||
a.addCommand("base64imageDialog",new CKEDITOR.dialogCommand("base64imageDialog",{allowedContent:"img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}",requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]}));a.on("doubleclick",function(b){b.data.element&&(!b.data.element.isReadOnly()&&"img"===b.data.element.getName())&&
|
||||
(b.data.dialog="base64imageDialog",a.getSelection().selectElement(b.data.element))});a.addMenuItem&&(a.addMenuGroup("base64imageGroup"),a.addMenuItem("base64imageItem",{label:a.lang.common.image,icon:this.path+"icons/base64image.png",command:"base64imageDialog",group:"base64imageGroup"}));a.contextMenu&&a.contextMenu.addListener(function(b){if(b&&b.getName()==="img"){a.getSelection().selectElement(b);return{base64imageItem:CKEDITOR.TRISTATE_ON}}return null})}});CKEDITOR.plugins.add("basicstyles",{init:function(c){var e=0,d=function(g,d,b,a){if(a){a=new CKEDITOR.style(a);var f=h[b];f.unshift(a);c.attachStyleStateChange(a,function(a){!c.readOnly&&c.getCommand(b).setState(a)});c.addCommand(b,new CKEDITOR.styleCommand(a,{contentForms:f}));c.ui.addButton&&c.ui.addButton(g,{isToggle:!0,label:d,command:b,toolbar:"basicstyles,"+(e+=10)})}},h={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==
|
||||
a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},b=c.config,a=c.lang.basicstyles;d("Bold",a.bold,"bold",b.coreStyles_bold);d("Italic",a.italic,"italic",b.coreStyles_italic);d("Underline",a.underline,"underline",b.coreStyles_underline);d("Strike",a.strike,"strike",b.coreStyles_strike);d("Subscript",a.subscript,
|
||||
"subscript",b.coreStyles_subscript);d("Superscript",a.superscript,"superscript",b.coreStyles_superscript);c.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}});CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"};CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"};CKEDITOR.config.coreStyles_underline={element:"u"};CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"};
|
||||
CKEDITOR.config.coreStyles_superscript={element:"sup"};(function(){function q(a,f,e,b){if(!a.isReadOnly()&&!a.equals(e.editable())){CKEDITOR.dom.element.setMarker(b,a,"bidi_processed",1);b=a;for(var c=e.editable();(b=b.getParent())&&!b.equals(c);)if(b.getCustomData("bidi_processed")){a.removeStyle("direction");a.removeAttribute("dir");return}b=e.config.useComputedState;(b?a.getComputedStyle("direction"):a.getStyle("direction")||a.hasAttribute("dir"))!=f&&(a.removeStyle("direction"),b?(a.removeAttribute("dir"),f!=a.getComputedStyle("direction")&&a.setAttribute("dir",
|
||||
(b.data.dialog="base64imageDialog",a.getSelection().selectElement(b.data.element))});a.addMenuItem&&(a.addMenuGroup("base64imageGroup"),a.addMenuItem("base64imageItem",{label:a.lang.common.image,icon:this.path+"icons/base64image.png",command:"base64imageDialog",group:"base64imageGroup"}));a.contextMenu&&a.contextMenu.addListener(function(b){if(b&&b.getName()==="img"){a.getSelection().selectElement(b);return{base64imageItem:CKEDITOR.TRISTATE_ON}}return null})}});CKEDITOR.plugins.add("basicstyles",{init:function(a){var f=0,d=function(h,d,c,b){if(b){b=new CKEDITOR.style(b);var g=e[c];g.unshift(b);a.attachStyleStateChange(b,function(b){!a.readOnly&&a.getCommand(c).setState(b)});a.addCommand(c,new CKEDITOR.styleCommand(b,{contentForms:g}));a.ui.addButton&&a.ui.addButton(h,{isToggle:!0,label:d,command:c,toolbar:"basicstyles,"+(f+=10)})}},e={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==
|
||||
a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},c=a.config,b=a.lang.basicstyles;d("Bold",b.bold,"bold",c.coreStyles_bold);d("Italic",b.italic,"italic",c.coreStyles_italic);d("Underline",b.underline,"underline",c.coreStyles_underline);d("Strike",b.strike,"strike",c.coreStyles_strike);d("Subscript",b.subscript,
|
||||
"subscript",c.coreStyles_subscript);d("Superscript",b.superscript,"superscript",c.coreStyles_superscript);a.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])},afterInit:function(a){if(a.config.coreStyles_toggleSubSup){var f=a.getCommand("subscript"),d=a.getCommand("superscript");if(f&&d)a.on("afterCommandExec",function(e){e=e.data.name;if("subscript"===e||"superscript"===e){var c="subscript"===e?d:f;("subscript"===e?f:d).state===CKEDITOR.TRISTATE_ON&&
|
||||
c.state===CKEDITOR.TRISTATE_ON&&(c.exec(a),a.fire("updateSnapshot"))}})}}});CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"};CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"};CKEDITOR.config.coreStyles_underline={element:"u"};CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"};CKEDITOR.config.coreStyles_superscript={element:"sup"};CKEDITOR.config.coreStyles_toggleSubSup=!1;(function(){function q(a,f,e,b){if(!a.isReadOnly()&&!a.equals(e.editable())){CKEDITOR.dom.element.setMarker(b,a,"bidi_processed",1);b=a;for(var c=e.editable();(b=b.getParent())&&!b.equals(c);)if(b.getCustomData("bidi_processed")){a.removeStyle("direction");a.removeAttribute("dir");return}b=e.config.useComputedState;(b?a.getComputedStyle("direction"):a.getStyle("direction")||a.hasAttribute("dir"))!=f&&(a.removeStyle("direction"),b?(a.removeAttribute("dir"),f!=a.getComputedStyle("direction")&&a.setAttribute("dir",
|
||||
f)):a.setAttribute("dir",f),e.forceNextSelectionCheck())}}function v(a,f,e){var b=a.getCommonAncestor(!1,!0);a=a.clone();a.enlarge(e==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(a.checkBoundaryOfElement(b,CKEDITOR.START)&&a.checkBoundaryOfElement(b,CKEDITOR.END)){for(var c;b&&b.type==CKEDITOR.NODE_ELEMENT&&(c=b.getParent())&&1==c.getChildCount()&&!(b.getName()in f);)b=c;return b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in f&&b}}function p(a){return{context:"p",
|
||||
allowedContent:{"h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td":{propertiesOnly:!0,attributes:"dir"}},requiredContent:"p[dir]",refresh:function(a,e){var b=a.config.useComputedState,c;if(!b){c=e.lastElement;for(var h=a.editable();c&&!(c.getName()in u||c.equals(h));){var d=c.getParent();if(!d)break;c=d}}c=c||e.block||e.blockLimit;c.equals(a.editable())&&(h=a.getSelection().getRanges()[0].getEnclosedNode())&&h.type==CKEDITOR.NODE_ELEMENT&&(c=h);c&&(b=b?c.getComputedStyle("direction"):c.getStyle("direction")||
|
||||
c.getAttribute("dir"),a.getCommand("bidirtl").setState("rtl"==b?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),a.getCommand("bidiltr").setState("ltr"==b?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF));b=(e.block||e.blockLimit||a.editable()).getDirection(1);b!=(a._.selDir||a.lang.dir)&&(a._.selDir=b,a.fire("contentDirChanged",b))},exec:function(f){var e=f.getSelection(),b=f.config.enterMode,c=e.getRanges();if(c&&c.length){for(var h={},d=e.createBookmarks(),c=c.createIterator(),g,l=0;g=c.getNextRange(1);){var k=
|
||||
@@ -725,21 +725,21 @@ b);0>a||(this.notifications.splice(a,1),b.element.remove(),this.element.getChild
|
||||
a.on("change",this._changeBuffer.input);a.on("floatingSpaceLayout",this._layout,this,null,20);a.on("blur",this._layout,this,null,20)},_removeListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.removeListener("scroll",this._uiBuffer.input);b.removeListener("resize",this._uiBuffer.input);a.removeListener("change",this._changeBuffer.input);a.removeListener("floatingSpaceLayout",this._layout);a.removeListener("blur",this._layout)},_layout:function(){function b(){a.setStyle("left",
|
||||
k(n+d.width-g-h))}var a=this.element,c=this.editor,d=c.ui.contentsElement.getClientRect(),e=c.ui.contentsElement.getDocumentPosition(),f,l,u=a.getClientRect(),m,g=this._notificationWidth,h=this._notificationMargin;m=CKEDITOR.document.getWindow();var p=m.getScrollPosition(),t=m.getViewPaneSize(),q=CKEDITOR.document.getBody(),r=q.getDocumentPosition(),k=CKEDITOR.tools.cssLength;g&&h||(m=this.element.getChild(0),g=this._notificationWidth=m.getClientRect().width,h=this._notificationMargin=parseInt(m.getComputedStyle("margin-left"),
|
||||
10)+parseInt(m.getComputedStyle("margin-right"),10));c.toolbar&&(f=c.ui.space(c.config.toolbarLocation),l=f.getClientRect());f&&f.isVisible()&&l.bottom>d.top&&l.bottom<d.bottom-u.height?a.setStyles({position:"fixed",top:k(l.bottom)}):0<d.top?a.setStyles({position:"absolute",top:k(e.y)}):e.y+d.height-u.height>p.y?a.setStyles({position:"fixed",top:0}):a.setStyles({position:"absolute",top:k(e.y+d.height-u.height)});var n="fixed"==a.getStyle("position")?d.left:"static"!=q.getComputedStyle("position")?
|
||||
e.x-r.x:e.x;d.width<g+h?e.x+g+h>p.x+t.width?b():a.setStyle("left",k(n)):e.x+g+h>p.x+t.width?a.setStyle("left",k(n)):e.x+d.width/2+g/2+h>p.x+t.width?a.setStyle("left",k(n-e.x+p.x+t.width-g-h)):0>d.left+d.width-g-h?b():0>d.left+d.width/2-g/2?a.setStyle("left",k(n-e.x+p.x)):a.setStyle("left",k(n+d.width/2-g/2-h/2))}};CKEDITOR.plugins.notification=q})();(function(){function D(a){function d(){for(var b=f(),e=CKEDITOR.tools.clone(a.config.toolbarGroups)||v(a),n=0;n<e.length;n++){var g=e[n];if("/"!=g){"string"==typeof g&&(g=e[n]={name:g});var l,d=g.groups;if(d)for(var h=0;h<d.length;h++)l=d[h],(l=b[l])&&c(g,l);(l=b[g.name])&&c(g,l)}}return e}function f(){var b={},c,e,g;for(c in a.ui.items)e=a.ui.items[c],g=e.toolbar||"others",g=g.split(","),e=g[0],g=parseInt(g[1]||-1,10),b[e]||(b[e]=[]),b[e].push({name:c,order:g});for(e in b)b[e]=b[e].sort(function(b,
|
||||
a){return b.order==a.order?0:0>a.order?-1:0>b.order?1:b.order<a.order?-1:1});return b}function c(c,e){if(e.length){c.items?c.items.push(a.ui.create("-")):c.items=[];for(var d;d=e.shift();)d="string"==typeof d?d:d.name,b&&-1!=CKEDITOR.tools.indexOf(b,d)||(d=a.ui.create(d))&&a.addFeature(d)&&c.items.push(d)}}function h(b){var a=[],e,d,h;for(e=0;e<b.length;++e)d=b[e],h={},"/"==d?a.push(d):CKEDITOR.tools.isArray(d)?(c(h,CKEDITOR.tools.clone(d)),a.push(h)):d.items&&(c(h,CKEDITOR.tools.clone(d.items)),
|
||||
h.name=d.name,a.push(h));return a}var b=a.config.removeButtons,b=b&&b.split(","),e=a.config.toolbar;"string"==typeof e&&(e=a.config["toolbar_"+e]);return a.toolbar=e?h(e):d()}function v(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list",
|
||||
"indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var z=function(){this.toolbars=[]};z.prototype.focus=function(){for(var a=0,d;d=this.toolbars[a++];)for(var f=0,c;c=d.items[f++];)if(c.focus){c.focus();return}};var E={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(a){a.toolbox&&(CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",
|
||||
{requires:"button",init:function(a){var d,f=function(c,h){var b,e="rtl"==a.lang.dir,k=a.config.toolbarGroupCycling,q=e?37:39,e=e?39:37,k=void 0===k||k;switch(h){case 9:case CKEDITOR.SHIFT+9:for(;!b||!b.items.length;)if(b=9==h?(b?b.next:c.toolbar.next)||a.toolbox.toolbars[0]:(b?b.previous:c.toolbar.previous)||a.toolbox.toolbars[a.toolbox.toolbars.length-1],b.items.length)for(c=b.items[d?b.items.length-1:0];c&&!c.focus;)(c=d?c.previous:c.next)||(b=0);c&&c.focus();return!1;case q:b=c;do b=b.next,!b&&
|
||||
k&&(b=c.toolbar.items[0]);while(b&&!b.focus);b?b.focus():f(c,9);return!1;case 40:return c.button&&c.button.hasArrow?c.execute():f(c,40==h?q:e),!1;case e:case 38:b=c;do b=b.previous,!b&&k&&(b=c.toolbar.items[c.toolbar.items.length-1]);while(b&&!b.focus);b?b.focus():(d=1,f(c,CKEDITOR.SHIFT+9),d=0);return!1;case 27:return a.focus(),!1;case 13:case 32:return c.execute(),!1;case CKEDITOR.ALT+122:return a.execCommand("elementsPathFocus"),!1}return!0};a.on("uiSpace",function(c){if(c.data.space==a.config.toolbarLocation){c.removeListener();
|
||||
a.toolbox=new z;var d=CKEDITOR.tools.getNextId(),b=['\x3cspan id\x3d"',d,'" class\x3d"cke_voice_label"\x3e',a.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+a.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',d,'" onmousedown\x3d"return false;"\x3e'],d=!1!==a.config.toolbarStartupExpanded,e,k;a.config.toolbarCanCollapse&&a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&b.push('\x3cspan class\x3d"cke_toolbox_main"'+(d?"\x3e":' style\x3d"display:none"\x3e'));
|
||||
for(var q=a.toolbox.toolbars,n=D(a),g=n.length,l=0;l<g;l++){var r,m=0,w,p=n[l],v="/"!==p&&("/"===n[l+1]||l==g-1),x;if(p)if(e&&(b.push("\x3c/span\x3e"),k=e=0),"/"===p)b.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{x=p.items||p;for(var y=0;y<x.length;y++){var t=x[y],A;if(t){var B=function(c){c=c.render(a,b);u=m.items.push(c)-1;0<u&&(c.previous=m.items[u-1],c.previous.next=c);c.toolbar=m;c.onkey=f};if(t.type==CKEDITOR.UI_SEPARATOR)k=e&&t;else{A=!1!==t.canGroup;if(!m){r=CKEDITOR.tools.getNextId();
|
||||
m={id:r,items:[]};w=p.name&&(a.lang.toolbar.toolbarGroups[p.name]||p.name);b.push('\x3cspan id\x3d"',r,'" class\x3d"cke_toolbar'+(v?' cke_toolbar_last"':'"'),w?' aria-labelledby\x3d"'+r+'_label"':"",' role\x3d"toolbar"\x3e');w&&b.push('\x3cspan id\x3d"',r,'_label" class\x3d"cke_voice_label"\x3e',w,"\x3c/span\x3e");b.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var u=q.push(m)-1;0<u&&(m.previous=q[u-1],m.previous.next=m)}A?e||(b.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),
|
||||
e=1):e&&(b.push("\x3c/span\x3e"),e=0);k&&(B(k),k=0);B(t)}}}e&&(b.push("\x3c/span\x3e"),k=e=0);m&&b.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}a.config.toolbarCanCollapse&&b.push("\x3c/span\x3e");if(a.config.toolbarCanCollapse&&a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var C=CKEDITOR.tools.addFunction(function(){a.execCommand("toolbarCollapse")});a.on("destroy",function(){CKEDITOR.tools.removeFunction(C)});a.addCommand("toolbarCollapse",{readOnly:1,exec:function(b){var a=
|
||||
b.ui.space("toolbar_collapser"),c=a.getPrevious(),d=b.ui.space("contents"),e=c.getParent(),h=parseInt(d.$.style.height,10),g=e.$.offsetHeight,f=a.hasClass("cke_toolbox_collapser_min");f?(c.show(),a.removeClass("cke_toolbox_collapser_min"),a.setAttribute("title",b.lang.toolbar.toolbarCollapse)):(c.hide(),a.addClass("cke_toolbox_collapser_min"),a.setAttribute("title",b.lang.toolbar.toolbarExpand));a.getFirst().setText(f?"▲":"◀");d.setStyle("height",h-(e.$.offsetHeight-g)+"px");b.fire("resize",{outerHeight:b.container.$.offsetHeight,
|
||||
contentsHeight:d.$.offsetHeight,outerWidth:b.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});a.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");b.push('\x3ca title\x3d"'+(d?a.lang.toolbar.toolbarCollapse:a.lang.toolbar.toolbarExpand)+'" id\x3d"'+a.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');d||b.push(" cke_toolbox_collapser_min");b.push('" onclick\x3d"CKEDITOR.tools.callFunction('+C+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',
|
||||
"\x3c/a\x3e")}b.push("\x3c/span\x3e");c.data.html+=b.join("")}});a.on("destroy",function(){if(this.toolbox){var a,d=0,b,e,f;for(a=this.toolbox.toolbars;d<a.length;d++)for(e=a[d].items,b=0;b<e.length;b++)f=e[b],f.clickFn&&CKEDITOR.tools.removeFunction(f.clickFn),f.keyDownFn&&CKEDITOR.tools.removeFunction(f.keyDownFn)}});a.on("uiReady",function(){var c=a.ui.space("toolbox");c&&a.focusManager.add(c,1)});a.addCommand("toolbarFocus",E);a.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");a.ui.add("-",CKEDITOR.UI_SEPARATOR,
|
||||
{});a.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,d){d.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,d,f){var c=v(this.editor),h=0===d,b={name:a};if(f){if(f=CKEDITOR.tools.search(c,function(a){return a.name==f})){!f.groups&&(f.groups=[]);if(d&&(d=CKEDITOR.tools.indexOf(f.groups,d),0<=d)){f.groups.splice(d+1,0,a);return}h?f.groups.splice(0,0,a):f.groups.push(a);
|
||||
return}d=null}d&&(d=CKEDITOR.tools.indexOf(c,function(a){return a.name==d}));h?c.splice(0,0,a):"number"==typeof d?c.splice(d+1,0,b):c.push(a)}})();CKEDITOR.UI_SEPARATOR="separator";CKEDITOR.config.toolbarLocation="top";(function(){function t(a,b,c){b.type||(b.type="auto");if(c&&!1===a.fire("beforePaste",b)||!b.dataValue&&b.dataTransfer.isEmpty())return!1;b.dataValue||(b.dataValue="");if(CKEDITOR.env.gecko&&"drop"==b.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus();a.focus()});return a.fire("paste",b)}function y(a){function b(){var b=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var c=function(b){a.getSelection().isCollapsed()||(a.readOnly&&"cut"==b.name||n.initPasteDataTransfer(b,
|
||||
e.x-r.x:e.x;d.width<g+h?e.x+g+h>p.x+t.width?b():a.setStyle("left",k(n)):e.x+g+h>p.x+t.width?a.setStyle("left",k(n)):e.x+d.width/2+g/2+h>p.x+t.width?a.setStyle("left",k(n-e.x+p.x+t.width-g-h)):0>d.left+d.width-g-h?b():0>d.left+d.width/2-g/2?a.setStyle("left",k(n-e.x+p.x)):a.setStyle("left",k(n+d.width/2-g/2-h/2))}};CKEDITOR.plugins.notification=q})();(function(){function D(b){function d(){for(var a=f(),e=CKEDITOR.tools.clone(b.config.toolbarGroups)||v(b),n=0;n<e.length;n++){var g=e[n];if("/"!=g){"string"==typeof g&&(g=e[n]={name:g});var l,d=g.groups;if(d)for(var h=0;h<d.length;h++)l=d[h],(l=a[l])&&c(g,l);(l=a[g.name])&&c(g,l)}}return e}function f(){var a={},c,e,g;for(c in b.ui.items)e=b.ui.items[c],g=e.toolbar||"others",g=g.split(","),e=g[0],g=parseInt(g[1]||-1,10),a[e]||(a[e]=[]),a[e].push({name:c,order:g});for(e in a)a[e]=a[e].sort(function(a,
|
||||
b){return a.order==b.order?0:0>b.order?-1:0>a.order?1:a.order<b.order?-1:1});return a}function c(c,e){if(e.length){c.items?c.items.push(b.ui.create("-")):c.items=[];for(var d;d=e.shift();)d="string"==typeof d?d:d.name,a&&-1!=CKEDITOR.tools.indexOf(a,d)||(d=b.ui.create(d))&&b.addFeature(d)&&c.items.push(d)}}function h(a){var b=[],e,d,h;for(e=0;e<a.length;++e)d=a[e],h={},"/"==d?b.push(d):CKEDITOR.tools.isArray(d)?(c(h,CKEDITOR.tools.clone(d)),b.push(h)):d.items&&(c(h,CKEDITOR.tools.clone(d.items)),
|
||||
h.name=d.name,b.push(h));return b}var a=function(a){return a&&"string"===typeof a?a.split(","):a}(b.config.removeButtons),e=b.config.toolbar;"string"==typeof e&&(e=b.config["toolbar_"+e]);return b.toolbar=e?h(e):d()}function v(b){return b._.toolbarGroups||(b._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},
|
||||
{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var z=function(){this.toolbars=[]};z.prototype.focus=function(){for(var b=0,d;d=this.toolbars[b++];)for(var f=0,c;c=d.items[f++];)if(c.focus){c.focus();return}};var E={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(b){b.toolbox&&(CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){b.toolbox.focus()},100):b.toolbox.focus())}};
|
||||
CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(b){var d,f=function(c,h){var a,e="rtl"==b.lang.dir,k=b.config.toolbarGroupCycling,q=e?37:39,e=e?39:37,k=void 0===k||k;switch(h){case 9:case CKEDITOR.SHIFT+9:for(;!a||!a.items.length;)if(a=9==h?(a?a.next:c.toolbar.next)||b.toolbox.toolbars[0]:(a?a.previous:c.toolbar.previous)||b.toolbox.toolbars[b.toolbox.toolbars.length-1],a.items.length)for(c=a.items[d?a.items.length-1:0];c&&!c.focus;)(c=d?c.previous:c.next)||(a=0);c&&c.focus();return!1;
|
||||
case q:a=c;do a=a.next,!a&&k&&(a=c.toolbar.items[0]);while(a&&!a.focus);a?a.focus():f(c,9);return!1;case 40:return c.button&&c.button.hasArrow?c.execute():f(c,40==h?q:e),!1;case e:case 38:a=c;do a=a.previous,!a&&k&&(a=c.toolbar.items[c.toolbar.items.length-1]);while(a&&!a.focus);a?a.focus():(d=1,f(c,CKEDITOR.SHIFT+9),d=0);return!1;case 27:return b.focus(),!1;case 13:case 32:return c.execute(),!1;case CKEDITOR.ALT+122:return b.execCommand("elementsPathFocus"),!1}return!0};b.on("uiSpace",function(c){if(c.data.space==
|
||||
b.config.toolbarLocation){c.removeListener();b.toolbox=new z;var d=CKEDITOR.tools.getNextId(),a=['\x3cspan id\x3d"',d,'" class\x3d"cke_voice_label"\x3e',b.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+b.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',d,'" onmousedown\x3d"return false;"\x3e'],d=!1!==b.config.toolbarStartupExpanded,e,k;b.config.toolbarCanCollapse&&b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&a.push('\x3cspan class\x3d"cke_toolbox_main"'+
|
||||
(d?"\x3e":' style\x3d"display:none"\x3e'));for(var q=b.toolbox.toolbars,n=D(b),g=n.length,l=0;l<g;l++){var r,m=0,w,p=n[l],v="/"!==p&&("/"===n[l+1]||l==g-1),x;if(p)if(e&&(a.push("\x3c/span\x3e"),k=e=0),"/"===p)a.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{x=p.items||p;for(var y=0;y<x.length;y++){var t=x[y],A;if(t){var B=function(c){c=c.render(b,a);u=m.items.push(c)-1;0<u&&(c.previous=m.items[u-1],c.previous.next=c);c.toolbar=m;c.onkey=f};if(t.type==CKEDITOR.UI_SEPARATOR)k=e&&
|
||||
t;else{A=!1!==t.canGroup;if(!m){r=CKEDITOR.tools.getNextId();m={id:r,items:[]};w=p.name&&(b.lang.toolbar.toolbarGroups[p.name]||p.name);a.push('\x3cspan id\x3d"',r,'" class\x3d"cke_toolbar'+(v?' cke_toolbar_last"':'"'),w?' aria-labelledby\x3d"'+r+'_label"':"",' role\x3d"toolbar"\x3e');w&&a.push('\x3cspan id\x3d"',r,'_label" class\x3d"cke_voice_label"\x3e',w,"\x3c/span\x3e");a.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var u=q.push(m)-1;0<u&&(m.previous=q[u-1],m.previous.next=m)}A?
|
||||
e||(a.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),e=1):e&&(a.push("\x3c/span\x3e"),e=0);k&&(B(k),k=0);B(t)}}}e&&(a.push("\x3c/span\x3e"),k=e=0);m&&a.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}b.config.toolbarCanCollapse&&a.push("\x3c/span\x3e");if(b.config.toolbarCanCollapse&&b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var C=CKEDITOR.tools.addFunction(function(){b.execCommand("toolbarCollapse")});b.on("destroy",function(){CKEDITOR.tools.removeFunction(C)});
|
||||
b.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),d=a.ui.space("contents"),e=c.getParent(),h=parseInt(d.$.style.height,10),g=e.$.offsetHeight,f=b.hasClass("cke_toolbox_collapser_min");f?(c.show(),b.removeClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(c.hide(),b.addClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarExpand));b.getFirst().setText(f?"▲":"◀");d.setStyle("height",
|
||||
h-(e.$.offsetHeight-g)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});b.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");a.push('\x3ca title\x3d"'+(d?b.lang.toolbar.toolbarCollapse:b.lang.toolbar.toolbarExpand)+'" id\x3d"'+b.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');d||a.push(" cke_toolbox_collapser_min");
|
||||
a.push('" onclick\x3d"CKEDITOR.tools.callFunction('+C+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}a.push("\x3c/span\x3e");c.data.html+=a.join("")}});b.on("destroy",function(){if(this.toolbox){var b,d=0,a,e,f;for(b=this.toolbox.toolbars;d<b.length;d++)for(e=b[d].items,a=0;a<e.length;a++)f=e[a],f.clickFn&&CKEDITOR.tools.removeFunction(f.clickFn),f.keyDownFn&&CKEDITOR.tools.removeFunction(f.keyDownFn)}});b.on("uiReady",function(){var c=b.ui.space("toolbox");c&&b.focusManager.add(c,
|
||||
1)});b.addCommand("toolbarFocus",E);b.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");b.ui.add("-",CKEDITOR.UI_SEPARATOR,{});b.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(b,d){d.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(b,d,f){var c=v(this.editor),h=0===d,a={name:b};if(f){if(f=CKEDITOR.tools.search(c,function(a){return a.name==f})){!f.groups&&(f.groups=[]);if(d&&
|
||||
(d=CKEDITOR.tools.indexOf(f.groups,d),0<=d)){f.groups.splice(d+1,0,b);return}h?f.groups.splice(0,0,b):f.groups.push(b);return}d=null}d&&(d=CKEDITOR.tools.indexOf(c,function(a){return a.name==d}));h?c.splice(0,0,b):"number"==typeof d?c.splice(d+1,0,a):c.push(b)}})();CKEDITOR.UI_SEPARATOR="separator";CKEDITOR.config.toolbarLocation="top";(function(){function t(a,b,c){b.type||(b.type="auto");if(c&&!1===a.fire("beforePaste",b)||!b.dataValue&&b.dataTransfer.isEmpty())return!1;b.dataValue||(b.dataValue="");if(CKEDITOR.env.gecko&&"drop"==b.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus();a.focus()});return a.fire("paste",b)}function y(a){function b(){var b=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var c=function(b){a.getSelection().isCollapsed()||(a.readOnly&&"cut"==b.name||n.initPasteDataTransfer(b,
|
||||
a),b.data.preventDefault())};b.on("copy",c);b.on("cut",c);b.on("cut",function(){a.readOnly||a.extractSelectedHtml()},null,null,999)}b.on(n.mainPasteEvent,function(a){"beforepaste"==n.mainPasteEvent&&u||m(a)});"beforepaste"==n.mainPasteEvent&&(b.on("paste",function(a){w||(g(),a.data.preventDefault(),m(a),e("paste"))}),b.on("contextmenu",f,null,null,0),b.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||f()},null,null,0));b.on("beforecut",function(){!u&&l(a)});var h;b.attachListener(CKEDITOR.env.ie?
|
||||
b:a.document.getDocumentElement(),"mouseup",function(){h=setTimeout(p,0)});a.on("destroy",function(){clearTimeout(h)});b.on("keyup",p)}function c(b){return{type:b,canUndo:"cut"==b,startDisabled:!0,fakeKeystroke:"cut"==b?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&l();var b;var c=this.type;if(CKEDITOR.env.ie)b=e(c);else try{b=a.document.$.execCommand(c,!1,null)}catch(h){b=!1}b||a.showNotification(a.lang.clipboard[this.type+"Error"]);return b}}}function d(){return{canUndo:!1,
|
||||
async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(a,b){function c(b,m){m="undefined"!==typeof m?m:!0;b?(b.method="paste",b.dataTransfer||(b.dataTransfer=n.initPasteDataTransfer()),t(a,b,m)):d&&!a._.forcePasteDialog&&a.showNotification(p,"info",a.config.clipboard_notificationDuration);a._.forcePasteDialog=!1;a.fire("afterCommandExec",{name:"paste",command:h,returnValue:!!b})}b="undefined"!==typeof b&&null!==b?b:{};var h=this,d="undefined"!==typeof b.notification?b.notification:!0,m=b.type,e=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,
|
||||
@@ -871,27 +871,28 @@ CKEDITOR.TRISTATE_DISABLED)}}));a.addCommand("editdiv",new CKEDITOR.dialogComman
|
||||
for(d=0;d<f.length;d++)f[d].remove(!0);b.selectBookmarks(h)}});a.ui.addButton&&a.ui.addButton("CreateDiv",{label:c.toolbar,command:"creatediv",toolbar:"blocks,50"});a.addMenuItems&&(a.addMenuItems({editdiv:{label:c.edit,command:"editdiv",group:"div",order:1},removediv:{label:c.remove,command:"removediv",group:"div",order:5}}),a.contextMenu&&a.contextMenu.addListener(function(b){return!b||b.isReadOnly()?null:CKEDITOR.plugins.div.getSurroundDiv(a)?{editdiv:CKEDITOR.TRISTATE_OFF,removediv:CKEDITOR.TRISTATE_OFF}:
|
||||
null}));CKEDITOR.dialog.add("creatediv",this.path+"dialogs/div.js");CKEDITOR.dialog.add("editdiv",this.path+"dialogs/div.js")}}});CKEDITOR.plugins.div={getSurroundDiv:function(a,c){var b=a.elementPath(c);return a.elementPath(b.blockLimit).contains(function(a){return a.is("div")&&!a.isReadOnly()},1)}}})();(function(){function b(a,b,d){this.editor=a;this.lastMatched=null;this.ignoreNext=!1;this.callback=b;this.ignoredKeys=[16,17,18,91,35,36,37,38,39,40,33,34];this._listeners=[];this.throttle=d||0;this._buffer=CKEDITOR.tools.throttle(this.throttle,function(a){(a=this.callback(a))?a.text!=this.lastMatched&&(this.lastMatched=a.text,this.fire("matched",a)):this.lastMatched&&this.unmatch()},this)}CKEDITOR.plugins.add("textwatcher",{});b.prototype={attach:function(){function a(){var a=c.editable();this._listeners.push(a.attachListener(a,
|
||||
"keyup",b,this))}function b(a){this.check(a)}function d(){this.unmatch()}var c=this.editor;this._listeners.push(c.on("contentDom",a,this));this._listeners.push(c.on("blur",d,this));this._listeners.push(c.on("beforeModeUnload",d,this));this._listeners.push(c.on("setData",d,this));this._listeners.push(c.on("afterCommandExec",d,this));c.editable()&&a.call(this);return this},check:function(a){this.ignoreNext?this.ignoreNext=!1:a&&"keyup"==a.name&&-1!=CKEDITOR.tools.array.indexOf(this.ignoredKeys,a.data.getKey())||
|
||||
(a=this.editor.getSelection())&&(a=a.getRanges()[0])&&this._buffer.input(a)},consumeNext:function(){this.ignoreNext=!0;return this},unmatch:function(){this.lastMatched=null;this.fire("unmatched");return this},destroy:function(){CKEDITOR.tools.array.forEach(this._listeners,function(a){a.removeListener()});this._listeners=[]}};CKEDITOR.event.implementOn(b.prototype);CKEDITOR.plugins.textWatcher=b})();(function(){function d(a,b){var c=a.config.autocomplete_commitKeystrokes||CKEDITOR.config.autocomplete_commitKeystrokes;this.editor=a;this.throttle=void 0!==b.throttle?b.throttle:20;this.view=this.getView();this.model=this.getModel(b.dataCallback);this.model.itemsLimit=b.itemsLimit;this.textWatcher=this.getTextWatcher(b.textTestCallback);this.commitKeystrokes=CKEDITOR.tools.array.isArray(c)?c.slice():[c];this._listeners=[];this.outputTemplate=void 0!==b.outputTemplate?new CKEDITOR.template(b.outputTemplate):
|
||||
null;b.itemTemplate&&(this.view.itemTemplate=new CKEDITOR.template(b.itemTemplate));if("ready"===this.editor.status)this.attach();else this.editor.on("instanceReady",function(){this.attach()},this);a.on("destroy",function(){this.destroy()},this)}function g(a){this.itemTemplate=new CKEDITOR.template('\x3cli data-id\x3d"{id}"\x3e{name}\x3c/li\x3e');this.editor=a}function f(a){this.dataCallback=a;this.isActive=!1;this.itemsLimit=0}function h(a){return CKEDITOR.tools.array.reduce(CKEDITOR.tools.object.keys(a),
|
||||
function(b,c){b[c]=CKEDITOR.tools.htmlEncode(a[c]);return b},{})}CKEDITOR.plugins.add("autocomplete",{requires:"textwatcher",onLoad:function(){CKEDITOR.document.appendStyleSheet(this.path+"skins/default.css")},isSupportedEnvironment:function(){return!CKEDITOR.env.ie||8<CKEDITOR.env.version}});d.prototype={attach:function(){var a=this.editor,b=CKEDITOR.document.getWindow(),c=a.editable(),k=c.isInline()?c:c.getDocument();CKEDITOR.env.iOS&&!c.isInline()&&(k=a.window.getFrame().getParent());this.view.append();
|
||||
this.view.attach();this.textWatcher.attach();this._listeners.push(this.textWatcher.on("matched",this.onTextMatched,this));this._listeners.push(this.textWatcher.on("unmatched",this.onTextUnmatched,this));this._listeners.push(this.model.on("change-data",this.modelChangeListener,this));this._listeners.push(this.model.on("change-selectedItemId",this.onSelectedItemId,this));this._listeners.push(this.view.on("change-selectedItemId",this.onSelectedItemId,this));this._listeners.push(this.view.on("click-item",
|
||||
this.onItemClick,this));this._listeners.push(this.model.on("change-isActive",this.updateAriaAttributesOnEditable,this));this._listeners.push(b.on("scroll",function(){this.viewRepositionListener()},this));this._listeners.push(k.on("scroll",function(){this.viewRepositionListener()},this));this._listeners.push(this.view.element.on("mousedown",function(a){a.data.preventDefault()},null,null,9999));c&&(this.registerPanelNavigation(),this.addAriaAttributesToEditable());a.on("contentDom",function(){this.registerPanelNavigation();
|
||||
this.addAriaAttributesToEditable()},this)},registerPanelNavigation:function(){var a=this.editor.editable();this._listeners.push(a.attachListener(a,"keydown",function(a){this.onKeyDown(a)},this,null,5))},addAriaAttributesToEditable:function(){var a=this.editor.editable(),b=this.view.element.getAttribute("id");a.isInline()&&(a.setAttribute("aria-controls",b),a.setAttribute("aria-activedescendant",""),a.setAttribute("aria-autocomplete","list"),a.setAttribute("aria-expanded","false"))},updateAriaAttributesOnEditable:function(a){var b=
|
||||
this.editor.editable();a=a.data;b&&b.isInline()&&(b.setAttribute("aria-expanded",a?"true":"false"),a||b.setAttribute("aria-activedescendant",""))},updateAriaActiveDescendantAttributeOnEditable:function(a){var b=this.editor.editable();b.isInline()&&b.setAttribute("aria-activedescendant",a)},removeAriaAttributesFromEditable:function(){var a=this.editor.editable();a&&a.isInline()&&(a.removeAttributes(["aria-controls","aria-expanded","aria-activedescendant"]),a.setAttribute("aria-autocomplete","none"))},
|
||||
close:function(){this.model.setActive(!1);this.view.close()},commit:function(a){if(this.model.isActive){this.close();if(null==a&&(a=this.model.selectedItemId,null==a))return;a=this.model.getItemById(a);var b=this.editor;b.fire("saveSnapshot");b.getSelection().selectRanges([this.model.range]);b.insertHtml(this.getHtmlToInsert(a),"text");b.fire("saveSnapshot")}},destroy:function(){CKEDITOR.tools.array.forEach(this._listeners,function(a){a.removeListener()});this._listeners=[];this.view.element&&this.view.element.remove();
|
||||
this.removeAriaAttributesFromEditable()},getHtmlToInsert:function(a){a=h(a);return this.outputTemplate?this.outputTemplate.output(a):a.name},getModel:function(a){var b=this;return new f(function(c,k){return a.call(this,CKEDITOR.tools.extend({autocomplete:b},c),k)})},getTextWatcher:function(a){return new CKEDITOR.plugins.textWatcher(this.editor,a,this.throttle)},getView:function(){return new g(this.editor)},open:function(){this.model.hasData()&&(this.model.setActive(!0),this.view.open(),this.model.selectFirst(),
|
||||
this.view.updatePosition(this.model.range))},viewRepositionListener:function(){this.model.isActive&&this.view.updatePosition(this.model.range)},modelChangeListener:function(a){this.model.hasData()?(this.view.updateItems(a.data),this.open()):this.close()},onItemClick:function(a){this.commit(a.data)},onKeyDown:function(a){if(this.model.isActive){var b=a.data.getKey(),c=!1;27==b?(this.close(),this.textWatcher.unmatch(),c=!0):40==b?(this.model.selectNext(),c=!0):38==b?(this.model.selectPrevious(),c=!0):
|
||||
-1!=CKEDITOR.tools.indexOf(this.commitKeystrokes,b)&&(this.commit(),this.textWatcher.unmatch(),c=!0);c&&(a.cancel(),a.data.preventDefault(),this.textWatcher.consumeNext())}},onSelectedItemId:function(a){a=a.data;var b=this.view.getItemById(a);this.model.setItem(a);this.view.selectItem(a);this.updateAriaActiveDescendantAttributeOnEditable(b.getAttribute("id"))},onTextMatched:function(a){this.model.setActive(!1);this.model.setQuery(a.data.text,a.data.range)},onTextUnmatched:function(){this.model.query=
|
||||
null;this.model.lastRequestId=null;this.close()}};g.prototype={append:function(){this.document=CKEDITOR.document;this.element=this.createElement();this.document.getBody().append(this.element)},appendItems:function(a){this.element.setHtml("");this.element.append(a)},attach:function(){this.element.on("click",function(a){(a=a.data.getTarget().getAscendant(this.isItemElement,!0))&&this.fire("click-item",a.data("id"))},this);this.element.on("mouseover",function(a){a=a.data.getTarget();this.element.contains(a)&&
|
||||
(a=a.getAscendant(function(a){return a.hasAttribute("data-id")},!0))&&(a=a.data("id"),this.fire("change-selectedItemId",a))},this)},close:function(){this.element.removeClass("cke_autocomplete_opened")},createElement:function(){var a=new CKEDITOR.dom.element("ul",this.document),b=CKEDITOR.tools.getNextId();a.setAttribute("id",b);a.addClass("cke_autocomplete_panel");a.setStyle("z-index",this.editor.config.baseFloatZIndex-3);a.setAttribute("role","listbox");return a},createItem:function(a){a=h(a);a=
|
||||
CKEDITOR.dom.element.createFromHtml(this.itemTemplate.output(a),this.document);var b=CKEDITOR.tools.getNextId();a.setAttribute("id",b);a.setAttribute("role","option");return a},getViewPosition:function(a){a=a.getClientRects();a=a[a.length-1];var b;b=this.editor.editable();b=b.isInline()?CKEDITOR.document.getWindow().getScrollPosition():b.getParent().getDocumentPosition(CKEDITOR.document);var c=CKEDITOR.document.getBody();"static"===c.getComputedStyle("position")&&(c=c.getParent());c=c.getDocumentPosition();
|
||||
b.x-=c.x;b.y-=c.y;return{top:a.top+b.y,bottom:a.top+a.height+b.y,left:a.left+b.x}},getItemById:function(a){return this.element.findOne('li[data-id\x3d"'+a+'"]')},isItemElement:function(a){return a.type==CKEDITOR.NODE_ELEMENT&&Boolean(a.data("id"))},open:function(){this.element.addClass("cke_autocomplete_opened")},selectItem:function(a){null!=this.selectedItemId&&this.getItemById(this.selectedItemId).removeClass("cke_autocomplete_selected");var b=this.getItemById(a);b.addClass("cke_autocomplete_selected");
|
||||
this.selectedItemId=a;this.scrollElementTo(b)},setPosition:function(a){var b=this.element.getWindow(),c=b.getViewPaneSize(),b=function(a){var b=a.editorViewportRect,c=a.caretRect,e=a.viewHeight,d=a.scrollPositionY,g=a.windowHeight;if(b.bottom<c.bottom)return Math.min(c.top,b.bottom)-e;a=c.top-b.top;var f=b.bottom-c.bottom,h=c.top-e<d;if(e>f&&e<a&&!h)return c.top-e;if(b.top>c.top)return Math.max(c.bottom,b.top);d=c.bottom+e>g+d;return e>f&&e<a||!d?Math.min(b.bottom,c.bottom):c.top-e}({editorViewportRect:function(a){var b=
|
||||
a.editable();return CKEDITOR.env.iOS&&!b.isInline()?a.window.getFrame().getParent().getClientRect(!0):b.isInline()?b.getClientRect(!0):a.window.getFrame().getClientRect(!0)}(this.editor),caretRect:a,viewHeight:this.element.getSize("height"),scrollPositionY:b.getScrollPosition().y,windowHeight:c.height});a=function(a){var b=a.leftPosition,c=a.viewWidth;a=a.windowWidth;return b+c>a?a-c:b}({leftPosition:a.left,viewWidth:this.element.getSize("width"),windowWidth:c.width});this.element.setStyles({left:a+
|
||||
"px",top:b+"px"})},scrollElementTo:function(a){a.scrollIntoParent(this.element)},updateItems:function(a){var b,c=new CKEDITOR.dom.documentFragment(this.document);for(b=0;b<a.length;++b)c.append(this.createItem(a[b]));this.appendItems(c);this.selectedItemId=null},updatePosition:function(a){this.setPosition(this.getViewPosition(a))}};CKEDITOR.event.implementOn(g.prototype);f.prototype={getIndexById:function(a){if(!this.hasData())return-1;for(var b=this.data,c=0,d=b.length;c<d;c++)if(b[c].id==a)return c;
|
||||
return-1},getItemById:function(a){a=this.getIndexById(a);return~a&&this.data[a]||null},hasData:function(){return Boolean(this.data&&this.data.length)},setItem:function(a){if(0>this.getIndexById(a))throw Error("Item with given id does not exist");this.selectedItemId=a},select:function(a){this.fire("change-selectedItemId",a)},selectFirst:function(){this.hasData()&&this.select(this.data[0].id)},selectLast:function(){this.hasData()&&this.select(this.data[this.data.length-1].id)},selectNext:function(){if(null==
|
||||
this.selectedItemId)this.selectFirst();else{var a=this.getIndexById(this.selectedItemId);0>a||a+1==this.data.length?this.selectFirst():this.select(this.data[a+1].id)}},selectPrevious:function(){if(null==this.selectedItemId)this.selectLast();else{var a=this.getIndexById(this.selectedItemId);0>=a?this.selectLast():this.select(this.data[a-1].id)}},setActive:function(a){this.isActive=a;this.fire("change-isActive",a)},setQuery:function(a,b){var c=this,d=CKEDITOR.tools.getNextId();this.lastRequestId=d;
|
||||
this.query=a;this.range=b;this.selectedItemId=this.data=null;this.dataCallback({query:a,range:b},function(a){d==c.lastRequestId&&(c.data=c.itemsLimit?a.slice(0,c.itemsLimit):a,c.fire("change-data",c.data))})}};CKEDITOR.event.implementOn(f.prototype);CKEDITOR.plugins.autocomplete=d;d.view=g;d.model=f;CKEDITOR.config.autocomplete_commitKeystrokes=[9,13]})();(function(){function h(b,d){for(var a=b.length,c=0,e=0;e<a;e+=1){var g=b[e];if(d>=c&&c+g.getText().length>=d)return{element:g,offset:d-c};c+=g.getText().length}return null}function m(b,d){for(var a=0;a<b.length;a++)if(d(b[a]))return a;return-1}CKEDITOR.plugins.add("textmatch",{});CKEDITOR.plugins.textMatch={};CKEDITOR.plugins.textMatch.match=function(b,d){var a=CKEDITOR.plugins.textMatch.getTextAndOffset(b),c=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,e=0;if(a)return 0==a.text.indexOf(c)&&(e=c.length,
|
||||
(a=this.editor.getSelection())&&(a=a.getRanges()[0])&&this._buffer.input(a)},consumeNext:function(){this.ignoreNext=!0;return this},unmatch:function(){this.lastMatched=null;this.fire("unmatched");return this},destroy:function(){CKEDITOR.tools.array.forEach(this._listeners,function(a){a.removeListener()});this._listeners=[]}};CKEDITOR.event.implementOn(b.prototype);CKEDITOR.plugins.textWatcher=b})();(function(){function d(a,b){var c=a.config.autocomplete_commitKeystrokes||CKEDITOR.config.autocomplete_commitKeystrokes;this.editor=a;this.throttle=void 0!==b.throttle?b.throttle:20;this.followingSpace=b.followingSpace;this.view=this.getView();this.model=this.getModel(b.dataCallback);this.model.itemsLimit=b.itemsLimit;this.textWatcher=this.getTextWatcher(b.textTestCallback);this.commitKeystrokes=CKEDITOR.tools.array.isArray(c)?c.slice():[c];this._listeners=[];this.outputTemplate=void 0!==b.outputTemplate?
|
||||
new CKEDITOR.template(b.outputTemplate):null;b.itemTemplate&&(this.view.itemTemplate=new CKEDITOR.template(b.itemTemplate));if("ready"===this.editor.status)this.attach();else this.editor.on("instanceReady",function(){this.attach()},this);a.on("destroy",function(){this.destroy()},this)}function g(a){this.itemTemplate=new CKEDITOR.template('\x3cli data-id\x3d"{id}"\x3e{name}\x3c/li\x3e');this.editor=a}function f(a){this.dataCallback=a;this.isActive=!1;this.itemsLimit=0}function h(a){return CKEDITOR.tools.array.reduce(CKEDITOR.tools.object.keys(a),
|
||||
function(b,c){b[c]=CKEDITOR.tools.htmlEncode(a[c]);return b},{})}function l(a){var b=a.getSelection().getRanges()[0].getNextNode(function(a){return Boolean(a.type==CKEDITOR.NODE_TEXT&&a.getText())});b&&b.getText().match(/^\s+/)&&(a=a.createRange(),a.setStart(b,0),a.setEnd(b,1),a.deleteContents())}CKEDITOR.plugins.add("autocomplete",{requires:"textwatcher",onLoad:function(){CKEDITOR.document.appendStyleSheet(this.path+"skins/default.css")},isSupportedEnvironment:function(){return!CKEDITOR.env.ie||
|
||||
8<CKEDITOR.env.version}});d.prototype={attach:function(){var a=this.editor,b=CKEDITOR.document.getWindow(),c=a.editable(),k=c.isInline()?c:c.getDocument();CKEDITOR.env.iOS&&!c.isInline()&&(k=a.window.getFrame().getParent());this.view.append();this.view.attach();this.textWatcher.attach();this._listeners.push(this.textWatcher.on("matched",this.onTextMatched,this));this._listeners.push(this.textWatcher.on("unmatched",this.onTextUnmatched,this));this._listeners.push(this.model.on("change-data",this.modelChangeListener,
|
||||
this));this._listeners.push(this.model.on("change-selectedItemId",this.onSelectedItemId,this));this._listeners.push(this.view.on("change-selectedItemId",this.onSelectedItemId,this));this._listeners.push(this.view.on("click-item",this.onItemClick,this));this._listeners.push(this.model.on("change-isActive",this.updateAriaAttributesOnEditable,this));this._listeners.push(b.on("scroll",function(){this.viewRepositionListener()},this));this._listeners.push(k.on("scroll",function(){this.viewRepositionListener()},
|
||||
this));this._listeners.push(this.view.element.on("mousedown",function(a){a.data.preventDefault()},null,null,9999));c&&(this.registerPanelNavigation(),this.addAriaAttributesToEditable());a.on("contentDom",function(){this.registerPanelNavigation();this.addAriaAttributesToEditable()},this)},registerPanelNavigation:function(){var a=this.editor.editable();this._listeners.push(a.attachListener(a,"keydown",function(a){this.onKeyDown(a)},this,null,5))},addAriaAttributesToEditable:function(){var a=this.editor.editable(),
|
||||
b=this.view.element.getAttribute("id");a.isInline()&&(a.setAttribute("aria-controls",b),a.setAttribute("aria-activedescendant",""),a.setAttribute("aria-autocomplete","list"),a.setAttribute("aria-expanded","false"))},updateAriaAttributesOnEditable:function(a){var b=this.editor.editable();a=a.data;b&&b.isInline()&&(b.setAttribute("aria-expanded",a?"true":"false"),a||b.setAttribute("aria-activedescendant",""))},updateAriaActiveDescendantAttributeOnEditable:function(a){var b=this.editor.editable();b.isInline()&&
|
||||
b.setAttribute("aria-activedescendant",a)},removeAriaAttributesFromEditable:function(){var a=this.editor.editable();a&&a.isInline()&&(a.removeAttributes(["aria-controls","aria-expanded","aria-activedescendant"]),a.setAttribute("aria-autocomplete","none"))},close:function(){this.model.setActive(!1);this.view.close()},commit:function(a){if(this.model.isActive){this.close();if(null==a&&(a=this.model.selectedItemId,null==a))return;var b=this.model.getItemById(a);a=this.editor;b=this.getHtmlToInsert(b);
|
||||
b+=this.followingSpace?"\x26nbsp;":"";a.fire("saveSnapshot");a.getSelection().selectRanges([this.model.range]);a.insertHtml(b,"text");this.followingSpace&&l(a);a.fire("saveSnapshot")}},destroy:function(){CKEDITOR.tools.array.forEach(this._listeners,function(a){a.removeListener()});this._listeners=[];this.view.element&&this.view.element.remove();this.removeAriaAttributesFromEditable()},getHtmlToInsert:function(a){a=h(a);return this.outputTemplate?this.outputTemplate.output(a):a.name},getModel:function(a){var b=
|
||||
this;return new f(function(c,k){return a.call(this,CKEDITOR.tools.extend({autocomplete:b},c),k)})},getTextWatcher:function(a){return new CKEDITOR.plugins.textWatcher(this.editor,a,this.throttle)},getView:function(){return new g(this.editor)},open:function(){this.model.hasData()&&(this.model.setActive(!0),this.view.open(),this.model.selectFirst(),this.view.updatePosition(this.model.range))},viewRepositionListener:function(){this.model.isActive&&this.view.updatePosition(this.model.range)},modelChangeListener:function(a){this.model.hasData()?
|
||||
(this.view.updateItems(a.data),this.open()):this.close()},onItemClick:function(a){this.commit(a.data)},onKeyDown:function(a){if(this.model.isActive){var b=a.data.getKey(),c=!1;27==b?(this.close(),this.textWatcher.unmatch(),c=!0):40==b?(this.model.selectNext(),c=!0):38==b?(this.model.selectPrevious(),c=!0):-1!=CKEDITOR.tools.indexOf(this.commitKeystrokes,b)&&(this.commit(),this.textWatcher.unmatch(),c=!0);c&&(a.cancel(),a.data.preventDefault(),this.textWatcher.consumeNext())}},onSelectedItemId:function(a){a=
|
||||
a.data;var b=this.view.getItemById(a);this.model.setItem(a);this.view.selectItem(a);this.updateAriaActiveDescendantAttributeOnEditable(b.getAttribute("id"))},onTextMatched:function(a){this.model.setActive(!1);this.model.setQuery(a.data.text,a.data.range)},onTextUnmatched:function(){this.model.query=null;this.model.lastRequestId=null;this.close()}};g.prototype={append:function(){this.document=CKEDITOR.document;this.element=this.createElement();this.document.getBody().append(this.element)},appendItems:function(a){this.element.setHtml("");
|
||||
this.element.append(a)},attach:function(){this.element.on("click",function(a){(a=a.data.getTarget().getAscendant(this.isItemElement,!0))&&this.fire("click-item",a.data("id"))},this);this.element.on("mouseover",function(a){a=a.data.getTarget();this.element.contains(a)&&(a=a.getAscendant(function(a){return a.hasAttribute("data-id")},!0))&&(a=a.data("id"),this.fire("change-selectedItemId",a))},this)},close:function(){this.element.removeClass("cke_autocomplete_opened")},createElement:function(){var a=
|
||||
new CKEDITOR.dom.element("ul",this.document),b=CKEDITOR.tools.getNextId();a.setAttribute("id",b);a.addClass("cke_autocomplete_panel");a.setStyle("z-index",this.editor.config.baseFloatZIndex-3);a.setAttribute("role","listbox");return a},createItem:function(a){a=h(a);a=CKEDITOR.dom.element.createFromHtml(this.itemTemplate.output(a),this.document);var b=CKEDITOR.tools.getNextId();a.setAttribute("id",b);a.setAttribute("role","option");return a},getViewPosition:function(a){a=a.getClientRects();a=a[a.length-
|
||||
1];var b;b=this.editor.editable();b=b.isInline()?CKEDITOR.document.getWindow().getScrollPosition():b.getParent().getDocumentPosition(CKEDITOR.document);var c=CKEDITOR.document.getBody();"static"===c.getComputedStyle("position")&&(c=c.getParent());c=c.getDocumentPosition();b.x-=c.x;b.y-=c.y;return{top:a.top+b.y,bottom:a.top+a.height+b.y,left:a.left+b.x}},getItemById:function(a){return this.element.findOne('li[data-id\x3d"'+a+'"]')},isItemElement:function(a){return a.type==CKEDITOR.NODE_ELEMENT&&Boolean(a.data("id"))},
|
||||
open:function(){this.element.addClass("cke_autocomplete_opened")},selectItem:function(a){null!=this.selectedItemId&&this.getItemById(this.selectedItemId).removeClass("cke_autocomplete_selected");var b=this.getItemById(a);b.addClass("cke_autocomplete_selected");this.selectedItemId=a;this.scrollElementTo(b)},setPosition:function(a){var b=this.element.getWindow(),c=b.getViewPaneSize(),b=function(a){var b=a.editorViewportRect,c=a.caretRect,e=a.viewHeight,d=a.scrollPositionY,g=a.windowHeight;if(b.bottom<
|
||||
c.bottom)return Math.min(c.top,b.bottom)-e;a=c.top-b.top;var f=b.bottom-c.bottom,h=c.top-e<d;if(e>f&&e<a&&!h)return c.top-e;if(b.top>c.top)return Math.max(c.bottom,b.top);d=c.bottom+e>g+d;return e>f&&e<a||!d?Math.min(b.bottom,c.bottom):c.top-e}({editorViewportRect:function(a){var b=a.editable();return CKEDITOR.env.iOS&&!b.isInline()?a.window.getFrame().getParent().getClientRect(!0):b.isInline()?b.getClientRect(!0):a.window.getFrame().getClientRect(!0)}(this.editor),caretRect:a,viewHeight:this.element.getSize("height"),
|
||||
scrollPositionY:b.getScrollPosition().y,windowHeight:c.height});a=function(a){var b=a.leftPosition,c=a.viewWidth;a=a.windowWidth;return b+c>a?a-c:b}({leftPosition:a.left,viewWidth:this.element.getSize("width"),windowWidth:c.width});this.element.setStyles({left:a+"px",top:b+"px"})},scrollElementTo:function(a){a.scrollIntoParent(this.element)},updateItems:function(a){var b,c=new CKEDITOR.dom.documentFragment(this.document);for(b=0;b<a.length;++b)c.append(this.createItem(a[b]));this.appendItems(c);this.selectedItemId=
|
||||
null},updatePosition:function(a){this.setPosition(this.getViewPosition(a))}};CKEDITOR.event.implementOn(g.prototype);f.prototype={getIndexById:function(a){if(!this.hasData())return-1;for(var b=this.data,c=0,d=b.length;c<d;c++)if(b[c].id==a)return c;return-1},getItemById:function(a){a=this.getIndexById(a);return~a&&this.data[a]||null},hasData:function(){return Boolean(this.data&&this.data.length)},setItem:function(a){if(0>this.getIndexById(a))throw Error("Item with given id does not exist");this.selectedItemId=
|
||||
a},select:function(a){this.fire("change-selectedItemId",a)},selectFirst:function(){this.hasData()&&this.select(this.data[0].id)},selectLast:function(){this.hasData()&&this.select(this.data[this.data.length-1].id)},selectNext:function(){if(null==this.selectedItemId)this.selectFirst();else{var a=this.getIndexById(this.selectedItemId);0>a||a+1==this.data.length?this.selectFirst():this.select(this.data[a+1].id)}},selectPrevious:function(){if(null==this.selectedItemId)this.selectLast();else{var a=this.getIndexById(this.selectedItemId);
|
||||
0>=a?this.selectLast():this.select(this.data[a-1].id)}},setActive:function(a){this.isActive=a;this.fire("change-isActive",a)},setQuery:function(a,b){var c=this,d=CKEDITOR.tools.getNextId();this.lastRequestId=d;this.query=a;this.range=b;this.selectedItemId=this.data=null;this.dataCallback({query:a,range:b},function(a){d==c.lastRequestId&&(c.data=c.itemsLimit?a.slice(0,c.itemsLimit):a,c.fire("change-data",c.data))})}};CKEDITOR.event.implementOn(f.prototype);CKEDITOR.plugins.autocomplete=d;d.view=g;
|
||||
d.model=f;CKEDITOR.config.autocomplete_commitKeystrokes=[9,13]})();(function(){function h(b,d){for(var a=b.length,c=0,e=0;e<a;e+=1){var g=b[e];if(d>=c&&c+g.getText().length>=d)return{element:g,offset:d-c};c+=g.getText().length}return null}function m(b,d){for(var a=0;a<b.length;a++)if(d(b[a]))return a;return-1}CKEDITOR.plugins.add("textmatch",{});CKEDITOR.plugins.textMatch={};CKEDITOR.plugins.textMatch.match=function(b,d){var a=CKEDITOR.plugins.textMatch.getTextAndOffset(b),c=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,e=0;if(a)return 0==a.text.indexOf(c)&&(e=c.length,
|
||||
a.text=a.text.replace(c,""),a.offset-=e),(c=d(a.text,a.offset))?{range:CKEDITOR.plugins.textMatch.getRangeInText(b,c.start,c.end+e),text:a.text.slice(c.start,c.end)}:null};CKEDITOR.plugins.textMatch.getTextAndOffset=function(b){if(!b.collapsed)return null;var d="",a=0,c=CKEDITOR.plugins.textMatch.getAdjacentTextNodes(b),e=!1,g,h=b.startContainer.type!=CKEDITOR.NODE_ELEMENT;g=h?m(c,function(a){return b.startContainer.equals(a)}):b.startOffset-(c[0]?c[0].getIndex():0);for(var k=c.length,f=0;f<k;f+=
|
||||
1){var l=c[f],d=d+l.getText();e||(h?f==g?(e=!0,a+=b.startOffset):a+=l.getText().length:(f==g&&(e=!0),0<f&&(a+=c[f-1].getText().length),k==g&&f+1==k&&(a+=l.getText().length)))}return{text:d,offset:a}};CKEDITOR.plugins.textMatch.getRangeInText=function(b,d,a){var c=new CKEDITOR.dom.range(b.root);b=CKEDITOR.plugins.textMatch.getAdjacentTextNodes(b);d=h(b,d);a=h(b,a);c.setStart(d.element,d.offset);c.setEnd(a.element,a.offset);return c};CKEDITOR.plugins.textMatch.getAdjacentTextNodes=function(b){if(!b.collapsed)return[];
|
||||
var d=[],a,c,e;b.startContainer.type!=CKEDITOR.NODE_ELEMENT?(a=b.startContainer.getParent().getChildren(),b=b.startContainer.getIndex()):(a=b.startContainer.getChildren(),b=b.startOffset);for(e=b;c=a.getItem(--e);)if(c.type==CKEDITOR.NODE_TEXT)d.unshift(c);else break;for(e=b;c=a.getItem(e++);)if(c.type==CKEDITOR.NODE_TEXT)d.push(c);else break;return d}})();(function(){CKEDITOR.plugins.add("xml",{});CKEDITOR.xml=function(c){var a=null;if("object"==typeof c)a=c;else if(c=(c||"").replace(/ /g," "),"ActiveXObject"in window){try{a=new ActiveXObject("MSXML2.DOMDocument")}catch(b){try{a=new ActiveXObject("Microsoft.XmlDom")}catch(d){}}a&&(a.async=!1,a.resolveExternals=!1,a.validateOnParse=!1,a.loadXML(c))}else window.DOMParser&&(a=(new DOMParser).parseFromString(c,"text/xml"));this.baseXml=a};CKEDITOR.xml.prototype={selectSingleNode:function(c,a){var b=
|
||||
@@ -920,8 +921,9 @@ a.getName()&&a.hasAttribute("data-cke-emoji-name")&&(this.elements.statusIcon.se
|
||||
this.blockElement.findOne('a[data-cke-emoji-group\x3d"'+e(a)+'"]');var d;a&&(d=this.getItemIndex(this.items,a),a.focus(!0),a.getAscendant("section").getFirst().scrollIntoView(!0),this.blockObject._.markItem(d))},getItemIndex:function(a,d){return f.indexOf(a.toArray(),function(a){return a.equals(d)})},loadSVGNavigationIcons:function(){if(this.editor.plugins.emoji.isSVGSupported()){var a=this.blockElement.getDocument();CKEDITOR.ajax.load(CKEDITOR.getUrl(this.plugin.path+"assets/iconsall.svg"),function(d){var c=
|
||||
new CKEDITOR.dom.element("div");c.addClass("cke_emoji-navigation_icons");c.setHtml(d);a.getBody().append(c)})}},addEmojiToGroups:function(){var a={};f.forEach(this.groups,function(d){a[d.name]=d.items},this);f.forEach(this.emojiList,function(d){a[d.group].push(d)},this)}}});CKEDITOR.plugins.add("emoji",{requires:"autocomplete,textmatch,ajax,panelbutton,floatpanel",icons:"emojipanel",hidpi:!0,isSupportedEnvironment:function(){return!CKEDITOR.env.ie||11<=CKEDITOR.env.version},beforeInit:function(){this.isSupportedEnvironment()&&
|
||||
!g&&(CKEDITOR.document.appendStyleSheet(this.path+"skins/default.css"),g=!0)},init:function(a){if(this.isSupportedEnvironment()){var d=CKEDITOR.tools.array;CKEDITOR.ajax.load(CKEDITOR.getUrl(a.config.emoji_emojiListUrl||"plugins/emoji/emoji.json"),function(c){function b(){a._.emoji.autocomplete=new CKEDITOR.plugins.autocomplete(a,{textTestCallback:e(),dataCallback:g,itemTemplate:'\x3cli data-id\x3d"{id}" class\x3d"cke_emoji-suggestion_item"\x3e\x3cspan\x3e{symbol}\x3c/span\x3e {name}\x3c/li\x3e',
|
||||
outputTemplate:"{symbol}"})}function e(){return function(a){return a.collapsed?CKEDITOR.plugins.textMatch.match(a,f):null}}function f(a,b){var c=a.slice(0,b),d=c.match(new RegExp("(?:\\s|^)(:\\S{"+l+"}\\S*)$"));return d?{start:c.lastIndexOf(d[1]),end:b}:null}function g(a,b){var c=a.query.substr(1).toLowerCase(),e=d.filter(h,function(a){return-1!==a.id.toLowerCase().indexOf(c)}).sort(function(a,b){var d=!a.id.substr(1).indexOf(c),e=!b.id.substr(1).indexOf(c);return d!=e?d?-1:1:a.id>b.id?1:-1}),e=d.map(e,
|
||||
k);b(e)}if(null!==c){void 0===a._.emoji&&(a._.emoji={});void 0===a._.emoji.list&&(a._.emoji.list=JSON.parse(c));var h=a._.emoji.list,l=void 0===a.config.emoji_minChars?2:a.config.emoji_minChars;if("ready"!==a.status)a.once("instanceReady",b);else b()}});a.addCommand("insertEmoji",{exec:function(a,b){a.insertHtml(b.emojiText)}});a.plugins.toolbar&&new h(a,this)}},isSVGSupported:function(){return!CKEDITOR.env.ie||CKEDITOR.env.edge}})})();(function(){function x(a,e,b){b=a.config.forceEnterMode||b;if("wysiwyg"==a.mode){e||(e=a.activeEnterMode);var l=a.elementPath();l&&!l.isContextFor("p")&&(e=CKEDITOR.ENTER_BR,b=1);a.fire("saveSnapshot");e==CKEDITOR.ENTER_BR?u(a,e,null,b):r(a,e,null,b);a.fire("saveSnapshot")}}function y(a){a=a.getSelection().getRanges(!0);for(var e=a.length-1;0<e;e--)a[e].deleteContents();return a[0]}function z(a){var e=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},
|
||||
outputTemplate:"{symbol}",followingSpace:a.config.emoji_followingSpace})}function e(){return function(a){return a.collapsed?CKEDITOR.plugins.textMatch.match(a,f):null}}function f(a,b){var c=a.slice(0,b),d=c.match(new RegExp("(?:\\s|^)(:\\S{"+l+"}\\S*)$"));return d?{start:c.lastIndexOf(d[1]),end:b}:null}function g(a,b){var c=a.query.substr(1).toLowerCase(),e=d.filter(h,function(a){return-1!==a.id.toLowerCase().indexOf(c)}).sort(function(a,b){var d=!a.id.substr(1).indexOf(c),e=!b.id.substr(1).indexOf(c);
|
||||
return d!=e?d?-1:1:a.id>b.id?1:-1}),e=d.map(e,k);b(e)}if(null!==c){void 0===a._.emoji&&(a._.emoji={});void 0===a._.emoji.list&&(a._.emoji.list=JSON.parse(c));var h=a._.emoji.list,l=void 0===a.config.emoji_minChars?2:a.config.emoji_minChars;if("ready"!==a.status)a.once("instanceReady",b);else b()}});a.addCommand("insertEmoji",{exec:function(a,b){a.insertHtml(b.emojiText)}});a.plugins.toolbar&&new h(a,this)}},isSVGSupported:function(){return!CKEDITOR.env.ie||CKEDITOR.env.edge}})})();
|
||||
CKEDITOR.config.emoji_followingSpace=!1;(function(){function x(a,e,b){b=a.config.forceEnterMode||b;if("wysiwyg"==a.mode){e||(e=a.activeEnterMode);var l=a.elementPath();l&&!l.isContextFor("p")&&(e=CKEDITOR.ENTER_BR,b=1);a.fire("saveSnapshot");e==CKEDITOR.ENTER_BR?u(a,e,null,b):r(a,e,null,b);a.fire("saveSnapshot")}}function y(a){a=a.getSelection().getRanges(!0);for(var e=a.length-1;0<e;e--)a[e].deleteContents();return a[0]}function z(a){var e=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},
|
||||
!0);if(a.root.equals(e))return a;e=new CKEDITOR.dom.range(e);e.moveToRange(a);return e}CKEDITOR.plugins.add("enterkey",{init:function(a){a.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){x(a)}});a.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){x(a,a.activeShiftEnterMode,1)}});a.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var A=CKEDITOR.dom.walker.whitespaces(),B=CKEDITOR.dom.walker.bookmark(),v,u,r,w;CKEDITOR.plugins.enterkey=
|
||||
{enterBlock:function(a,e,b,l){function n(a){var b;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],p.lastElement.getName())||1!==p.lastElement.getChildCount())return!1;a=p.lastElement.getChild(0).clone(!0);(b=a.getBogus())&&b.remove();return a.getText().length?!1:!0}if(b=b||y(a)){b=z(b);var g=b.document,f=b.checkStartOfBlock(),k=b.checkEndOfBlock(),p=a.elementPath(b.startContainer),c=p.block,m=e==CKEDITOR.ENTER_DIV?"div":"p",d;if(c&&f&&k){f=c.getParent();if(f.is("li")&&1<f.getChildCount()){g=
|
||||
new CKEDITOR.dom.element("li");d=a.createRange();g.insertAfter(f);c.remove();d.setStart(g,0);a.getSelection().selectRanges([d]);return}if(c.is("li")||c.getParent().is("li")){c.is("li")||(c=c.getParent(),f=c.getParent());d=f.getParent();b=!c.hasPrevious();var h=!c.hasNext();l=a.getSelection();var m=l.createBookmarks(),t=c.getDirection(1),k=c.getAttribute("class"),q=c.getAttribute("style"),r=d.getDirection(1)!=t;a=a.enterMode!=CKEDITOR.ENTER_BR||r||q||k;if(d.is("li"))b||h?(b&&h&&f.remove(),c[h?"insertAfter":
|
||||
@@ -932,10 +934,10 @@ CKEDITOR.dtd.$removeEmpty[m.getName()]&&(m=m.clone(),d.moveChildren(m),d.append(
|
||||
CKEDITOR.dtd.$empty))},(h=d.next())&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?g.createElement("br"):g.createText(" ")).insertBefore(h)),c&&b.moveToElementEditStart(c);b.select();b.scrollIntoView()}}},enterBr:function(a,e,b,l){if(b=b||y(a)){var n=b.document,g=b.checkEndOfBlock(),f=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),k=f.block,p=k&&f.block.getName();l||"li"!=p?(!l&&g&&w.test(p)?(g=k.getDirection())?(n=n.createElement("div"),n.setAttribute("dir",
|
||||
g),n.insertAfter(k),b.setStart(n,0)):(n.createElement("br").insertAfter(k),CKEDITOR.env.gecko&&n.createText("").insertAfter(k),b.setStartAt(k.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==p&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?n.createText("\r"):n.createElement("br"),b.deleteContents(),b.insertNode(a),CKEDITOR.env.needsBrFiller?(n.createText("").insertAfter(a),g&&(k||f.blockLimit).appendBogus(),a.getNext().$.nodeValue="",b.setStartAt(a.getNext(),
|
||||
CKEDITOR.POSITION_AFTER_START)):b.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),b.collapse(!0),b.select(),b.scrollIntoView()):r(a,e,b,l)}}};v=CKEDITOR.plugins.enterkey;u=v.enterBr;r=v.enterBlock;w=/^h[1-6]$/})();(function(){function k(a,f){var g={},c=[],e={nbsp:" ",shy:"",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,b){var d=f?"\x26"+b+";":e[b];g[d]=f?e[b]:"\x26"+b+";";c.push(d);return""});a=a.replace(/,$/,"");if(!f&&a){a=a.split(",");var b=document.createElement("div"),d;b.innerHTML="\x26"+a.join(";\x26")+";";d=b.innerHTML;b=null;for(b=0;b<d.length;b++){var h=d.charAt(b);g[h]="\x26"+a[b]+";";c.push(h)}}g.regex=c.join(f?"|":"");return g}
|
||||
CKEDITOR.plugins.add("entities",{afterInit:function(a){function f(b){return h[b]}function g(a){return"force"!=c.entities_processNumerical&&b[a]?b[a]:"\x26#"+a.charCodeAt(0)+";"}var c=a.config;if(a=(a=a.dataProcessor)&&a.htmlFilter){var e=[];!1!==c.basicEntities&&e.push("nbsp,gt,lt,amp");c.entities&&(e.length&&e.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"),
|
||||
CKEDITOR.plugins.add("entities",{afterInit:function(a){function f(b){return h[b]}function g(a){return"force"!=c.entities_processNumerical&&b[a]?b[a]:"\x26#"+(CKEDITOR.env.ie?a.charCodeAt(0):a.codePointAt(0))+";"}var c=a.config;if(a=(a=a.dataProcessor)&&a.htmlFilter){var e=[];!1!==c.basicEntities&&e.push("nbsp,gt,lt,amp");c.entities&&(e.length&&e.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"),
|
||||
c.entities_latin&&e.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml"),c.entities_greek&&e.push("Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv"),
|
||||
c.entities_additional&&e.push(c.entities_additional));var b=k(e.join(",")),d=b.regex?"["+b.regex+"]":"a^";delete b.regex;c.entities&&c.entities_processNumerical&&(d="[^ -~]|"+d);var d=new RegExp(d,"g"),h=k("nbsp,gt,lt,amp,shy",!0),l=new RegExp(h.regex,"g");a.addRules({text:function(a){return a.replace(l,f).replace(d,g)}},{applyToAll:!0,excludeNestedEditable:!0})}}})})();CKEDITOR.config.basicEntities=!0;CKEDITOR.config.entities=!0;CKEDITOR.config.entities_latin=!0;CKEDITOR.config.entities_greek=!0;
|
||||
CKEDITOR.config.entities_additional="#39";(function(){function f(b,a){var c=k.exec(b),d=k.exec(a);if(c){if(!c[2]&&"px"==d[2])return d[1];if("px"==c[2]&&!d[2])return d[1]+"px"}return a}function m(b){return{elements:{$:function(a){var c=a.attributes,c=c&&c["data-cke-realelement"],d=l(b,decodeURIComponent(c));if((c=(c=c&&new CKEDITOR.htmlParser.fragment.fromHtml(d))&&c.children[0])&&a.attributes["data-cke-resizable"]){var e=(new h(a)).rules;a=c.attributes;d=e.width;e=e.height;d&&(a.width=f(a.width,d));e&&(a.height=f(a.height,e))}return c}}}}
|
||||
c.entities_additional&&e.push(c.entities_additional));var b=k(e.join(",")),d=b.regex?"["+b.regex+"]":"a^";delete b.regex;c.entities&&c.entities_processNumerical&&(d="[^ -~]|"+d);var d=new RegExp(d,CKEDITOR.env.ie?"g":"gu"),h=k("nbsp,gt,lt,amp,shy",!0),l=new RegExp(h.regex,"g");a.addRules({text:function(a){return a.replace(l,f).replace(d,g)}},{applyToAll:!0,excludeNestedEditable:!0})}}})})();CKEDITOR.config.basicEntities=!0;CKEDITOR.config.entities=!0;CKEDITOR.config.entities_latin=!0;
|
||||
CKEDITOR.config.entities_greek=!0;CKEDITOR.config.entities_additional="#39";(function(){function f(b,a){var c=k.exec(b),d=k.exec(a);if(c){if(!c[2]&&"px"==d[2])return d[1];if("px"==c[2]&&!d[2])return d[1]+"px"}return a}function m(b){return{elements:{$:function(a){var c=a.attributes,c=c&&c["data-cke-realelement"],d=l(b,decodeURIComponent(c));if((c=(c=c&&new CKEDITOR.htmlParser.fragment.fromHtml(d))&&c.children[0])&&a.attributes["data-cke-resizable"]){var e=(new h(a)).rules;a=c.attributes;d=e.width;e=e.height;d&&(a.width=f(a.width,d));e&&(a.height=f(a.height,e))}return c}}}}
|
||||
function l(b,a){var c=[],d=/^cke:/i,e=new CKEDITOR.htmlParser.filter({elements:{"^":function(a){d.test(a.name)&&(a.name=a.name.replace(d,""),c.push(a))},iframe:function(a){a.children=[]}}}),n=b.activeFilter,f=new CKEDITOR.htmlParser.basicWriter,g=CKEDITOR.htmlParser.fragment.fromHtml(a);e.applyTo(g);n.applyTo(g);CKEDITOR.tools.array.forEach(c,function(a){a.name="cke:"+a.name});g.writeHtml(f);return f.getHtml()}var h=CKEDITOR.htmlParser.cssStyle,g=CKEDITOR.tools.cssLength,k=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i;
|
||||
CKEDITOR.plugins.add("fakeobjects",{init:function(b){b.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(b){var a=b.dataProcessor;(a=a&&a.htmlFilter)&&a.addRules(m(b),{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(b,a,c,d){var e=this.lang.fakeobjects,e=e[c]||e.unknown;a={"class":a,"data-cke-realelement":encodeURIComponent(b.getOuterHtml()),"data-cke-real-node-type":b.type,alt:e,title:e,align:b.getAttribute("align")||""};CKEDITOR.env.hc||
|
||||
(a.src=CKEDITOR.tools.transparentImageData);c&&(a["data-cke-real-element-type"]=c);d&&(a["data-cke-resizable"]=d,c=new h,d=b.getAttribute("width"),b=b.getAttribute("height"),d&&(c.rules.width=g(d)),b&&(c.rules.height=g(b)),c.populate(a));return this.document.createElement("img",{attributes:a})};CKEDITOR.editor.prototype.createFakeParserElement=function(b,a,c,d){var e=this.lang.fakeobjects,e=e[c]||e.unknown,f;f=new CKEDITOR.htmlParser.basicWriter;b.writeHtml(f);f=f.getHtml();a={"class":a,"data-cke-realelement":encodeURIComponent(f),
|
||||
@@ -1149,15 +1151,17 @@ order:18},tablecell_split_horizontal:{label:c.cell.splitHorizontal,group:"tablec
|
||||
tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:c.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:c.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:c.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:c.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,
|
||||
tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:c.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:c.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:c.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}});d.contextMenu&&d.contextMenu.addListener(function(a,b,c){return(a=c.contains({td:1,th:1},1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,
|
||||
tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getCellColIndex:v,insertRow:r,insertColumn:u,getSelectedCells:q};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)})();
|
||||
CKEDITOR.tools.buildTableMap=function(q,r,B,v,w){q=q.$.rows;B=B||0;v="number"===typeof v?v:q.length-1;w="number"===typeof w?w:-1;var u=-1,y=[];for(r=r||0;r<=v;r++){u++;!y[u]&&(y[u]=[]);for(var t=-1,z=B;z<=(-1===w?q[r].cells.length-1:w);z++){var p=q[r].cells[z];if(!p)break;for(t++;y[u][t];)t++;for(var A=isNaN(p.colSpan)?1:p.colSpan,p=isNaN(p.rowSpan)?1:p.rowSpan,x=0;x<p&&!(r+x>v);x++){y[u+x]||(y[u+x]=[]);for(var C=0;C<A;C++)y[u+x][t+C]=q[r].cells[z]}t+=A-1;if(-1!==w&&t>=w)break}}return y};(function(){function z(b){return CKEDITOR.env.ie?b.$.clientWidth:parseInt(b.getComputedStyle("width"),10)}function t(b,c){var a=b.getComputedStyle("border-"+c+"-width"),l={thin:"0px",medium:"1px",thick:"2px"};0>a.indexOf("px")&&(a=a in l&&"none"!=b.getComputedStyle("border-style")?l[a]:0);return parseFloat(a)}function C(b){var c=[],a={},l="rtl"===b.getComputedStyle("direction"),e=CKEDITOR.tools.array.zip((new CKEDITOR.dom.nodeList(b.$.rows)).toArray(),CKEDITOR.tools.buildTableMap(b));CKEDITOR.tools.array.forEach(e,
|
||||
function(h){var f=h[0].$;h=h[1];var g=-1,d=0,e=null;f?(d=new CKEDITOR.dom.element(f),e={height:d.$.offsetHeight,position:d.getDocumentPosition()}):e=void 0;for(var f=CKEDITOR.env.ie&&!CKEDITOR.env.edge,n="collapse"===b.getComputedStyle("border-collapse"),d=e.height,e=e.position,m=0;m<h.length;m++){var k=new CKEDITOR.dom.element(h[m]),u=h[m+1]&&new CKEDITOR.dom.element(h[m+1]),p,v,q=k.getDocumentPosition().x,g=g+(k.$.colSpan||1);l?v=q+t(k,"left"):p=q+k.$.offsetWidth-t(k,"right");u?(q=u.getDocumentPosition().x,
|
||||
l?p=q+u.$.offsetWidth-t(u,"right"):v=q+t(u,"left")):(q=b.getDocumentPosition().x,l?p=q:v=q+b.$.offsetWidth);k=Math.max(v-p,3);f&&n&&(p-=k,k=Math.max(v-p,3));k={table:b,index:g,x:p,y:e.y,width:k,height:d,rtl:l};a[g]=a[g]||[];a[g].push(k);k.alignedPillars=a[g];c.push(k)}});return c}function B(b){(b.data||b).preventDefault()}function E(b){function c(){y=0;d.setOpacity(0);m&&a();var b=f.table;setTimeout(function(){b.removeCustomData("_cke_table_pillars")},0);g.removeListener("dragstart",B)}function a(){for(var d=
|
||||
f.rtl,l=d?p.length:u.length,a=0,e=0;e<l;e++){var g=u[e],h=p[e],c=f.table;CKEDITOR.tools.setTimeout(function(f,e,g,h,k,m){f&&f.setStyle("width",n(Math.max(e+m,1)));g&&g.setStyle("width",n(Math.max(h-m,1)));k&&c.setStyle("width",n(k+m*(d?-1:1)));++a==l&&b.fire("saveSnapshot")},0,this,[g,g&&z(g),h,h&&z(h),(!g||!h)&&z(c)+t(c,"left")+t(c,"right"),m])}}function l(l){B(l);b.fire("saveSnapshot");l=f.index;for(var a=CKEDITOR.tools.buildTableMap(f.table),c=[],k=[],n=Number.MAX_VALUE,t=n,x=f.rtl,D=0,C=a.length;D<
|
||||
C;D++){var r=a[D],w=r[l+(x?1:0)],r=r[l+(x?0:1)],w=w&&new CKEDITOR.dom.element(w),r=r&&new CKEDITOR.dom.element(r);w&&r&&w.equals(r)||(w&&(n=Math.min(n,z(w))),r&&(t=Math.min(t,z(r))),c.push(w),k.push(r))}u=c;p=k;v=f.x-n;q=f.x+t;d.setOpacity(.5);A=parseInt(d.getStyle("left"),10);m=0;y=1;d.on("mousemove",h);g.on("dragstart",B);g.on("mouseup",e,this)}function e(b){b.removeListener();c()}function h(b){k(b.data.getPageOffset().x)}var f,g,d,y,A,m,k,u,p,v,q;g=b.document;d=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-temp\x3d1 contenteditable\x3dfalse unselectable\x3don style\x3d"position:absolute;cursor:col-resize;filter:alpha(opacity\x3d0);opacity:0;padding:0;background-color:#004;background-image:none;border:0px none;z-index:10000"\x3e\x3c/div\x3e',
|
||||
g);b.on("destroy",function(){d.remove()});x||g.getDocumentElement().append(d);this.attachTo=function(b){var a,e,c;y||(x&&(g.getBody().append(d),m=0),f=b,a=f.alignedPillars[0],e=f.alignedPillars[f.alignedPillars.length-1],c=a.y,a=e.height+e.y-a.y,d.setStyles({width:n(b.width),height:n(a),left:n(b.x),top:n(c)}),x&&d.setOpacity(.25),d.on("mousedown",l,this),g.getBody().setStyle("cursor","col-resize"),d.show())};k=this.move=function(b,a){if(!f)return 0;if(!(y||b>=f.x&&b<=f.x+f.width&&a>=f.y&&a<=f.y+f.height))return f=
|
||||
null,y=m=0,g.removeListener("mouseup",e),d.removeListener("mousedown",l),d.removeListener("mousemove",h),g.getBody().setStyle("cursor","auto"),x?d.remove():d.hide(),0;var c=b-Math.round(d.$.offsetWidth/2);if(y){if(c==v||c==q)return 1;c=Math.max(c,v);c=Math.min(c,q);m=c-A}d.setStyle("left",n(c));return 1}}function A(b){var c=b.data.getTarget();if("mouseout"==b.name){if(!c.is("table"))return;for(var a=new CKEDITOR.dom.element(b.data.$.relatedTarget||b.data.$.toElement);a&&a.$&&!a.equals(c)&&!a.is("body");)a=
|
||||
a.getParent();if(!a||a.equals(c))return}c.getAscendant("table",1).removeCustomData("_cke_table_pillars");b.removeListener()}var n=CKEDITOR.tools.cssLength,x=CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks);CKEDITOR.plugins.add("tableresize",{requires:"tabletools",init:function(b){b.on("contentDom",function(){var c,a=b.editable();a.attachListener(a.isInline()?a:b.document,"mousemove",function(a){a=a.data;var e=a.getTarget();if(e.type==CKEDITOR.NODE_ELEMENT){var h=a.getPageOffset().x,
|
||||
f=a.getPageOffset().y;if(c&&c.move(h,f))B(a);else if(e.is("table")||e.getAscendant({thead:1,tbody:1,tfoot:1},1))if(a=e.getAscendant("table",1),b.editable().contains(a)){(e=a.getCustomData("_cke_table_pillars"))||(a.setCustomData("_cke_table_pillars",e=C(a)),a.on("mouseout",A),a.on("mousedown",A));a:{a=e;for(var e=0,g=a.length;e<g;e++){var d=a[e];if(h>=d.x&&h<=d.x+d.width&&f>=d.y&&f<=d.y+d.height){h=d;break a}}h=null}h&&(!c&&(c=new E(b)),c.attachTo(h))}}})})}})})();(function(){function n(a,b){return CKEDITOR.tools.array.reduce(b,function(a,b){return b(a)},a)}var g=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],p={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(a){function b(a){d.enabled&&!1!==a.data.command.canUndo&&d.save()}function c(){d.enabled=a.readOnly?!1:"wysiwyg"==a.mode;d.onChange()}var d=a.undoManager=new e(a),l=d.editingHandler=new k(d),f=a.addCommand("undo",{exec:function(){d.undo()&&(a.selectionChange(),this.fire("afterUndo"))},
|
||||
CKEDITOR.tools.buildTableMap=function(q,r,B,v,w){q=q.$.rows;B=B||0;v="number"===typeof v?v:q.length-1;w="number"===typeof w?w:-1;var u=-1,y=[];for(r=r||0;r<=v;r++){u++;!y[u]&&(y[u]=[]);for(var t=-1,z=B;z<=(-1===w?q[r].cells.length-1:w);z++){var p=q[r].cells[z];if(!p)break;for(t++;y[u][t];)t++;for(var A=isNaN(p.colSpan)?1:p.colSpan,p=isNaN(p.rowSpan)?1:p.rowSpan,x=0;x<p&&!(r+x>v);x++){y[u+x]||(y[u+x]=[]);for(var C=0;C<A;C++)y[u+x][t+C]=q[r].cells[z]}t+=A-1;if(-1!==w&&t>=w)break}}return y};
|
||||
CKEDITOR.config.tabletools_scopedHeaders=!1;(function(){function z(b){return CKEDITOR.env.ie?b.$.clientWidth:parseInt(b.getComputedStyle("width"),10)}function u(b,d){var a=b.getComputedStyle("border-"+d+"-width"),h={thin:"0px",medium:"1px",thick:"2px"};0>a.indexOf("px")&&(a=a in h&&"none"!=b.getComputedStyle("border-style")?h[a]:0);return parseFloat(a)}function C(b){var d=[],a={},h="rtl"===b.getComputedStyle("direction"),l=CKEDITOR.tools.array.zip((new CKEDITOR.dom.nodeList(b.$.rows)).toArray(),CKEDITOR.tools.buildTableMap(b));CKEDITOR.tools.array.forEach(l,
|
||||
function(e){var c=e[0].$;e=e[1];var l=-1,g=0,f=null;c?(g=new CKEDITOR.dom.element(c),f={height:g.$.offsetHeight,position:g.getDocumentPosition()}):f=void 0;for(var c=CKEDITOR.env.ie&&!CKEDITOR.env.edge,m="collapse"===b.getComputedStyle("border-collapse"),g=f.height,f=f.position,p=0;p<e.length;p++){var k=new CKEDITOR.dom.element(e[p]),v=e[p+1]&&new CKEDITOR.dom.element(e[p+1]),q,w,r=k.getDocumentPosition().x,l=l+(k.$.colSpan||1);h?w=r+u(k,"left"):q=r+k.$.offsetWidth-u(k,"right");v?(r=v.getDocumentPosition().x,
|
||||
h?q=r+v.$.offsetWidth-u(v,"right"):w=r+u(v,"left")):(r=b.getDocumentPosition().x,h?q=r:w=r+b.$.offsetWidth);k=Math.max(w-q,3);c&&m&&(q-=k,k=Math.max(w-q,3));k={table:b,index:l,x:q,y:f.y,width:k,height:g,rtl:h};a[l]=a[l]||[];a[l].push(k);k.alignedPillars=a[l];d.push(k)}});return d}function B(b){(b.data||b).preventDefault()}function E(b){function d(){f=0;g.setOpacity(0);p&&a();var b=c.table;setTimeout(function(){b.removeCustomData("_cke_table_pillars")},0);n.removeListener("dragstart",B)}function a(){for(var l=
|
||||
c.rtl,a=l?q.length:v.length,g=0,e=0;e<a;e++){var f=v[e],d=q[e],k=c.table;CKEDITOR.tools.setTimeout(function(c,e,f,d,n,h){c&&c.setStyle("width",m(Math.max(e+h,1)));f&&f.setStyle("width",m(Math.max(d-h,1)));n&&k.setStyle("width",m(n+h*(l?-1:1)));++g==a&&b.fire("saveSnapshot")},0,this,[f,f&&z(f),d,d&&z(d),(!f||!d)&&z(k)+u(k,"left")+u(k,"right"),p])}}function h(a){B(a);b.fire("saveSnapshot");a=c.index;for(var d=CKEDITOR.tools.buildTableMap(c.table),k=[],h=[],m=Number.MAX_VALUE,u=m,y=c.rtl,D=0,C=d.length;D<
|
||||
C;D++){var t=d[D],x=t[a+(y?1:0)],t=t[a+(y?0:1)],x=x&&new CKEDITOR.dom.element(x),t=t&&new CKEDITOR.dom.element(t);x&&t&&x.equals(t)||(x&&(m=Math.min(m,z(x))),t&&(u=Math.min(u,z(t))),k.push(x),h.push(t))}v=k;q=h;w=c.x-m;r=c.x+u;g.setOpacity(.5);A=parseInt(g.getStyle("left"),10);p=0;f=1;g.on("mousemove",e);n.on("dragstart",B);n.on("mouseup",l,this)}function l(c){c.removeListener();d()}function e(c){k(c.data.getPageOffset().x)}var c,n,g,f,A,p,k,v,q,w,r;n=b.document;g=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-temp\x3d1 contenteditable\x3dfalse unselectable\x3don style\x3d"position:absolute;cursor:col-resize;filter:alpha(opacity\x3d0);opacity:0;padding:0;background-color:#004;background-image:none;border:0px none;z-index:10000"\x3e\x3c/div\x3e',
|
||||
n);b.on("destroy",function(){g.remove()});y||n.getDocumentElement().append(g);this.attachTo=function(b){var a,l,e;f||(y&&(n.getBody().append(g),p=0),c=b,a=c.alignedPillars[0],l=c.alignedPillars[c.alignedPillars.length-1],e=a.y,a=l.height+l.y-a.y,g.setStyles({width:m(b.width),height:m(a),left:m(b.x),top:m(e)}),y&&g.setOpacity(.25),g.on("mousedown",h,this),n.getBody().setStyle("cursor","col-resize"),g.show())};k=this.move=function(a,b){if(!c)return 0;if(!(f||a>=c.x&&a<=c.x+c.width&&b>=c.y&&b<=c.y+c.height))return c=
|
||||
null,f=p=0,n.removeListener("mouseup",l),g.removeListener("mousedown",h),g.removeListener("mousemove",e),n.getBody().setStyle("cursor","auto"),y?g.remove():g.hide(),0;var d=a-Math.round(g.$.offsetWidth/2);if(f){if(d==w||d==r)return 1;d=Math.max(d,w);d=Math.min(d,r);p=d-A}g.setStyle("left",m(d));return 1}}function A(b){var d=b.data.getTarget();if("mouseout"==b.name){if(!d.is("table"))return;for(var a=new CKEDITOR.dom.element(b.data.$.relatedTarget||b.data.$.toElement);a&&a.$&&!a.equals(d)&&!a.is("body");)a=
|
||||
a.getParent();if(!a||a.equals(d))return}d.getAscendant("table",1).removeCustomData("_cke_table_pillars");b.removeListener()}var m=CKEDITOR.tools.cssLength,y=CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks);CKEDITOR.plugins.add("tableresize",{requires:"tabletools",init:function(b){b.on("contentDom",function(){var d,a=b.editable(),h=a.isInline()?a:b.document;a.attachListener(h,"mousemove",function(a){a=a.data;var e=a.getTarget();if(e.type==CKEDITOR.NODE_ELEMENT){var c=a.getPageOffset().x,
|
||||
h=a.getPageOffset().y;if(d&&d.move(c,h))B(a);else if(e.is("table")||e.getAscendant({thead:1,tbody:1,tfoot:1},1))if(a=e.getAscendant("table",1),b.editable().contains(a)){(e=a.getCustomData("_cke_table_pillars"))||(a.setCustomData("_cke_table_pillars",e=C(a)),a.on("mouseout",A),a.on("mousedown",A));a:{a=e;for(var e=0,g=a.length;e<g;e++){var f=a[e];if(c>=f.x&&c<=f.x+f.width&&h>=f.y&&h<=f.y+f.height){c=f;break a}}c=null}c&&(!d&&(d=new E(b)),d.attachTo(c))}}});a.attachListener(h,"scroll",function(){var b=
|
||||
a.find("table").toArray();CKEDITOR.tools.array.forEach(b,CKEDITOR.tools.debounce(function(a){a.removeCustomData("_cke_table_pillars")},200))})})}})})();(function(){function n(a,b){return CKEDITOR.tools.array.reduce(b,function(a,b){return b(a)},a)}var g=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],p={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(a){function b(a){d.enabled&&!1!==a.data.command.canUndo&&d.save()}function c(){d.enabled=a.readOnly?!1:"wysiwyg"==a.mode;d.onChange()}var d=a.undoManager=new e(a),l=d.editingHandler=new k(d),f=a.addCommand("undo",{exec:function(){d.undo()&&(a.selectionChange(),this.fire("afterUndo"))},
|
||||
startDisabled:!0,canUndo:!1}),h=a.addCommand("redo",{exec:function(){d.redo()&&(a.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});a.setKeystroke([[g[0],"undo"],[g[1],"redo"],[g[2],"redo"]]);d.onChange=function(){f.setState(d.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);h.setState(d.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};a.on("beforeCommandExec",b);a.on("afterCommandExec",b);a.on("saveSnapshot",function(a){d.save(a.data&&a.data.contentOnly)});
|
||||
a.on("contentDom",l.attachListeners,l);a.on("instanceReady",function(){a.fire("saveSnapshot")});a.on("beforeModeUnload",function(){"wysiwyg"==a.mode&&d.save(!0)});a.on("mode",c);a.on("readOnly",c);a.ui.addButton&&(a.ui.addButton("Undo",{label:a.lang.undo.undo,command:"undo",toolbar:"undo,10"}),a.ui.addButton("Redo",{label:a.lang.undo.redo,command:"redo",toolbar:"undo,20"}));a.resetUndo=function(){d.reset();a.fire("saveSnapshot")};a.on("updateSnapshot",function(){d.currentImage&&d.update()});a.on("lockSnapshot",
|
||||
function(a){a=a.data;d.lock(a&&a.dontUpdate,a&&a.forceUpdate)});a.on("unlockSnapshot",d.unlock,d)}});CKEDITOR.plugins.undo={};var e=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this._filterRules=[];this.editor=a;this.reset();CKEDITOR.env.ie&&this.addFilterRule(function(a){return a.replace(/\s+data-cke-expando=".*?"/g,"")})};e.prototype={type:function(a,b){var c=e.getKeyGroup(a),
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -2,17 +2,17 @@
|
||||
Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
||||
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||
*/
|
||||
CKEDITOR.dialog.add("cellProperties",function(h){function k(a){return{isSpacer:!0,type:"html",html:"\x26nbsp;",requiredContent:a?a:void 0}}function r(){return{type:"vbox",padding:0,children:[]}}function t(a){return{requiredContent:"td{"+a+"}",type:"hbox",widths:["70%","30%"],children:[{type:"text",id:a,width:"100px",label:e[a],validate:n.number(d["invalid"+CKEDITOR.tools.capitalize(a)]),onLoad:function(){var b=this.getDialog().getContentElement("info",a+"Type").getElement(),c=this.getInputElement(),
|
||||
d=c.getAttribute("aria-labelledby");c.setAttribute("aria-labelledby",[d,b.$.id].join(" "))},setup:f(function(b){var c=parseFloat(b.getAttribute(a),10);b=parseFloat(b.getStyle(a),10);if(!isNaN(b))return b;if(!isNaN(c))return c}),commit:function(b){var c=parseFloat(this.getValue(),10),d=this.getDialog().getValueOf("info",a+"Type")||u(b,a);isNaN(c)?b.removeStyle(a):b.setStyle(a,c+d);b.removeAttribute(a)},"default":""},{type:"select",id:a+"Type",label:h.lang.table[a+"Unit"],labelStyle:"visibility:hidden;display:block;width:0;overflow:hidden",
|
||||
"default":"px",items:[[p.widthPx,"px"],[p.widthPc,"%"]],setup:f(function(b){return u(b,a)})}]}}function f(a){return function(b){for(var c=a(b[0]),d=1;d<b.length;d++)if(a(b[d])!==c){c=null;break}"undefined"!=typeof c&&(this.setValue(c),CKEDITOR.env.gecko&&"select"==this.type&&!c&&(this.getInputElement().$.selectedIndex=-1))}}function u(a,b){var c=/^(\d+(?:\.\d+)?)(px|%)$/.exec(a.getStyle(b)||a.getAttribute(b));if(c)return c[2]}function v(a,b){h.getColorFromDialog(function(c){c&&a.getDialog().getContentElement("info",
|
||||
b).setValue(c);a.focus()},a)}function w(a,b,c){(a=a.getValue())?b.setStyle(c,a):b.removeStyle(c);"background-color"==c?b.removeAttribute("bgColor"):"border-color"==c&&b.removeAttribute("borderColor")}var p=h.lang.table,d=p.cell,e=h.lang.common,n=CKEDITOR.dialog.validate,y="rtl"==h.lang.dir,l=h.plugins.colordialog,q=[t("width"),t("height"),k(["td{width}","td{height}"]),{type:"select",id:"wordWrap",requiredContent:"td{white-space}",label:d.wordWrap,"default":"yes",items:[[d.yes,"yes"],[d.no,"no"]],
|
||||
setup:f(function(a){var b=a.getAttribute("noWrap");if("nowrap"==a.getStyle("white-space")||b)return"no"}),commit:function(a){"no"==this.getValue()?a.setStyle("white-space","nowrap"):a.removeStyle("white-space");a.removeAttribute("noWrap")}},k("td{white-space}"),{type:"select",id:"hAlign",requiredContent:"td{text-align}",label:d.hAlign,"default":"",items:[[e.notSet,""],[e.left,"left"],[e.center,"center"],[e.right,"right"],[e.justify,"justify"]],setup:f(function(a){var b=a.getAttribute("align");return a.getStyle("text-align")||
|
||||
b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("text-align",b):a.removeStyle("text-align");a.removeAttribute("align")}},{type:"select",id:"vAlign",requiredContent:"td{vertical-align}",label:d.vAlign,"default":"",items:[[e.notSet,""],[e.alignTop,"top"],[e.alignMiddle,"middle"],[e.alignBottom,"bottom"],[d.alignBaseline,"baseline"]],setup:f(function(a){var b=a.getAttribute("vAlign");a=a.getStyle("vertical-align");switch(a){case "top":case "middle":case "bottom":case "baseline":break;default:a=
|
||||
""}return a||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("vertical-align",b):a.removeStyle("vertical-align");a.removeAttribute("vAlign")}},k(["td{text-align}","td{vertical-align}"]),{type:"select",id:"cellType",requiredContent:"th",label:d.cellType,"default":"td",items:[[d.data,"td"],[d.header,"th"]],setup:f(function(a){return a.getName()}),commit:function(a){a.renameNode(this.getValue())}},k("th"),{type:"text",id:"rowSpan",requiredContent:"td[rowspan]",label:d.rowSpan,"default":"",
|
||||
validate:n.integer(d.invalidRowSpan),setup:f(function(a){if((a=parseInt(a.getAttribute("rowSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("rowSpan",this.getValue()):a.removeAttribute("rowSpan")}},{type:"text",id:"colSpan",requiredContent:"td[colspan]",label:d.colSpan,"default":"",validate:n.integer(d.invalidColSpan),setup:f(function(a){if((a=parseInt(a.getAttribute("colSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),
|
||||
10);b&&1!=b?a.setAttribute("colSpan",this.getValue()):a.removeAttribute("colSpan")}},k(["td[colspan]","td[rowspan]"]),{type:"hbox",padding:0,widths:l?["60%","40%"]:["100%"],requiredContent:"td{background-color}",children:function(){var a=[{type:"text",id:"bgColor",label:d.bgColor,"default":"",setup:f(function(a){var c=a.getAttribute("bgColor");return a.getStyle("background-color")||c}),commit:function(a){w(this,a,"background-color")}}];l&&a.push({type:"button",id:"bgColorChoose","class":"colorChooser",
|
||||
label:d.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){v(this,"bgColor")}});return a}()},{type:"hbox",padding:0,widths:l?["60%","40%"]:["100%"],requiredContent:"td{border-color}",children:function(){var a=[{type:"text",id:"borderColor",label:d.borderColor,"default":"",setup:f(function(a){var c=a.getAttribute("borderColor");return a.getStyle("border-color")||c}),commit:function(a){w(this,a,"border-color")}}];l&&a.push({type:"button",
|
||||
id:"borderColorChoose","class":"colorChooser",label:d.chooseColor,style:(y?"margin-right":"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){v(this,"borderColor")}});return a}()}],m=0,x=-1,g=[r()],q=CKEDITOR.tools.array.filter(q,function(a){var b=a.requiredContent;delete a.requiredContent;(b=h.filter.check(b))&&!a.isSpacer&&m++;return b});5<m&&(g=g.concat([k(),r()]));CKEDITOR.tools.array.forEach(q,function(a){a.isSpacer||
|
||||
x++;5<m&&x>=m/2?g[2].children.push(a):g[0].children.push(a)});CKEDITOR.tools.array.forEach(g,function(a){a.isSpacer||(a=a.children,a[a.length-1].isSpacer&&a.pop())});return{title:d.title,minWidth:1===g.length?205:410,minHeight:50,contents:[{id:"info",label:d.title,accessKey:"I",elements:[{type:"hbox",widths:1===g.length?["100%"]:["40%","5%","40%"],children:g}]}],getModel:function(a){return CKEDITOR.plugins.tabletools.getSelectedCells(a.getSelection())},onShow:function(){var a=this.getModel(this.getParentEditor());
|
||||
this.setupContent(a)},onOk:function(){for(var a=this._.editor.getSelection(),b=a.createBookmarks(),c=this.getParentEditor(),d=this.getModel(c),e=0;e<d.length;e++)this.commitContent(d[e]);c.forceNextSelectionCheck();a.selectBookmarks(b);c.selectionChange()},onLoad:function(){var a={};this.foreach(function(b){b.setup&&b.commit&&(b.setup=CKEDITOR.tools.override(b.setup,function(c){return function(){c.apply(this,arguments);a[b.id]=b.getValue()}}),b.commit=CKEDITOR.tools.override(b.commit,function(c){return function(){a[b.id]!==
|
||||
b.getValue()&&c.apply(this,arguments)}}))})}}});
|
||||
CKEDITOR.dialog.add("cellProperties",function(g){function k(a){return{isSpacer:!0,type:"html",html:"\x26nbsp;",requiredContent:a?a:void 0}}function r(){return{type:"vbox",padding:0,children:[]}}function t(a){return{requiredContent:"td{"+a+"}",type:"hbox",widths:["70%","30%"],children:[{type:"text",id:a,width:"100px",label:e[a],validate:p.number(d["invalid"+CKEDITOR.tools.capitalize(a)]),onLoad:function(){var b=this.getDialog().getContentElement("info",a+"Type").getElement(),c=this.getInputElement(),
|
||||
d=c.getAttribute("aria-labelledby");c.setAttribute("aria-labelledby",[d,b.$.id].join(" "))},setup:f(function(b){var c=parseFloat(b.getAttribute(a),10);b=parseFloat(b.getStyle(a),10);if(!isNaN(b))return b;if(!isNaN(c))return c}),commit:function(b){var c=parseFloat(this.getValue(),10),d=this.getDialog().getValueOf("info",a+"Type")||u(b,a);isNaN(c)?b.removeStyle(a):b.setStyle(a,c+d);b.removeAttribute(a)},"default":""},{type:"select",id:a+"Type",label:g.lang.table[a+"Unit"],labelStyle:"visibility:hidden;display:block;width:0;overflow:hidden",
|
||||
"default":"px",items:[[q.widthPx,"px"],[q.widthPc,"%"]],setup:f(function(b){return u(b,a)})}]}}function f(a){return function(b){for(var c=a(b[0]),d=1;d<b.length;d++)if(a(b[d])!==c){c=null;break}"undefined"!=typeof c&&(this.setValue(c),CKEDITOR.env.gecko&&"select"==this.type&&!c&&(this.getInputElement().$.selectedIndex=-1))}}function u(a,b){var c=/^(\d+(?:\.\d+)?)(px|%)$/.exec(a.getStyle(b)||a.getAttribute(b));if(c)return c[2]}function v(a,b){g.getColorFromDialog(function(c){c&&a.getDialog().getContentElement("info",
|
||||
b).setValue(c);a.focus()},a)}function w(a,b,c){(a=a.getValue())?b.setStyle(c,a):b.removeStyle(c);"background-color"==c?b.removeAttribute("bgColor"):"border-color"==c&&b.removeAttribute("borderColor")}var q=g.lang.table,d=q.cell,e=g.lang.common,p=CKEDITOR.dialog.validate,z="rtl"==g.lang.dir,m=g.plugins.colordialog,l=t("width"),A=t("height"),B=k(["td{width}","td{height}"]),C={type:"select",id:"wordWrap",requiredContent:"td{white-space}",label:d.wordWrap,"default":"yes",items:[[d.yes,"yes"],[d.no,"no"]],
|
||||
setup:f(function(a){var b=a.getAttribute("noWrap");if("nowrap"==a.getStyle("white-space")||b)return"no"}),commit:function(a){"no"==this.getValue()?a.setStyle("white-space","nowrap"):a.removeStyle("white-space");a.removeAttribute("noWrap")}},D=k("td{white-space}"),E={type:"select",id:"hAlign",requiredContent:"td{text-align}",label:d.hAlign,"default":"",items:[[e.notSet,""],[e.left,"left"],[e.center,"center"],[e.right,"right"],[e.justify,"justify"]],setup:f(function(a){var b=a.getAttribute("align");
|
||||
return a.getStyle("text-align")||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("text-align",b):a.removeStyle("text-align");a.removeAttribute("align")}},F={type:"select",id:"vAlign",requiredContent:"td{vertical-align}",label:d.vAlign,"default":"",items:[[e.notSet,""],[e.alignTop,"top"],[e.alignMiddle,"middle"],[e.alignBottom,"bottom"],[d.alignBaseline,"baseline"]],setup:f(function(a){var b=a.getAttribute("vAlign");a=a.getStyle("vertical-align");switch(a){case "top":case "middle":case "bottom":case "baseline":break;
|
||||
default:a=""}return a||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("vertical-align",b):a.removeStyle("vertical-align");a.removeAttribute("vAlign")}},G=k(["td{text-align}","td{vertical-align}"]),H=d.cellType,x;x=g.config.tabletools_scopedHeaders?[[d.data,"td"],[d.columnHeader,"thc"],[d.rowHeader,"thr"]]:[[d.data,"td"],[d.header,"th"]];var l=[l,A,B,C,D,E,F,G,{type:"select",id:"cellType",requiredContent:"th[scope]",label:H,"default":"td",items:x,setup:f(function(a){var b=a.getName();
|
||||
a=a.getAttribute("scope");if("td"===b)return"td";switch(a){case "row":return"thr";case "col":return"thc";default:return"th"}}),commit:function(a){var b={td:{name:"td"},th:{name:"th"},thc:{name:"th",scope:"col"},thr:{name:"th",scope:"row"}}[this.getValue()];a.renameNode(b.name);b.scope?a.setAttribute("scope",b.scope):a.removeAttribute("scope")}},k("th"),{type:"text",id:"rowSpan",requiredContent:"td[rowspan]",label:d.rowSpan,"default":"",validate:p.integer(d.invalidRowSpan),setup:f(function(a){if((a=
|
||||
parseInt(a.getAttribute("rowSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("rowSpan",this.getValue()):a.removeAttribute("rowSpan")}},{type:"text",id:"colSpan",requiredContent:"td[colspan]",label:d.colSpan,"default":"",validate:p.integer(d.invalidColSpan),setup:f(function(a){if((a=parseInt(a.getAttribute("colSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("colSpan",this.getValue()):
|
||||
a.removeAttribute("colSpan")}},k(["td[colspan]","td[rowspan]"]),{type:"hbox",padding:0,widths:m?["60%","40%"]:["100%"],requiredContent:"td{background-color}",children:function(){var a=[{type:"text",id:"bgColor",label:d.bgColor,"default":"",setup:f(function(a){var c=a.getAttribute("bgColor");return a.getStyle("background-color")||c}),commit:function(a){w(this,a,"background-color")}}];m&&a.push({type:"button",id:"bgColorChoose","class":"colorChooser",label:d.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align",
|
||||
"bottom")},onClick:function(){v(this,"bgColor")}});return a}()},{type:"hbox",padding:0,widths:m?["60%","40%"]:["100%"],requiredContent:"td{border-color}",children:function(){var a=[{type:"text",id:"borderColor",label:d.borderColor,"default":"",setup:f(function(a){var c=a.getAttribute("borderColor");return a.getStyle("border-color")||c}),commit:function(a){w(this,a,"border-color")}}];m&&a.push({type:"button",id:"borderColorChoose","class":"colorChooser",label:d.chooseColor,style:(z?"margin-right":
|
||||
"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){v(this,"borderColor")}});return a}()}],n=0,y=-1,h=[r()],l=CKEDITOR.tools.array.filter(l,function(a){var b=a.requiredContent;delete a.requiredContent;(b=g.filter.check(b))&&!a.isSpacer&&n++;return b});5<n&&(h=h.concat([k(),r()]));CKEDITOR.tools.array.forEach(l,function(a){a.isSpacer||y++;5<n&&y>=n/2?h[2].children.push(a):h[0].children.push(a)});CKEDITOR.tools.array.forEach(h,
|
||||
function(a){a.isSpacer||(a=a.children,a[a.length-1].isSpacer&&a.pop())});return{title:d.title,minWidth:1===h.length?205:410,minHeight:50,contents:[{id:"info",label:d.title,accessKey:"I",elements:[{type:"hbox",widths:1===h.length?["100%"]:["40%","5%","40%"],children:h}]}],getModel:function(a){return CKEDITOR.plugins.tabletools.getSelectedCells(a.getSelection())},onShow:function(){var a=this.getModel(this.getParentEditor());this.setupContent(a)},onOk:function(){for(var a=this._.editor.getSelection(),
|
||||
b=a.createBookmarks(),c=this.getParentEditor(),d=this.getModel(c),e=0;e<d.length;e++)this.commitContent(d[e]);c.forceNextSelectionCheck();a.selectBookmarks(b);c.selectionChange()},onLoad:function(){var a={};this.foreach(function(b){b.setup&&b.commit&&(b.setup=CKEDITOR.tools.override(b.setup,function(c){return function(){c.apply(this,arguments);a[b.id]=b.getValue()}}),b.commit=CKEDITOR.tools.override(b.commit,function(c){return function(){a[b.id]!==b.getValue()&&c.apply(this,arguments)}}))})}}});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1228
UI/WebServerResources/js/vendor/qrcode.js
vendored
1228
UI/WebServerResources/js/vendor/qrcode.js
vendored
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user