Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Tue, 30 Aug 2016 10:32:22 +0000 (12:32 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Tue, 30 Aug 2016 10:32:22 +0000 (12:32 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js

index b16a3d9a55bb3032f96deec555024637c867680c..3faee86312a9205d84bdf9e86390ea5651e5aa11 100644 (file)
@@ -17,7 +17,7 @@ $.Redactor.prototype.WoltLabButton=function(){"use strict";return{init:function(
 // 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;this.buffer.set();var i=t.clientY<e.getBoundingClientRect().top,n=elCreate("p");n.textContent="​",e.parentNode.insertBefore(n,i?e:e.nextSibling),this.caret.end(n)}}},_addParagraphAfterBlock:function(t){var e=t.nextElementSibling;(!e||"P"!==e.nodeName&&!this.utils.isBlockTag(e.nodeName))&&(e=elCreate("p"),e.textContent="​",t.parentNode.insertBefore(e,t.nextSibling))}}};
 // WoltLabClean.js
-$.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var n=this.clean.onSet;this.clean.onSet=function(t){return n.call(this,t.replace(/\u200B/g,""))}.bind(this);var t=this.clean.onSync;this.clean.onSync=function(n){var e,i={};return-1!==n.indexOf("<pre")&&(e=elCreate("div"),e.innerHTML=n,elBySelAll("pre",e,function(n){var t=WCF.getUUID();i[t]=n.textContent,n.textContent=t}),n=e.innerHTML),n=t.call(this,n),e&&(e.innerHTML=n,elBySelAll("pre",e,function(n){n.textContent=i[n.textContent]}),n=e.innerHTML),n}.bind(this);var e=this.clean.savePreFormatting;this.clean.savePreFormatting=function(n){var t=this.clean.encodeEntities;return this.clean.encodeEntities=function(n){return WCF.String.escapeHTML(n)},n=e.call(this,n),this.clean.encodeEntities=t,n}.bind(this)}}};
+$.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){this.opts.pasteInlineTags=this.opts.pasteInlineTags.filter(function(n){return"span"!==n});var n=this.clean.onSet;this.clean.onSet=function(t){return n.call(this,t.replace(/\u200B/g,""))}.bind(this);var t=this.clean.onSync;this.clean.onSync=function(n){var e=elCreate("div"),i={};return-1!==n.indexOf("<pre")&&(e.innerHTML=n,elBySelAll("pre",e,function(n){var t=WCF.getUUID();i[t]=n.textContent,n.textContent=t}),n=e.innerHTML),n=t.call(this,n),e.innerHTML=n,elBySelAll("span",e,function(n){n.outerHTML=n.innerHTML}),elBySelAll("pre",e,function(n){i.hasOwnProperty(n.textContent)&&(n.textContent=i[n.textContent])}),n=e.innerHTML}.bind(this);var e=this.clean.savePreFormatting;this.clean.savePreFormatting=function(n){var t=this.clean.encodeEntities;return this.clean.encodeEntities=function(n){return WCF.String.escapeHTML(n)},n=e.call(this,n),this.clean.encodeEntities=t,n}.bind(this);var i=this.clean.stripTags;this.clean.stripTags=function(n,t){return Array.isArray(t)&&t.push("span"),i.call(this,n,t)}.bind(this)}}};
 // WoltLabCode.js
 $.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/Code"],function(t){new t(this)}.bind(this))}}};
 // WoltLabColor.js
