From: woltlab.com Date: Sat, 22 Feb 2020 16:29:40 +0000 (+0000) Subject: Updating minified JavaScript files X-Git-Tag: 3.0.23~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7ce60a2a670cff4c380391f333f231e50e4843ab;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 cc387c3ff4..9b8d34eef6 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js @@ -8,13 +8,13 @@ $.Redactor.prototype.WoltLabAutosave=function(){"use strict";return{init:functio $.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(e,t,o,i){if(e="quote"===e?"blockquote":e,-1!==$.inArray(e,this.block.tags))return"p"===e&&void 0===t&&(t="class"),this.placeholder.hide(),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(e,t,o,i):this.block.formatUncollapsed(e,t,o,i)}.bind(this);var n=function(e,t){return!(document.activeElement!==e||!1===t||!this.utils.isRedactorParent(t))}.bind(this),c=this.block.formatCollapsed;this.block.formatCollapsed=function(e,t,o,i){var s=this.selection.block();if(!s||"LI"!==s.nodeName&&"TD"!==s.nodeName){var a=this.core.editor()[0];n(a,s)||(this.selection.restore(),document.activeElement!==a&&a.focus()),n(a,s)||(this.focus.end(),this.selection.save());for(var l=c.call(this,e,t,o,i),h=0,r=l.length;h"),!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 r=t.data("dropdown");elBySel(".redactor-dropdown-outdent span",r[0]).textContent=WCF.Language.get("wcf.editor.list.outdent"),elBySel(".redactor-dropdown-indent span",r[0]).textContent=WCF.Language.get("wcf.editor.list.indent")}}var c=this.core.toolbar()[0];elBySelAll(".re-button-tooltip",c.parentNode,elRemove);for(var d,u={},h=[];c.childElementCount;)d=c.removeChild(c.children[0]),e=elAttr(d.children[0],"rel"),u[e]=d,h.push(e);var b=!1;for(o=0,n=this.opts.buttons.length;o',elData(o,"show-on-mobile",!0);var e=o.children[0].children[0],t=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);o.children[0].addEventListener("mousedown",t),this.$toolbar[0].appendChild(o),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this.$element[0].id,function(){this.$toolbar[0].classList.contains("redactorToolbarOverride")&&t()}.bind(this))}}}; +$.Redactor.prototype.WoltLabButton=function(){"use strict";var o;return{init:function(){this.button.buildButtonTooltip=function(){};var t,e,o,n,i,s,a,l=this.button.clickCallback;for(this.button.clickCallback=function(t,e,o,n){"function"==typeof t.preventDefault&&t.preventDefault(),l.call(this,t,e,o,n)}.bind(this),o=0,n=this.opts.woltlab.customButtons.length;o"),!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 r=t.data("dropdown");elBySel(".redactor-dropdown-outdent span",r[0]).textContent=WCF.Language.get("wcf.editor.list.outdent"),elBySel(".redactor-dropdown-indent span",r[0]).textContent=WCF.Language.get("wcf.editor.list.indent")}}var c=this.core.toolbar()[0];elBySelAll(".re-button-tooltip",c.parentNode,elRemove);for(var d,u={},h=[];c.childElementCount;)d=c.removeChild(c.children[0]),e=elAttr(d.children[0],"rel"),u[e]=d,h.push(e);var b=!1;for(o=0,n=this.opts.buttons.length;o',elData(o,"show-on-mobile",!0);var e=o.children[0].children[0],t=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);o.children[0].addEventListener("mousedown",t),this.$toolbar[0].appendChild(o),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this.$element[0].id,function(){this.$toolbar[0].classList.contains("redactorToolbarOverride")&&t()}.bind(this))}}}; // 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);var o=!1;require(["Environment"],function(e){o="ios"===e.platform()});var a=this.caret.end;this.caret.end=function(e){var t=!1;if((e=this.caret.prepare(e)).nodeType===Node.ELEMENT_NODE&&e.lastChild&&"P"===e.lastChild.nodeName)t=!0;else if(o){var n=this.core.editor()[0];e.parentNode===n&&"


"===n.innerHTML&&(t=!0)}else"P"===e.nodeName&&0===e.childNodes.length&&(e.innerHTML="​",t=!0);if(t){var i=window.getSelection(),r=document.createRange();return r.selectNodeContents(e.lastChild),r.collapse(!1),i.removeAllRanges(),void i.addRange(r)}return a.call(this,e)}.bind(this);var i=this.selection.nodes;this.selection.nodes=function(e){var t=i.call(this,e);if(1===t.length&&t[0]===this.$editor[0]){var n=this.selection.range(this.selection.get());if(n.startContainer===n.endContainer)return[n.startContainer]}return t}.bind(this),this.$editor[0].addEventListener(WCF_CLICK_EVENT,this.WoltLabCaret._handleEditorClick.bind(this)),this.WoltLabCaret._initInternalRange();var r=this.selection.saveInstant;this.selection.saveInstant=function(){var e=r.call(this);if(e){e.isAtNodeStart=!1;var t=window.getSelection();if(t.rangeCount&&!t.isCollapsed){var n=t.getRangeAt(0);n.startContainer.nodeType===Node.TEXT_NODE&&0===n.startOffset&&(e.isAtNodeStart=!0)}}return e}.bind(this);var d=this.selection.restoreInstant;this.selection.restoreInstant=function(e){if(void 0!==e||this.saved){var t=void 0!==e?e:this.saved;d.call(this,e);var n=window.getSelection();if(n.rangeCount)if(!0===t.isAtNodeStart){if(!n.isCollapsed){var i=n.getRangeAt(0),r=i.startContainer;if(t.node===r)return;for(;null!==r&&"P"!==r.nodeName;)r=r.parentNode;if(null!==r&&null!==(r=r.nextElementSibling)&&"P"===r.nodeName&&0===r.textContent.replace(/\u200B/g,"").length){r=r.nextElementSibling;for(var o=t.node;null!==o&&o!==r;)o=o.parentNode;o===r&&((i=i.cloneRange()).setStart(t.node,0),n.removeAllRanges(),n.addRange(i))}}}else if(n.isCollapsed){var a=n.anchorNode,s=this.core.editor()[0];if(a.nodeType===Node.TEXT_NODE&&a.parentNode===s&&n.anchorOffset===a.textContent.length){var l=a.nextElementSibling;l&&"P"===l.nodeName&&this.caret.start(l)}}}}.bind(this),this.selection.nodes=function(e){var i=void 0===e?[]:$.isArray(e)?e:[e],t=this.selection.get(),n=this.selection.range(t),r=[],o=[];if(this.utils.isCollapsed())r=[this.selection.current()];else{var a=n.startContainer,s=n.endContainer;if(a===s)return[a];for(var l=n.commonAncestorContainer;a&&a!==s;)r.push(a=this.selection.nextNode(a,l));for(a=n.startContainer;a&&a!==l;)r.unshift(a),a=a.parentNode}return $.each(r,function(e,t){if(t){var n=1===t.nodeType&&t.tagName.toLowerCase();if($(t).hasClass("redactor-script-tag")||$(t).hasClass("redactor-selection-marker"))return;if(n&&0!==i.length&&-1===$.inArray(n,i))return;o.push(t)}}),0===o.length?[]:o}.bind(this),this.selection.nextNode=function(e,t){if(e.hasChildNodes())return e.firstChild;for(;e&&!e.nextSibling;)if(e=e.parentNode,t&&e===t)return null;return e?e.nextSibling:null}},paragraphAfterBlock:function(e){var t=e.nextElementSibling;t&&"P"!==t.nodeName&&((t=elCreate("p")).textContent="​",e.parentNode.insertBefore(t,e.nextSibling)),this.caret.after(e)},endOfEditor:function(){var e=this.core.editor()[0];document.activeElement!==e&&e.focus();var t=e.lastElementChild;"P"===t.nodeName?this.caret.end(t):this.caret.after(t)},_initInternalRange:function(){var r=this.core.editor()[0],o=null,a=window.getSelection(),i=function(){o=a.rangeCount?a.getRangeAt(0).cloneRange():null},n=function(){if(null!==o){if(document.activeElement===r){var e=a.getRangeAt(0);if(0!==e.startOffset)return;for(var t=e.startContainer;t;){if(t.parentNode===r){if(t.previousSibling)return;break}if(t.previousSibling)return;t=t.parentNode}if(!t)return}var n=r.scrollLeft,i=r.scrollTop;r.focus(),r.scrollLeft=n,r.scrollTop=i,a.removeAllRanges(),a.addRange(o),o=null}};r.addEventListener("keyup",i),r.addEventListener("mouseup",function(){a.rangeCount&&i()});var e=this.selection.save;this.selection.save=function(){o=null,e.call(this)}.bind(this);var t=this.selection.restore;this.selection.restore=function(){o&&null===elBySel(".redactor-selection-marker",this.$editor[0])&&(n(),a.rangeCount&&this.utils.isRedactorParent(a.getRangeAt(0).commonAncestorContainer))||t.call(this)}.bind(this);var s=this.buffer.set;this.buffer.set=function(e){if(document.activeElement!==r){var t=window.getSelection();t.rangeCount&&!1!==this.utils.isRedactorParent(t.anchorNode)?r.focus():n()}s.call(this,e),i()}.bind(this);var l=this.insert.html;this.insert.html=function(e,t){var n=elBySel(".redactor-selection-marker",this.$editor[0]);l.call(this,e,t),(n||null===elBySel(".redactor-selection-marker",this.$editor[0]))&&i()}.bind(this),require(["Environment"],function(e){"ios"===e.platform()&&(r.addEventListener("focus",function(){document.addEventListener("selectionchange",i)}),r.addEventListener("blur",function(){document.removeEventListener("selectionchange",i)}))}.bind(this))},_handleEditorClick:function(e){if(this.selection.get().isCollapsed){var t=this.selection.block();if(!1===t){if(this.selection.current()===this.$editor[0]){var n=this.$editor[0].childNodes[this.selection.get().anchorOffset];n.nodeType===Node.ELEMENT_NODE&&"TABLE"===n.nodeName&&(t=n)}if(!1===t)return}for(var i=e.target;i&&!this.utils.isBlockTag(i.nodeName);)i=i.parentNode;if(i&&i!==t&&("P"!==t.nodeName||(t=t.parentNode)!==this.$editor[0]&&this.utils.isBlockTag(t.nodeName))){if("TD"===t.nodeName)for(;"TABLE"!==t.nodeName;)t=t.parentNode;if(!t.nodeName.match(/^H\d$/)&&!$(t).closest("ol, ul",this.$editor[0]).length){for(var r,o,a=t;a;){if(o=a.getBoundingClientRect(),e.clientYo.bottom))break;r=!1,t=a}if(!a.parentNode||a.parentNode===this.$editor[0])break;a=a.parentNode}if(void 0!==r){var s=t[(r?"previous":"next")+"ElementSibling"];if(s&&"P"===s.nodeName)this.caret.end(s);else{this.buffer.set();var l=elCreate("p");l.textContent="​",t.parentNode.insertBefore(l,r?t:t.nextSibling),this.caret.end(l)}}}}}},_addParagraphAfterBlock:function(e){var t=e.nextElementSibling;t&&("P"===t.nodeName||this.utils.isBlockTag(t.nodeName))||((t=elCreate("p")).textContent="​",e.parentNode.insertBefore(t,e.nextSibling))}}}; // WoltLabClean.js -$.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var n=this.clean.onSet;this.clean.onSet=function(e){e=(e=(e=e.replace(/\u200B/g,"")).replace(/&/g,"@@@WCF_LITERAL_AMP@@@")).replace(/&/g,"&WCF_AMPERSAND&"),e=(e=(e=n.call(this,e)).replace(/&WCF_AMPERSAND&(amp;)?/g,"&")).replace(/@@@WCF_LITERAL_AMP@@@/,"&");var t=elCreate("div");return t.innerHTML=e,elBySelAll("iframe",t,elRemove),elBySelAll("pre",t,function(e){e.classList.contains("redactor-script-tag")&&elRemove(e)}),elBySelAll("td",t,function(e){0===e.childNodes.length&&(e.innerHTML="​")}),e=t.innerHTML}.bind(this);var l=this.clean.onSync;this.clean.onSync=function(e){var t=elCreate("div");t.innerHTML=e;var n={};return elBySelAll("pre",t,function(e){var t=WCF.getUUID();n[t]=e.textContent,e.textContent=t}),elBySelAll("p",t,function(e){var t=e.lastElementChild;if(t&&"BR"===t.nodeName)if(t.nextSibling){if(t.nextSibling.textContent.replace(/[\r\n\t]/g,"").match(/^\u200B+$/)){var n=elCreate("p");n.innerHTML="
",e.parentNode.insertBefore(n,e.nextSibling),e.removeChild(t.nextSibling),e.removeChild(t)}}else(t.previousElementSibling||t.previousSibling&&""!==t.previousSibling.textContent.replace(/\u200B/g,"").trim())&&e.removeChild(t)}),e=(e=(e=t.innerHTML).replace(/

\u200B<\/p>/g,"


")).replace(/&/g,"&WCF_AMPERSAND&"),e=(e=l.call(this,e)).replace(/&WCF_AMPERSAND&/g,"&"),t.innerHTML=e,elBySelAll("pre",t,function(e){n.hasOwnProperty(e.textContent)&&(e.textContent=n[e.textContent])}),e=t.innerHTML}.bind(this);var r=this.clean.savePreFormatting;this.clean.savePreFormatting=function(e){var t=this.clean.encodeEntities;return this.clean.encodeEntities=function(e){return WCF.String.escapeHTML(e)},e=r.call(this,e),this.clean.encodeEntities=t,e}.bind(this);var C=this.clean.onPaste;this.clean.onPaste=function(e,t,n){if(t.pre||this.utils.isCurrentOrParent("kbd")){var l=this.clean.removeEmptyInlineTags;return this.clean.removeEmptyInlineTags=function(e){return e},e=C.call(this,e,t,n),this.clean.removeEmptyInlineTags=l,e}var r,i,a,o=elCreate("div");o.innerHTML=e.replace(/@@@WOLTLAB-P-ALIGN-(?:left|right|center|justify)@@@/g,"");var s=!0;for(i=0,a=o.childElementCount;i",r.parentNode.insertBefore(y,r.nextSibling)}p.push(d)}p.forEach(function(e){r.style.removeProperty(e)})}return elBySelAll("span",o,function(e){if(!e.hasAttribute("style")||!e.style.length){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}),elBySelAll("p",o,function(e){e.classList.contains("MsoNormal")?1===e.childElementCount&&"O:P"===e.children[0].nodeName&&" "===e.textContent&&(e.innerHTML="
"):e.className.match(/\btext-(left|right|center|justify)\b/)&&e.insertBefore(document.createTextNode("@@@WOLTLAB-P-ALIGN-"+RegExp.$1+"@@@"),e.firstChild),e.removeAttribute("class"),e.removeAttribute("style")}),elBySelAll("img",o,function(e){e.removeAttribute("style")}),elBySelAll("br",o,function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e.nextSibling)}),e=(e=(e=C.call(this,o.innerHTML,t,n)).replace(/\n*@@@WOLTLAB-BR-MARKER@@@\n*/g,"")).replace(/(

)?\s*@@@WOLTLAB-P-ALIGN-(left|right|center|justify)@@@/g,function(e,t,n){return t?'

':""}),o.innerHTML=e.replace(/&quot;/g,"""),elBySelAll("woltlab-br-marker",o,function(e){var t=e.parentNode;if(null!==t){if("P"===t.nodeName){var n=elCreate("p"),l=!(n.innerHTML="
"),r=e.nextSibling;r&&"WOLTLAB-BR-MARKER"===r.nodeName&&(l=!0);for(var i=!l;e.nextSibling;)i&&0!==e.nextSibling.textContent.replace(/\u200B/g,"").trim().length&&(i=!1),n.appendChild(e.nextSibling);i||elRemove(n.firstElementChild);var a=e.previousSibling;a&&"BR"===a.nodeName&&elRemove(a),t.parentNode.insertBefore(n,t.nextSibling),l&&((n=elCreate("p")).innerHTML="
",t.parentNode.insertBefore(n,t.nextSibling))}else t.insertBefore(elCreate("br"),e);elRemove(e)}}),elBySelAll("p",o,function(e){var t=!1;0===e.childNodes.length?t=!0:""===e.textContent?(t=!0,elBySelAll("*",e,function(e){"SPAN"!==e.nodeName&&(t=!1)})):0===e.textContent.trim().length&&(elBySelAll("span",e,function(e){if(!e.hasAttribute("style")||!e.style.length){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}),0===e.children.length&&(e.innerHTML="
")),t&&elRemove(e)}),o.innerHTML}.bind(this);var o=[],i=function(e,t){for(var n,l,r={},i=0,a=t.length;i');var n=elCreate("div");n.innerHTML=e,elBySelAll("woltlab-custom-tag",n,function(e){var t=~~elData(e,"index");if(o[t]){var n=o[t],l=elCreate(n.element.nodeName);for(var r in n.attributes)n.attributes.hasOwnProperty(r)&&elAttr(l,r,n.attributes[r]);for(e.parentNode.insertBefore(l,e);e.childNodes.length;)l.appendChild(e.childNodes[0])}elRemove(e)}),e=n.innerHTML}return(t.links&&this.opts.pasteLinks||t.images&&this.opts.pasteImages)&&(e=(e=e.replace(new RegExp("#@###\\[","gi"),"<")).replace(new RegExp("\\]###@#","gi"),">")),s.call(this,e,t)}.bind(this),this.clean.removeSpans=function(e){return e};var c=this.clean.getCurrentType;this.clean.getCurrentType=function(e,t){var n=c.call(this,e,t);return this.utils.isCurrentOrParent(["kbd"])&&(n.inline=!1,n.block=!1,n.encode=!0,n.pre=!0,n.paragraphize=!1,n.images=!1,n.links=!1),n}.bind(this)}}}; +$.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var n=this.clean.onSet;this.clean.onSet=function(e){e=(e=(e=e.replace(/\u200B/g,"")).replace(/&amp;/g,"@@@WCF_LITERAL_AMP@@@")).replace(/&/g,"&WCF_AMPERSAND&"),e=(e=(e=n.call(this,e)).replace(/&WCF_AMPERSAND&(amp;)?/g,"&")).replace(/@@@WCF_LITERAL_AMP@@@/,"&amp;");var t=elCreate("div");return t.innerHTML=e,elBySelAll("*",t,function(e){for(var t,n=[],l=0,r=e.attributes.length;l",e.parentNode.insertBefore(n,e.nextSibling),e.removeChild(t.nextSibling),e.removeChild(t)}}else(t.previousElementSibling||t.previousSibling&&""!==t.previousSibling.textContent.replace(/\u200B/g,"").trim())&&e.removeChild(t)}),e=(e=(e=t.innerHTML).replace(/

\u200B<\/p>/g,"


")).replace(/&/g,"&WCF_AMPERSAND&"),e=(e=l.call(this,e)).replace(/&WCF_AMPERSAND&/g,"&"),t.innerHTML=e,elBySelAll("pre",t,function(e){n.hasOwnProperty(e.textContent)&&(e.textContent=n[e.textContent])}),e=t.innerHTML}.bind(this);var r=this.clean.savePreFormatting;this.clean.savePreFormatting=function(e){var t=this.clean.encodeEntities;return this.clean.encodeEntities=function(e){return WCF.String.escapeHTML(e)},e=r.call(this,e),this.clean.encodeEntities=t,e}.bind(this);var C=this.clean.onPaste;this.clean.onPaste=function(e,t,n){if(t.pre||this.utils.isCurrentOrParent("kbd")){var l=this.clean.removeEmptyInlineTags;return this.clean.removeEmptyInlineTags=function(e){return e},e=C.call(this,e,t,n),this.clean.removeEmptyInlineTags=l,e}var r,i,a,o=elCreate("div");o.innerHTML=e.replace(/@@@WOLTLAB-P-ALIGN-(?:left|right|center|justify)@@@/g,"");var s=!0;for(i=0,a=o.childElementCount;i",r.parentNode.insertBefore(y,r.nextSibling)}p.push(d)}p.forEach(function(e){r.style.removeProperty(e)})}return elBySelAll("span",o,function(e){if(!e.hasAttribute("style")||!e.style.length){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}),elBySelAll("p",o,function(e){e.classList.contains("MsoNormal")?1===e.childElementCount&&"O:P"===e.children[0].nodeName&&" "===e.textContent&&(e.innerHTML="
"):e.className.match(/\btext-(left|right|center|justify)\b/)&&e.insertBefore(document.createTextNode("@@@WOLTLAB-P-ALIGN-"+RegExp.$1+"@@@"),e.firstChild),e.removeAttribute("class"),e.removeAttribute("style")}),elBySelAll("img",o,function(e){e.removeAttribute("style")}),elBySelAll("br",o,function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e.nextSibling)}),e=(e=(e=C.call(this,o.innerHTML,t,n)).replace(/\n*@@@WOLTLAB-BR-MARKER@@@\n*/g,"")).replace(/(

)?\s*@@@WOLTLAB-P-ALIGN-(left|right|center|justify)@@@/g,function(e,t,n){return t?'

':""}),o.innerHTML=e.replace(/&quot;/g,"""),elBySelAll("woltlab-br-marker",o,function(e){var t=e.parentNode;if(null!==t){if("P"===t.nodeName){var n=elCreate("p"),l=!(n.innerHTML="
"),r=e.nextSibling;r&&"WOLTLAB-BR-MARKER"===r.nodeName&&(l=!0);for(var i=!l;e.nextSibling;)i&&0!==e.nextSibling.textContent.replace(/\u200B/g,"").trim().length&&(i=!1),n.appendChild(e.nextSibling);i||elRemove(n.firstElementChild);var a=e.previousSibling;a&&"BR"===a.nodeName&&elRemove(a),t.parentNode.insertBefore(n,t.nextSibling),l&&((n=elCreate("p")).innerHTML="
",t.parentNode.insertBefore(n,t.nextSibling))}else t.insertBefore(elCreate("br"),e);elRemove(e)}}),elBySelAll("p",o,function(e){var t=!1;0===e.childNodes.length?t=!0:""===e.textContent?(t=!0,elBySelAll("*",e,function(e){"SPAN"!==e.nodeName&&(t=!1)})):0===e.textContent.trim().length&&(elBySelAll("span",e,function(e){if(!e.hasAttribute("style")||!e.style.length){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}),0===e.children.length&&(e.innerHTML="
")),t&&elRemove(e)}),o.innerHTML}.bind(this);var o=[],i=function(e,t){for(var n,l,r={},i=0,a=t.length;i');var n=elCreate("div");n.innerHTML=e,elBySelAll("woltlab-custom-tag",n,function(e){var t=~~elData(e,"index");if(o[t]){var n=o[t],l=elCreate(n.element.nodeName);for(var r in n.attributes)n.attributes.hasOwnProperty(r)&&elAttr(l,r,n.attributes[r]);for(e.parentNode.insertBefore(l,e);e.childNodes.length;)l.appendChild(e.childNodes[0])}elRemove(e)}),e=n.innerHTML}return(t.links&&this.opts.pasteLinks||t.images&&this.opts.pasteImages)&&(e=(e=e.replace(new RegExp("#@###\\[","gi"),"<")).replace(new RegExp("\\]###@#","gi"),">")),s.call(this,e,t)}.bind(this),this.clean.removeSpans=function(e){return e};var c=this.clean.getCurrentType;this.clean.getCurrentType=function(e,t){var n=c.call(this,e,t);return this.utils.isCurrentOrParent(["kbd"])&&(n.inline=!1,n.block=!1,n.encode=!0,n.pre=!0,n.paragraphize=!1,n.images=!1,n.links=!1),n}.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));var e=this.code.start;this.code.start=function(t){e.call(this,t),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","codeStart_"+this.$element[0].id),elBySelAll("kbd",this.$editor[0],function(t){var e=t.nextSibling;if(!e||e.nodeType!==Node.TEXT_NODE||"​"!==e.textContent.substr(0,1)){var i=document.createTextNode("​");t.parentNode.insertBefore(i,e)}})}.bind(this);var i=this.code.set;this.code.set=function(t,e){i.call(this,t,e),this.utils.isEmpty()&&this.observe.toolbar()}.bind(this);var t=this.code.get;this.code.get=function(){return this.code.html=!1,this.code.startSync(this.core.editor().html()),t.call(this)}.bind(this)}}}; diff --git a/wcfsetup/install/files/js/WCF.Combined.min.js b/wcfsetup/install/files/js/WCF.Combined.min.js index be1d40b1e8..79161448f5 100755 --- a/wcfsetup/install/files/js/WCF.Combined.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.min.js @@ -64,7 +64,7 @@ i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s. (function (window, undefined) {!function(){var o=!1,a=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(e){function t(){!o&&this.init&&this.init.apply(this,arguments)}var i=this.prototype;o=!0;var n=new this;for(var r in o=!1,e)n[r]="function"==typeof e[r]&&"function"==typeof i[r]&&a.test(e[r])?function(n,r){return function(){var e=this._super;this._super=i[n];var t=r.apply(this,arguments);return this._super=e,t}}(r,e[r]):e[r];return((t.prototype=n).constructor=t).extend=arguments.callee,t}}(),function(u,r){"use strict";function s(){}function o(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;ni.left&&r.xi.top&&r.yv.longTapThreshold&&b=v.threshold),e}function _(){var e=!1;return null!==v.cancelThreshold&&null!==w&&(e=ee(w)-b>=v.cancelThreshold),e}function j(){return!v.maxTimeThreshold||!(y>=v.maxTimeThreshold)}function V(){var e=X(),t=Q(),n=null===v.pinchThreshold||A>=v.pinchThreshold;return e&&t&&n}function q(){return!!(v.pinchStatus||v.pinchIn||v.pinchOut)}function U(){var e=j(),t=R(),n=X(),r=Q();return!_()&&r&&n&&t&&e}function H(){return!!(v.swipe||v.swipeStatus||v.swipeLeft||v.swipeRight||v.swipeUp||v.swipeDown)}function X(){return S===v.fingers||v.fingers===Te||!ke}function Q(){return 0!==C[0].end.x}function Y(){return!!v.tap}function B(){return!!v.doubleTap}function W(){if(null==p)return!1;var e=ie();return B()&&e-p<=v.doubleTapThreshold}function Z(){c=s=0}function G(){var e=!1;s&&(ie()-s<=v.fingerReleaseThreshold&&(e=!0));return e}function K(e){!0===e?(l.bind(r,h),l.bind(i,g),o&&l.bind(o,I)):(l.unbind(r,h,!1),l.unbind(i,g,!1),o&&l.unbind(o,I,!1)),l.data(Me+"_intouch",!0===e)}function $(e,t){var n=void 0!==t.identifier?t.identifier:0;return C[e].identifier=n,C[e].start.x=C[e].end.x=t.pageX||t.clientX,C[e].start.y=C[e].end.y=t.pageY||t.clientY,C[e]}function J(e){var t=function(e){for(var t=0;t/g,">").replace(/&/g,"&").replace(/\n/g,"
");i.html(e+" ").css({width:parseInt(r.width(),10)+"px"}),n()}function n(){var e=i.height(),t="hidden",n=o?e+u+a:e+u;c").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body);e();var o="border-box"==r.css("box-sizing")||"border-box"==r.css("-moz-box-sizing")||"border-box"==r.css("-webkit-box-sizing"),a=parseInt(r.css("border-top-width"))+parseInt(r.css("padding-top"))+parseInt(r.css("padding-bottom"))+parseInt(r.css("border-bottom-width")),l=parseInt(r.css("height"),10),u=parseInt(r.css("line-height"),10)||parseInt(r.css("font-size"),10),s=l<2*u?2*u:l,c=-1>0),k="attached",S="detached",C="extends",M="ADDITION",N="MODIFICATION",I="REMOVAL",P="DOMAttrModified",D="DOMContentLoaded",F="<",z="=",R=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,_=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],j=[],V=[],q="",U=u.documentElement,H=j.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},X=n.prototype,Q=X.hasOwnProperty,Y=X.isPrototypeOf,B=n.defineProperty,W=n.getOwnPropertyDescriptor,Z=n.getOwnPropertyNames,G=n.getPrototypeOf,K=n.setPrototypeOf,$=!!n.__proto__,J=n.create||function e(t){return t?(e.prototype=t,new e):this},ee=K||($?function(e,t){return e.__proto__=t,e}:Z&&W?function(){function n(e,t){for(var n,r=Z(t),i=0,o=r.length;i').appendTo(document.body),WCF.CloseOverlayHandler.addCallback("WCF.Dropdown.Interactive.Handler",$.proxy(this.closeAll,this)));var n=new WCF.Dropdown.Interactive.Instance(this._dropdownContainer,e,t,i);return this._dropdownMenus[t]=n},open:function(e){return!!this._dropdownMenus[e]&&(this._dropdownMenus[e].open(),!0)},close:function(e){return!!this._dropdownMenus[e]&&(this._dropdownMenus[e].close(),!0)},closeAll:function(){for(var e in this._dropdownMenus)this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].close()},getOpenDropdown:function(){for(var e in this._dropdownMenus)if(this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].isOpen())return this._dropdownMenus[e];return null},getDropdown:function(e){return this._dropdownMenus[e]}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:null,_itemList:null,_linkList:null,_options:{},_pointer:null,_triggerElement:null,init:function(e,t,i,n){this._options=n||{},this._triggerElement=t;var s=null;if(!0===n.staticDropdown)this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click(function(e){e.stopPropagation()});else{this._container=$('

').click(function(e){e.stopPropagation()});var a=$('
').appendTo(this._container);$(''+n.title+"").appendTo(a),this._linkList=$('').appendTo(a),s=$('
').appendTo(this._container),this._itemList=$('
    ').appendTo(s),$(''+WCF.Language.get("wcf.user.panel.showAll")+"").appendTo(this._container)}this._pointer=$('').appendTo(this._container),require(["Environment"],function(e){"desktop"===e.platform()&&null!==s&&s.perfectScrollbar({suppressScrollX:!0})}.bind(this)),this._container.appendTo(e)},getContainer:function(){return this._container},getItemList:function(){return this._itemList},getLinkList:function(){return this._linkList},open:function(){WCF.Dropdown._closeAll(),this._triggerElement.addClass("open"),this._container.addClass("open"),WCF.System.Event.fireEvent("com.woltlab.wcf.Search","close"),this.render()},close:function(){this._triggerElement.removeClass("open"),this._container.removeClass("open")},isOpen:function(){return this._triggerElement.hasClass("open")},toggle:function(){return this._container.hasClass("open")?(this.close(),!1):(WCF.Dropdown.Interactive.Handler.closeAll(),this.open(),!0)},resetItems:function(){this._itemList.empty(),this.close()},render:function(){require(["Ui/Alignment","Ui/Screen"],function(e,t){t.is("screen-lg")?e.set(this._container[0],this._triggerElement[0],{horizontal:"right",pointer:!0}):this._container.css({bottom:"",left:"",right:"",top:elById("pageHeaderPanel").clientHeight+"px"})}.bind(this))},rebuildScrollbar:function(){require(["Environment"],function(e){if("desktop"===e.platform()){var t=this._itemList.parent();t.perfectScrollbar("destroy"),t.perfectScrollbar({suppressScrollX:!0})}}.bind(this))}}),WCF.Clipboard={init:function(n,s,a,o){require(["EventHandler","WoltLabSuite/Core/Controller/Clipboard"],function(e,t){for(var i in t.setup({hasMarkedItems:0 ol")):i.replaceWith(i.find("> ol > li")),this._containers.splice(this._containers.indexOf(i.wcfIdentify()),1),this._didTriggerEffect(i);else{var n=this;i.wcfBlindOut("up",function(){$(this).remove(),n._containers.splice(n._containers.indexOf($(this).wcfIdentify()),1),n._didTriggerEffect($(this))})}}}}),WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i||".jsToggleButton",this._containers=[];var n={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(n),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();WCF.inArray(n,this._containers)||(this._containers.push(n),i.find(this._buttonSelector).click($.proxy(this._click,this)))},this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessageHtml")?t.data("confirmMessageHtml"):t.data("confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,!!t.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);WCF.inArray(n.data("objectID"),e)&&(i.wcfHighlight(),this._toggleButton(i,n))}},_toggleButton:function(e,t){var i="";WCF.LoadingOverlayHandler.updateIcon(t,!1),t.hasClass("fa-square-o")?(t.removeClass("fa-square-o").addClass("fa-check-square-o"),i=t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable")):(t.removeClass("fa-check-square-o").addClass("fa-square-o"),i=t.data("enableTitle")?t.data("enableTitle"):WCF.Language.get("wcf.global.button.enable")),t.attr("title",i),e.toggleClass("disabled")}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){this._threshold=parseInt(e),0!==this._threshold?($.isFunction(t)&&(this._callback=t),null!==this._callback?(this._reference=$(i||window),this._target=$(n||document),this.start(),this._scroll()):console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting.")):console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting.")},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop();e-(this._reference.height()+t)/g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(e,t){var i=(e=String(WCF.Number.round(e,t||2))).split(".");return e=this.addThousandsSeparator(i[0]),1")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this.init()}},WCF.Template=Class.extend({init:function(t){var i=new WCF.Dictionary,n=0;t=(t=(t=t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")).replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var t="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return i.add(t,e.replace(/\{\/?literal\}/g,"")),t},this))).replace(/\{\*.*?\*\}/g,"");var s=function(e){for(var t=e.split(""),i={},n=!0,s="",a="",o=!1,r=!1,l=!1,c=0,u=t.length;c').prependTo(t);return i.data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget).data("containerID"),i=this._containerData[t].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(t)],parameters:$.extend(!0,{containerID:t,currentState:n,newState:s},this._getAdditionalParameters(t))}),this._proxy.sendRequest(),$("#"+t).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("fa-chevron-down fa-chevron-right fa-spinner").addClass("fa-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(e){return{}},_updateContent:function(e,t,i){this._containerData[e].target.html(t)},_success:function(e,t,i){if(e.returnValues.containerID){var n=e.returnValues.containerID;if(this._containers[n]){this._containerData[n].isOpen=!!e.returnValues.isOpen;var s=e.returnValues.isOpen?"open":"close";this._updateContent(n,$.trim(e.returnValues.content),s)}}}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget).data("containerID"),i=this._containerData[t].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(t)],parameters:$.extend(!0,{containerID:t,currentState:n,newState:s},this._getAdditionalParameters(t))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[t].button,"open"===s?"chevron-down":"chevron-right"),"open"===s?this._containerData[t].target.show():this._containerData[t].target.hide(),$("#"+t).toggleClass("jsCollapsed"),this._containerData[t].isOpen="open"===s}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){if(!e.length)return!0;var n=e.getOffsets("offset").top,s=$(document).height(),a=$(window).height();return s-a").addClass(this._options.messageType).text(this._options.emptyMessage));else if(this._options.refreshPage)if(this._options.updatePageNumber){var e=window.location.href.match(/(\?|&)pageNo=(\d+)/g);if(e){var t=e[e.length-1].match(/\d+/g);0'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('