From 8e1382a485b2d4c0e5a6571138a7524df3d5f7ea Mon Sep 17 00:00:00 2001 From: WoltLab Date: Tue, 17 Nov 2020 14:56:24 +0000 Subject: [PATCH] Updating minified JavaScript files --- .../files/acp/templates/codeMetaCode.tpl | 32 +++++++++++++++++++ .../redactor2/redactor.combined.min.js | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 wcfsetup/install/files/acp/templates/codeMetaCode.tpl diff --git a/wcfsetup/install/files/acp/templates/codeMetaCode.tpl b/wcfsetup/install/files/acp/templates/codeMetaCode.tpl new file mode 100644 index 0000000000..67e183bcaa --- /dev/null +++ b/wcfsetup/install/files/acp/templates/codeMetaCode.tpl @@ -0,0 +1,32 @@ +
+
+
{$title}{if $filename}: {$filename}{/if}
+ + {if !$isAmp && $lines > 10} + + {/if} +
+ + {assign var='lineNumber' value=$startLineNumber} +
{foreach from=$content item=line}{*
+		*}{assign var='codeLineID' value='codeLine_'|concat:$lineNumber:'_':$codeID}{*
+		*}
{$line}
{* + *}{assign var='lineNumber' value=$lineNumber+1}{* + *}{/foreach}
+ + {if !$isAmp && $lines > 10} + {lang}wcf.bbcode.button.showAll{/lang} + {/if} +
+{if !$isAmp} + +{/if} 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 f61ecb2975..7a9e5c7cf3 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js @@ -55,7 +55,7 @@ (function (window, undefined) { $.Redactor.prototype.WoltLabInlineCode=function(){"use strict";var s;return{init:function(){this.opts.activeButtonsStates.kbd="tt",require(["Environment","EventHandler"],function(e,t){s=e,t.add("com.woltlab.wcf.redactor2","bbcode_tt_"+this.$element[0].id,this.WoltLabInlineCode._toggle.bind(this))}.bind(this))},_toggle:function(e){var t;e.cancel=!0;var o=window.getSelection();if(o.isCollapsed){t=null;var n=o.anchorNode;n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var r,d,i=!1;if("KBD"===n.nodeName&&""!==n.textContent.replace(/\u200b/g,"")&&(r=o.anchorNode,d=o.anchorOffset,r.nodeType===Node.TEXT_NODE&&0===d?t=r:r===n&&(0===d?i=!0:t=n.childNodes[d-1])),!1===i&&null!==t)for(var a,l=0,c=n.childNodes.length;l/g,"").replace(/
/g,"").replace(/\u200B/g,"").trim();a.call(this,e,t),i&&(n=this.$editor[0].firstElementChild),n&&"P"===n.nodeName&&n.nextElementSibling&&(r=!1,(0===n.childElementCount&&""===n.textContent.replace(/\u200B/g,"").trim()||1===n.childElementCount&&"
"===n.innerHTML)&&(r=!0),r&&elRemove(n)),o.rangeCount&&"IMG"===o.anchorNode.nodeName&&this.caret.after(o.anchorNode)}.bind(this);var t=this.insert.text;this.insert.text=function(e){s=s&&s(),this.core.editor().focus(),this.selection.restore(),elClosest(window.getSelection().anchorNode,".redactor-layer")!==this.core.editor()[0]&&this.WoltLabCaret.endOfEditor(),t.call(this,e),this.selection.saveInstant()}.bind(this),this.insert.placeHtml=function(e){var t=!1;e.forEach(function(e){e instanceof Element&&e.classList.contains("woltlab-bbcode-marker")&&(t=!0)});var o=document.createElement("span");o.id="redactor-insert-marker",o=this.insert.node(o),$(o).before(e),t||(this.selection.restore(),this.caret.after(o)),$(o).remove()}.bind(this)}}}; })(this); +(function (window, undefined) { $.Redactor.prototype.WoltLabInsert=function(){"use strict";return{init:function(){var s=this.opts.woltlab.placeholderCallback;var a=this.insert.html;this.insert.html=function(e,t){s=s&&s();var o=window.getSelection();o.rangeCount&&"IMG"===o.anchorNode.nodeName&&this.caret.after(o.anchorNode),this.placeholder.hide(),this.core.editor().focus(),!this.detect.isFirefox()||null===(o.anchorNode.nodeType===Node.TEXT_NODE?o.anchorNode.parentNode:o.anchorNode).closest(".redactor-layer")&&(this.selection.restore(),null===(o.anchorNode.nodeType===Node.TEXT_NODE?o.anchorNode.parentNode:o.anchorNode).closest(".redactor-layer")&&(this.WoltLabCaret.endOfEditor(),this.selection.save()));var r,i=this.selection.block(),n=""===this.$editor[0].innerHTML.replace(/<\/?p>/g,"").replace(/
/g,"").replace(/\u200B/g,"").trim();a.call(this,e,t),n&&(i=this.$editor[0].firstElementChild),i&&"P"===i.nodeName&&i.nextElementSibling&&(r=!1,(0===i.childElementCount&&""===i.textContent.replace(/\u200B/g,"").trim()||1===i.childElementCount&&"
"===i.innerHTML)&&(r=!0),r&&elRemove(i)),this.detect.isFirefox()&&(this.selection.save(),function e(t){var o=t.querySelector("p > p");if(null!==o){for(var r=o.parentElement,i=r.parentElement;r.childNodes.length;)i.insertBefore(r.childNodes[0],r);r.remove(),e(t)}}(this.$editor[0]),this.selection.restore()),o.rangeCount&&"IMG"===o.anchorNode.nodeName&&this.caret.after(o.anchorNode)}.bind(this);var t=this.insert.text;this.insert.text=function(e){s=s&&s(),this.core.editor().focus(),this.selection.restore(),elClosest(window.getSelection().anchorNode,".redactor-layer")!==this.core.editor()[0]&&this.WoltLabCaret.endOfEditor(),t.call(this,e),this.selection.saveInstant()}.bind(this),this.insert.placeHtml=function(e){var t=!1;e.forEach(function(e){e instanceof Element&&e.classList.contains("woltlab-bbcode-marker")&&(t=!0)});var o=document.createElement("span");o.id="redactor-insert-marker",o=this.insert.node(o),$(o).before(e),t||(this.selection.restore(),this.caret.after(o)),$(o).remove()}.bind(this)}}}; })(this); // plugins/WoltLabKeydown.js (function (window, undefined) { $.Redactor.prototype.WoltLabKeydown=function(){"use strict";var s=!1,n=[];return{init:function(){var b=window.getSelection();require(["Environment"],function(e){s="safari"===e.browser()});var y=this.keydown.init;this.keydown.init=function(e){if(this.detect.isFirefox()&&b.isCollapsed&&e.which===this.keyCode.BACKSPACE&&((N=b.anchorNode).nodeType===Node.ELEMENT_NODE&&0":"",s&&((o=document.createRange()).selectNodeContents(n),o.collapse(!1),b.removeAllRanges(),b.addRange(o))))}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,"").trim()&&(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 t=this.keydown.blockquote;t&&(this.keydown.blockquote=!1);var i=n.call(this,e);return t&&(this.keydown.blockquote=t),i}.bind(this),this.keydown.replaceToParagraph=function(e){var t=this.selection.block(),i=t.innerHTML.replace(//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 l=window.getSelection();return l.removeAllRanges(),l.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 r=this.keydown.onTab;this.keydown.onTab=function(e,t){if(!this.keydown.pre){var i=$(this.selection.current()).closest("ul, ol, td",this.core.editor()[0]);if(0===i.length)return!0;if("TD"===(i=i[0]).nodeName){var n,o=null;return e.originalEvent.shiftKey?null===(o=i.previousElementSibling)&&null!==(o=i.parentNode.previousElementSibling)&&(o=o.lastElementChild):null===(o=i.nextElementSibling)&&(null===(o=i.parentNode.nextElementSibling)&&(this.table.addRowBelow(),o=i.parentNode.nextElementSibling),o=o.firstElementChild),null!==o&&(this.utils.isEmpty(o.innerHTML)?this.caret.end(o):((n=document.createRange()).selectNodeContents(o),b.removeAllRanges(),b.addRange(n))),e.originalEvent.preventDefault(),!1}}return r.call(this,e,t)}.bind(this);var l=this.keydown.formatEmpty;this.keydown.formatEmpty=function(e){for(var t,i=this.$editor[0],n=0,o=i.childElementCount;n