From eac12cf2db18156e1555257e4ef90e8a082b3a20 Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Thu, 15 Jan 2015 15:41:47 +0100 Subject: [PATCH] Updating minified JavaScript files --- .../install/files/js/3rdParty/redactor/plugins/wcombined.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 58dbc2bab2..a5ea9a91fd 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(){return{init:function(){var d=this.$textarea.wcfIdentify();this.opts.initCallback=(function(){if($.browser.msie){this.$editor.addClass("msie")}var h=$.trim(this.wutil.getOption("woltlab.originalValue"));if(h.length){this.wutil.replaceText(h);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 c=this.clean.onSync;this.clean.onSync=function(h){h=h.replace(/

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

@@@wcf_empty_line@@@

");return c.call(self,h)};if(this.wutil.getOption("woltlab.autosaveOnce")){this.wutil.saveTextToStorage();delete this.opts.woltlab.autosaveOnce}var b=this.button.get("table");if(b.length){var g=b.data("dropdown");g.find(".redactor-dropdown-add_head").parent().remove();g.find(".redactor-dropdown-delete_head").parent().remove();$('"}return'

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

    '+R+"
"});F=F.replace(w,h)}}F=F.replace(/

<(blockquote|div)/g,"<$1");F=F.replace(/<\/(blockquote|div)><\/p>/g,"");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:F});return F},_pasteBeforeCallback:function(a){var b={1:24,2:22,3:18,4:14,5:12,6:10};a=a.replace(/]*)>/g,function(f,i,h){if(h&&h.match(/style="([^"]+?)"/)){if(/font-size: ?(\d+|\d+\.\d+)(px|pt|em|rem|%)/.test(RegExp.$1)){var c=$('

').appendTo(document.body);var e=parseInt(c[0].clientWidth);c.remove();var d=-1;var g=false;$.each(b,function(l,j){if(d===-1){d=l}else{if(Math.abs(e-j)/g,"[/size]");a=a.replace(/<(article|header)[^>]+>/g,"
");a=a.replace(/<\/(article|header)>/g,"
");a=a.replace(/<(div|p)([^>]+)?><(div|p)([^>]+)?>/g,"

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

");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:a});return a},_pasteCallback:function(a){console.debug(a);a=a.replace(/\[size=(\d+)\]/g,'

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

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

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

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

div");if(j.length==1){if(j[0].innerHTML===""){j[0].innerHTML=this.opts.invisibleSpace}}else{if($.browser.mozilla){var i=l.find("> div > br[type=_moz]");if(i.length){$("
"+this.opts.invisibleSpace+"
").insertBefore(i);i.remove()}}}l.removeAttr("id");this.wutil.setCaretAfter(l[0])}this.wbbcode.observeQuotes();this.wbbcode.fixBlockLevelElements();this.$toolbar.find("a.re-__wcf_quote").removeClass("redactor-button-disabled")}else{this.wutil.insertAtCaret(g+e+a)}this.wutil.saveSelection();return l},_buildQuoteHeader:function(b,c){var a="";if(!b&&c){b=c;c=""}if(b){if(c){a+=''}a+=WCF.Language.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:WCF.String.unescapeHTML(b)});if(c){a+=""}}else{a=""+WCF.Language.get("wcf.bbcode.quote.title.clickToSet")+""}return a},_handleInsertQuote:function(){this.wbbcode._openQuoteEditOverlay(null,true)},_handleInsertCode:function(c,e){this.modal.load("code",WCF.Language.get("wcf.bbcode.code."+(e?"insert":"edit")),400);var a=this.modal.createActionButton(this.lang.get("save")).addClass("buttonPrimary");if(e){this.selection.get();var b=this.selection.getText();this.selection.save();this.modal.show();var i=$("#redactorCodeBox").focus();i.val(b);a.click($.proxy(function(){var p=$("#redactorCodeBox");var m=$("#redactorCodeFilename");var r=$("#redactorCodeHighlighter");var s=$("#redactorCodeLineNumber");var o=p.val().replace(/^\n+/,"").replace(/\n+$/,"");if($.trim(o).length===0){if(!p.next("small.innerError").length){$(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(p)}return}var n=$.trim(m.val().replace(/['"]/g,""));var q="[code="+r.val()+","+s.val()+(n.length?",'"+n+"'":"")+"]";q+=o;q+="[/code]";this.wutil.adjustSelectionForBlockElement();this.wutil.saveSelection();var l=this.wbbcode.convertToHtml(q);this.buffer.set();this.insert.html(l,false);var p=this.$editor.find(".codeBox:not(.jsRedactorCodeBox)");this.wbbcode.observeCodeListings();this.wbbcode.fixBlockLevelElements();p.attr("contenteditable","false");this.caret.setAfter(p);this.modal.close()},this))}else{var g=this.modal.createActionButton(WCF.Language.get("wcf.global.button.delete"));g.click((function(){this.buffer.set();c.remove();this.modal.close()}).bind(this));this.modal.show();var i=$("#redactorCodeBox").focus();var h=$("#redactorCodeFilename");var f=$("#redactorCodeHighlighter");var j=$("#redactorCodeLineNumber");f.val(c.data("highlighter"));h.val(c.data("filename")||"");var d=c.find("> div > ol");j.val(parseInt(d.prop("start")));var k="";d.children("li").each(function(l,m){k+=$(m).text()+"\n"});i.val(k.replace(/^\n+/,"").replace(/\n+$/,""));a.click($.proxy(function(){var m=i.val().replace(/^\n+/,"").replace(/\n+$/,"");if($.trim(m).length===0){if(!i.next("small.innerError").length){$(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(i)}return}var q=f.val();c.data("highlighter",q);c.attr("data-highlighter",q);var n=__REDACTOR_CODE_HIGHLIGHTERS[q];var l=$.trim(h.val().replace(/['"]/g,""));if(l){n+=": "+WCF.String.escapeHTML(l);c.data("filename",l);c.attr("data-filename",l)}else{c.removeAttr("data-filename");c.removeData("filename")}c.data("highlighter",f.val());c.find("> div > div > h3").html(n);var o=c.find("> div > ol").empty();var r=parseInt(j.val());o.prop("start",(r>1?r:1));m=m.split("\n");var p="";for(var s=0;s"+WCF.String.escapeHTML(m[s])+""}o.append($(p));this.modal.close()},this))}},fixBlockLevelElements:function(){var a=(function(d,c){var b="P";if(d.parentElement.tagName==="DIV"&&d.parentElement!==this.$editor[0]){d=d.parentElement;b="DIV"}if(d[c]===null||d[c].tagName!==b){$("<"+b+">"+this.opts.invisibleSpace+"")[(c==="previousElementSibling"?"insertBefore":"insertAfter")](d)}else{if(d.previousElementSibling.tagName===b){if(!d[c].innerHTML.length||d[c].innerHTML.toLowerCase()==="

"){$(d[c]).html(this.opts.invisibleSpace)}}}}).bind(this);this.$editor.find("blockquote, .codeBox").each((function(b,c){a(c,"previousElementSibling");a(c,"nextElementSibling")}).bind(this))},fixFormatting:function(c){var a=function(e){e.style.removeProperty("text-align");for(var f=0;f").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};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+d+"_"+this.$textarea.wcfIdentify(),b);if(b.cancel===false){var c=this.selection.getHtml();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 h=0,e=__REDACTOR_BUTTONS.length;h").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();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 -- 2.20.1