From 90a9e4df1c16e560813d8b26552833a5e2397f11 Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Sun, 2 Nov 2014 13:26:53 +0100 Subject: [PATCH] Updating minified JavaScript files --- .../install/files/js/3rdParty/redactor/plugins/wcombined.min.js | 2 +- wcfsetup/install/files/js/WCF.Combined.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 9ad12c4ab1..aecccedc3c 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js @@ -1,7 +1,7 @@ // table.js if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.table=function(){return{getTemplate:function(){return String()+'
'},init:function(){var b={};b.insert_table={title:this.lang.get("insert_table"),func:this.table.show};b.insert_row_above={title:this.lang.get("insert_row_above"),func:this.table.addRowAbove};b.insert_row_below={title:this.lang.get("insert_row_below"),func:this.table.addRowBelow};b.insert_column_left={title:this.lang.get("insert_column_left"),func:this.table.addColumnLeft};b.insert_column_right={title:this.lang.get("insert_column_right"),func:this.table.addColumnRight};b.add_head={title:this.lang.get("add_head"),func:this.table.addHead};b.delete_head={title:this.lang.get("delete_head"),func:this.table.deleteHead};b.delete_column={title:this.lang.get("delete_column"),func:this.table.deleteColumn};b.delete_row={title:this.lang.get("delete_row"),func:this.table.deleteRow};b.delete_table={title:this.lang.get("delete_table"),func:this.table.deleteTable};this.observe.addButton("td","table");this.observe.addButton("th","table");var a=this.button.addBefore("link","table",this.lang.get("table"));this.button.addDropdown(a,b)},show:function(){this.modal.addTemplate("table",this.table.getTemplate());this.modal.load("table",this.lang.get("insert_table"),300);this.modal.createCancelButton();var a=this.modal.createActionButton(this.lang.get("insert"));a.on("click",this.table.insert);this.selection.save();this.modal.show();$("#redactor-table-rows").focus()},insert:function(){var n=$("#redactor-table-rows").val(),c=$("#redactor-table-columns").val(),a=$("
"),b=Math.floor(Math.random()*99999),l=$('
'),e,h,j,k;for(e=0;e");for(j=0;j"+this.opts.invisibleSpace+"");if(e===0&&j===0){k.append(this.selection.getMarker())}$(h).append(k)}l.append(h)}a.append(l);var f=a.html();this.modal.close();this.selection.restore();if(this.table.getTable()){return}this.buffer.set();var g=this.selection.getBlock()||this.selection.getCurrent();if(g&&g.tagName!="BODY"){if(g.tagName=="LI"){g=$(g).closest("ul, ol")}$(g).after(f)}else{this.insert.html(f)}this.selection.restore();var m=this.$editor.find("#table"+b);if(!this.opts.linebreaks&&(this.utils.browser("mozilla")||this.utils.browser("msie"))){var d=m.next();if(d.length===0){m.after(this.opts.emptyHtml)}}this.observe.buttons();m.find("span.redactor-selection-marker").remove();m.removeAttr("id");this.code.sync();this.core.setCallback("insertedTable",m)},getTable:function(){var a=$(this.selection.getParent()).closest("table");if(!this.utils.isRedactorParent(a)){return false}if(a.size()===0){return false}return a},restoreAfterDelete:function(a){this.selection.restore();a.find("span.redactor-selection-marker").remove();this.code.sync()},deleteTable:function(){var b=this.table.getTable();if(!b){return}this.buffer.set();var a=b.next();if(!this.opts.linebreaks&&a.length!==0){this.caret.setStart(a)}else{this.caret.setAfter(b)}b.remove();this.code.sync()},deleteRow:function(){var a=this.table.getTable();if(!a){return}var c=$(this.selection.getCurrent());this.buffer.set();var e=c.closest("tr");var b=e.prev().length?e.prev():e.next();if(b.length){var d=b.children("td, th").first();if(d.length){d.prepend(this.selection.getMarker())}}e.remove();this.table.restoreAfterDelete(a)},deleteColumn:function(){var c=this.table.getTable();if(!c){return}this.buffer.set();var d=$(this.selection.getCurrent());var a=d.closest("td, th");var b=a[0].cellIndex;c.find("tr").each($.proxy(function(f,g){var e=$(g);var h=b-1<0?b+1:b-1;if(f===0){e.find("td, th").eq(h).prepend(this.selection.getMarker())}e.find("td, th").eq(b).remove()},this));this.table.restoreAfterDelete(c)},addHead:function(){var a=this.table.getTable();if(!a){return}this.buffer.set();if(a.find("thead").size()!==0){this.table.deleteHead();return}var b=a.find("tr").first().clone();b.find("td").html(this.opts.invisibleSpace);$thead=$("").append(b);a.prepend($thead);this.code.sync()},deleteHead:function(){var a=this.table.getTable();if(!a){return}var b=a.find("thead");if(b.size()===0){return}this.buffer.set();b.remove();this.code.sync()},addRowAbove:function(){this.table.addRow("before")},addRowBelow:function(){this.table.addRow("after")},addColumnLeft:function(){this.table.addColumn("before")},addColumnRight:function(){this.table.addColumn("after")},addRow:function(c){var a=this.table.getTable();if(!a){return}this.buffer.set();var b=$(this.selection.getCurrent());var d=b.closest("tr");var e=d.clone();e.find("th").replaceWith(function(){var f=$("");f[0].attributes=this.attributes;return f.append($(this).contents())});e.find("td").html(this.opts.invisibleSpace);if(c=="after"){d.after(e)}else{d.before(e)}this.code.sync()},addColumn:function(d){var c=this.table.getTable();if(!c){return}var b=0;var e=$(this.selection.getCurrent());this.buffer.set();var f=e.closest("tr");var a=e.closest("td, th");f.find("td, th").each($.proxy(function(g,h){if($(h)[0]===a[0]){b=g}},this));c.find("tr").each($.proxy(function(g,j){var h=$(j).find("td, th").eq(b);var k=h.clone();k.html(this.opts.invisibleSpace);if(d=="after"){h.after(k)}else{h.before(k)}},this));this.code.sync()}}}; // wbbcode.js -if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode=function(){return{init:function(){var c=this.$textarea.wcfIdentify();this.opts.initCallback=$.proxy(function(){var f=$.trim(this.wutil.getOption("woltlab.originalValue"));if(f.length){this.wutil.replaceText(f);this.wutil.selectionEndOfEditor()}delete this.opts.woltlab.originalValue;$(document).trigger("resize")},this);this.opts.pasteBeforeCallback=$.proxy(this.wbbcode._pasteBeforeCallback,this);this.opts.pasteCallback=$.proxy(this.wbbcode._pasteCallback,this);var b=this.clean.onSync;this.clean.onSync=function(f){f=f.replace(/

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

