From a6ff9517eea21334ba6d6a97089ba00f2ca8639c Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Fri, 23 Dec 2016 17:16:49 +0100 Subject: [PATCH] Updating minified JavaScript files --- .../install/files/js/3rdParty/redactor2/plugins/combined.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e61a496d54..743f08b5f2 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js @@ -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(/
/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&&"
"===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/gi,"");if(e.tagName===t&&this.utils.isEmpty(i)&&!$(e).hasClass("redactor-in")){var n=document.createElement("p");$(e).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"===e.tagName&&$(e).removeAttr("style")}.bind(this),this.keydown.onShiftEnter=function(t){return this.buffer.set(),this.keydown.pre?this.keydown.insertNewLine(t):this.insert.raw("
​")}.bind(this);var e=this.keydown.onTab;this.keydown.onTab=function(t,i){return this.keydown.pre||0!==$(this.selection.current()).closest("ul, ol",this.core.editor()[0]).length?e.call(this,t,i):!0}.bind(this);var i=this.keydown.formatEmpty;this.keydown.formatEmpty=function(t){for(var e,n=this.$editor[0],o=0,r=n.childElementCount;r>o;o++)if(e=n.children[o],"P"!==e.nodeName&&this.utils.isBlockTag(e.nodeName))return;return i.call(this,t)}.bind(this),require(["Core","Environment"],function(t,e){if("desktop"===e.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(e){if(83===e.event.which){var i=!1;window.navigator.platform.match(/^Mac/)?e.event.ctrlKey&&e.event.altKey&&(i=!0):e.event.altKey&&!e.event.ctrlKey&&(i=!0),i&&(e.cancel=!0,"function"==typeof o.click?o.click():t.triggerEvent(o,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],i=0,n=t.length;n>i;i++)e.push(this.utils.isTag(this.keydown.current,t[i]));return e}}}; +$.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/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("
​")}.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(),this.selection.save(),this.observe.closeAllTooltip();var e=this.link.is();i.showDialog({insert:e===!1,submitCallback:function(){var i=this.link.buildLinkFromModal();return i===!1?!1:(this.selection.restore(),this.link.insert(i,!0),!0)}.bind(this)});var n=this.link.buildLinkFromElement(e);n.url=this.link.removeSelfHostFromUrl(n.url),this.link.setModalValues(n),this.detect.isDesktop()&&$("#redactor-link-url").focus()}}}; // WoltLabMedia.js -- 2.20.1