From: woltlab.com Date: Thu, 25 Jun 2015 13:36:52 +0000 (+0200) Subject: Updating minified JavaScript files X-Git-Tag: 2.1.5~6^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=96050fa8b8e88cfa5187ab155ddb5dd82f4ad0ba;p=GitHub%2FWoltLab%2FWCF.git Updating minified JavaScript files --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js index 96dbef0d62..ea447ba3a3 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js @@ -3,7 +3,7 @@ if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.table=function(){ret // wbbcode.js if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode=function(){var a=false;return{init:function(){var e=this.$textarea.wcfIdentify();this.opts.initCallback=(function(){if($.browser.msie){this.$editor.addClass("msie")}var i=$.trim(this.wutil.getOption("woltlab.originalValue"));if(i.length){this.wutil.replaceText(i);this.wutil.selectionEndOfEditor()}delete this.opts.woltlab.originalValue;$(document).trigger("resize");this.wutil.saveSelection()}).bind(this);this.opts.pasteBeforeCallback=$.proxy(this.wbbcode._pasteBeforeCallback,this);this.opts.pasteCallback=$.proxy(this.wbbcode._pasteCallback,this);var d=this.clean.onSync;this.clean.onSync=(function(i){i=i.replace(/\u200C/g,"__wcf_zwnj__");i=i.replace(/\u200D/g,"__wcf_zwj__");if(a===true){a=false}else{i=i.replace(/

]+)?><\/p>/g,"

@@@wcf_empty_line@@@

")}i=d.call(this,i);i=i.replace(/__wcf_zwnj__/g,"\u200C");return i.replace(/__wcf_zwj__/g,"\u200D")}).bind(this);if(this.wutil.getOption("woltlab.autosaveOnce")){this.wutil.saveTextToStorage();delete this.opts.woltlab.autosaveOnce}var c=this.button.get("table");if(c.length){var h=c.data("dropdown");h.find(".redactor-dropdown-add_head").parent().remove();h.find(".redactor-dropdown-delete_head").parent().remove();$('"}return'

"+__REDACTOR_CODE_HIGHLIGHTERS[N]+(Q?": "+WCF.String.escapeHTML(Q):"")+'

    '+V+"
