From: woltlab.com Date: Tue, 30 Aug 2016 18:32:24 +0000 (+0200) Subject: Updating minified JavaScript files X-Git-Tag: 3.0.0_Beta_1~396 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7778953bed409110713365942fa1c9b5a0430f3;p=GitHub%2FWoltLab%2FWCF.git Updating minified JavaScript files --- 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 45e739d30a..62dbb46b62 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.WoltLabBlock=function(){"use strict";return{init:function() // WoltLabButton.js $.Redactor.prototype.WoltLabButton=function(){"use strict";return{init:function(){var t,s,o,e;for(o=0,e=this.opts.woltlab.customButtons.length;e>o;o++)s=this.opts.woltlab.customButtons[o],t=this.button.add(s,""),this.button.addCallback(t,this.WoltLabButton._handleCustomButton);var n;for(o=0,e=this.opts.buttons.length;e>o;o++)if(s=this.opts.buttons[o],"wcfSeparator"!==s){if(!this.opts.woltlab.buttons.hasOwnProperty(s))throw new Error("Missing button definition for '"+s+"'.");switch(n=this.opts.woltlab.buttons[s],"underline"===s&&(this.opts.activeButtonsStates.u="underline"),s){case"subscript":case"superscript":t=this.button.addAfter(this.opts.buttons[o-1],s,""),this.button.setEvent(t,s,{func:"inline.format"}),this.opts.activeButtonsStates["subscript"===s?"sub":"sup"]=s;break;case"redo":case"undo":t=this.button.addAfter(this.opts.buttons[o-1],s,""),this.button.addCallback(t,this.buffer[s]);break;default:t=this.button.get(s)}if(this.button.setIcon(t,''),!t[0])throw new Error("Missing button element for '"+s+"'.");elAttr(t[0],"title",n.title),t[0].classList.add("jsTooltip")}for(var i,r={},a=[],l=this.core.toolbar()[0];l.childElementCount;)i=l.removeChild(l.children[0]),s=elAttr(i.children[0],"rel"),r[s]=i,a.push(s);var h=!1;for(o=0,e=this.opts.buttons.length;e>o;o++)s=this.opts.buttons[o],"wcfSeparator"!==s?(i=r[s],l.appendChild(i),a.splice(a.indexOf(s),1),h&&(i.classList.add("redactor-toolbar-separator"),h=!1)):h=!0;for(o=0,e=l.childElementCount;e>o;o++)i=l.children[o],t=i.children[0],elData(i,"show-on-mobile",-1!==this.opts.woltlab.buttonMobile.indexOf(t.rel));a.forEach(function(t){l.appendChild(r[t])}),WCF.DOMNodeInsertedHandler.execute()},_handleCustomButton:function(t){var s={cancel:!1};if(WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","bbcode_"+t+"_"+this.$element[0].id,s),s.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()}}}}; // WoltLabCaret.js -$.Redactor.prototype.WoltLabCaret=function(){"use strict";return{init:function(){var t=this.caret.after;this.caret.after=function(e){e=this.caret.prepare(e),this.utils.isBlockTag(e.tagName)&&this.WoltLabCaret._addParagraphAfterBlock(e),t.call(this,e)}.bind(this),this.$editor[0].addEventListener("mouseup",this.WoltLabCaret._handleEditorClick.bind(this)),this.WoltLabCaret._initInternalRange()},endOfEditor:function(){var t=this.core.editor()[0];document.activeElement!==t&&t.focus();var e=t.lastElementChild;"P"===e.nodeName?this.caret.end(e):this.caret.after(e)},_initInternalRange:function(){var t=this.core.editor()[0],e=null,i=window.getSelection(),n=function(){e=i.rangeCount?i.getRangeAt(0).cloneRange():null},r=function(){if(null!==e){if(document.activeElement===t){var n=i.getRangeAt(0);if(0!==n.startOffset)return;for(var r=n.startContainer;r;){if(r.parentNode===t){if(r.previousSibling)return;break}if(r.previousSibling)return;r=r.parentNode}if(!r)return}t.focus(),i.removeAllRanges(),i.addRange(e),e=null}};this.$editor[0].addEventListener("keyup",n),this.$editor[0].addEventListener("mouseup",function(){i.rangeCount&&n()});var a=this.selection.save;this.selection.save=function(){e=null,a.call(this)}.bind(this);var o=this.selection.restore;this.selection.restore=function(){e&&(r(),i.rangeCount&&this.utils.isRedactorParent(i.getRangeAt(0).commonAncestorContainer))||o.call(this)}.bind(this);var s=this.buffer.set;this.buffer.set=function(e){document.activeElement!==t&&r(),s.call(this,e),n()}.bind(this);var l=this.insert.html;this.insert.html=function(t,e){l.call(this,t,e),n()}.bind(this)},_handleEditorClick:function(t){if(t.target===this.$editor[0]&&this.selection.get().isCollapsed){var e=this.selection.block();if(e!==!1&&("P"!==e.nodeName||(e=e.parentNode,e!==this.$editor[0]&&this.utils.isBlockTag(e.nodeName)))){if("TD"===e.nodeName)for(;"TABLE"!==e.nodeName;)e=e.parentNode;if(!e.nodeName.match(/^H\d$/)){this.buffer.set();var i=t.clientY