@@@wcf_empty_line@@@

");return b.call(self,f)};if(this.wutil.getOption("woltlab.autosaveOnce")){this.wutil._saveTextToStorage();delete this.opts.woltlab.autosaveOnce}var a=this.button.get("table");if(a.length){var e=a.data("dropdown");e.find(".redactor-dropdown-add_head").parent().remove();e.find(".redactor-dropdown-delete_head").parent().remove();$('
";return N})};for(var a=x.length-1;a>=0;a--){var u=x[a];var w=new RegExp("@@"+u.hashCode+"@@","g");C=C.replace(w,p(u.content))}}if($.getLength(t)){for(var k in t){var w=new RegExp("@@"+k+"@@","g");C=C.replace(w,t[k])}C=C.replace(/\[tt\](.*?)\[\/tt\]/gi,'$1')}C=C.replace(/\[code\][\S\s]*?\[\/code\]/,"
$&
");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:C});return C},_pasteBeforeCallback: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,"

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

");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:a});return a},_pasteCallback:function(a){a=a.replace(/]*>(]*>)+/g,"$1");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(d){d=parseInt(d);var b=this.wutil.getOption("woltlab.attachmentUrl");var c="[attach="+d+"][/attach]";var a=this.wbbcode._getImageAttachmentIDs();if(b&&WCF.inArray(d,a)){this.wutil.insertDynamic('',c)}else{this.wutil.insertDynamic(c)}},_getImageAttachmentIDs:function(){var a=this.wutil.getOption("woltlab.attachmentImageIDs")||[];if(a.length){delete this.opts.wAttachmentImageIDs;return a}var b={imageAttachmentIDs:[]};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$textarea.wcfIdentify(),b);return b.imageAttachmentIDs},_keydownCallback:function(f){switch(f.event.which){case $.ui.keyCode.BACKSPACE:case $.ui.keyCode.DELETE:case $.ui.keyCode.DOWN:case $.ui.keyCode.ENTER:case $.ui.keyCode.TAB:case $.ui.keyCode.UP:break;default:return;break}this.selection.get();var a=$(this.selection.getCurrent());var e=this.selection.getParent();e=(e)?$(e):e;var k=(e)?e.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(f.event.which){case $.ui.keyCode.BACKSPACE:if(this.wutil.isCaret()){if(k.length){var c=true;k.find("div > div").each(function(){if($(this).text().replace(/\u200B/,"").length){c=false;return false}});if(c){var g=window.getSelection();if(g.rangeCount){g.removeAllRanges()}var h=document.createRange();h.selectNode(k[0]);g.addRange(h);f.cancel=true}}}break;case $.ui.keyCode.DELETE:if(this.wutil.isCaret()){if(this.wutil.isEndOfElement(a[0])&&a.next("blockquote").length){var g=window.getSelection();if(g.rangeCount){g.removeAllRanges()}var h=document.createRange();h.selectNode(a.next()[0]);g.addRange(h);f.cancel=true}}break;case $.ui.keyCode.DOWN:if(a.next("blockquote").length){this.caret.setStart(a.next().find("> div > div:first"));f.cancel=true}else{if(e){if(e.next("blockquote").length){this.caret.setStart(e.next().find("> div > div:first"));f.cancel=true}else{if(k.length){var j=a.closest("div",k[0]);if(!j.next().length){if(k.next().length){this.caret.setStart(k.next())}else{this.wutil.setCaretAfter(k)}f.cancel=true}}}}}break;case $.ui.keyCode.ENTER:if(k.length){this.keydown.blockquote=false;this.keydown.enterWithinBlockquote=true}break;case $.ui.keyCode.TAB:var d=this.selection.getBlock();if(!d||d.tagName!=="LI"){f.cancel=true}break;case $.ui.keyCode.UP:if(!e||!k.length){return}var j=a.closest("div",k[0]);var b=j.prev();if(b[0].tagName==="DIV"){return}else{if(b[0].tagName==="BLOCKQUOTE"){return}}var i=k.prev();if(i.length===0){this.wutil.setCaretBefore(k)}else{if(i[0].tagName==="BLOCKQUOTE"){this.caret.sendEnd(i.find("> div > div:last"))}else{if($.trim(i.html())==""){i.html(this.opts.invisibleSpace)}this.caret.setEnd(i)}}f.cancel=true;break}},_keyupCallback:function(a){if(a.event.which!==$.ui.keyCode.BACKSPACE&&a.event.which!==$.ui.keyCode.DELETE){return}this.$editor.find("blockquote").each(function(b,d){var c=$(d);if(!c.find("> div > header").length){c.remove()}})},_observeQuotes:function(){this.$editor.find(".redactorQuoteEdit:not(.jsRedactorQuoteEdit)").addClass("jsRedactorQuoteEdit").click($.proxy(this.wbbcode._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.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);$('
').appendTo(document.body).focus().remove()},_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){b.click($.proxy(function(){var e=$("#redactorQuoteAuthor").val();var d=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.wbbcode.insertQuoteBBCode(e,d);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+"']"}}if(this.wutil.inWysiwygMode()){var f=(e)?this.wbbcode.convertToHtml(e):"";var i=WCF.getUUID();var b=this.wbbcode.convertToHtml(g+i+a);b=b.replace(i,f);b=b.replace(/(

)?