"}).bind(this));I=I.replace(z,i)}}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:I});return I},_expandFormatting:function(e,c,f){if(!e.length){return c+this.opts.invisibleSpace+f}var b=e.indexOf("[/td]");if(b!==-1){var d=e.substring(0,b);if(d.indexOf("[td]")===-1){return c+d+f+e.substring(b)}}var d=e.split("\n");e="";for(var i=0,h=d.length;i]*)>/g,function(g,j,i){if(i&&i.match(/style="([^"]+?)"/)){if(/font-size: ?(\d+|\d+\.\d+)(px|pt|em|rem|%)/.test(RegExp.$1)){var d=$('
').appendTo(document.body);var f=parseInt(d[0].clientWidth);d.remove();var e=-1;var h=false;$.each(c,function(m,l){if(e===-1){e=m}else{if(Math.abs(f-l)/g,"[/size]");b=b.replace(/<(article|header)[^>]+>/g,"
");b=b.replace(/<\/(article|header)>/g,"
");b=b.replace(/<(div|p)([^>]+)?><(div|p)([^>]+)?>/g,"

");b=b.replace(/<\/(div|p)><\/(div|p)>/g,"

");b=b.replace(/<(?:div|p|span)[^>]+>/gi,function(d){return d.replace(/ class="[^"]+"/,"")});b=b.replace(/<\/?wbr[^>]*>/g,"");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:b});return b},_pasteCallback:function(b){b=b.replace(/\[size=(\d+)\]/g,'

');b=b.replace(/\[\/size\]/g,"

");b=b.replace(/style="([^"]+)"/,function(c,e){var d=e.split(";");var g=[];for(var i=0,f=d.length;i]+)>/g,function(c,d){c=c.replace(/data-mozilla-paste-image="0"/,'data-mozilla-paste-image="0" style="display:none"');return c});return b},insertAttachment:function(f,d){f=parseInt(f);var b=this.wutil.getOption("woltlab.attachment"+(!d?"Thumbnail":"")+"Url");var e=this.wbbcode._getImageAttachments();if(b&&e[f]!==undefined){var c="";if(d){c=' style="width: '+e[f].width+"px; max-height: "+e[f].height+"px; max-width: "+e[f].width+'px;"'}this.wutil.insertDynamic('","[attach="+f+(d?",none,"+e[f].width:"")+"][/attach]")}else{this.wutil.insertDynamic("[attach="+f+"][/attach]")}},removeAttachment:function(b){if(!this.opts.visual){return}this.$editor.find("img.redactorEmbeddedAttachment").each(function(c,e){var d=$(e);if(d.data("attachmentID")==b){d.remove()}})},_getImageAttachments:function(){var c=this.wutil.getOption("woltlab.attachmentImages")||[];if(c.length){delete this.opts.attachmentImages;return c}var b={imageAttachments:{}};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$textarea.wcfIdentify(),b);return b.imageAttachments},_keydownCallback:function(x){switch(x.event.which){case $.ui.keyCode.BACKSPACE:case $.ui.keyCode.DELETE:case $.ui.keyCode.DOWN:case $.ui.keyCode.ENTER:case $.ui.keyCode.UP:case 83:break;default:return;break}this.selection.get();var p=this.selection.getCurrent();var n=this.selection.getParent();n=(n)?$(n):n;var j=(n)?n.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(x.event.which){case $.ui.keyCode.BACKSPACE:if(this.wutil.isCaret()){var h=false;if(j.length){var k=true;for(var b=0;b0){continue}if(c.children.length>1||c.children[0].tagName==="BR"){continue}c=c.children[0];while(c.children.length===1){c=c.children[0]}if(c.children.length===0&&c.tagName==="BR"){var e=c.parentNode;var b=document.createTextNode("\u200b");e.appendChild(b);e.removeChild(c)}}break}},observeQuotes:function(){this.$editor.find(".redactorQuoteEdit").off("click.wbbcode").on("click.wbbcode",$.proxy(this.wbbcode._observeQuotesClick,this))},_observeQuotesClick:function(e){var c=$(e.currentTarget).closest("header");var d=$('');$(''+WCF.Language.get("wcf.bbcode.quote.edit")+"").click($.proxy(function(f){f.preventDefault();this.wbbcode._openQuoteEditOverlay($(e.currentTarget).closest("blockquote.quoteBox"),false);$(".redactor-link-tooltip").remove()},this)).appendTo(d);var b=c.offset();d.css({left:b.left+"px",top:(b.top+20)+"px"});$(".redactor-link-tooltip").remove();d.appendTo(document.body);this.selection.remove()},observeCodeListings:function(){this.$editor.find(".codeBox").each((function(b,e){var c=$(e);var d=c.find(".redactorEditCodeBox");if(!d.length){d=$('
'+WCF.Language.get("wcf.bbcode.code.edit")+"
").insertAfter(c.find("> div > div > h3"))}d.off("click.wbbcode").on("click.wbbcode",(function(){this.wbbcode._handleInsertCode(c,false)}).bind(this))}).bind(this))},_openQuoteEditOverlay:function(b,d){this.modal.load("quote",WCF.Language.get("wcf.bbcode.quote."+(d?"insert":"edit")),400);var c=this.modal.createActionButton(this.lang.get("save"));if(d){this.selection.save();c.click($.proxy(function(){var g=$("#redactorQuoteAuthor").val();var f=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.selection.restore();a=true;var e=this.selection.getHtml();if(this.utils.isEmpty(e)){e=""}var h=this.wbbcode.insertQuoteBBCode(g,f,e);if(h!==null){if(!e.length){if($.browser.mozilla){h.children("br[type=_moz]").replaceWith("
"+this.opts.invisibleSpace+"
")}this.caret.setStart(h.children("div")[0])}}this.modal.close()},this))}else{$("#redactorQuoteAuthor").val(b.data("author"));$("#redactorQuoteLink").val(WCF.String.unescapeHTML(b.attr("cite")));c.click($.proxy(function(){var e=$("#redactorQuoteAuthor").val();b.data("author",e);b.attr("data-author",e);b.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val()));this.wbbcode._updateQuoteHeader(b);this.modal.close()},this))}this.modal.show()},_updateQuoteHeader:function(c){var d=c.data("author");var b=c.attr("cite");if(b){b=WCF.String.escapeHTML(b)}c.find("> header > h3").empty().append(this.wbbcode._buildQuoteHeader(d,b))},insertQuoteBBCode:function(g,l,i,j){var k="[quote]";var c="[/quote]";if(g){if(l){k="[quote='"+g+"','"+l+"']"}else{k="[quote='"+g+"']"}}var p=null;if(this.wutil.inWysiwygMode()){var o=WCF.getUUID();var e="";if(j){e=this.wbbcode.convertToHtml(k+j+c)}else{e=this.wbbcode.convertToHtml(k+o+c);e=e.replace(o,i.replace(/^

/,"").replace(/<\/p>$/,""))}e=e.replace(/^

/,"").replace(/<\/p>$/,"");e=e.replace(/

div");if(n.length==1){if(n[0].innerHTML===""){n[0].innerHTML=this.opts.invisibleSpace}}else{if($.browser.mozilla){var m=p.find("> div > br[type=_moz]");if(m.length){$("
"+this.opts.invisibleSpace+"
").insertBefore(m);m.remove()}}}p.removeAttr("id");this.wutil.setCaretAfter(p[0]);var d=p[0].previousElementSibling;if(d!==null&&d.nodeName==="P"&&d.innerHTML==="\u200B"){d=d.previousElementSibling;if(d!==null&&d.nodeName==="P"&&(d.innerHTML==="\u200B"||d.innerHTML==="
")){d.parentNode.removeChild(d.nextElementSibling)}}}this.wbbcode.observeQuotes();this.wbbcode.fixBlockLevelElements();this.$toolbar.find("a.re-__wcf_quote").removeClass("redactor-button-disabled")}else{this.wutil.insertAtCaret(k+j+c)}this.wutil.saveSelection();return p},_buildQuoteHeader:function(c,d){var b="";if(!c&&d){c=d;d=""}if(c){if(d){b+=''}b+=WCF.Language.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:WCF.String.unescapeHTML(c)});if(d){b+=""}}else{b=""+WCF.Language.get("wcf.bbcode.quote.title.clickToSet")+""}return b},_handleInsertQuote:function(){this.wbbcode._openQuoteEditOverlay(null,true)},_handleInsertCode:function(d,f){this.modal.load("code",WCF.Language.get("wcf.bbcode.code."+(f?"insert":"edit")),400);var b=this.modal.createActionButton(this.lang.get("save")).addClass("buttonPrimary");if(f){this.selection.get();var c=this.selection.getText();this.selection.save();this.modal.show();var j=$("#redactorCodeBox").focus();j.val(c);b.click($.proxy(function(){var q=$("#redactorCodeBox");var n=$("#redactorCodeFilename");var s=$("#redactorCodeHighlighter");var t=$("#redactorCodeLineNumber");var p=q.val().replace(/^\n+/,"").replace(/\n+$/,"");if($.trim(p).length===0){if(!q.next("small.innerError").length){$(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(q)}return}var o=$.trim(n.val().replace(/['"]/g,""));var r="[code="+s.val()+","+t.val()+(o.length?",'"+o+"'":"")+"]";if(r.match(/\[code=([^,]+),(\d+)\]/)){r="[code="+RegExp.$2+","+RegExp.$1+"]"}r+=p;r+="[/code]";this.wutil.adjustSelectionForBlockElement();this.wutil.saveSelection();var m=this.wbbcode.convertToHtml(r);this.buffer.set();this.insert.html(m,false);var q=this.$editor.find(".codeBox:not(.jsRedactorCodeBox)");this.wbbcode.observeCodeListings();this.wbbcode.fixBlockLevelElements();q.attr("contenteditable","false");this.wutil.setCaretAfter(q[0]);this.modal.close()},this))}else{var h=this.modal.createActionButton(WCF.Language.get("wcf.global.button.delete"));h.click((function(){this.buffer.set();d.remove();this.modal.close()}).bind(this));this.modal.show();var j=$("#redactorCodeBox").focus();var i=$("#redactorCodeFilename");var g=$("#redactorCodeHighlighter");var k=$("#redactorCodeLineNumber");g.val(d.data("highlighter"));i.val(d.data("filename")||"");var e=d.find("> div > ol");k.val(parseInt(e.prop("start")));var l="";e.children("li").each(function(m,n){l+=$(n).text().replace(/^\u200b$/,"")+"\n"});j.val(l.replace(/^\n+/,"").replace(/\n+$/,""));b.click($.proxy(function(){var n=j.val().replace(/^\n+/,"").replace(/\n+$/,"");if($.trim(n).length===0){if(!j.next("small.innerError").length){$(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(j)}return}var r=g.val();d.data("highlighter",r);d.attr("data-highlighter",r);var o=__REDACTOR_CODE_HIGHLIGHTERS[r];var m=$.trim(i.val().replace(/['"]/g,""));if(m){o+=": "+WCF.String.escapeHTML(m);d.data("filename",m);d.attr("data-filename",m)}else{d.removeAttr("data-filename");d.removeData("filename")}d.data("highlighter",g.val());d.find("> div > div > h3").html(o);var p=d.find("> div > ol").empty();var s=parseInt(k.val());p.prop("start",(s>1?s:1));n=n.split("\n");var q="";for(var t=0;t"+WCF.String.escapeHTML(n[t])+""}p.append($(q));this.modal.close()},this))}},fixBlockLevelElements:function(){var b=(function(e,c){var d=e[c];if(d&&d.nodeType===Node.ELEMENT_NODE&&d.tagName==="P"){if(!d.innerHTML.length){d.parentElement.removeChild(d)}}}).bind(this);this.$editor.find("blockquote, .codeBox").each(function(){b(this,"previousElementSibling");b(this,"nextElementSibling")})},fixFormatting:function(d){var b=function(f){f.style.removeProperty("text-align");for(var g=0;g").append(e).insertAfter(this.button.get(d).parent());if(a!==null){this.button.setAwesome(b,a)}},_addBBCodeButton:function(b){var c="__wcf_"+b.name;var a=this.button.add(c,b.label);this.button.addCallback(a,this.wbutton._insertBBCode);this._bbcodes[c]={name:b.name,voidElement:(b.voidElement===true)};if(b.icon.match(/^fa\-[a-z\-]+$/)){this.button.setAwesome(c,b.icon)}else{a.css("background-image","url("+__REDACTOR_ICON_PATH+b.icon+")")}},_insertBBCode:function(a){var d=this._bbcodes[a].name;var b={buttonName:a,cancel:false,redactor:this};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+d+"_"+this.$textarea.wcfIdentify(),b);if(b.cancel===false){var c=this.selection.getHtml();c=c.replace(/

@@@wcf_empty_line@@@<\/p>/g,"


");if(false&&d==="tt"){var e=(this.selection.getParent())?$(this.selection.getParent()):null;if(e&&e.closest("inline.inlineCode",this.$editor.get()[0]).length){this.inline.toggleClass("inlineCode")}else{this.inline.toggleClass("inlineCode")}}else{this.buffer.set();if(this.utils.browser("mozilla")&&!c.length){var f=getSelection().getRangeAt(0).startContainer;if(f.nodeType===Node.ELEMENT_NODE&&f.tagName==="P"&&f.innerHTML==="
"){f.removeChild(f.children[0])}}if(this._bbcodes[a].voidElement){this.insert.html(c+this.selection.getMarkerAsHtml()+"["+d+"]",false)}else{this.insert.html("["+d+"]"+c+this.selection.getMarkerAsHtml()+"[/"+d+"]",false)}this.selection.restore()}}},insertImage:function(){this.image.show()},_insertImage:function(){var d=$("#redactor-image-link-source");var b=d.val().trim();if(b.length){this.buffer.set();var c=$("#redactor-image-align").val();var a="";if(c==="left"||c==="right"){a=' style="float: '+c+'"'}this.insert.html('",false);this.modal.close();this.observe.images()}else{if(!d.next("small.innerError")){$(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(d)}}}}}; +if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbutton=function(){return{_bbcodes:{},init:function(){this._bbcodes={};for(var i=0,f=__REDACTOR_BUTTONS.length;i").append(e).insertAfter(this.button.get(d).parent());if(a!==null){this.button.setAwesome(b,a)}},_addBBCodeButton:function(b){var c="__wcf_"+b.name;var a=this.button.add(c,b.label);this.button.addCallback(a,this.wbutton._insertBBCode);this._bbcodes[c]={name:b.name,voidElement:(b.voidElement===true)};if(b.icon.match(/^fa\-[a-z\-]+$/)){this.button.setAwesome(c,b.icon)}else{a.css("background-image","url("+__REDACTOR_ICON_PATH+b.icon+")")}},_insertBBCode:function(a){var d=this._bbcodes[a].name;var b={buttonName:a,cancel:false,redactor:this};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+d+"_"+this.$textarea.wcfIdentify(),b);if(b.cancel===false){var c=this.selection.getHtml();c=c.replace(/

@@@wcf_empty_line@@@<\/p>/g,"


");if(false&&d==="tt"){var e=(this.selection.getParent())?$(this.selection.getParent()):null;if(e&&e.closest("inline.inlineCode",this.$editor.get()[0]).length){this.inline.toggleClass("inlineCode")}else{this.inline.toggleClass("inlineCode")}}else{this.buffer.set();if(this.utils.browser("mozilla")&&!c.length){var f=getSelection().getRangeAt(0).startContainer;if(f.nodeType===Node.ELEMENT_NODE&&f.tagName==="P"&&f.innerHTML==="
"){f.removeChild(f.children[0])}}if(this._bbcodes[a].voidElement){this.insert.html(c+this.selection.getMarkerAsHtml()+"["+d+"]",false)}else{this.insert.html("["+d+"]"+c+this.selection.getMarkerAsHtml()+"[/"+d+"]",false)}this.selection.restore()}}},insertImage:function(){this.image.show()},_insertImage:function(){var d=$("#redactor-image-link-source");var b=d.val().trim();if(b.length){this.buffer.set();var c=$("#redactor-image-align").val();var a="";if(c==="left"||c==="right"){a=' style="float: '+c+'"'}this.insert.html('",false);this.modal.close();this.observe.images()}else{if(!d.next("small.innerError")){$(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(d)}}}}}; // wfontcolor.js if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontcolor=function(){return{init:function(){var a=this.button.addDropdown(this.button.get("fontcolor"));this.wfontcolor._createDropdown(a)},_createDropdown:function(h){var b=["#000000","#800000","#8B4513","#2F4F4F","#008080","#000080","#4B0082","#696969","#B22222","#A52A2A","#DAA520","#006400","#40E0D0","#0000CD","#800080","#808080","#FF0000","#FF8C00","#FFD700","#008000","#00FFFF","#0000FF","#EE82EE","#A9A9A9","#FFA07A","#FFA500","#FFFF00","#00FF00","#AFEEEE","#ADD8E6","#DDA0DD","#D3D3D3","#FFF0F5","#FAEBD7","#FFFFE0","#F0FFF0","#F0FFFF","#F0F8FF","#E6E6FA","#FFFFFF"];var e=$('
  • ');for(var g=0,d=b.length;g').data("color",f).css("background-color",f);e.append(c);c.click($.proxy(this.wfontcolor._onColorPick,this))}var a=$('').html(this.lang.get("none")).data("color","none");a.click($.proxy(this.wfontcolor._onColorPick,this));e.appendTo(h);$('
  • ")},_onColorPick:function(a){a.preventDefault();var b=$(a.currentTarget).data("color");if(b==="none"){this.inline.removeStyleRule("color")}else{this.inline.format("span","style","color: "+b+";")}}}}; // wfontfamily.js