From: woltlab.com Date: Fri, 12 Sep 2014 18:11:50 +0000 (+0200) Subject: Updating minified JavaScript files X-Git-Tag: 2.1.0_Alpha_1~344^2~17 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=567a5586bd3c39a1681b5496e8e299042d22a6bf;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 9b21b46cbc..faaa7c6190 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js @@ -1,5 +1,5 @@ // wbbcode.js -if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode={init:function(){var c=this.$source.wcfIdentify();this.opts.initCallback=$.proxy(function(){var f=$.trim(this.getOption("wOriginalValue"));if(f.length){this.toggle();this.$source.val(f);this.toggle()}delete this.opts.wOriginalValue},this);this.opts.pasteBeforeCallback=$.proxy(this._wPasteBeforeCallback,this);this.opts.pasteAfterCallback=$.proxy(this._wPasteAfterCallback,this);var e=this.syncClean;var b=this;this.syncClean=function(f){f=f.replace(/

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

@@@wcf_empty_line@@@

");return e.call(b,f)};if(this.getOption("wAutosaveOnce")){this._saveTextToStorage();delete this.opts.wAutosaveOnce}var a=this.buttonGet("table");if(a.length){var d=a.data("dropdown").children("a.redactor_dropdown_add_head");d.prev().remove();d.next().remove();d.remove();a.click($.proxy(this._tableButtonClick,this))}WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_quote_"+c,$.proxy(function(f){f.cancel=true;this._handleInsertQuote()},this));WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+c,$.proxy(this._wKeydownCallback,this))},_tableButtonClick:function(b){var c=$(b.currentTarget);if(!c.hasClass("dropact")){return}var a=this.getBlock()||this.getCurrent();var d=c.data("dropdown");d.children("li").show();var e=d.find("> li > .redactor_dropdown_insert_table").parent();if(a.tagName=="TD"){e.hide().next().hide()}else{e.nextAll().hide()}},insertSmiley:function(a,b,c){if(c){this.registerSmiley(a,b)}if(this.opts.visual){this.bufferSet();this.$editor.focus();this.insertHtml(' '+a+' ');if(this.opts.air){this.$air.fadeOut(100)}this.sync()}else{this.insertAtCaret(" "+a+" ")}},registerSmiley:function(a,b){if(__REDACTOR_SMILIES[a]){return false}__REDACTOR_SMILIES[a]=b;return true},toggle:function(a){if(this.opts.visual){this.sync(undefined,true);this.toggleCode(a);this._convertFromHtml();this.buttonGet("html").children("i").removeClass("fa-square-o").addClass("fa-square")}else{this._convertToHtml();this.toggleVisual();this._observeQuotes();this.buttonGet("html").children("i").removeClass("fa-square").addClass("fa-square-o")}},_convertFromHtml:function(){var m=this.$source.val();WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertFromHtml",{html:m});m=m.replace(/™/gi,"\u2122");m=m.replace(/©/gi,"\u00a9");m=m.replace(/…/gi,"\u2026");m=m.replace(/—/gi,"\u2014");m=m.replace(/‐/gi,"\u2010");m=m.replace(/\r?\n/g,"");var f=m.split(/(<\/?(?:div|p)>)/);var g="";var x="";for(var a=0;a"||y=="
"){continue}else{if(y=="

"||y=="
"){x=$.trim(x);if(x!="@@@wcf_empty_line@@@"){x+="\n"}g+=x;x=""}else{if(a==0||a+1==f.length){g+=y}else{x+=y}}}}if(x){g+=x;x=""}m=g;m=m.replace(/@@@wcf_empty_line@@@/g,"\n");m=m.replace(/\n\n$/,"\n");m=m.replace(/
$/,"");m=m.replace(/
/g,"\n");m=m.replace(/
/g,"");m=m.replace(/ /gi," ");m=m.replace(/
\n?]+>\n?
[\s\S]*?<\/header>/gi,function(z,B,A,C){var D;if(B){D="[quote='"+A+"','"+B+"']"}else{if(A){D="[quote='"+A+"']"}else{D="[quote]"}}return D});m=m.replace(/(?:\n*)<\/blockquote>/gi,"[/quote]\n");m=m.replace(/]*?href=(["'])mailto:(.+?)\1.*?>([\s\S]+?)<\/a>/gi,"[email=$2]$3[/email]");m=m.replace(/]*?href=(["'])(.+?)\1.*?>([\s\S]+?)<\/a>/gi,function(B,z,A,C){if(A==C){return"[url]"+A+"[/url]"}return"[url='"+A+"']"+C+"[/url]"});m=m.replace(/<(?:b|strong)>/gi,"[b]");m=m.replace(/<\/(?:b|strong)>/gi,"[/b]");m=m.replace(/<(?:i|em)>/gi,"[i]");m=m.replace(/<\/(?:i|em)>/gi,"[/i]");m=m.replace(//gi,"[u]");m=m.replace(/<\/u>/gi,"[/u]");m=m.replace(/<(?:s(trike)?|del)>/gi,"[s]");m=m.replace(/<\/(?:s(trike)?|del)>/gi,"[/s]");m=m.replace(//gi,"[sub]");m=m.replace(/<\/sub>/gi,"[/sub]");m=m.replace(//gi,"[sup]");m=m.replace(/<\/sup>/gi,"[/sup]");m=m.replace(/]*?alt="([^"]+?)" class="smiley".*?> ?/gi,"$1 ");m=m.replace(/]*?class="smiley" alt="([^"]+?)".*?> ?/gi,"$1 ");m=m.replace(/]*?class="redactorEmbeddedAttachment" data-attachment-id="(\d+)".*?>/gi,"[attach=$1][/attach]");m=m.replace(/]*?src=(["'])([^"']+?)\1 style="float: (left|right)[^"]*".*?>/gi,"[img='$2',$3][/img]");m=m.replace(/]*?src=(["'])([^"']+?)\1.*?>/gi,"[img]$2[/img]");var d=m.split(/(<\/?span[^>]*>)/);var x=[];var p=[];var q="";for(var a=0;a"){var c=p.pop();var g=c.start+x.pop()+c.end;if(x.length){x[x.length-1]+=g}else{q+=g}}else{if(h.match(/^/)){var k=RegExp.$1;var v;var n;if(k.match(/^color: ?rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\);?$/i)){var u=RegExp.$1;var b=RegExp.$2;var e=RegExp.$3;var s=("0123456789ABCDEF".charAt((u-u%16)/16)+""+"0123456789ABCDEF".charAt(u%16))+""+("0123456789ABCDEF".charAt((b-b%16)/16)+""+"0123456789ABCDEF".charAt(b%16))+""+("0123456789ABCDEF".charAt((e-e%16)/16)+""+"0123456789ABCDEF".charAt(e%16));v="[color=#"+s+"]";n="[/color]"}else{if(k.match(/^color: ?(.*?);?$/i)){v="[color="+RegExp.$1+"]";n="[/color]"}else{if(k.match(/^font-size: ?(\d+)pt;?$/i)){v="[size="+RegExp.$1+"]";n="[/size]"}else{if(k.match(/^font-family: ?(.*?);?$/)){v="[font="+RegExp.$1.replace(/'/g,"")+"]";n="[/font]"}else{v='';n=""}}}}x[x.length]="";p[x.length]={start:v,end:n}}else{if(h.match(/^/)){x[x.length]="";p[x.length]={start:"[tt]",end:"[/tt]"}}else{if(x.length){x[x.length-1]+=h}else{q+=h}}}}}m=q;m=m.replace(/<(div|p) style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)\n/gi,function(A,z,C,B){return"[align="+C+"]"+$.trim(B)+"[/align]"});m=m.replace(/
  • /gi,"[*]");m=m.replace(/<\/li>/gi,"");m=m.replace(/
      /gi,"[list]");m=m.replace(/<(ol|ul style="list-style-type: decimal")>/gi,"[list=1]");m=m.replace(/
        /gi,"[list=$1]");m=m.replace(/<\/(ul|ol)>/gi,"[/list]");m=m.replace(/]*>/gi,"[table]\n");m=m.replace(/<\/table>/gi,"[/table]\n");m=m.replace(/([\s\S]*?)<\/tbody>/,function(z,A){return $.trim(A)});m=m.replace(/<\/tr>/gi,"");m=m.replace(//gi,"[tr]\n");m=m.replace(/<\/tr>/gi,"[/tr]\n");m=m.replace(/([\s\S]*?)<\/td>/gi,"[td][align=$1]$2[/align][/td]");m=m.replace(/(\t)*(\t)*/gi,"[td]");m=m.replace(/(\t)*<\/td>/gi,"[/td]\n");var w={};m.replace(/<\/span>/,function(z){var A=z.hashCode();w[A]=z.replace(/\$/g,"$$$$");return"@@"+A+"@@"});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","convertFromHtml",{html:m});m=m.replace(/<[^>]+>/g,"");if($.getLength(w)){for(var j in w){var t=new RegExp("@@"+j+"@@","g");data=data.replace(t,w[j])}}m=m.replace(/</g,"<");m=m.replace(/>/g,">");m=m.replace(/&/g,"&");m=m.replace(/%28/g,"(");m=m.replace(/%29/g,")");var r={};for(var a=0,i=__REDACTOR_SOURCE_BBCODES.length;a/g,">");var m={};for(var a=0,f=__REDACTOR_SOURCE_BBCODES.length;a$1');q=q.replace(/\[url\='([^'"]+)'](.+?)\[\/url]/gi,'$2');q=q.replace(/\[url\=([^'"\]]+)](.+?)\[\/url]/gi,'$2');q=q.replace(/\[email\]([^"]+?)\[\/email]/gi,'$1');q=q.replace(/\[email\=([^"\]]+)](.+?)\[\/email]/gi,'$2');q=q.replace(/\[b\](.*?)\[\/b]/gi,"$1");q=q.replace(/\[i\](.*?)\[\/i]/gi,"$1");q=q.replace(/\[u\](.*?)\[\/u]/gi,"$1");q=q.replace(/\[s\](.*?)\[\/s]/gi,"$1");q=q.replace(/\[sub\](.*?)\[\/sub]/gi,"$1");q=q.replace(/\[sup\](.*?)\[\/sup]/gi,"$1");q=q.replace(/\[img\]([^"]+?)\[\/img\]/gi,'');q=q.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi,'');q=q.replace(/\[img='?([^"]*?)'?\]\[\/img\]/gi,'');q=q.replace(/\[size=(\d+)\](.*?)\[\/size\]/gi,'$2');q=q.replace(/\[color=([#a-z0-9]*?)\](.*?)\[\/color\]/gi,'$2');q=q.replace(/\[font='?([a-z,\- ]*?)'?\](.*?)\[\/font\]/gi,'$2');q=q.replace(/\[align=(left|right|center|justify)\](.*?)\[\/align\]/gi,'
        $2
        ');q=q.replace(/\[\*\](.*?)(?=\[\*\]|\[\/list\])/gi,"
      • $1
      • ");q=q.replace(/\[list\]/gi,"
          ");q=q.replace(/\[list=1\]/gi,'
            ');q=q.replace(/\[list=a\]/gi,'
              ');q=q.replace(/\[list=(none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)\]/gi,'
                ');q=q.replace(/\[\/list]/gi,"
              ");q=q.replace(/\[table\]([\S\s]*?)\[\/table\]/gi,function(s,t){return"[table]"+$.trim(t)+"[/table]"});q=q.replace(/\[table\]/gi,'');q=q.replace(/\[\/table\]/gi,"
              ");q=q.replace(/\[tr\]/gi,"");q=q.replace(/\[\/tr\]/gi,"");q=q.replace(/\[td\]/gi,"");q=q.replace(/\[\/td\]/gi,"");q=q.replace(/([\S\s]*?)<\/td>/gi,function(s,u){var t=$.trim(u);if(!t.length){t="​"}return""+t+""});var b=this.getOption("wAttachmentUrl");if(b){var c=this._getImageAttachmentIDs();q=q.replace(/\[attach=(\d+)\]\[\/attach\]/g,function(s,t){t=parseInt(t);if(WCF.inArray(t,c)){return''}return s})}for(var n in __REDACTOR_SMILIES){$smileyCode=n.replace(//g,">");var e=new RegExp("(\\s|>|^)"+WCF.String.escapeRegExp($smileyCode)+"(?=\\s|<|$)","gi");q=q.replace(e,'$1'+$smileyCode+'')}q=q.replace(/(javascript):/gi,"$1:");q=q.replace(/(\r|\r\n)/g,"\n");var p={};q=q.replace(/\[quote.*?\][\S\s]*?\[\/quote\]/gi,function(s){var t=s.hashCode();p[t]=s.replace(/\$/g,"$$$$");return"@@"+t+"@@"});q=q.replace(/(\[quote.*?\])/gi,"$1\n");q=q.replace(/(\[\/quote\])/gi,"\n$1");q=q.replace(/\n*$/,"");var d=q.split("\n");q="";for(var a=0,f=d.length;a$/)||l.match(/]+>.*?<\/span>$/)){q+="
              "}}else{if(!l){l="
              "}q+="

              "+l+"

              "}}if($.getLength(m)){for(var g in m){var o=new RegExp("@@"+g+"@@","g");q=q.replace(o,m[g])}q=q.replace(/\[tt\](.*?)\[\/tt\]/gi,'$1')}q=q.replace(/\[code\][\S\s]*?\[\/code\]/,"
              $&
              ");if($.getLength(p)){var r=function(s){return s.replace(/^['"]/,"").replace(/['"]$/,"")};var j=this;var i=function(s){return s.replace(/\[quote([^\]]+)?\]([\S\s]*)\[\/quote\]?/gi,$.proxy(function(v,u,x){var A="";var w="";if(u){u=u.substr(1);u=u.split(",");switch(u.length){case 1:A=u[0];break;case 2:A=u[0];w=u[1];break}A=WCF.String.escapeHTML(r($.trim(A)));w=WCF.String.escapeHTML(r($.trim(w)))}var B='

              '+j._buildQuoteHeader(A,w)+'

              ';x=$.trim(x);var t="";if(x.length){var z=x.split("\n");for(var y=0;y"+z[y]+"
              "}}else{t="
              "+j.opts.invisibleSpace+"
              "}B+=t;B+="
              ";return B},this))};for(var g in p){var o=new RegExp("@@"+g+"@@","g");q=q.replace(o,i(p[g]))}}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:q});this.$source.val(q)},_wPasteBeforeCallback:function(a){var b={1:24,2:22,3:18,4:14,5:12,6:10};a=a.replace(/]+>/g,function(c,d){return"[size="+b[d]+"]"});a=a.replace(/<\/h[1-6]>/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_break@@@");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:a});return a},_wPasteAfterCallback:function(a){a=a.replace(/

              ([\s\S]*?)<\/p>/g,"

              $1

              ");a=a.replace(/]*>/g,"");a=a.replace(/<\/header>/g,"");a=a.replace(/
              .*?<\/div>/g,"

              $1

              ");a=a.replace(/<\/?div>/g,"");a=a.replace(/@@@wcf_break@@@/g,"


              ");a=a.replace(/

              /g,"

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


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


              ");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});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterPaste",{html:a});return a},insertAttachment:function(d){d=parseInt(d);var b=this.getOption("wAttachmentUrl");var c="[attach="+d+"][/attach]";var a=this._getImageAttachmentIDs();if(b&&WCF.inArray(d,a)){this.insertDynamic('',c)}else{this.insertDynamic(c)}},_getImageAttachmentIDs:function(){var a=this.getOption("wAttachmentImageIDs")||[];if(a.length){delete this.opts.wAttachmentImageIDs;return a}var b={imageAttachmentIDs:[]};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$source.wcfIdentify(),b);return b.imageAttachmentIDs},_wKeydownCallback:function(d){if(d.event.which!==$.ui.keyCode.DOWN&&d.event.which!==$.ui.keyCode.UP){return}var b=$(this.getCurrent());var e=this.getParent();e=(e)?$(e):e;var g=(e)?e.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(d.event.which){case $.ui.keyCode.DOWN:if(e){if(g.length){var f=b.closest("div",g[0]);if(!f.next().length){this.insertingAfterLastElement(g);d.cancel=true}}else{if(e.next("blockquote.quoteBox").length){this.selectionStart(e.next().find("> div > div:first"));d.cancel=true}}}else{if(b.next("blockquote.quoteBox").length){this.selectionStart(b.next().find("> div > div:first"));d.cancel=true}}break;case $.ui.keyCode.UP:if(!e||!g.length){return}var f=b.closest("div",g[0]);if(f.prev("div").length){return}var c=g.prev();if(c.length===0){var a=$(this.opts.emptyHtml);a.insertBefore(g);this.selectionStart(a)}else{if(c[0].tagName==="BLOCKQUOTE"){this.selectionEnd(c.find("> div > div:last"))}else{if($.trim(c.html())==""){c.html(this.opts.invisibleSpace)}this.selectionEnd(c)}}d.cancel=true;break}},_observeQuotes:function(){this.$editor.find(".redactorQuoteEdit:not(.jsRedactorQuoteEdit)").addClass("jsRedactorQuoteEdit").click($.proxy(this._observeQuotesClick,this))},_observeQuotesClick:function(d){var b=$(d.currentTarget).closest("header");var c=$('');$(''+WCF.Language.get("wcf.bbcode.quote.edit")+"").click($.proxy(function(f){f.preventDefault();this._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)},_openQuoteEditOverlay:function(a,b){if(b){this.modalInit(WCF.Language.get("wcf.bbcode.quote.insert"),this.opts.modal_quote,300,$.proxy(function(){$("#redactorEditQuote").click($.proxy(function(){var d=$("#redactorQuoteAuthor").val();var c=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.insertQuoteBBCode(d,c);this.modalClose()},this))},this))}else{this.modalInit(WCF.Language.get("wcf.bbcode.quote.edit"),this.opts.modal_quote,300,$.proxy(function(){if(!b){$("#redactorQuoteAuthor").val(a.data("author"));$("#redactorQuoteLink").val(a.attr("cite"))}$("#redactorEditQuote").click($.proxy(function(){var c=$("#redactorQuoteAuthor").val();a.data("author",c);a.attr("data-author",c);a.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val()));this._updateQuoteHeader(a);this.modalClose()},this))},this))}},_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._buildQuoteHeader(c,a))},insertQuoteBBCode:function(d,f,c,b){if(this.inWysiwygMode()){var a='

              '+this._buildQuoteHeader(d,f)+'

              ';this.insertHtml(a);var h=$("#redactorInsertedQuote");var g=$("
              "+(c?c:this.opts.invisibleSpace)+"
              ").insertAfter(h.find("> div > header"));h.removeAttr("id");this.selectionStart(g[0]);this._observeQuotes();this.$toolbar.find("a.re-__wcf_quote").addClass("redactor_button_disabled")}else{var e="[quote]";if(d){if(f){e="[quote='"+d+"','"+f+"']"}else{e="[quote='"+d+"']"}}if(b){e+=b}e+="[/quote]";this.insertAtCaret(e)}},_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._openQuoteEditOverlay(null,true)}}; +if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode={wBlockTest:/^(BLOCKQUOTE|DIV)$/,init:function(){var c=this.$source.wcfIdentify();this.opts.initCallback=$.proxy(function(){var f=$.trim(this.getOption("wOriginalValue"));if(f.length){this.toggle();this.$source.val(f);this.toggle()}delete this.opts.wOriginalValue},this);this.opts.pasteBeforeCallback=$.proxy(this._wPasteBeforeCallback,this);this.opts.pasteAfterCallback=$.proxy(this._wPasteAfterCallback,this);var e=this.syncClean;var b=this;this.syncClean=function(f){f=f.replace(/

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

              @@@wcf_empty_line@@@

              ");return e.call(b,f)};if(this.getOption("wAutosaveOnce")){this._saveTextToStorage();delete this.opts.wAutosaveOnce}var a=this.buttonGet("table");if(a.length){var d=a.data("dropdown").children("a.redactor_dropdown_add_head");d.prev().remove();d.next().remove();d.remove();a.click($.proxy(this._tableButtonClick,this))}WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_quote_"+c,$.proxy(function(f){f.cancel=true;this._handleInsertQuote()},this));WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+c,$.proxy(this._wKeydownCallback,this))},_tableButtonClick:function(b){var c=$(b.currentTarget);if(!c.hasClass("dropact")){return}var a=this.getBlock()||this.getCurrent();var d=c.data("dropdown");d.children("li").show();var e=d.find("> li > .redactor_dropdown_insert_table").parent();if(a.tagName=="TD"){e.hide().next().hide()}else{e.nextAll().hide()}},insertSmiley:function(a,b,c){if(c){this.registerSmiley(a,b)}if(this.opts.visual){this.bufferSet();this.$editor.focus();this.insertHtml(' '+a+' ');if(this.opts.air){this.$air.fadeOut(100)}this.sync()}else{this.insertAtCaret(" "+a+" ")}},registerSmiley:function(a,b){if(__REDACTOR_SMILIES[a]){return false}__REDACTOR_SMILIES[a]=b;return true},toggle:function(a){if(this.opts.visual){this.sync(undefined,true);this.toggleCode(a);this._convertFromHtml();this.buttonGet("html").children("i").removeClass("fa-square-o").addClass("fa-square")}else{this._convertToHtml();this.toggleVisual();this.fixQuoteContent();this._observeQuotes();this.buttonGet("html").children("i").removeClass("fa-square").addClass("fa-square-o")}},_convertFromHtml:function(){var m=this.$source.val();WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertFromHtml",{html:m});m=m.replace(/™/gi,"\u2122");m=m.replace(/©/gi,"\u00a9");m=m.replace(/…/gi,"\u2026");m=m.replace(/—/gi,"\u2014");m=m.replace(/‐/gi,"\u2010");m=m.replace(/\r?\n/g,"");var f=m.split(/(<\/?(?:div|p)>)/);var g="";var x="";for(var a=0;a"||y=="
              "){continue}else{if(y=="

              "||y=="
              "){x=$.trim(x);if(x!="@@@wcf_empty_line@@@"){x+="\n"}g+=x;x=""}else{if(a==0||a+1==f.length){g+=y}else{x+=y}}}}if(x){g+=x;x=""}m=g;m=m.replace(/@@@wcf_empty_line@@@/g,"\n");m=m.replace(/\n\n$/,"\n");m=m.replace(/
              $/,"");m=m.replace(/
              /g,"\n");m=m.replace(/
              /g,"");m=m.replace(/ /gi," ");m=m.replace(/
              \n?]+>\n?
              [\s\S]*?<\/header>/gi,function(z,B,A,C){var D;if(B){D="[quote='"+A+"','"+B+"']"}else{if(A){D="[quote='"+A+"']"}else{D="[quote]"}}return D});m=m.replace(/(?:\n*)<\/blockquote>/gi,"[/quote]\n");m=m.replace(/]*?href=(["'])mailto:(.+?)\1.*?>([\s\S]+?)<\/a>/gi,"[email=$2]$3[/email]");m=m.replace(/]*?href=(["'])(.+?)\1.*?>([\s\S]+?)<\/a>/gi,function(B,z,A,C){if(A==C){return"[url]"+A+"[/url]"}return"[url='"+A+"']"+C+"[/url]"});m=m.replace(/<(?:b|strong)>/gi,"[b]");m=m.replace(/<\/(?:b|strong)>/gi,"[/b]");m=m.replace(/<(?:i|em)>/gi,"[i]");m=m.replace(/<\/(?:i|em)>/gi,"[/i]");m=m.replace(//gi,"[u]");m=m.replace(/<\/u>/gi,"[/u]");m=m.replace(/<(?:s(trike)?|del)>/gi,"[s]");m=m.replace(/<\/(?:s(trike)?|del)>/gi,"[/s]");m=m.replace(//gi,"[sub]");m=m.replace(/<\/sub>/gi,"[/sub]");m=m.replace(//gi,"[sup]");m=m.replace(/<\/sup>/gi,"[/sup]");m=m.replace(/]*?alt="([^"]+?)" class="smiley".*?> ?/gi,"$1 ");m=m.replace(/]*?class="smiley" alt="([^"]+?)".*?> ?/gi,"$1 ");m=m.replace(/]*?class="redactorEmbeddedAttachment" data-attachment-id="(\d+)".*?>/gi,"[attach=$1][/attach]");m=m.replace(/]*?src=(["'])([^"']+?)\1 style="float: (left|right)[^"]*".*?>/gi,"[img='$2',$3][/img]");m=m.replace(/]*?src=(["'])([^"']+?)\1.*?>/gi,"[img]$2[/img]");var d=m.split(/(<\/?span[^>]*>)/);var x=[];var p=[];var q="";for(var a=0;a"){var c=p.pop();var g=c.start+x.pop()+c.end;if(x.length){x[x.length-1]+=g}else{q+=g}}else{if(h.match(/^/)){var k=RegExp.$1;var v;var n;if(k.match(/^color: ?rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\);?$/i)){var u=RegExp.$1;var b=RegExp.$2;var e=RegExp.$3;var s=("0123456789ABCDEF".charAt((u-u%16)/16)+""+"0123456789ABCDEF".charAt(u%16))+""+("0123456789ABCDEF".charAt((b-b%16)/16)+""+"0123456789ABCDEF".charAt(b%16))+""+("0123456789ABCDEF".charAt((e-e%16)/16)+""+"0123456789ABCDEF".charAt(e%16));v="[color=#"+s+"]";n="[/color]"}else{if(k.match(/^color: ?(.*?);?$/i)){v="[color="+RegExp.$1+"]";n="[/color]"}else{if(k.match(/^font-size: ?(\d+)pt;?$/i)){v="[size="+RegExp.$1+"]";n="[/size]"}else{if(k.match(/^font-family: ?(.*?);?$/)){v="[font="+RegExp.$1.replace(/'/g,"")+"]";n="[/font]"}else{v='';n=""}}}}x[x.length]="";p[x.length]={start:v,end:n}}else{if(h.match(/^/)){x[x.length]="";p[x.length]={start:"[tt]",end:"[/tt]"}}else{if(x.length){x[x.length-1]+=h}else{q+=h}}}}}m=q;m=m.replace(/<(div|p) style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)\n/gi,function(A,z,C,B){return"[align="+C+"]"+$.trim(B)+"[/align]"});m=m.replace(/
            • /gi,"[*]");m=m.replace(/<\/li>/gi,"");m=m.replace(/
                /gi,"[list]");m=m.replace(/<(ol|ul style="list-style-type: decimal")>/gi,"[list=1]");m=m.replace(/
                  /gi,"[list=$1]");m=m.replace(/<\/(ul|ol)>/gi,"[/list]");m=m.replace(/]*>/gi,"[table]\n");m=m.replace(/<\/table>/gi,"[/table]\n");m=m.replace(/([\s\S]*?)<\/tbody>/,function(z,A){return $.trim(A)});m=m.replace(/<\/tr>/gi,"");m=m.replace(//gi,"[tr]\n");m=m.replace(/<\/tr>/gi,"[/tr]\n");m=m.replace(/([\s\S]*?)<\/td>/gi,"[td][align=$1]$2[/align][/td]");m=m.replace(/(\t)*(\t)*/gi,"[td]");m=m.replace(/(\t)*<\/td>/gi,"[/td]\n");var w={};m.replace(/<\/span>/,function(z){var A=z.hashCode();w[A]=z.replace(/\$/g,"$$$$");return"@@"+A+"@@"});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","convertFromHtml",{html:m});m=m.replace(/<[^>]+>/g,"");if($.getLength(w)){for(var j in w){var t=new RegExp("@@"+j+"@@","g");data=data.replace(t,w[j])}}m=m.replace(/</g,"<");m=m.replace(/>/g,">");m=m.replace(/&/g,"&");m=m.replace(/%28/g,"(");m=m.replace(/%29/g,")");var r={};for(var a=0,i=__REDACTOR_SOURCE_BBCODES.length;a/g,">");var b={};for(var n=0,k=__REDACTOR_SOURCE_BBCODES.length;n$1');e=e.replace(/\[url\='([^'"]+)'](.+?)\[\/url]/gi,'$2');e=e.replace(/\[url\=([^'"\]]+)](.+?)\[\/url]/gi,'$2');e=e.replace(/\[email\]([^"]+?)\[\/email]/gi,'$1');e=e.replace(/\[email\=([^"\]]+)](.+?)\[\/email]/gi,'$2');e=e.replace(/\[b\](.*?)\[\/b]/gi,"$1");e=e.replace(/\[i\](.*?)\[\/i]/gi,"$1");e=e.replace(/\[u\](.*?)\[\/u]/gi,"$1");e=e.replace(/\[s\](.*?)\[\/s]/gi,"$1");e=e.replace(/\[sub\](.*?)\[\/sub]/gi,"$1");e=e.replace(/\[sup\](.*?)\[\/sup]/gi,"$1");e=e.replace(/\[img\]([^"]+?)\[\/img\]/gi,'');e=e.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi,'');e=e.replace(/\[img='?([^"]*?)'?\]\[\/img\]/gi,'');e=e.replace(/\[size=(\d+)\](.*?)\[\/size\]/gi,'$2');e=e.replace(/\[color=([#a-z0-9]*?)\](.*?)\[\/color\]/gi,'$2');e=e.replace(/\[font='?([a-z,\- ]*?)'?\](.*?)\[\/font\]/gi,'$2');e=e.replace(/\[align=(left|right|center|justify)\](.*?)\[\/align\]/gi,'
                  $2
                  ');e=e.replace(/\[\*\](.*?)(?=\[\*\]|\[\/list\])/gi,"
                • $1
                • ");e=e.replace(/\[list\]/gi,"
                    ");e=e.replace(/\[list=1\]/gi,'
                      ');e=e.replace(/\[list=a\]/gi,'
                        ');e=e.replace(/\[list=(none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)\]/gi,'
                          ');e=e.replace(/\[\/list]/gi,"
                        ");e=e.replace(/\[table\]([\S\s]*?)\[\/table\]/gi,function(p,q){return"[table]"+$.trim(q)+"[/table]"});e=e.replace(/\[table\]/gi,'');e=e.replace(/\[\/table\]/gi,"
                        ");e=e.replace(/\[tr\]/gi,"");e=e.replace(/\[\/tr\]/gi,"");e=e.replace(/\[td\]/gi,"");e=e.replace(/\[\/td\]/gi,"");e=e.replace(/([\S\s]*?)<\/td>/gi,function(p,r){var q=$.trim(r);if(!q.length){q="​"}return""+q+""});var g=this.getOption("wAttachmentUrl");if(g){var l=this._getImageAttachmentIDs();e=e.replace(/\[attach=(\d+)\]\[\/attach\]/g,function(p,q){q=parseInt(q);if(WCF.inArray(q,l)){return''}return p})}for(var o in __REDACTOR_SMILIES){$smileyCode=o.replace(//g,">");var i=new RegExp("(\\s|>|^)"+WCF.String.escapeRegExp($smileyCode)+"(?=\\s|<|$)","gi");e=e.replace(i,'$1'+$smileyCode+'')}e=e.replace(/(javascript):/gi,"$1:");e=e.replace(/(\r|\r\n)/g,"\n");var h={};e=e.replace(/\[quote.*?\][\S\s]*?\[\/quote\]/gi,function(p){var q=p.hashCode();h[q]=p.replace(/\$/g,"$$$$");return"@@"+q+"@@"});e=e.replace(/(\[quote.*?\])/gi,"$1\n");e=e.replace(/(\[\/quote\])/gi,"\n$1");e=e.replace(/\n*$/,"");var a=e.split("\n");e="";for(var n=0,k=a.length;n$/)||m.match(/]+>.*?<\/span>$/)){e+="
                        "}}else{if(!m){m="
                        "}e+="

                        "+m+"

                        "}}if($.getLength(b)){for(var f in b){var j=new RegExp("@@"+f+"@@","g");e=e.replace(j,b[f])}e=e.replace(/\[tt\](.*?)\[\/tt\]/gi,'$1')}e=e.replace(/\[code\][\S\s]*?\[\/code\]/,"
                        $&
                        ");if($.getLength(h)){for(var f in h){var j=new RegExp("@@"+f+"@@","g");e=e.replace(j,this.transformQuote(h[f]))}}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:e});this.$source.val(e)},unquoteString:function(a){return a.replace(/^['"]/,"").replace(/['"]$/,"")},transformQuote:function(b){var a=this;b=b.replace(/\[quote([^\]]+)?\]/gi,function(e,d,g){var f="";var c="";if(d){d=d.substr(1);d=d.split(",");switch(d.length){case 1:f=d[0];break;case 2:f=d[0];c=d[1];break}f=WCF.String.escapeHTML(a.unquoteString($.trim(f)));c=WCF.String.escapeHTML(a.unquoteString($.trim(c)))}var h='

                        '+a._buildQuoteHeader(f,c)+'

                        ';return h});return b.replace(/\[\/quote\]/gi,"
                        ")},fixQuoteContent:function(){var c=this.$editor.find(".redactorQuoteContent").length;var a=this;while(c>0){var b=this.$editor.find(".redactorQuoteContent:eq(0)").removeClass("redactorQuoteContent");b.contents().each(function(e,g){if(g.nodeType===Element.ELEMENT_NODE){if(a.opts.rBlockTest.test(this.tagName)||a.wBlockTest.test(this.tagName)){$(g).wrap("
                        ")}}else{if(g.nodeType===Element.TEXT_NODE){var d=$(g);var f=g.nodeValue.split(/\n/);for(var i=0;i"+h+"
                        ").insertAfter(d)}d.remove()}}});c--}},_wPasteBeforeCallback:function(a){var b={1:24,2:22,3:18,4:14,5:12,6:10};a=a.replace(/]+>/g,function(c,d){return"[size="+b[d]+"]"});a=a.replace(/<\/h[1-6]>/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_break@@@");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:a});return a},_wPasteAfterCallback:function(a){a=a.replace(/

                        ([\s\S]*?)<\/p>/g,"

                        $1

                        ");a=a.replace(/]*>/g,"");a=a.replace(/<\/header>/g,"");a=a.replace(/
                        .*?<\/div>/g,"

                        $1

                        ");a=a.replace(/<\/?div>/g,"");a=a.replace(/@@@wcf_break@@@/g,"


                        ");a=a.replace(/

                        /g,"

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


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


                        ");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});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterPaste",{html:a});return a},insertAttachment:function(d){d=parseInt(d);var b=this.getOption("wAttachmentUrl");var c="[attach="+d+"][/attach]";var a=this._getImageAttachmentIDs();if(b&&WCF.inArray(d,a)){this.insertDynamic('',c)}else{this.insertDynamic(c)}},_getImageAttachmentIDs:function(){var a=this.getOption("wAttachmentImageIDs")||[];if(a.length){delete this.opts.wAttachmentImageIDs;return a}var b={imageAttachmentIDs:[]};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$source.wcfIdentify(),b);return b.imageAttachmentIDs},_wKeydownCallback:function(d){if(d.event.which!==$.ui.keyCode.DOWN&&d.event.which!==$.ui.keyCode.UP){return}var b=$(this.getCurrent());var e=this.getParent();e=(e)?$(e):e;var g=(e)?e.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(d.event.which){case $.ui.keyCode.DOWN:if(e){if(g.length){var f=b.closest("div",g[0]);if(!f.next().length){this.insertingAfterLastElement(g);d.cancel=true}}else{if(e.next("blockquote.quoteBox").length){this.selectionStart(e.next().find("> div > div:first"));d.cancel=true}}}else{if(b.next("blockquote.quoteBox").length){this.selectionStart(b.next().find("> div > div:first"));d.cancel=true}}break;case $.ui.keyCode.UP:if(!e||!g.length){return}var f=b.closest("div",g[0]);if(f.prev("div").length){return}var c=g.prev();if(c.length===0){var a=$(this.opts.emptyHtml);a.insertBefore(g);this.selectionStart(a)}else{if(c[0].tagName==="BLOCKQUOTE"){this.selectionEnd(c.find("> div > div:last"))}else{if($.trim(c.html())==""){c.html(this.opts.invisibleSpace)}this.selectionEnd(c)}}d.cancel=true;break}},_observeQuotes:function(){this.$editor.find(".redactorQuoteEdit:not(.jsRedactorQuoteEdit)").addClass("jsRedactorQuoteEdit").click($.proxy(this._observeQuotesClick,this))},_observeQuotesClick:function(d){var b=$(d.currentTarget).closest("header");var c=$('');$(''+WCF.Language.get("wcf.bbcode.quote.edit")+"").click($.proxy(function(f){f.preventDefault();this._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)},_openQuoteEditOverlay:function(a,b){if(b){this.modalInit(WCF.Language.get("wcf.bbcode.quote.insert"),this.opts.modal_quote,300,$.proxy(function(){$("#redactorEditQuote").click($.proxy(function(){var d=$("#redactorQuoteAuthor").val();var c=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.insertQuoteBBCode(d,c);this.modalClose()},this))},this))}else{this.modalInit(WCF.Language.get("wcf.bbcode.quote.edit"),this.opts.modal_quote,300,$.proxy(function(){if(!b){$("#redactorQuoteAuthor").val(a.data("author"));$("#redactorQuoteLink").val(a.attr("cite"))}$("#redactorEditQuote").click($.proxy(function(){var c=$("#redactorQuoteAuthor").val();a.data("author",c);a.attr("data-author",c);a.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val()));this._updateQuoteHeader(a);this.modalClose()},this))},this))}},_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._buildQuoteHeader(c,a))},insertQuoteBBCode:function(d,f,c,b){if(this.inWysiwygMode()){var a='

                        '+this._buildQuoteHeader(d,f)+'

                        ';this.insertHtml(a);var h=$("#redactorInsertedQuote");var g=$("
                        "+(c?c:this.opts.invisibleSpace)+"
                        ").insertAfter(h.find("> div > header"));h.removeAttr("id");this.selectionStart(g[0]);this._observeQuotes();this.$toolbar.find("a.re-__wcf_quote").addClass("redactor_button_disabled")}else{var e="[quote]";if(d){if(f){e="[quote='"+d+"','"+f+"']"}else{e="[quote='"+d+"']"}}if(b){e+=b}e+="[/quote]";this.insertAtCaret(e)}},_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._openQuoteEditOverlay(null,true)}}; // wbutton.js if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbutton={_bbcodes:{},init:function(){this._bbcodes={};for(var g=0,d=__REDACTOR_BUTTONS.length;g").append(d).insertAfter(this.buttonGet(c).parent());if(a!==null){this.buttonAwesome(b,a)}},_addBBCodeButton:function(b){var c="__wcf_"+b.name;var a=this.buttonAdd(c,b.label,this._insertBBCode);this._bbcodes[c]=b.name;if(b.icon.match(/^fa\-[a-z\-]+$/)){this.buttonAwesome(c,b.icon)}else{a.css("background-image","url("+__REDACTOR_ICON_PATH+b.icon+")")}},_insertBBCode:function(a,g,c,f){var e=this._bbcodes[a];var b={buttonName:a,buttonDOM:g,buttonObj:c,event:f,cancel:false};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+e+"_"+this.$source.wcfIdentify(),b);if(b.cancel===false){var d=this.getSelectionHtml();if(e==="tt"){var h=(this.getParent())?$(this.getParent()):null;if(h&&h.closest("inline.inlineCode",this.$editor.get()[0]).length){this.inlineRemoveClass("inlineCode")}else{this.inlineSetClass("inlineCode")}}else{this.insertHtml("["+e+"]"+d+"[/"+e+"]")}}f.preventDefault();return false}}; // wfontcolor.js diff --git a/wcfsetup/install/files/js/WCF.Combined.min.js b/wcfsetup/install/files/js/WCF.Combined.min.js index dbbd355393..3fc77c2c76 100755 --- a/wcfsetup/install/files/js/WCF.Combined.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.min.js @@ -57,7 +57,7 @@ WCF.Label={};WCF.Label.ACPList=Class.extend({_labelInput:null,_labelList:[],init WCF.Location={};WCF.Location.Util={getLocation:function(b,a){if(navigator.geolocation){navigator.geolocation.getCurrentPosition(function(c){b(c.coords.latitude,c.coords.longitude)},function(){b(undefined,undefined)},{timeout:a||5000})}else{b(undefined,undefined)}}};WCF.Location.GoogleMaps={};WCF.Location.GoogleMaps.Settings={_settings:{},get:function(a){if(a===undefined){return this._settings}if(this._settings[a]!==undefined){return this._settings[a]}return null},set:function(b,c){if($.isPlainObject(b)){for(var a in b){this._settings[a]=b[a]}}else{this._settings[b]=c}}};WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(b,a){this._mapContainer=$("#"+b);this._mapOptions=$.extend(true,this._getDefaultMapOptions(),a);this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions);this._markers=[];if(this._mapContainer.parents(".sidebar").length){enquire.register("screen and (max-width: 800px)",{setup:$.proxy(this._addSidebarMapListener,this),deferSetup:true})}this.refresh()},_addInfoWindowEventListener:function(a,b){google.maps.event.addListener(a,"click",$.proxy(function(){b.open(this._map,a)},this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var a={};a.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude"));a.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom");a.draggable=WCF.Location.GoogleMaps.Settings.get("draggable");switch(WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":a.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":a.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":a.mapTypeId=google.maps.MapTypeId.TERRAIN;break;case"hybrid":default:a.mapTypeId=google.maps.MapTypeId.HYBRID;break}a.mapTypeControl=WCF.Location.GoogleMaps.Settings.get("mapTypeControl")!="off";if(a.mapTypeControl){switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":a.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":a.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:a.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT};break}}a.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl");a.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel");a.zoom=WCF.Location.GoogleMaps.Settings.get("zoom");return a},addDraggableMarker:function(c,b){var a=new google.maps.Marker({clickable:false,draggable:true,map:this._map,position:new google.maps.LatLng(c,b),zIndex:1});this._markers.push(a);return a},addMarker:function(g,e,f,d,c){var b=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(g,e),title:f});if(d){b.setIcon(d)}if(c){var a=new google.maps.InfoWindow({content:c});this._addInfoWindowEventListener(b,a);b.infoWindow=a}this._markers.push(b);return b},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var a=this._map.getCenter();google.maps.event.trigger(this._map,"resize");this._map.setCenter(a)},refreshBounds:function(){var f=null;var c=null;var d=null;var g=null;for(var a in this._markers){var e=this._markers[a];var h=e.getPosition().lat();var b=e.getPosition().lng();if(f===null){f=c=h;d=g=b}else{if(f>h){f=h}else{if(ch){d=h}else{if(g=a.lat()&&this._previousNorthEast.lng()>=a.lng()&&this._previousSouthWest.lat()<=b.lat()&&this._previousSouthWest.lng()<=b.lng()){return}this._previousNorthEast=a;this._previousSouthWest=b;this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:{excludedObjectIDs:this._objectIDs,eastLongitude:a.lng(),northLatitude:a.lat(),southLatitude:b.lat(),westLongitude:b.lng()}});this._proxy.sendRequest()},_success:function(d,e,c){if(d.returnValues&&d.returnValues.markers){for(var a in d.returnValues.markers){var b=d.returnValues.markers[a];this.addMarker(b.latitude,b.longitude,b.title,null,b.infoWindow);if(b.objectID){this._objectIDs.push(b.objectID)}else{if(b.objectIDs){this._objectIDs=this._objectIDs.concat(b.objectIDs)}}}}},addMarker:function(f,d,e,c,b){var a=this._super(f,d,e,c,b);this._markerClusterer.addMarker(a);this._markerSpiderfier.addMarker(a);return a}});WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(b,e,a,c,d){this._super(b,e,a,c,d);this._geocoder=new google.maps.Geocoder()},_createListItem:function(b){var a=$("
                      • "+WCF.String.escapeHTML(b.formatted_address)+"
                      • ").appendTo(this._list);a.data("location",b.geometry.location).data("label",b.formatted_address).click($.proxy(this._executeCallback,this));this._itemCount++;return a},_keyUp:function(b){switch(b.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;break;case $.ui.keyCode.UP:this._selectPreviousItem();return;break;case $.ui.keyCode.DOWN:this._selectNextItem();return;break;case $.ui.keyCode.ENTER:return this._selectElement(b);break}var a=this._getSearchString(b);if(a===""){this._clearList(true)}else{if(a.length>=this._triggerLength){this._clearList(false);this._geocoder.geocode({address:a},$.proxy(this._success,this))}else{this._clearList(false)}}},_success:function(d,b){if(b!=google.maps.GeocoderStatus.OK){return}if($.getLength(d)){var c=0;for(var a in d){this._createListItem(d[a]);if(++c==10){break}}}else{if(!this._handleEmptyResult()){return}}WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var e=this._searchInput.parents(".dropdown").wcfIdentify();if(!WCF.Dropdown.getDropdownMenu(e).hasClass("dropdownOpen")){WCF.Dropdown.toggleDropdown(e)}this._itemIndex=-1;if(!WCF.Dropdown.getDropdown(e).data("disableAutoFocus")){this._selectNextItem()}}});WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(d,b,a,e,c){this._searchInput=a;this._map=new WCF.Location.GoogleMaps.Map(d,b);this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(a,$.proxy(this._setMarkerByLocation,this));if(e&&c){this._marker=this._map.addDraggableMarker(e,c)}else{this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude"));WCF.Location.Util.getLocation($.proxy(function(g,f){if(g!==undefined&&f!==undefined){WCF.Location.GoogleMaps.Util.moveMarker(this._marker,g,f);WCF.Location.GoogleMaps.Util.focusMarker(this._marker)}},this))}this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},getMap:function(){return this._map},getMarker:function(){return this._marker},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy(function(a){if(a!==null){$(this._searchInput).val(a)}},this),this._marker)},_setMarkerByLocation:function(a){this._marker.setPosition(a.location);WCF.Location.GoogleMaps.Util.focusMarker(this._marker);$(this._searchInput).val(a.label)}});WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(a){a.getMap().setCenter(a.getPosition())},getMarkerPosition:function(a){return{latitude:a.getPosition().lat(),longitude:a.getPosition().lng()}},moveMarker:function(a,d,b,c){a.setPosition(new google.maps.LatLng(d,b));if(c){google.maps.event.trigger(a,"dragend")}},reverseGeocoding:function(f,a,e,c,b){if(a){e=a.getPosition().lat();c=a.getPosition().lng()}if(this._geocoder===null){this._geocoder=new google.maps.Geocoder()}var d=new google.maps.LatLng(e,c);this._geocoder.geocode({latLng:d},function(h,g){if(g==google.maps.GeocoderStatus.OK){f((b?h:h[0].formatted_address))}else{f(null)}})}}; // WCF.Message.js -WCF.Message={};WCF.Message.BBCode={};WCF.Message.BBCode.CodeViewer=Class.extend({_dialog:null,init:function(){this._dialog=null;this._initCodeBoxes();WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.BBCode.CodeViewer",$.proxy(this._initCodeBoxes,this));WCF.DOMNodeInsertedHandler.execute()},_initCodeBoxes:function(){$(".codeBox:not(.jsCodeViewer)").each($.proxy(function(a,c){var b=$(c).addClass("jsCodeViewer");$('').appendTo(b.find("div > h3")).click($.proxy(this._click,this))},this))},_click:function(b){var a="";$(b.currentTarget).parents("div").next("ol").children("li").each(function(c,d){if(a){a+="\n"}a+=$(d).text().replace(/\n+$/,"")});if(this._dialog===null){this._dialog=$('