Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Sun, 4 Dec 2016 15:31:46 +0000 (16:31 +0100)
committerwoltlab.com <woltlab@woltlab.com>
Sun, 4 Dec 2016 15:31:46 +0000 (16:31 +0100)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js

index c82d77f677971c3987e505e23a0f111f4aa0990a..4349458e8515491281202ae9093f1811f876500f 100644 (file)
@@ -61,7 +61,7 @@ $.Redactor.prototype.WoltLabSize=function(){"use strict";return{init:function(){
 // WoltLabSmiley.js
 $.Redactor.prototype.WoltLabSmiley=function(){"use strict";var t=0;return{init:function(){require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","insertSmiley_"+this.$element[0].id,this.WoltLabSmiley._insert.bind(this))}.bind(this))},_insert:function(i){if(!this.WoltLabSource.isActive()){this.buffer.set();var e="wscSmiley_"+this.uuid+"_"+t++,r=i.img.cloneNode();r.id=e,this.insert.html(r.outerHTML),r=elById(e),r.removeAttribute("id"),r.outerHTML=r.outerHTML}}}};
 // WoltLabSource.js
-$.Redactor.prototype.WoltLabSource=function(){"use strict";return{init:function(){var e=function(e){elBySelAll("woltlab-quote",e,function(e){if(2===e.childElementCount&&"P"===e.children[0].nodeName&&"P"===e.children[1].nodeName){var t=e.children[0];if(""===t.innerHTML.trim()){var n=e.children[1];"<br>"===n.innerHTML.trim()&&e.removeChild(t)}}})};this.source.setCaretOnShow=function(){},this.source.setCaretOnHide=function(e){return e};var t=this.source.hide;this.source.hide=function(){t.call(this),setTimeout(function(){this.focus.end(),e(this.core.editor()[0])}.bind(this),100),this.placeholder.enable()}.bind(this);var n=this.source.$textarea[0];this.$element[0].parentNode.insertBefore(n,this.$element[0]);var r=this.source.show;this.source.show=function(){var t=this.$editor[0].offsetHeight;r.call(this),n.style.setProperty("height",Math.ceil(t)+"px",""),n.style.setProperty("display","block","");var i=elCreate("div");i.innerHTML=n.value,e(i),n.value=this.WoltLabSource.format(i.innerHTML),n.selectionStart=n.selectionEnd=n.value.length}.bind(this),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+this.$element[0].id,function(e){n.clientHeight&&(e.api.throwError(this.$element[0],WCF.Language.get("wcf.editor.source.error.active")),e.valid=!1)}.bind(this))},isActive:function(){return"none"===this.$editor[0].style.getPropertyValue("display")},format:function(e){var t=this.block.tags.join("|").toLowerCase();t+="|ul|ol|li";var n="[^'\">]*(?:(?:\"[^\"]*\"|'[^']*')[^'\">]*)*",r=[];e=e.replace(new RegExp("<pre"+n+">[sS]*?</pre>","g"),function(e){return r.push(e),"@@@WCF_PRE_BACKUP_"+(r.length-1)+"@@@"}),e=e.replace(new RegExp("\\s*</("+t+")("+n+")>\\s*","g"),"\n</$1$2>"),e=e.replace(new RegExp("\\s*<("+t+")("+n+")>\\s*","g"),"\n<$1$2>\n"),e=e.replace(/<woltlab-quote([^>]*)>\n\t*\n(\t*)<p/,"<woltlab-quote$1>\n$2<p"),e=e.replace(new RegExp("<(ol|ul)("+n+")>\\s*","g"),"<$1$2>\n");var i,o,l,s=e.split(/\n/),a=0,c=new RegExp("^<(?:"+t+")"),h=new RegExp("^</(?:"+t+")>$"),u=!1;for(i=0,o=s.length;o>i;i++){if(l=s[i],u=!1,l.match(c)?u=!0:l.match(h)&&a--,a>0){var d=a;for(s[i]="";d--;)s[i]+="        ";s[i]+=l}u&&a++}for(e=s.join("\n"),i=0,o=r.length;o>i;i++)e=e.replace("@@@WCF_PRE_BACKUP_"+i+"@@@",r[i]);return e.trim()}}};
+$.Redactor.prototype.WoltLabSource=function(){"use strict";return{init:function(){var e=function(e){elBySelAll("woltlab-quote",e,function(e){if(2===e.childElementCount&&"P"===e.children[0].nodeName&&"P"===e.children[1].nodeName){var t=e.children[0];if(""===t.innerHTML.trim()){var n=e.children[1];"<br>"===n.innerHTML.trim()&&e.removeChild(t)}}})};this.source.setCaretOnShow=function(){},this.source.setCaretOnHide=function(e){return e};var t=this.source.hide;this.source.hide=function(){t.call(this),setTimeout(function(){this.focus.end(),e(this.core.editor()[0])}.bind(this),100),this.placeholder.enable()}.bind(this);var n=this.source.$textarea[0];this.$element[0].parentNode.insertBefore(n,this.$element[0]);var i=this.source.show;this.source.show=function(){var t=this.$editor[0].offsetHeight;i.call(this),n.style.setProperty("height",Math.ceil(t)+"px",""),n.style.setProperty("display","block","");var r=elCreate("div");r.innerHTML=n.value,e(r),n.value=this.WoltLabSource.format(r.innerHTML),n.selectionStart=n.selectionEnd=n.value.length}.bind(this),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+this.$element[0].id,function(e){n.clientHeight&&(e.api.throwError(this.$element[0],WCF.Language.get("wcf.editor.source.error.active")),e.valid=!1)}.bind(this))},isActive:function(){return"none"===this.$editor[0].style.getPropertyValue("display")},format:function(e){var t=["ul","ol","li"];this.block.tags.forEach(function(e){t.push(e)}),t=t.join("|").toLowerCase();var n=["p","li"],i="[^'\">]*(?:(?:\"[^\"]*\"|'[^']*')[^'\">]*)*",r=[];e=e.replace(new RegExp("<pre"+i+">[sS]*?</pre>","g"),function(e){return r.push(e),"@@@WCF_PRE_BACKUP_"+(r.length-1)+"@@@"}),e=e.replace(new RegExp("\\s*</("+t+")>\\s*","g"),function(e,t){return(-1===n.indexOf(t)?"\n":"")+"</"+t+">"}),e=e.replace(new RegExp("\\s*<("+t+")("+i+")>\\s*","g"),function(e,t,i){return"\n<"+t+i+">"+(-1===n.indexOf(t)?"\n":"")}),e=e.replace(/<woltlab-quote([^>]*)>\n\t*\n(\t*)<p/,"<woltlab-quote$1>\n$2<p"),e=e.replace(new RegExp("<(ol|ul)("+i+")>\\s*","g"),"<$1$2>\n");var o,l,s,a=e.split(/\n/),c=0,h=new RegExp("^<("+t+")"),u=new RegExp("^</(?:"+t+")>$"),d=!1;for(o=0,l=a.length;l>o;o++){if(s=a[o],d=!1,s.match(h)?-1===n.indexOf(RegExp.$1)&&(d=!0):s.match(u)&&c--,c>0){var f=c;for(a[o]="";f--;)a[o]+="     ";a[o]+=s}d&&c++}for(e=a.join("\n"),o=0,l=r.length;l>o;o++)e=e.replace("@@@WCF_PRE_BACKUP_"+o+"@@@",r[o]);return e.trim()}}};
 // WoltLabSpoiler.js
 $.Redactor.prototype.WoltLabSpoiler=function(){"use strict";return{init:function(){this.WoltLabBlock.register("woltlab-spoiler",!0),this.opts.activeButtonsStates["woltlab-spoiler"]="woltlabSpoiler",require(["WoltLabSuite/Core/Ui/Redactor/Spoiler"],function(t){new t(this)}.bind(this))}}};
 // WoltLabUtils.js