From ff427ef6ca3bbd594c38e0abd0de7d77e0e613e8 Mon Sep 17 00:00:00 2001 From: Henning Leutz <leutz@pcsg.de> Date: Mon, 14 Aug 2017 15:52:32 +0200 Subject: [PATCH] fix: komplette Liste der installierten Module durchgegangen und optimiert --- bin/Editor.js | 63 +++++++++++++++++++++----------------- plugins/activePlugins.json | 25 --------------- 2 files changed, 35 insertions(+), 53 deletions(-) diff --git a/bin/Editor.js b/bin/Editor.js index d4b85ed..01d1c60 100644 --- a/bin/Editor.js +++ b/bin/Editor.js @@ -122,7 +122,6 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ Textarea = false, size = Container.getSize(); - if (!Container.getElement('textarea')) { Textarea = new Element('textarea', { id : self.getId(), @@ -233,15 +232,20 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ var pluginPath = config.pluginPath; var extraPlugins = plugins.join(","); + var i, len, pluginName; + + for (i = 0, len = plugins.length; i < len; i++) { + pluginName = plugins[i]; - for (var i = 0, len = plugins.length; i < len; i++) { - var pluginName = plugins[i]; if (!window.CKEDITOR.plugins.get(pluginName)) { - window.CKEDITOR.plugins.addExternal(pluginName, pluginPath + "/bin/" + pluginName + "/", ""); + window.CKEDITOR.plugins.addExternal( + pluginName, + pluginPath + "/bin/" + pluginName + "/", + "" + ); } } - window.CKEDITOR.replace(instance, { skinName : 'moono-lisa', customConfig : '', @@ -260,10 +264,10 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ baseFloatZIndex : zIndex, extraPlugins : extraPlugins, //removePlugins : 'scayt', - disableNativeSpellChecker: config.disableNativeSpellChecker + disableNativeSpellChecker: config.disableNativeSpellChecker, + autoGrow_onStartup : false, + resize_enabled : false }); - - }); }, @@ -561,7 +565,7 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ extra.push('codetag'); break; case 'Image': - extra.push('image2'); + extra.push('image'); break; case 'Zoom': extra.push('zoom'); @@ -650,11 +654,10 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ dialogName = ev.data.name, dialogDefinition = ev.data.definition; - /** * Image dialog */ - if (dialogName != 'image') { + if (dialogName !== 'image') { return ev; } @@ -669,20 +672,24 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ // image button var UrlGroup = this.getContentElement('info', 'txtUrl') - .getElement() - .$; + .getElement().$; var UrlInput = UrlGroup.getElement('input[type="text"]'); var HeightInput = this.getContentElement('info', 'txtHeight') - .getElement().$ - .getElement('input[type="text"]'); + .getElement().$ + .getElement('input[type="text"]'); var WidthInput = this.getContentElement('info', 'txtWidth') - .getElement().$ - .getElement('input[type="text"]'); + .getElement().$ + .getElement('input[type="text"]'); + UrlGroup.getElement('label').setStyles({ + 'float': 'left', + 'width': '100%' + }); + if (!UrlGroup.getElement('.qui-button')) { Button = new Element('button', { 'class': 'qui-button', @@ -737,7 +744,7 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ // link button var LinkGroup = this.getContentElement('Link', 'txtUrl') - .getElement() + .getElement() .$; @@ -806,10 +813,10 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ orgCommit.call(this, data); Protokoll = dialogDefinition.dialog - .getContentElement('info', 'protocol') - .getElement() - .$ - .getElement('select'); + .getContentElement('info', 'protocol') + .getElement() + .$ + .getElement('select'); data.url = { protocol: Protokoll.value, @@ -826,7 +833,7 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ oldOnShow.bind(this)(); var UrlGroup = this.getContentElement('info', 'url') - .getElement() + .getElement() .$; if (UrlGroup.getElement('.qui-button')) { @@ -836,9 +843,9 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ var UrlInput = UrlGroup.getElement('input[type="text"]'); Protokoll = this.getContentElement('info', 'protocol') - .getElement() - .$ - .getElement('select'); + .getElement() + .$ + .getElement('select'); UrlInput.setStyles({ 'float': 'left', @@ -903,7 +910,7 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ var self = this; var oldOnShow = dialogDefinition.onShow || function () { - }; + }; dialogDefinition.onShow = function () { oldOnShow.bind(this)(); @@ -967,7 +974,7 @@ define('package/quiqqer/ckeditor4/bin/Editor', [ var self = this; var oldOnShow = dialogDefinition.onShow || function () { - }; + }; dialogDefinition.onShow = function () { oldOnShow.bind(this)(); diff --git a/plugins/activePlugins.json b/plugins/activePlugins.json index ff810ec..62f5ec8 100644 --- a/plugins/activePlugins.json +++ b/plugins/activePlugins.json @@ -2,37 +2,25 @@ "about", "ajax", "autoembed", - "autogrow", "autolink", "balloonpanel", - "base64image", - "ckawesome", "clipboard", - "codesnippet", - "codesnippetgeshi", "codeTag", "code", "colorbutton", "colordialog", - "crossreference", "dialog", "dialogadvtab", "div", - "docprops", "embed", "embedbase", - "embedsemantic", - "enhancedcolorbutton", "find", - "fixed", "font", - "footnotes", "html5audio", "html5video", "iframe", "iframedialog", "image", - "image2", "indentblock", "justify", "language", @@ -41,42 +29,29 @@ "link", "liststyle", "magicline", - "newpage", - "notification", - "notificationaggregator", "pagebreak", "panelbutton", - "pastebase64", "pastefromword", - "placeholder", "pre", - "preview", - "print", "qui-font-awesome", - "save", "scayt", "selectall", - "selectallcontextmenu", - "sharedspace", "showblocks", "smallerselection", "smiley", "sourcedialog", "specialchar", "stylesheetparser", - "symbol", "table", "tableresize", "tabletools", "templates", "textselection", - "texttransform", "uicolor", "widget", "widgetselection", "wordcount", "xml", "youtube", - "forms", "zoom" ] \ No newline at end of file -- GitLab