From 80fba51cb5f5a37a815a62b12f402d9b0d660e67 Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Tue, 7 Jun 2016 18:26:17 +0200 Subject: [PATCH] Updating minified JavaScript files --- .../install/files/js/3rdParty/redactor2/plugins/combined.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js index bc407895d6..7a7f520706 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js @@ -15,7 +15,7 @@ $.Redactor.prototype.WoltLabDropdown=function(){"use strict";return{init:functio // WoltLabEvent.js $.Redactor.prototype.WoltLabEvent=function(){"use strict";return{init:function(){this._callbacks=[],this._elementId=this.$element[0].id,require(["EventHandler"],this.WoltLabEvent._setEvents.bind(this))},_setEvents:function(t){var e=this.$element[0].id,i=this.observe.load;this.observe.load=function(){i.call(this),t.fire("com.woltlab.wcf.redactor","observe_load_"+e,{editor:this.$editor[0]})}.bind(this),this.opts.callbacks.keyup=function(i){var n={cancel:!1,event:i};return t.fire("com.woltlab.wcf.redactor","keyup_"+e,n),n.cancel===!1},t.add("com.woltlab.wcf.redactor2","getText_"+e,function(t){t.message=this.code.get()}.bind(this))},register:function(t,e){require(["EventHandler"],function(i){-1===this._callbacks.indexOf(t)&&(this.opts.callbacks[t]=function(e){var n={cancel:!1,event:e,redactor:this};return i.fire("com.woltlab.wcf.redactor2",t+"_"+this.WoltLabEvent._elementId,n),n.cancel===!1}.bind(this),this._callbacks.push(t)),require(["EventHandler"],function(i){i.add("com.woltlab.wcf.redactor2",t+"_"+this.WoltLabEvent._elementId,e)}.bind(this))}.bind(this))}}}; // WoltLabImage.js -$.Redactor.prototype.WoltLabImage=function(){"use strict";return{init:function(){var e=this.button.add("woltlabImage","");this.button.addCallback(e,this.WoltLabImage.add);var t=this.image.showEdit;this.image.showEdit=function(e){t(e),elById("redactor-image-source").value=e[0].src;var a=elById("redactor-image-float");e[0].classList.contains("messageFloatObjectLeft")?a.value="left":e[0].classList.contains("messageFloatObjectRight")&&(a.value="right")};var a=this.image.update;this.image.update=function(){var e=elById("redactor-image-source"),t=function(e,t){$('').text(t).insertAfter(e)},i=e.value.trim();if(""===i)return t(e,WCF.Language.get("wcf.global.form.error.empty"));if(!i.match(this.opts.regexps.url))return t(e,WCF.Language.get("wcf.editor.image.source.error.invalid"));var r=this.observe.image[0];r.src=i,r.classList.remove("messageFloatObjectLeft"),r.classList.remove("messageFloatObjectRight");var o=elById("redactor-image-float").value;("left"===o||"right"===o)&&r.classList.add("messageFloatObject"+WCF.String.ucfirst(o)),a(),r.removeAttribute("alt"),r.removeAttribute("title")}.bind(this),this.opts.modal["image-edit"]='
'+WCF.Language.get("wcf.editor.image.source.description")+'
'+WCF.Language.get("wcf.editor.image.link.description")+'
"+WCF.Language.get("wcf.editor.image.float.description")+'
'},add:function(){this.modal.load("image-edit",WCF.Language.get("wcf.editor.image.insert")),this.modal.show(),this.modal.getDeleteButton().hide();var e=this.modal.getActionButton();e[0].addEventListener(WCF_CLICK_EVENT,this.WoltLabImage.insert)},insert:function(e){e.preventDefault(),this.modal.getModal().find(".innerError").remove();var t=elById("redactor-image-source"),a=function(e,t){$('').text(t).insertAfter(e)},i=t.value.trim();if(""===i)return a(t,WCF.Language.get("wcf.global.form.error.empty"));if(!i.match(this.opts.regexps.url))return a(t,WCF.Language.get("wcf.editor.image.source.error.invalid"));var r=elById("redactor-image-link"),o=r.value.trim();if(""!==o&&!o.match(this.opts.regexps.url))return a(r,WCF.Language.get("wcf.editor.image.link.error.invalid"));var l=elById("redactor-image-float").value,s="";("left"===l||"right"===l)&&(s="messageFloatObject"+WCF.String.ucfirst(l));var d='";o&&(d=''+d+""),this.modal.close(),this.insert.html(d)}}}; +$.Redactor.prototype.WoltLabImage=function(){"use strict";return{init:function(){var e=this.button.add("woltlabImage","");this.button.addCallback(e,this.WoltLabImage.add);var t=this.image.showEdit;this.image.showEdit=function(e){var a=e[0];if(!a.classList.contains("smiley")){t(e),elById("redactor-image-source").value=a.src;var i=elById("redactor-image-float");a.classList.contains("messageFloatObjectLeft")?i.value="left":a.classList.contains("messageFloatObjectRight")&&(i.value="right"),a.classList.contains("woltlabAttachment")&&elRemove(elById("redactor-image-source-container"))}};var a=this.image.update;this.image.update=function(){var e=this.observe.image[0],t=elById("redactor-image-source"),i=function(e,t){$('').text(t).insertAfter(e)};if(!e.classList.contains("woltlabAttachment")){var r=t.value.trim();if(""===r)return i(t,WCF.Language.get("wcf.global.form.error.empty"));if(!r.match(this.opts.regexps.url))return i(t,WCF.Language.get("wcf.editor.image.source.error.invalid"));e.src=r}e.classList.remove("messageFloatObjectLeft"),e.classList.remove("messageFloatObjectRight");var o=elById("redactor-image-float").value;("left"===o||"right"===o)&&e.classList.add("messageFloatObject"+WCF.String.ucfirst(o)),a(),e.removeAttribute("alt"),e.removeAttribute("title")}.bind(this),this.opts.modal["image-edit"]='
'+WCF.Language.get("wcf.editor.image.source.description")+'
'+WCF.Language.get("wcf.editor.image.link.description")+'
"+WCF.Language.get("wcf.editor.image.float.description")+'
'},add:function(){this.modal.load("image-edit",WCF.Language.get("wcf.editor.image.insert")),this.modal.show(),this.modal.getDeleteButton().hide();var e=this.modal.getActionButton();e[0].addEventListener(WCF_CLICK_EVENT,this.WoltLabImage.insert)},insert:function(e){e.preventDefault(),this.modal.getModal().find(".innerError").remove();var t=elById("redactor-image-source"),a=function(e,t){$('').text(t).insertAfter(e)},i=t.value.trim();if(""===i)return a(t,WCF.Language.get("wcf.global.form.error.empty"));if(!i.match(this.opts.regexps.url))return a(t,WCF.Language.get("wcf.editor.image.source.error.invalid"));var r=elById("redactor-image-link"),o=r.value.trim();if(""!==o&&!o.match(this.opts.regexps.url))return a(r,WCF.Language.get("wcf.editor.image.link.error.invalid"));var l=elById("redactor-image-float").value,s="";("left"===l||"right"===l)&&(s="messageFloatObject"+WCF.String.ucfirst(l));var n='";o&&(n=''+n+""),this.modal.close(),this.insert.html(n)}}}; // WoltLabLink.js $.Redactor.prototype.WoltLabLink=function(){"use strict";var i=null;return{init:function(){this.link.show=this.WoltLabLink.show.bind(this),require(["WoltLab/WCF/Ui/Redactor/Link"],function(t){i=t})},show:function(t){"undefined"!=typeof t&&t.preventDefault&&t.preventDefault(),this.observe.closeAllTooltip();var e=this.link.is();i.showDialog({insert:e===!1,submitCallback:function(){var i=this.link.buildLinkFromModal();return i===!1?!1:(this.selection.restore(),this.link.insert(i,!0),!0)}.bind(this)});var n=this.link.buildLinkFromElement(e);n.url=this.link.removeSelfHostFromUrl(n.url),this.link.setModalValues(n),this.detect.isDesktop()&&$("#redactor-link-url").focus()}}}; // WoltLabMedia.js -- 2.20.1