'}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)}}}; +if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode=function(){return{init:function(){var c=this.$textarea.wcfIdentify();this.opts.initCallback=$.proxy(function(){var f=$.trim(this.wutil.getOption("woltlab.originalValue"));if(f.length){this.wutil.replaceText(f);this.wutil.selectionEndOfEditor()}delete this.opts.woltlab.originalValue;$(document).trigger("resize")},this);this.opts.pasteBeforeCallback=$.proxy(this.wbbcode._pasteBeforeCallback,this);this.opts.pasteCallback=$.proxy(this.wbbcode._pasteCallback,this);var b=this.clean.onSync;this.clean.onSync=function(f){f=f.replace(/

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

@@@wcf_empty_line@@@

");return b.call(self,f)};if(this.wutil.getOption("woltlab.autosaveOnce")){this.wutil._saveTextToStorage();delete this.opts.woltlab.autosaveOnce}var a=this.button.get("table");if(a.length){var e=a.data("dropdown");e.find(".redactor-dropdown-add_head").parent().remove();e.find(".redactor-dropdown-delete_head").parent().remove();$('
";return N})};for(var a=x.length-1;a>=0;a--){var u=x[a];var w=new RegExp("@@"+u.hashCode+"@@","g");C=C.replace(w,p(u.content))}}if($.getLength(t)){for(var k in t){var w=new RegExp("@@"+k+"@@","g");C=C.replace(w,t[k])}C=C.replace(/\[tt\](.*?)\[\/tt\]/gi,'$1')}C=C.replace(/\[code\][\S\s]*?\[\/code\]/,"
$&
");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:C});return C},_pasteBeforeCallback: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,"

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

