From 0071b6f1aa01777a920433868fa949019a3e2718 Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Sun, 25 Dec 2016 12:31:48 +0100 Subject: [PATCH] Updating minified JavaScript files --- .../files/js/3rdParty/redactor2/plugins/combined.min.js | 4 ++-- wcfsetup/install/files/js/WCF.Combined.min.js | 5 ++--- wcfsetup/install/files/js/WoltLabSuite.Core.min.js | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) 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 743f08b5f2..b68bb770a0 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js @@ -7,7 +7,7 @@ // WoltLabAlignment.js $.Redactor.prototype.WoltLabAlignment=function(){"use strict";return{init:function(){var t=this.alignment.removeAlign;this.alignment.removeAlign=function(){t.call(this),this.block.removeClass("text-justify")}.bind(this);var i=this.dropdown.buildItem("justify",{title:this.lang.get("align-justify"),func:function(){this.buffer.set(),this.alignment.removeAlign(),this.block.addClass("text-justify")}.bind(this)});i.appendTo(this.button.get("alignment").data("dropdown"))}}}; // WoltLabAttachment.js -$.Redactor.prototype.WoltLabAttachment=function(){"use strict";return{init:function(){require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","insertAttachment_"+this.$element[0].id,this.WoltLabAttachment._insert.bind(this)),t.add("com.woltlab.wcf.redactor2","deleteAttachment_"+this.$element[0].id,this.WoltLabAttachment._delete.bind(this)),t.add("com.woltlab.wcf.redactor2","replaceAttachment_"+this.$element[0].id,this.WoltLabAttachment._replaceAttachment.bind(this))}.bind(this))},_insert:function(t){if(!this.WoltLabSource.isActive()){var e=t.attachmentId;this.buffer.set(),t.url?this.insert.html(''):this.insert.text("[attach="+e+"][/attach]"),this.buffer.set()}},_replaceAttachment:function(t){var e=elCreate("img");e.className="woltlabAttachment",e.src=t.src,elData(e,"attachment-id",t.attachmentId),t.img.parentNode.insertBefore(e,t.img),elRemove(t.img)},_delete:function(t){var e=t.attachmentId,a=this.core.editor()[0];elBySelAll('.woltlabAttachment[data-attachment-id="'+e+'"]',a,function(t){elRemove(t)});var n="[attach="+e+"][/attach]";if(a.textContent.indexOf(n)!==!1){for(var c,i=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1),r=[];c=i.nextNode();)-1!==c.textContent.indexOf(n)&&r.push(c);for(var l=0,h=r.length;h>l;l++)r[l].textContent=r[l].textContent.replace(new RegExp("\\[attach="+e+"\\]\\[\\/attach\\]","g"),"")}}}}; +$.Redactor.prototype.WoltLabAttachment=function(){"use strict";return{init:function(){this.opts.woltlab.attachments&&require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","insertAttachment_"+this.$element[0].id,this.WoltLabAttachment._insert.bind(this)),t.add("com.woltlab.wcf.redactor2","deleteAttachment_"+this.$element[0].id,this.WoltLabAttachment._delete.bind(this)),t.add("com.woltlab.wcf.redactor2","replaceAttachment_"+this.$element[0].id,this.WoltLabAttachment._replaceAttachment.bind(this))}.bind(this))},_insert:function(t){if(!this.WoltLabSource.isActive()){var e=t.attachmentId;this.buffer.set(),t.url?this.insert.html(''):this.insert.text("[attach="+e+"][/attach]"),this.buffer.set()}},_replaceAttachment:function(t){var e=elCreate("img");e.className="woltlabAttachment",e.src=t.src,elData(e,"attachment-id",t.attachmentId),t.img.parentNode.insertBefore(e,t.img),elRemove(t.img)},_delete:function(t){var e=t.attachmentId,a=this.core.editor()[0];elBySelAll('.woltlabAttachment[data-attachment-id="'+e+'"]',a,function(t){elRemove(t)});var n="[attach="+e+"][/attach]";if(a.textContent.indexOf(n)!==!1){for(var c,i=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1),r=[];c=i.nextNode();)-1!==c.textContent.indexOf(n)&&r.push(c);for(var l=0,h=r.length;h>l;l++)r[l].textContent=r[l].textContent.replace(new RegExp("\\[attach="+e+"\\]\\[\\/attach\\]","g"),"")}}}}; // WoltLabAutosave.js $.Redactor.prototype.WoltLabAutosave=function(){"use strict";return{init:function(){this.opts.woltlab.autosave&&(this.opts.woltlab.autosave.watch(this),this.opts.woltlab.autosave.createOverlay(),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveDestroy_"+this.$element[0].id,this.WoltLabAutosave.destroy.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveReset_"+this.$element[0].id,this.WoltLabAutosave.reset.bind(this)))},destroy:function(){this.opts.woltlab.autosave&&this.opts.woltlab.autosave.destroy()},reset:function(){this.opts.woltlab.autosave&&this.opts.woltlab.autosave.clear()}}}; // WoltLabBlock.js @@ -23,7 +23,7 @@ $.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){ // WoltLabColor.js $.Redactor.prototype.WoltLabColor=function(){"use strict";var o=["000000","800000","8B4513","2F4F4F","008080","000080","4B0082","696969","B22222","A52A2A","DAA520","006400","40E0D0","0000CD","800080","808080","FF0000","FF8C00","FFD700","008000","00FFFF","0000FF","EE82EE","A9A9A9","FFA07A","FFA500","FFFF00","00FF00","AFEEEE","ADD8E6","DDA0DD","D3D3D3","FFF0F5","FAEBD7","FFFFE0","F0FFF0","F0FFFF","F0F8FF","E6E6FA","FFFFFF"];return{init:function(){for(var t,e=this.WoltLabColor.setColor.bind(this),r={},F=0,i=o.length;i>F;F++)t=o[F],r["color_"+t]={title:"#"+t,func:e};r.removeColor={title:this.lang.get("remove-color"),func:this.WoltLabColor.removeColor.bind(this)};var l=this.button.add("woltlabColor","");this.button.addDropdown(l,r);var s=l.data("dropdown");s.find("a").each(function(o,t){t.className.match(/redactor-dropdown-color_([A-F0-9]{6})/)&&(t.style.setProperty("color","#"+RegExp.$1,""),t.parentNode.classList.add("woltlab-color-selection"))}),$('').insertBefore(s.children("li").last())},setColor:function(o){o=o.replace(/^color_/,""),this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.format(this.$editor[0],"color","#"+o),this.buffer.set()}.bind(this))},removeColor:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.removeFormat(this.$editor[0],"color"),this.buffer.set()}.bind(this))}}}; // WoltLabDragAndDrop.js -$.Redactor.prototype.WoltLabDragAndDrop=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/DragAndDrop"],function(t){t.init(this)}.bind(this))}}}; +$.Redactor.prototype.WoltLabDragAndDrop=function(){"use strict";return{init:function(){this.opts.woltlab.attachments&&require(["WoltLabSuite/Core/Ui/Redactor/DragAndDrop"],function(t){t.init(this)}.bind(this))}}}; // WoltLabDropdown.js $.Redactor.prototype.WoltLabDropdown=function(){"use strict";return{init:function(){this.utils.disableBodyScroll=function(){},this.utils.enableBodyScroll=function(){},this.WoltLabDropdown._hideAll(),this.WoltLabDropdown._show()},_hideAll:function(){var o=this.dropdown.hideAll;this.dropdown.hideAll=function(t,i){o.call(this,t,i),$(".redactor-dropdown-"+this.uuid).stop(!0,!0).hide()}.bind(this)},_show:function(){var o=this.dropdown.show;this.dropdown.show=function(t,i){var l=this.button.get(i),d=l.data("dropdown");if(!elDataBool(d[0],"woltlab")){var n=elCreate("ul");for(n.className="dropdownMenu";d[0].childElementCount;)n.appendChild(d[0].children[0]);d[0].appendChild(n),elData(d[0],"woltlab",!0)}var s=l.hasClass("dropact");o.call(this,t,i),s||d.stop(!0).show()}.bind(this)}}}; // WoltLabEvent.js diff --git a/wcfsetup/install/files/js/WCF.Combined.min.js b/wcfsetup/install/files/js/WCF.Combined.min.js index 8e5a687a6e..3fc688d4aa 100755 --- a/wcfsetup/install/files/js/WCF.Combined.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.min.js @@ -102,9 +102,8 @@ this._className){var l=this._container.find(".formSubmit");if(!l.length&&(l=this (function (window, undefined) {"use strict";WCF.Search.Message={},WCF.Search.Message.KeywordList=WCF.Search.Base.extend({_className:"wcf\\data\\search\\keyword\\SearchKeywordAction",_divider:null,_forceSubmit:!1,init:function(e,i,s){if(!$.isFunction(i))return void console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.");this._callback=i,this._excludedSearchValues=[],s&&(this._excludedSearchValues=s),this._searchInput=$(e).keyup($.proxy(this._keyUp,this)).keydown($.proxy(function(e){13===e.which&&this._itemCount&&-1!==this._itemIndex&&e.preventDefault()},this));var t=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()),r=t.find("li.dropdownDivider").last();this._divider=$('