From 86898bb59e7e522d6b36b26c9a4fddd7e1e78854 Mon Sep 17 00:00:00 2001 From: WoltLab Date: Wed, 16 Jun 2021 13:58:51 +0000 Subject: [PATCH] Updating minified JavaScript files --- .../files/js/3rdParty/redactor2/redactor.combined.min.js | 2 +- wcfsetup/install/files/js/WCF.Combined.min.js | 6 +++--- wcfsetup/install/files/js/WCF.Combined.tiny.min.js | 2 +- wcfsetup/install/files/js/WoltLabSuite.Core.min.js | 4 ++-- wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js index 8d52ef4a23..8686d2004b 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js @@ -22,7 +22,7 @@ (function (window, undefined) { $.Redactor.prototype.WoltLabCaret=function(){"use strict";var e,t=!1,n=!1;return{init:function(){var i,o,r,a,s,l,d=this.caret.after;this.caret.after=function(e){e=this.caret.prepare(e),this.utils.isBlockTag(e.tagName)&&this.WoltLabCaret._addParagraphAfterBlock(e),d.call(this,e)}.bind(this),i=this.caret.start,this.caret.start=function(e){if(n){if(!(e=this.caret.prepare(e)))return;"P"===e.nodeName&&"​"===e.innerHTML&&(e.innerHTML="
")}i.call(this,e)}.bind(this),o=this.core.editor()[0],require(["Environment"],function(i){var r,a;t="ios"===i.platform(),(n="safari"===i.browser())&&o.classList.add("jsSafariMarginClickTarget"),r=this.WoltLabCaret._handleEditorClick.bind(this),a=this.WoltLabCaret._handleEditorMouseUp.bind(this),n&&t?(o.addEventListener("touchstart",(function(t){e=t.target}),{passive:!0}),o.addEventListener("touchend",function(e){r(e),a(e)}.bind(this))):(o.addEventListener("click",function(e){this.WoltLabCaret._detectTripleClick(e),r(e)}.bind(this)),o.addEventListener("mouseup",a))}.bind(this)),r=this.caret.end,this.caret.end=function(e){var n,i,o,a;return"OL"!==(e=this.caret.prepare(e)).nodeName&&"UL"!==e.nodeName||null===(e=e.lastElementChild)&&(e=e.parentNode),n=!1,e.nodeType===Node.ELEMENT_NODE&&e.lastChild&&"P"===e.lastChild.nodeName?n=!0:t?(i=this.core.editor()[0],e.parentNode===i&&"


"===i.innerHTML&&(n=!0)):"P"===e.nodeName&&0===e.childNodes.length&&(e.innerHTML="​",n=!0),n?(o=window.getSelection(),(a=document.createRange()).selectNodeContents(e.lastChild),a.collapse(!1),o.removeAllRanges(),void o.addRange(a)):"P"===e.nodeName&&1===e.childNodes.length&&"BR"===e.childNodes[0].nodeName?this.caret.before(e.childNodes[0]):r.call(this,e)}.bind(this),a=this.selection.nodes,this.selection.nodes=function(e){var t,n=a.call(this,e);return 1===n.length&&n[0]===this.$editor[0]&&(t=this.selection.range(this.selection.get())).startContainer===t.endContainer?[t.startContainer]:n}.bind(this),this.WoltLabCaret._initInternalRange(),s=this.selection.saveInstant,this.selection.saveInstant=function(){var e,t,n=s.call(this);return n&&(n.isAtNodeStart=!1,(e=window.getSelection()).rangeCount&&!e.isCollapsed&&(t=e.getRangeAt(0)).startContainer.nodeType===Node.TEXT_NODE&&0===t.startOffset&&(n.isAtNodeStart=!0)),n}.bind(this),l=this.selection.restoreInstant,this.selection.restoreInstant=function(e){var t,n,i,o,r,a,s,d;if((void 0!==e||this.saved)&&(t=void 0!==e?e:this.saved,l.call(this,e),(n=window.getSelection()).rangeCount))if(!0===t.isAtNodeStart){if(!n.isCollapsed){if(o=(i=n.getRangeAt(0)).startContainer,t.node===o)return;for(;null!==o&&"P"!==o.nodeName;)o=o.parentNode;if(null!==o&&null!==(o=o.nextElementSibling)&&"P"===o.nodeName&&0===o.textContent.replace(/\u200B/g,"").length){for(o=o.nextElementSibling,r=t.node;null!==r&&r!==o;)r=r.parentNode;r===o&&((i=i.cloneRange()).setStart(t.node,0),n.removeAllRanges(),n.addRange(i))}}}else n.isCollapsed&&(a=n.anchorNode,s=this.core.editor()[0],a.nodeType===Node.TEXT_NODE&&a.parentNode===s&&n.anchorOffset===a.textContent.length&&(d=a.nextElementSibling)&&"P"===d.nodeName&&this.caret.start(d))}.bind(this),this.selection.nodes=function(e){var t,n,i,o=void 0===e?[]:$.isArray(e)?e:[e],r=this.selection.get(),a=this.selection.range(r),s=[],l=[];if(this.utils.isCollapsed())s=[this.selection.current()];else{if((t=a.startContainer)===(n=a.endContainer))return[t];for(i=a.commonAncestorContainer;t&&t!==n;)s.push(t=this.selection.nextNode(t,i));for(t=a.startContainer;t&&t!==i;)s.unshift(t),t=t.parentNode}return $.each(s,(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!==o.length&&-1===$.inArray(n,o))return;l.push(t)}})),0===l.length?[]:l}.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"),"


"===this.opts.emptyHtml?t.innerHTML="
":t.textContent="​",e.parentNode.insertBefore(t,e.nextSibling)),this.caret.after(e)},endOfEditor:function(){var e,t=this.core.editor()[0];document.activeElement!==t&&t.focus(),"P"===(e=t.lastElementChild).nodeName?this.caret.end(e):this.caret.after(e)},_initInternalRange:function(){var e,t,n,i,o,r=this.core.editor()[0],a=null,s=window.getSelection(),l=function(){a=s.rangeCount?s.getRangeAt(0).cloneRange():null};this.WoltLabCaret.forceSelectionSave=l,e=function(){var e,t,n,i;if(null!==a){if(document.activeElement===r){if(0!==(e=s.getRangeAt(0)).startOffset)return;for(t=e.startContainer;t;){if(t.parentNode===r){if(t.previousSibling)return;break}if(t.previousSibling)return;t=t.parentNode}if(!t)return}n=r.scrollLeft,i=r.scrollTop,r.focus(),r.scrollLeft=n,r.scrollTop=i,s.removeAllRanges(),s.addRange(a),a=null}},r.addEventListener("keyup",l),r.addEventListener("mouseup",(function(){s.rangeCount&&l()})),t=this.selection.save,this.selection.save=function(){a=null,t.call(this)}.bind(this),n=this.selection.restore,this.selection.restore=function(){a&&null===elBySel(".redactor-selection-marker",this.$editor[0])&&(e(),s.rangeCount&&this.utils.isRedactorParent(s.getRangeAt(0).commonAncestorContainer))||n.call(this)}.bind(this),i=this.buffer.set,this.buffer.set=function(t){if(document.activeElement!==r){var n=window.getSelection();n.rangeCount&&!1!==this.utils.isRedactorParent(n.anchorNode)?r.focus():e()}i.call(this,t),l()}.bind(this),o=this.insert.html,this.insert.html=function(e,t){var n=elBySel(".redactor-selection-marker",this.$editor[0]);o.call(this,e,t),(n||null===elBySel(".redactor-selection-marker",this.$editor[0]))&&l()}.bind(this),require(["Environment"],function(e){"ios"===e.platform()&&(r.addEventListener("focus",(function(){document.addEventListener("selectionchange",l)})),r.addEventListener("blur",(function(){document.removeEventListener("selectionchange",l)})))}.bind(this))},_detectTripleClick:function(e){var t,n,i;e.detail<3||(t=window.getSelection()).isCollapsed||"TR"===(n=t.getRangeAt(0)).commonAncestorContainer.nodeName&&(i=elClosest(n.startContainer,"td"),(n=document.createRange()).selectNodeContents(i),t.removeAllRanges(),t.addRange(n))},_handleEditorClick:function(i){var o,r,a,s,l,d,c,h,u,f=i.clientY,g=t&&e===i.target&&this.utils.isBlockTag(e.nodeName);if(void 0===f&&g&&(f=i.changedTouches[0].clientY),(this.selection.get().isCollapsed||g&&void 0!==f)&&(!1!==(o=this.selection.block())||(this.selection.current()===this.$editor[0]&&(r=this.$editor[0].childNodes[this.selection.get().anchorOffset]).nodeType===Node.ELEMENT_NODE&&"TABLE"===r.nodeName&&(o=r),!1!==o))){for(a=!1,n&&this.utils.isBlockTag(i.target.nodeName)&&f>i.target.getBoundingClientRect().bottom&&(o=i.target,a=!0),s=i.target;s&&!this.utils.isBlockTag(s.nodeName);)s=s.parentNode;if(s&&(a||s!==o)&&("P"!==o.nodeName||(o=o.parentNode)!==this.$editor[0]&&this.utils.isBlockTag(o.nodeName))){if("TD"===o.nodeName)for(;"TABLE"!==o.nodeName;)o=o.parentNode;if(!o.nodeName.match(/^H\d$/)&&!$(o).closest("ol, ul",this.$editor[0]).length){for(c=o;c;){if(f<(d=c.getBoundingClientRect()).top)l=!0,o=c;else{if(!(f>d.bottom))break;l=!1,o=c}if(!c.parentNode||c.parentNode===this.$editor[0])break;c=c.parentNode}void 0!==l&&((h=o[(l?"previous":"next")+"ElementSibling"])&&"P"===h.nodeName?this.caret.end(h):(this.buffer.set(),(u=elCreate("p")).textContent="​",o.parentNode.insertBefore(u,l?o:o.nextSibling),this.caret.end(u)))}}}},_handleEditorMouseUp:function(i){var o,r,a,s,l,d=window.getSelection();if(d.isCollapsed||n&&t&&e===i.target&&this.utils.isBlockTag(e.nodeName))if(i.target===this.$editor[0])(o=d.anchorNode).nodeType===Node.TEXT_NODE&&(o=o.parentNode),"KBD"===o.nodeName&&(null!==(r=o.previousSibling)&&"​"===r.textContent||(r=document.createTextNode("​"),o.parentNode.insertBefore(r,o)),this.caret.before(r));else if("KBD"===i.target.nodeName&&(a=i.target,(o=d.anchorNode).nodeType===Node.TEXT_NODE)){for(r=o;(r=r.nextSibling)&&r.nodeType===Node.TEXT_NODE&&(""===r.textContent||"​"===r.textContent););r===a&&(0!==a.childNodes.length&&"​"===a.childNodes[0].textContent||(s=document.createTextNode("​"),a.insertBefore(s,a.firstChild)),(l=document.createRange()).setStartAfter(a.childNodes[0]),l.setEndAfter(a.childNodes[0]),d.removeAllRanges(),d.addRange(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))}}}; })(this); // plugins/WoltLabClean.js -(function (window, undefined) { $.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var e,t,n,l,r,i,o,a,s=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=s.call(this,e)).replace(/&WCF_AMPERSAND&(amp;)?/g,"&")).replace(/@@@WCF_LITERAL_AMP@@@/g,"&amp;");var t=elCreate("div");return t.innerHTML=e,elBySelAll("*",t,(function(e){var t,n,l,r=[];for(n=0,l=e.attributes.length;n",e.parentNode.insertBefore(t,e.nextSibling),e.removeChild(n.nextSibling),e.removeChild(n)):(n.previousElementSibling||n.previousSibling&&""!==n.previousSibling.textContent.replace(/\u200B/g,"").trim())&&e.removeChild(n))})),elBySelAll("span",l,(function(e){if(e.childNodes.length>0){var t=e.childNodes[e.childNodes.length-1];t.nodeType===Node.TEXT_NODE&&t.textContent.match(/\n$/)&&(t.textContent=t.textContent.replace(/\n+$/,e.parentNode.lastChild===e?"":" "))}})),t=(t=(t=l.innerHTML).replace(/

\u200B<\/p>/g,"


")).replace(/&/g,"&WCF_AMPERSAND&"),t=(t=e.call(this,t)).replace(/&WCF_AMPERSAND&/g,"&"),l.innerHTML=t,elBySelAll("pre",l,(function(e){n.hasOwnProperty(e.textContent)&&(e.textContent=n[e.textContent])})),t=l.innerHTML}.bind(this),t=this.clean.savePreFormatting,this.clean.savePreFormatting=function(e){var n=this.clean.encodeEntities;return this.clean.encodeEntities=function(e){return WCF.String.escapeHTML(e)},e=t.call(this,e),this.clean.encodeEntities=n,e}.bind(this),n=this.clean.onPaste,this.clean.onPaste=function(e,t,l){var r,i,o,a,s,c,h,d,p,u,f,m,g,y,v,b;if(t.pre||this.utils.isCurrentOrParent("kbd"))return t.pre&&this.opts.preSpaces&&(e=e.replace(/\t/g,new Array(this.opts.preSpaces+1).join(" "))),WCF.String.escapeHTML(e);for(this.clean.isHtmlMsWord(e)&&(e=this.clean.cleanMsWord(e)),(r=elCreate("div")).innerHTML=e.replace(/@@@WOLTLAB-P-ALIGN-(?:left|right|center|justify)@@@/g,""),s=!0,o=0,a=r.childElementCount;o0;)t.appendChild(e.childNodes[0]);r.removeChild(e)}))}for(d=null!==elBySel(".MsoNormal",r),o=0,a=(p=elBySelAll("[style]",r)).length;o500&&(m=elCreate("strong"),i.parentNode.insertBefore(m,i),m.appendChild(i))):d&&"margin-bottom"===u&&"P"===i.nodeName&&(g=i.style.getPropertyValue(u)).match(/^12(?:\.0)?pt$/)&&((b=elCreate("p")).innerHTML="
",i.parentNode.insertBefore(b,i.nextSibling)),f.push(u));f.forEach((function(e){i.style.removeProperty(e)}))}return elBySelAll("span",r,function(e){var t,n,l,r,i;if(!e.classList.contains("redactor-selection-marker"))if(e.hasAttribute("style")&&e.style.length)for(r=((t=e.style.getPropertyValue("color"))?1:0)+((n=e.style.getPropertyValue("font-family"))?1:0)+((l=e.style.getPropertyValue("font-size"))?1:0);r>1;){if(this.opts.pastePlainText)return e.style.removeProperty("color"),e.style.removeProperty("font-family"),void e.style.removeProperty("font-size");i=elCreate("span"),t?(i.style.setProperty("color",t,""),e.style.removeProperty("color"),t="",r--):n?(i.style.setProperty("font-family",n,""),e.style.removeProperty("font-family"),n="",r--):l&&(i.style.setProperty("font-size",l,""),e.style.removeProperty("font-size"),l="",r--),e.parentNode.insertBefore(i,e),i.appendChild(e)}else{for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}.bind(this)),elBySelAll("p",r,(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",r,(function(e){e.removeAttribute("style")})),elBySelAll("br",r,(function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e.nextSibling)})),elBySelAll("kbd",r,(function(e){for(e.insertBefore(document.createTextNode("[tt]"),e.firstChild),e.appendChild(document.createTextNode("[/tt]"));e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)})),e=(e=(e=n.call(this,r.innerHTML,t,l)).replace(/\n*@@@WOLTLAB-BR-MARKER@@@\n*/g,"")).replace(/(

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

':""})),r.innerHTML=e.replace(/&quot;/g,"""),elBySelAll("woltlab-br-marker",r,(function(e){var t,n,l,r,i,o,a,s=e.parentNode;if(null!==s){for(t=!1,n=s;null!==n;)"P"===n.nodeName&&(t=!0),n=n.parentNode;if(t){for((l=elCreate("p")).innerHTML="
",r=!1,(i=e.nextSibling)&&"WOLTLAB-BR-MARKER"===i.nodeName&&(r=!0),o=!r;e.nextSibling;)o&&0!==e.nextSibling.textContent.replace(/\u200B/g,"").trim().length&&(o=!1),l.appendChild(e.nextSibling);o||elRemove(l.firstElementChild),(a=e.previousSibling)&&"BR"===a.nodeName&&elRemove(a),s.parentNode.insertBefore(l,s.nextSibling),r&&((l=elCreate("p")).innerHTML="
",s.parentNode.insertBefore(l,s.nextSibling))}else s.insertBefore(elCreate("br"),e);elRemove(e)}})),elBySelAll("p",r,(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)})),r.innerHTML}.bind(this),l=[],r=function(e,t){var n,r,i,o,a={};for(i=0,o=t.length;i');var n=elCreate("div");n.innerHTML=e,elBySelAll("woltlab-custom-tag",n,(function(e){var t,n,r,i=~~elData(e,"index");if(l[i]){for(r in t=l[i],n=elCreate(t.element.nodeName),t.attributes)t.attributes.hasOwnProperty(r)&&elAttr(n,r,t.attributes[r]);for(e.parentNode.insertBefore(n,e);e.childNodes.length;)n.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"),">")),o.call(this,e,t)}.bind(this),this.clean.removeSpans=function(e){return e},a=this.clean.getCurrentType,this.clean.getCurrentType=function(e,t){var n=a.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),this.clean.removeEmptyInlineTags,this.clean.removeEmptyInlineTags=function(e){var t=this.opts.inlineTags,n=$("

").html($.parseHTML(e,document,!0)),l=this,r=n.find("span"),i=n.find(t.join(","));return i.filter(":not(span)").removeAttr("style"),i.each((function(){var e=$(this).html();0===this.attributes.length&&l.utils.isEmpty(e)&&$(this).replaceWith((function(){return $(this).contents()}))})),r.each((function(){$(this).html();0===this.attributes.length&&$(this).replaceWith((function(){return $(this).contents()}))})),e=(e=(e=(e=n.html()).replace("\x3c!--?php",""),n.remove(),e}.bind(this)},removeRedundantStyles:function(){var e,t=[],n=["del","em","strong","sub","sup","u"];elBySelAll(n.join(","),this.$editor[0],(function(e){elBySelAll(e.nodeName,e,(function(e){t.push(e)}))})),this.opts.pastePlainText||(elBySelAll("span[style]",this.$editor[0],(function(e){["color","font-family","font-size"].forEach((function(n){var l=e.style.getPropertyValue(n);l&&window.getComputedStyle(e.parentNode).getPropertyValue(n)===l&&t.push(e)}))})),t.forEach((function(t){for(e=t.parentNode;t.childNodes.length;)e.insertBefore(t.childNodes[0],t);e.removeChild(t)})))}}}; })(this); +(function (window, undefined) { $.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var e,t,n,l,r,i,o,a,s=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=s.call(this,e)).replace(/&WCF_AMPERSAND&(amp;)?/g,"&")).replace(/@@@WCF_LITERAL_AMP@@@/g,"&amp;");var t=elCreate("div");return t.innerHTML=e,elBySelAll("*",t,(function(e){var t,n,l,r=[];for(n=0,l=e.attributes.length;n",e.parentNode.insertBefore(t,e.nextSibling),e.removeChild(n.nextSibling),e.removeChild(n)):(n.previousElementSibling||n.previousSibling&&""!==n.previousSibling.textContent.replace(/\u200B/g,"").trim())&&e.removeChild(n))})),elBySelAll("span",l,(function(e){if(e.childNodes.length>0){var t=e.childNodes[e.childNodes.length-1];t.nodeType===Node.TEXT_NODE&&t.textContent.match(/\n$/)&&(t.textContent=t.textContent.replace(/\n+$/,e.parentNode.lastChild===e?"":" "))}})),t=(t=(t=l.innerHTML).replace(/

\u200B<\/p>/g,"


")).replace(/&/g,"&WCF_AMPERSAND&"),t=(t=e.call(this,t)).replace(/&WCF_AMPERSAND&/g,"&"),l.innerHTML=t,elBySelAll("pre",l,(function(e){n.hasOwnProperty(e.textContent)&&(e.textContent=n[e.textContent])})),t=l.innerHTML}.bind(this),t=this.clean.savePreFormatting,this.clean.savePreFormatting=function(e){var n=this.clean.encodeEntities;return this.clean.encodeEntities=function(e){return WCF.String.escapeHTML(e)},e=t.call(this,e),this.clean.encodeEntities=n,e}.bind(this),n=this.clean.onPaste,this.clean.onPaste=function(e,t,l){var r,i,o,a,s,c,h,d,p,u,f,m,g,y,v,b;if(t.pre||this.utils.isCurrentOrParent("kbd"))return t.pre&&this.opts.preSpaces&&(e=e.replace(/\t/g,new Array(this.opts.preSpaces+1).join(" "))),WCF.String.escapeHTML(e);for(this.clean.isHtmlMsWord(e)&&(e=this.clean.cleanMsWord(e)),(r=elCreate("div")).innerHTML=e.replace(/@@@WOLTLAB-P-ALIGN-(?:left|right|center|justify)@@@/g,""),s=!0,o=0,a=r.childElementCount;o0;)t.appendChild(e.childNodes[0]);r.removeChild(e)}))}for(d=null!==elBySel(".MsoNormal",r),o=0,a=(p=elBySelAll("[style]",r)).length;o500&&(m=elCreate("strong"),i.parentNode.insertBefore(m,i),m.appendChild(i))):d&&"margin-bottom"===u&&"P"===i.nodeName&&(g=i.style.getPropertyValue(u)).match(/^12(?:\.0)?pt$/)&&((b=elCreate("p")).innerHTML="
",i.parentNode.insertBefore(b,i.nextSibling)),f.push(u));f.forEach((function(e){i.style.removeProperty(e)}))}return elBySelAll("span",r,function(e){var t,n,l,r,i;if(!e.classList.contains("redactor-selection-marker"))if(e.hasAttribute("style")&&e.style.length)for(r=((t=e.style.getPropertyValue("color"))?1:0)+((n=e.style.getPropertyValue("font-family"))?1:0)+((l=e.style.getPropertyValue("font-size"))?1:0);r>0;){if(this.opts.pastePlainText)return e.style.removeProperty("color"),e.style.removeProperty("font-family"),void e.style.removeProperty("font-size");i=elCreate("span"),t?(i.style.setProperty("color",t,""),e.style.removeProperty("color"),t="",r--):n?(i.style.setProperty("font-family",n,""),e.style.removeProperty("font-family"),n="",r--):l&&(i.style.setProperty("font-size",l,""),e.style.removeProperty("font-size"),l="",r--),e.parentNode.insertBefore(i,e),i.appendChild(e)}else{for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}.bind(this)),elBySelAll("p",r,(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",r,(function(e){e.removeAttribute("style")})),elBySelAll("br",r,(function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e.nextSibling)})),elBySelAll("kbd",r,(function(e){for(e.insertBefore(document.createTextNode("[tt]"),e.firstChild),e.appendChild(document.createTextNode("[/tt]"));e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)})),e=(e=(e=n.call(this,r.innerHTML,t,l)).replace(/\n*@@@WOLTLAB-BR-MARKER@@@\n*/g,"")).replace(/(

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

':""})),r.innerHTML=e.replace(/&quot;/g,"""),elBySelAll("woltlab-br-marker",r,(function(e){var t,n,l,r,i,o,a,s=e.parentNode;if(null!==s){for(t=!1,n=s;null!==n;)"P"===n.nodeName&&(t=!0),n=n.parentNode;if(t){for((l=elCreate("p")).innerHTML="
",r=!1,(i=e.nextSibling)&&"WOLTLAB-BR-MARKER"===i.nodeName&&(r=!0),o=!r;e.nextSibling;)o&&0!==e.nextSibling.textContent.replace(/\u200B/g,"").trim().length&&(o=!1),l.appendChild(e.nextSibling);o||elRemove(l.firstElementChild),(a=e.previousSibling)&&"BR"===a.nodeName&&elRemove(a),s.parentNode.insertBefore(l,s.nextSibling),r&&((l=elCreate("p")).innerHTML="
",s.parentNode.insertBefore(l,s.nextSibling))}else s.insertBefore(elCreate("br"),e);elRemove(e)}})),elBySelAll("p",r,(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)})),r.innerHTML}.bind(this),l=[],r=function(e,t){var n,r,i,o,a={};for(i=0,o=t.length;i');var n=elCreate("div");n.innerHTML=e,elBySelAll("woltlab-custom-tag",n,(function(e){var t,n,r,i=~~elData(e,"index");if(l[i]){for(r in t=l[i],n=elCreate(t.element.nodeName),t.attributes)t.attributes.hasOwnProperty(r)&&elAttr(n,r,t.attributes[r]);for(e.parentNode.insertBefore(n,e);e.childNodes.length;)n.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"),">")),o.call(this,e,t)}.bind(this),this.clean.removeSpans=function(e){return e},a=this.clean.getCurrentType,this.clean.getCurrentType=function(e,t){var n=a.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),this.clean.removeEmptyInlineTags,this.clean.removeEmptyInlineTags=function(e){var t=this.opts.inlineTags,n=$("

").html($.parseHTML(e,document,!0)),l=this,r=n.find("span"),i=n.find(t.join(","));return i.filter(":not(span)").removeAttr("style"),i.each((function(){var e=$(this).html();0===this.attributes.length&&l.utils.isEmpty(e)&&$(this).replaceWith((function(){return $(this).contents()}))})),r.each((function(){$(this).html();0===this.attributes.length&&$(this).replaceWith((function(){return $(this).contents()}))})),e=(e=(e=(e=n.html()).replace("\x3c!--?php",""),n.remove(),e}.bind(this)},removeRedundantStyles:function(){var e,t=[],n=["del","em","strong","sub","sup","u"];elBySelAll(n.join(","),this.$editor[0],(function(e){elBySelAll(e.nodeName,e,(function(e){t.push(e)}))})),this.opts.pastePlainText||(elBySelAll("span[style]",this.$editor[0],(function(e){["color","font-family","font-size"].forEach((function(n){var l=e.style.getPropertyValue(n);l&&window.getComputedStyle(e.parentNode).getPropertyValue(n)===l&&t.push(e)}))})),t.forEach((function(t){for(e=t.parentNode;t.childNodes.length;)e.insertBefore(t.childNodes[0],t);e.removeChild(t)})))}}}; })(this); // plugins/WoltLabCode.js (function (window, undefined) { $.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){var t,e,i;require(["WoltLabSuite/Core/Ui/Redactor/Code"],function(t){new t(this)}.bind(this)),t=this.code.start,this.code.start=function(e){t.call(this,e),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","codeStart_"+this.$element[0].id),elBySelAll("kbd",this.$editor[0],(function(t){var e,i=t.nextSibling;i&&i.nodeType===Node.TEXT_NODE&&"​"===i.textContent.substr(0,1)||(e=document.createTextNode("​"),t.parentNode.insertBefore(e,i))}))}.bind(this),e=this.code.set,this.code.set=function(t,i){e.call(this,t,i),this.utils.isEmpty()&&this.observe.toolbar()}.bind(this),i=this.code.get,this.code.get=function(){return this.code.html=!1,this.code.startSync(this.core.editor().html()),i.call(this)}.bind(this)}}}; })(this); diff --git a/wcfsetup/install/files/js/WCF.Combined.min.js b/wcfsetup/install/files/js/WCF.Combined.min.js index 7c9bfc62a0..0e16ea167f 100755 --- a/wcfsetup/install/files/js/WCF.Combined.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.min.js @@ -28,7 +28,7 @@ (function (window, undefined) { "use strict";WCF.ACL={},WCF.ACL.List=Class.extend({_categoryName:"",_container:null,_containerElements:{},_objectID:0,_objectTypeID:null,_options:{},_proxy:null,_search:null,_values:{group:{},user:{}},init:function(e,t,n,i,a,s,r){var c,l,o,h,p,d;this._objectID=i||0,this._objectTypeID=t,this._categoryName=n,void 0===a&&(a=!0),this._values={group:{},user:{}},this._aclValuesFieldName=r||"aclValues",this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._container=$(e).hide().addClass("aclContainer"),c=this._container.children("dd"),l=$('
    ').appendTo(c),o=$('').appendTo(c),h=$('
      ').hide().appendTo(c),elData(h[0],"grant",WCF.Language.get("wcf.acl.option.grant")),elData(h[0],"deny",WCF.Language.get("wcf.acl.option.deny")),this._containerElements={aclList:l,denyAll:null,grantAll:null,permissionList:h,searchInput:o},this._search=new WCF.Search.User(o,$.proxy(this.addObject,this),a),(p=this._container.parents("form:eq(0)")).submit($.proxy(this.submit,this)),(d=p.find("input[type=reset]:eq(0)")).length&&d.click($.proxy(this._reset,this)),s?this._success(s):this._loadACL()},_reset:function(){this._values={group:{},user:{}},this._containerElements.aclList.empty(),this._containerElements.searchInput.val(""),this._containerElements.permissionList.hide().find("input[type=checkbox]").prop("checked",!1)},_loadACL:function(){this._proxy.setOption("data",{actionName:"loadAll",className:"wcf\\data\\acl\\option\\ACLOptionAction",parameters:{categoryName:this._categoryName,objectID:this._objectID,objectTypeID:this._objectTypeID}}),this._proxy.sendRequest()},addObject:function(e){var t=this._createListItem(e.objectID,e.label,e.type);this._savePermissions(),this._containerElements.aclList.children("li").removeClass("active"),t.addClass("active"),this._search.addExcludedSearchValue(e.label),this._containerElements.permissionList.find("input[type=checkbox]").prop("checked",!1),this._containerElements.searchInput.val(""),this._containerElements.permissionList.show(),WCF.DOMNodeInsertedHandler.execute()},_createListItem:function(e,t,n){var i=$('
    • '+t+"
    • ").appendTo(this._containerElements.aclList);return i.data("objectID",e).data("type",n).data("label",t).click($.proxy(this._click,this)),$('').click($.proxy(this._removeItem,this)).appendTo(i),i},_removeItem:function(e){var t=$(e.currentTarget).parent(),n=t.data("type"),i=t.data("objectID");this._search.removeExcludedSearchValue(t.data("label")),t.remove(),this._values[n][i]&&delete this._values[n][i],this._selectFirstEntry()},_selectFirstEntry:function(){var e=this._containerElements.aclList.children("li:eq(0)");e.length?this._select(e,!1):this._reset()},_success:function(e,t,n){var i,a,s,r,c,l,o,h,p,d,u;if($.getLength(e.returnValues.options)){for(s in i=0,a={},e.returnValues.options)r=e.returnValues.options[s],c=$("
    • "+r.label+"
    • ").data("optionID",s).data("optionName",r.optionName),l=$('').appendTo(c).wrap('