");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:a});return a},_pasteCallback:function(a){a=a.replace(/]*>(]*>)+/g,"$1");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(d){d=parseInt(d);var b=this.wutil.getOption("woltlab.attachmentUrl");var c="[attach="+d+"][/attach]";var a=this.wbbcode._getImageAttachmentIDs();if(b&&WCF.inArray(d,a)){this.wutil.insertDynamic('',c)}else{this.wutil.insertDynamic(c)}},_getImageAttachmentIDs:function(){var a=this.wutil.getOption("woltlab.attachmentImageIDs")||[];if(a.length){delete this.opts.wAttachmentImageIDs;return a}var b={imageAttachmentIDs:[]};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$textarea.wcfIdentify(),b);return b.imageAttachmentIDs},_keydownCallback:function(f){switch(f.event.which){case $.ui.keyCode.BACKSPACE:case $.ui.keyCode.DELETE:case $.ui.keyCode.DOWN:case $.ui.keyCode.ENTER:case $.ui.keyCode.TAB:case $.ui.keyCode.UP:break;default:return;break}this.selection.get();var a=$(this.selection.getCurrent());var e=this.selection.getParent();e=(e)?$(e):e;var k=(e)?e.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(f.event.which){case $.ui.keyCode.BACKSPACE:if(this.wutil.isCaret()){if(k.length){var c=true;k.find("div > div").each(function(){if($(this).text().replace(/\u200B/,"").length){c=false;return false}});if(c){var g=window.getSelection();if(g.rangeCount){g.removeAllRanges()}var h=document.createRange();h.selectNode(k[0]);g.addRange(h);f.cancel=true}}}break;case $.ui.keyCode.DELETE:if(this.wutil.isCaret()){if(this.wutil.isEndOfElement(a[0])&&a.next("blockquote").length){var g=window.getSelection();if(g.rangeCount){g.removeAllRanges()}var h=document.createRange();h.selectNode(a.next()[0]);g.addRange(h);f.cancel=true}}break;case $.ui.keyCode.DOWN:if(a.next("blockquote").length){this.caret.setStart(a.next().find("> div > div:first"));f.cancel=true}else{if(e){if(e.next("blockquote").length){this.caret.setStart(e.next().find("> div > div:first"));f.cancel=true}else{if(k.length){var j=a.closest("div",k[0]);if(!j.next().length){if(k.next().length){this.caret.setStart(k.next())}else{this.wutil.setCaretAfter(k)}f.cancel=true}}}}}break;case $.ui.keyCode.ENTER:if(k.length){this.keydown.blockquote=false;this.keydown.enterWithinBlockquote=true}break;case $.ui.keyCode.TAB:var d=this.selection.getBlock();if(!d||d.tagName!=="LI"){f.cancel=true}break;case $.ui.keyCode.UP:if(!e||!k.length){return}var j=a.closest("div",k[0]);var b=j.prev();if(b[0].tagName==="DIV"){return}else{if(b[0].tagName==="BLOCKQUOTE"){return}}var i=k.prev();if(i.length===0){this.wutil.setCaretBefore(k)}else{if(i[0].tagName==="BLOCKQUOTE"){this.caret.sendEnd(i.find("> div > div:last"))}else{if($.trim(i.html())==""){i.html(this.opts.invisibleSpace)}this.caret.setEnd(i)}}f.cancel=true;break}},_keyupCallback:function(a){if(a.event.which!==$.ui.keyCode.BACKSPACE&&a.event.which!==$.ui.keyCode.DELETE){return}this.$editor.find("blockquote").each(function(b,d){var c=$(d);if(!c.find("> div > header").length){c.remove()}})},_observeQuotes:function(){this.$editor.find(".redactorQuoteEdit:not(.jsRedactorQuoteEdit)").addClass("jsRedactorQuoteEdit").click($.proxy(this.wbbcode._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.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);$('
').appendTo(document.body).focus().remove()},_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){b.click($.proxy(function(){var e=$("#redactorQuoteAuthor").val();var d=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.wbbcode.insertQuoteBBCode(e,d);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+"']"}}if(this.wutil.inWysiwygMode()){var f=(e)?this.wbbcode.convertToHtml(e):"";var i=WCF.getUUID();var b=this.wbbcode.convertToHtml(g+i+a);b=b.replace(i,f);b=b.replace(/(

)?

'}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)}}}; // wbutton.js 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]=b.name;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];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.insert.html("["+d+"]"+c+this.selection.getMarkerAsHtml()+"[/"+d+"]",false);this.selection.restore()}}event.preventDefault();return false},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 diff --git a/wcfsetup/install/files/js/WCF.Combined.min.js b/wcfsetup/install/files/js/WCF.Combined.min.js index f2d019f639..12c97011a6 100755 --- a/wcfsetup/install/files/js/WCF.Combined.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.min.js @@ -100,7 +100,7 @@ window.matchMedia||(window.matchMedia=function(){var c=window.styleMedia||window (function (window, undefined) {"use strict";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:$.extend(this._additionalParameters,{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)}})}}; })(this); // WCF.Message.js -(function (window, undefined) {"use strict";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=$('