Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Thu, 30 Mar 2017 14:16:48 +0000 (16:16 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Thu, 30 Mar 2017 14:16:48 +0000 (16:16 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js

index 27c44e316205655c9f30691da5b23f02faa0c90c..cd036f0800b16ec51af8d1c73d4330d2a58347d8 100644 (file)
@@ -11,7 +11,7 @@ $.Redactor.prototype.WoltLabAttachment=function(){"use strict";return{init:funct
 // 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
-$.Redactor.prototype.WoltLabBlock=function(){"use strict";return{init:function(){this.block.tags=["p","blockquote","pre","h1","h2","h3","h4","h5","h6","div","figure"],this.block.format=function(t,e,o,i){return t="quote"===t?"blockquote":t,-1!==$.inArray(t,this.block.tags)?("p"===t&&"undefined"==typeof e&&(e="class"),this.placeholder.hide(),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(t,e,o,i):this.block.formatUncollapsed(t,e,o,i)):void 0}.bind(this);var t=this.block.formatCollapsed;this.block.formatCollapsed=function(e,o,i,s){var l=this.selection.block();if(!l||"LI"!==l.nodeName&&"TD"!==l.nodeName){if(this.detect.isFirefox()){var h=this.core.editor()[0];document.activeElement!==h&&(this.selection.restore(),document.activeElement!==h&&h.focus()),this.selection.block()===!1&&this.focus.end()}for(var a=t.call(this,e,o,i,s),r=0,c=a.length;c>r;r++)this.WoltLabBlock._paragraphize(a[r]);return this.caret.end(a),a}}.bind(this);var e=this.block.formatUncollapsed;this.block.formatUncollapsed=function(t,o,i,s){for(var l,h=e.call(this,t,o,i,s),a=null,r=0,c=h.length;c>r;r++)if(l=h[r][0],this.WoltLabBlock._paragraphize(l),0===r)a=l;else{for(;l.childNodes.length;)a.appendChild(l.childNodes[0]);elRemove(l)}return $(a)}.bind(this)},register:function(t,e){-1===this.block.tags.indexOf(t)&&(this.block.tags.push(t),this.opts.paragraphizeBlocks.push(t),-1===this.opts.blockTags.indexOf(t)&&(this.opts.blockTags.push(t),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i")),e&&this.WoltLabKeydown.register(t))},_paragraphize:function(t){if(-1===["p","pre","h1","h2","h3","h4","h5","h6","div","figure"].indexOf(t.nodeName.toLowerCase())){for(var e=elCreate("p");t.childNodes.length;)e.appendChild(t.childNodes[0]);t.appendChild(e)}}}};
+$.Redactor.prototype.WoltLabBlock=function(){"use strict";return{init:function(){this.block.tags=["p","blockquote","pre","h1","h2","h3","h4","h5","h6","div","figure"],this.block.format=function(t,e,i,o){return t="quote"===t?"blockquote":t,-1!==$.inArray(t,this.block.tags)?("p"===t&&"undefined"==typeof e&&(e="class"),this.placeholder.hide(),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(t,e,i,o):this.block.formatUncollapsed(t,e,i,o)):void 0}.bind(this);var t=function(t,e){return!(document.activeElement!==t||e===!1||!this.utils.isRedactorParent(e))}.bind(this),e=this.block.formatCollapsed;this.block.formatCollapsed=function(i,o,s,l){var h=this.selection.block();if(!h||"LI"!==h.nodeName&&"TD"!==h.nodeName){var a=this.core.editor()[0];t(a,h)||(this.selection.restore(),document.activeElement!==a&&a.focus()),t(a,h)||(this.focus.end(),this.selection.save());for(var r=e.call(this,i,o,s,l),n=0,c=r.length;c>n;n++)this.WoltLabBlock._paragraphize(r[n]);return this.caret.end(r),r}}.bind(this);var i=this.block.formatUncollapsed;this.block.formatUncollapsed=function(t,e,o,s){for(var l,h=i.call(this,t,e,o,s),a=null,r=0,n=h.length;n>r;r++)if(l=h[r][0],this.WoltLabBlock._paragraphize(l),0===r)a=l;else{for(;l.childNodes.length;)a.appendChild(l.childNodes[0]);elRemove(l)}return $(a)}.bind(this)},register:function(t,e){-1===this.block.tags.indexOf(t)&&(this.block.tags.push(t),this.opts.paragraphizeBlocks.push(t),-1===this.opts.blockTags.indexOf(t)&&(this.opts.blockTags.push(t),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i")),e&&this.WoltLabKeydown.register(t))},_paragraphize:function(t){if(-1===["p","pre","h1","h2","h3","h4","h5","h6","div","figure"].indexOf(t.nodeName.toLowerCase())){for(var e=elCreate("p");t.childNodes.length;)e.appendChild(t.childNodes[0]);t.appendChild(e)}}}};
 // WoltLabButton.js
 $.Redactor.prototype.WoltLabButton=function(){"use strict";var t;return{init:function(){this.button.buildButtonTooltip=function(){};var t,e,o,n;for(o=0,n=this.opts.woltlab.customButtons.length;n>o;o++)e=this.opts.woltlab.customButtons[o],t=this.button.add(e,""),this.button.addCallback(t,this.WoltLabButton._handleCustomButton);var i,s,a;for(o=0,n=this.opts.buttons.length;n>o;o++)if(e=this.opts.buttons[o],"wcfSeparator"!==e){if(!this.opts.woltlab.buttons.hasOwnProperty(e))throw new Error("Missing button definition for '"+e+"'.");switch(i=this.opts.woltlab.buttons[e],"underline"===e&&(this.opts.activeButtonsStates.u="underline"),e){case"subscript":case"superscript":t=this.button.addAfter(this.opts.buttons[o-1],e,""),this.button.setEvent(t,e,{func:"inline.format"}),this.opts.activeButtonsStates["subscript"===e?"sub":"sup"]=e;break;case"redo":case"undo":t=this.button.addAfter(this.opts.buttons[o-1],e,""),this.button.addCallback(t,this.buffer[e]);break;default:t=this.button.get(e)}if(s=i.icon,a=!1,!s.match(/^fa-/)&&s.match(/\.(gif|jpe?g|png|svg)$/)&&(a=!0),this.button.setIcon(t,'<span class="icon icon16 '+(a?"redactorButtonImage":s)+'"'+(a?" style=\"background-image: url('"+WCF_PATH+"icon/"+s+"')\"":"")+"></span>"),!t[0])throw new Error("Missing button element for '"+e+"'.");if(elAttr(t[0],"title",i.title),t[0].classList.add("jsTooltip"),"lists"==e){var l=t.data("dropdown");elBySel(".redactor-dropdown-outdent span",l[0]).textContent=WCF.Language.get("wcf.editor.list.outdent"),elBySel(".redactor-dropdown-indent span",l[0]).textContent=WCF.Language.get("wcf.editor.list.indent")}}var r=this.core.toolbar()[0];elBySelAll(".re-button-tooltip",r,elRemove);for(var c,d={},u=[];r.childElementCount;)c=r.removeChild(r.children[0]),e=elAttr(c.children[0],"rel"),d[e]=c,u.push(e);var h=!1;for(o=0,n=this.opts.buttons.length;n>o;o++)e=this.opts.buttons[o],"wcfSeparator"!==e?(c=d[e],r.appendChild(c),u.splice(u.indexOf(e),1),h&&(c.classList.add("redactor-toolbar-separator"),h=!1)):h=!0;for(o=0,n=r.childElementCount;n>o;o++)c=r.children[o],t=c.children[0],elData(c,"show-on-mobile",-1!==this.opts.woltlab.buttonMobile.indexOf(t.rel));u.forEach(function(t){r.appendChild(d[t])}),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(t){t.on("screen-xs",{match:this.WoltLabButton._enableToggleButton.bind(this),unmatch:this.WoltLabButton._disableToggleButton.bind(this),setup:this.WoltLabButton._setupToggleButton.bind(this)})}.bind(this))},_handleCustomButton:function(t){var e={cancel:!1};if(WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","bbcode_"+t+"_"+this.$element[0].id,e),e.cancel!==!0){this.buffer.set();var o="["+t+"]"+this.selection.html()+(this.selection.is()?"":this.marker.html())+"[/"+t+"]";this.insert.html(o),this.selection.restore()}window.setTimeout(function(){document.activeElement!==this.$editor[0]&&this.$editor[0].focus()}.bind(this),10)},_enableToggleButton:function(){null===t.parentNode&&this.$toolbar[0].appendChild(t)},_disableToggleButton:function(){null!==t.parentNode&&this.$toolbar[0].removeChild(t)},_setupToggleButton:function(){t=elCreate("li"),t.className="redactorToolbarToggle",t.innerHTML='<a href="#"><span class="icon icon16 fa-caret-down"></span></a>',elData(t,"show-on-mobile",!0);var e=t.children[0].children[0],o=function(t){t instanceof Event&&t.preventDefault(),this.$toolbar[0].classList.toggle("redactorToolbarOverride")&&document.activeElement&&document.activeElement!==this.$editor[0]&&document.activeElement.blur(),e.classList.toggle("fa-caret-down"),e.classList.toggle("fa-caret-up")}.bind(this);t.children[0].addEventListener("mousedown",o),this.$toolbar[0].appendChild(t),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this.$element[0].id,function(){this.$toolbar[0].classList.contains("redactorToolbarOverride")&&o()}.bind(this))}}};
 // WoltLabCaret.js