@@ -31,7 +31,7 @@ $.Redactor.prototype.WoltLabImage=function(){"use strict";return{init:function()
 // WoltLabInlineCode.js
 $.Redactor.prototype.WoltLabInlineCode=function(){"use strict";return{init:function(){this.opts.activeButtonsStates.kbd="tt",require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","bbcode_tt_"+this.$element[0].id,function(t){t.cancel=!0,this.button.toggle({},"kbd","func","inline.format")}.bind(this))}.bind(this))}}};
 // WoltLabInsert.js
-$.Redactor.prototype.WoltLabInsert=function(){"use strict";return{init:function(){var t=this.opts.woltlab.placeholderCallback,e=this.insert.html;this.insert.html=function(i,n){t&&(t=t()),this.placeholder.hide(),this.core.editor().focus();var l=this.selection.block();if(e.call(this,i,n),l&&"P"===l.nodeName&&l.nextElementSibling){var o=!1;0===l.childElementCount&&""===l.textContent.replace(/\u200B/g,"").trim()?o=!0:1===l.childElementCount&&"<br>"===l.innerHTML&&(o=!0),o&&elRemove(l)}}.bind(this);var i=this.insert.text;this.insert.text=function(e){t&&(t=t()),i.call(this,e)}.bind(this)}}};
+$.Redactor.prototype.WoltLabInsert=function(){"use strict";return{init:function(){var t=this.opts.woltlab.placeholderCallback,e=this.insert.html;this.insert.html=function(i,n){t&&(t=t()),this.placeholder.hide(),this.core.editor().focus();var r=this.selection.block(),l=""===this.$editor[0].innerHTML.replace(/<\/?p>/g,"").replace(/<br>/g,"").replace(/\u200B/g,"").trim();if(e.call(this,i,n),l&&(r=this.$editor[0].firstElementChild),r&&"P"===r.nodeName&&r.nextElementSibling){var s=!1;0===r.childElementCount&&""===r.textContent.replace(/\u200B/g,"").trim()?s=!0:1===r.childElementCount&&"<br>"===r.innerHTML&&(s=!0),s&&elRemove(r)}}.bind(this);var i=this.insert.text;this.insert.text=function(e){t&&(t=t()),i.call(this,e)}.bind(this)}}};
 // WoltLabKeydown.js
 $.Redactor.prototype.WoltLabKeydown=function(){"use strict";var t=[];return{init:function(){this.keydown.onArrowDown=function(){for(var t=this.WoltLabKeydown._getBlocks(),e=0;e<t.length;e++)if(t[e])return this.keydown.insertAfterLastElement(t[e]),!1}.bind(this),this.keydown.onArrowUp=function(){for(var t=this.WoltLabKeydown._getBlocks(),e=0;e<t.length;e++)if(t[e])return this.keydown.insertBeforeFirstElement(t[e]),!1}.bind(this);var t=this.keydown.onEnter;this.keydown.onEnter=function(e){var n=this.keydown.blockquote;n&&(this.keydown.blockquote=!1),t.call(this,e),n&&(this.keydown.blockquote=n)}.bind(this);var e=this.keydown.onTab;this.keydown.onTab=function(t,n){return this.keydown.pre||0!==$(this.selection.current()).closest("ul, ol",this.core.editor()[0]).length?e.call(this,t,n):!0}.bind(this),require(["Core","Environment"],function(t,e){if("desktop"===e.platform()){var n=this.$editor[0].closest("form, .message");if(null!==n){var o=elBySel(".formSubmit",n);if(null!==o){var i=elBySel('input[type="submit"], button[data-type="save"], button[accesskey="s"]',o);i&&(i.removeAttribute("accesskey"),this.WoltLabEvent.register("keydown",function(e){if(83===e.event.which){var n=!1;window.navigator.platform.match(/^Mac/)?e.event.ctrlKey&&e.event.altKey&&(n=!0):e.event.altKey&&!e.event.ctrlKey&&(n=!0),n&&(e.cancel=!0,t.triggerEvent(i,WCF_CLICK_EVENT))}}.bind(this)))}}}}.bind(this))},register:function(e){-1===t.indexOf(e)&&t.push(e)},_getBlocks:function(){for(var e=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],n=0,o=t.length;o>n;n++)e.push(this.utils.isTag(this.keydown.current,t[n]));return e}}};
 // WoltLabLink.js