Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Wed, 4 Jan 2017 16:46:48 +0000 (17:46 +0100)
committerwoltlab.com <woltlab@woltlab.com>
Wed, 4 Jan 2017 16:46:48 +0000 (17:46 +0100)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js

index 5c03c690f40647b1199e2f74c67d6a708968076b..87f7310e275104e60033d9b51f96d3b999225ba9 100644 (file)
@@ -39,7 +39,7 @@ $.Redactor.prototype.WoltLabInlineCode=function(){"use strict";return{init:funct
 // 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 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 e=[];return{init:function(){var e=this.keydown.init;this.keydown.init=function(t){var i=e.call(this,t);if(!(i===!1||t.originalEvent.defaultPrevented||(t=t.originalEvent,39!==t.which||t.ctrlKey||t.shiftKey||t.metaKey||t.altKey))){var n=window.getSelection();if(!n.isCollapsed)return;var o=n.anchorNode;if(o.nodeType!==Node.TEXT_NODE||n.getRangeAt(0).startOffset!==o.textContent.length)return;var r=o.parentNode;if("KBD"!==r.nodeName)return;for(var s=!0,a=r;a&&a!==this.core.editor()[0];){if(null!==a.nextSibling){for(;a.nextSibling&&a.nextSibling.nodeType===Node.TEXT_NODE&&0===a.nextSibling.textContent.length;)a.parentNode.removeChild(a.nextSibling);if(a.nextSibling&&"BR"!==a.nextSibling.nodeName||null!==a.nextSibling.nextSibling){s=!1;break}}a=a.parentNode}s&&r.parentNode.insertBefore(document.createTextNode("​"),r.nextSibling)}}.bind(this),this.core.editor().off("keydown.redactor"),this.core.editor().on("keydown.redactor",this.keydown.init.bind(this)),this.keydown.onArrowDown=function(){for(var e=this.WoltLabKeydown._getBlocks(),t=0;t<e.length;t++)if(e[t])return this.keydown.insertAfterLastElement(e[t]),!1}.bind(this),this.keydown.onArrowUp=function(){for(var e=this.WoltLabKeydown._getBlocks(),t=0;t<e.length;t++)if(e[t])return this.keydown.insertBeforeFirstElement(e[t]),!1}.bind(this),this.keydown.onBackspaceAndDeleteAfter=function(e){setTimeout($.proxy(function(){this.code.syncFire=!1,this.keydown.removeEmptyLists(),this.core.editor().find("*[style]").not("span, img, #redactor-image-box, #redactor-image-editter").removeAttr("style"),this.keydown.formatEmpty(e),this.code.syncFire=!0},this),1)}.bind(this);var t=function(e){var t=this.core.callback("enter",e);if(t===!1)return e.preventDefault(),!1;if(this.keydown.blockquote&&this.keydown.exitFromBlockquote(e)===!0)return!1;if(this.keydown.pre)return this.keydown.insertNewLine(e);if(this.keydown.blockquote||this.keydown.figcaption)return this.keydown.insertBreakLine(e);if(this.keydown.figure)setTimeout($.proxy(function(){this.keydown.replaceToParagraph("FIGURE")},this),1);else if(this.keydown.block){if(setTimeout($.proxy(function(){this.keydown.replaceToParagraph("DIV")},this),1),"LI"===this.keydown.block.tagName){var i=this.selection.current(),n=$(i).closest("li",this.$editor[0]),o=n.parentsUntil(this.$editor[0],"ul,ol").last();if(0!==n.length&&this.utils.isEmpty(n.html())&&0===o.next().length&&this.utils.isEmpty(o.find("li").last().html())){o.find("li").last().remove();var r=$(this.opts.emptyHtml);return o.after(r),this.caret.start(r),!1}}}else if(!this.keydown.block)return this.keydown.insertParagraph(e);return this.detect.isFirefox()&&this.utils.isInline(this.keydown.parent)?(this.keydown.insertBreakLine(e),void setTimeout(function(){for(var e=this.selection.block(),t=this.selection.inline();t&&t!==e;){if("A"===t.nodeName){var i=!1;if(0===t.childNodes.length?i=!0:""===t.textContent.replace(/\u200B/g,"")&&(i=!0,elBySelAll("*",t,function(e){"SPAN"!==e.nodeName&&(i=!1)})),i){for(;t.childNodes.length;)t.parentNode.insertBefore(t.childNodes[0],t);elRemove(t);break}}t=t.parentNode}}.bind(this),1)):void 0}.bind(this);this.keydown.onEnter=function(e){var i=this.keydown.blockquote;i&&(this.keydown.blockquote=!1);var n=t.call(this,e);return i&&(this.keydown.blockquote=i),n}.bind(this),this.keydown.replaceToParagraph=function(e){var t=this.selection.block(),i=t.innerHTML.replace(/<br\s?\/?>/gi,"");if(t.tagName===e&&this.utils.isEmpty(i)&&!$(t).hasClass("redactor-in")){var n=document.createElement("p");$(t).replaceWith(n);var o=document.createRange();o.setStart(n,0);var r=document.createTextNode("​");o.insertNode(r),o.setStartAfter(r),o.collapse(!0);var s=window.getSelection();return s.removeAllRanges(),s.addRange(o),!1}"P"===t.tagName&&$(t).removeAttr("style")}.bind(this),this.keydown.onShiftEnter=function(e){return this.buffer.set(),this.keydown.pre?this.keydown.insertNewLine(e):this.insert.raw("<br>​")}.bind(this);var i=this.keydown.onTab;this.keydown.onTab=function(e,t){return this.keydown.pre||0!==$(this.selection.current()).closest("ul, ol",this.core.editor()[0]).length?i.call(this,e,t):!0}.bind(this);var n=this.keydown.formatEmpty;this.keydown.formatEmpty=function(e){for(var t,i=this.$editor[0],o=0,r=i.childElementCount;r>o;o++)if(t=i.children[o],"P"!==t.nodeName&&this.utils.isBlockTag(t.nodeName))return;return n.call(this,e)}.bind(this),require(["Core","Environment"],function(e,t){if("desktop"===t.platform()){var i=this.$editor[0].closest("form, .message");if(null!==i){var n=elBySel(".formSubmit",i);if(null!==n){var o=elBySel('input[type="submit"], button[data-type="save"], button[accesskey="s"]',n);o&&(o.removeAttribute("accesskey"),this.WoltLabEvent.register("keydown",function(t){if(83===t.event.which){var i=!1;window.navigator.platform.match(/^Mac/)?t.event.ctrlKey&&t.event.altKey&&(i=!0):t.event.altKey&&!t.event.ctrlKey&&(i=!0),i&&(t.cancel=!0,"function"==typeof o.click?o.click():e.triggerEvent(o,WCF_CLICK_EVENT))}}.bind(this)))}}}}.bind(this))},register:function(t){-1===e.indexOf(t)&&e.push(t)},_getBlocks:function(){for(var t=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],i=0,n=e.length;n>i;i++)t.push(this.utils.isTag(this.keydown.current,e[i]));return t}}};
+$.Redactor.prototype.WoltLabKeydown=function(){"use strict";var e=[];return{init:function(){var e=this.keydown.init;this.keydown.init=function(t){var i=e.call(this,t);if(!(i===!1||t.originalEvent.defaultPrevented||(t=t.originalEvent,39!==t.which||t.ctrlKey||t.shiftKey||t.metaKey||t.altKey))){var n=window.getSelection();if(!n.isCollapsed)return;var o=n.anchorNode;if(o.nodeType!==Node.TEXT_NODE||n.getRangeAt(0).startOffset!==o.textContent.length)return;var r=o.parentNode;if("KBD"!==r.nodeName)return;for(var s=!0,a=r;a&&a!==this.core.editor()[0];){if(null!==a.nextSibling){for(;a.nextSibling&&a.nextSibling.nodeType===Node.TEXT_NODE&&0===a.nextSibling.textContent.length;)a.parentNode.removeChild(a.nextSibling);if(a.nextSibling&&"BR"!==a.nextSibling.nodeName||null!==a.nextSibling.nextSibling){s=!1;break}}a=a.parentNode}s&&r.parentNode.insertBefore(document.createTextNode("​"),r.nextSibling)}}.bind(this),this.core.editor().off("keydown.redactor"),this.core.editor().on("keydown.redactor",this.keydown.init.bind(this)),this.keydown.onArrowDown=function(){for(var e=this.WoltLabKeydown._getBlocks(),t=0;t<e.length;t++)if(e[t])return this.keydown.insertAfterLastElement(e[t]),!1}.bind(this),this.keydown.onArrowUp=function(){for(var e=this.WoltLabKeydown._getBlocks(),t=0;t<e.length;t++)if(e[t])return this.keydown.insertBeforeFirstElement(e[t]),!1}.bind(this),this.keydown.onBackspaceAndDeleteAfter=function(e){setTimeout($.proxy(function(){this.code.syncFire=!1,this.keydown.removeEmptyLists(),this.core.editor().find("*[style]").not("span, img, #redactor-image-box, #redactor-image-editter").removeAttr("style"),this.keydown.formatEmpty(e);var t=this.selection.current();"KBD"===t.nodeName&&0===t.innerHTML.length&&elRemove(t),this.code.syncFire=!0},this),1)}.bind(this);var t=function(e){var t=this.core.callback("enter",e);if(t===!1)return e.preventDefault(),!1;if(this.keydown.blockquote&&this.keydown.exitFromBlockquote(e)===!0)return!1;if(this.keydown.pre)return this.keydown.insertNewLine(e);if(this.keydown.blockquote||this.keydown.figcaption)return this.keydown.insertBreakLine(e);if(this.keydown.figure)setTimeout($.proxy(function(){this.keydown.replaceToParagraph("FIGURE")},this),1);else if(this.keydown.block){if(setTimeout($.proxy(function(){this.keydown.replaceToParagraph("DIV")},this),1),"LI"===this.keydown.block.tagName){var i=this.selection.current(),n=$(i).closest("li",this.$editor[0]),o=n.parentsUntil(this.$editor[0],"ul,ol").last();if(0!==n.length&&this.utils.isEmpty(n.html())&&0===o.next().length&&this.utils.isEmpty(o.find("li").last().html())){o.find("li").last().remove();var r=$(this.opts.emptyHtml);return o.after(r),this.caret.start(r),!1}}}else if(!this.keydown.block)return this.keydown.insertParagraph(e);return this.detect.isFirefox()&&this.utils.isInline(this.keydown.parent)?(this.keydown.insertBreakLine(e),void setTimeout(function(){for(var e=this.selection.block(),t=this.selection.inline();t&&t!==e;){if("A"===t.nodeName){var i=!1;if(0===t.childNodes.length?i=!0:""===t.textContent.replace(/\u200B/g,"")&&(i=!0,elBySelAll("*",t,function(e){"SPAN"!==e.nodeName&&(i=!1)})),i){for(;t.childNodes.length;)t.parentNode.insertBefore(t.childNodes[0],t);elRemove(t);break}}t=t.parentNode}}.bind(this),1)):void 0}.bind(this);this.keydown.onEnter=function(e){var i=this.keydown.blockquote;i&&(this.keydown.blockquote=!1);var n=t.call(this,e);return i&&(this.keydown.blockquote=i),n}.bind(this),this.keydown.replaceToParagraph=function(e){var t=this.selection.block(),i=t.innerHTML.replace(/<br\s?\/?>/gi,"");if(t.tagName===e&&this.utils.isEmpty(i)&&!$(t).hasClass("redactor-in")){var n=document.createElement("p");$(t).replaceWith(n);var o=document.createRange();o.setStart(n,0);var r=document.createTextNode("​");o.insertNode(r),o.setStartAfter(r),o.collapse(!0);var s=window.getSelection();return s.removeAllRanges(),s.addRange(o),!1}"P"===t.tagName&&$(t).removeAttr("style")}.bind(this),this.keydown.onShiftEnter=function(e){return this.buffer.set(),this.keydown.pre?this.keydown.insertNewLine(e):this.insert.raw("<br>​")}.bind(this);var i=this.keydown.onTab;this.keydown.onTab=function(e,t){return this.keydown.pre||0!==$(this.selection.current()).closest("ul, ol",this.core.editor()[0]).length?i.call(this,e,t):!0}.bind(this);var n=this.keydown.formatEmpty;this.keydown.formatEmpty=function(e){for(var t,i=this.$editor[0],o=0,r=i.childElementCount;r>o;o++)if(t=i.children[o],"P"!==t.nodeName&&this.utils.isBlockTag(t.nodeName))return;return n.call(this,e)}.bind(this),require(["Core","Environment"],function(e,t){if("desktop"===t.platform()){var i=this.$editor[0].closest("form, .message");if(null!==i){var n=elBySel(".formSubmit",i);if(null!==n){var o=elBySel('input[type="submit"], button[data-type="save"], button[accesskey="s"]',n);o&&(o.removeAttribute("accesskey"),this.WoltLabEvent.register("keydown",function(t){if(83===t.event.which){var i=!1;window.navigator.platform.match(/^Mac/)?t.event.ctrlKey&&t.event.altKey&&(i=!0):t.event.altKey&&!t.event.ctrlKey&&(i=!0),i&&(t.cancel=!0,"function"==typeof o.click?o.click():e.triggerEvent(o,WCF_CLICK_EVENT))}}.bind(this)))}}}}.bind(this))},register:function(t){-1===e.indexOf(t)&&e.push(t)},_getBlocks:function(){for(var t=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],i=0,n=e.length;n>i;i++)t.push(this.utils.isTag(this.keydown.current,e[i]));return t}}};
 // WoltLabLink.js
 $.Redactor.prototype.WoltLabLink=function(){"use strict";var i=null;return{init:function(){this.link.show=this.WoltLabLink.show.bind(this),require(["WoltLabSuite/Core/Ui/Redactor/Link"],function(t){i=t})},show:function(t){"undefined"!=typeof t&&t.preventDefault&&t.preventDefault();var e=this.selection.is();this.selection.save(),this.observe.closeAllTooltip();var s=this.link.is();i.showDialog({insert:s===!1,submitCallback:function(){var i=this.link.buildLinkFromModal();return i===!1?!1:(this.selection.restore(),this.link.insert(i,!0),!0)}.bind(this)}),e&&this.selection.restore();var n=this.link.buildLinkFromElement(s);e&&this.selection.save(),n.url=this.link.removeSelfHostFromUrl(n.url),this.link.setModalValues(n),this.detect.isDesktop()&&$("#redactor-link-url").focus()}}};
 // WoltLabMedia.js