From: woltlab.com Date: Sat, 17 Jan 2015 14:06:44 +0000 (+0100) Subject: Updating minified JavaScript files X-Git-Tag: 2.1.0_Beta_4~77^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=823bed3f7efb390928bfc3985f1b10892677a8c3;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 7c8a9ce5e0..3853c90ee6 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js @@ -11,7 +11,7 @@ if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontfamily=function // wfontsize.js if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontsize=function(){return{init:function(){var a=this.button.addDropdown(this.button.get("fontsize"));this.wfontsize._createDropdown(a)},_createDropdown:function(g){var e=[8,10,12,14,18,24,36];var b=this;for(var f=0;f'+c+"").appendTo(g);var a=d.children("a").data("fontSize",c).css("font-size",c+"pt");if(c>18){a.css("line-height","1em")}a.click(function(h){h.preventDefault();b.inline.format("span","style","font-size: "+$(this).data("fontSize")+"pt;")})}$('
  • '+this.opts.curLang.none+"
  • ").appendTo(g);d.children("a").click(function(h){h.preventDefault();b.inline.removeStyleRule("font-size")})}}}; // wmonkeypatch.js -if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wmonkeypatch=function(){var a=null;return{init:function(){this.wmonkeypatch.alignment();this.wmonkeypatch.button();this.wmonkeypatch.caret();this.wmonkeypatch.clean();this.wmonkeypatch.code();this.wmonkeypatch.dropdown();this.wmonkeypatch.image();this.wmonkeypatch.inline();this.wmonkeypatch.insert();this.wmonkeypatch.keydown();this.wmonkeypatch.keyup();this.wmonkeypatch.link();this.wmonkeypatch.modal();this.wmonkeypatch.paste();this.wmonkeypatch.observe();this.wmonkeypatch.selection();this.wmonkeypatch.utils();this.wmonkeypatch.rebuildTemplates();this.wmonkeypatch.bindEvents();this.wmonkeypatch.fixWebKit()},bindEvents:function(){var b=this.$textarea.wcfIdentify();this.wutil.setOption("keydownCallback",function(e){var d={cancel:false,event:e};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keydown_"+b,d);return(d.cancel?false:true)});this.wutil.setOption("keyupCallback",(function(e){this.wutil.saveSelection();var d={cancel:false,event:e};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keyup_"+b,d);return(d.cancel?false:true)}).bind(this));if(this.opts.activeButtons){this.$editor.off("mouseup.redactor keyup.redactor focus.redactor");this.$editor.on("mouseup.redactor keyup.redactor focus.redactor",$.proxy(this.observe.buttons,this));this.$editor.on("keyup.redactor",$.proxy(this.keyup.init,this))}var c=false;this.$editor.on("mousedown.wmonkeypatch",(function(){c=true}).bind(this));$(document).on("mouseup.wmonkeypatch",(function(){if(c){c=false;this.wutil.saveSelection()}}).bind(this))},alignment:function(){var b=this.alignment.setBlocks;this.alignment.setBlocks=(function(c){b.call(this,c);WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","fixFormatting_"+this.$textarea.wcfIdentify())}).bind(this)},button:function(){var b=this.button.addDropdown;this.button.addDropdown=(function(c,e){var d=b.call(this,c,e);if(!e){d.addClass("dropdownMenu")}return d}).bind(this)},caret:function(){this.caret.set=(function(h,g,f,c){if(!this.utils.browser("msie")){if(this.utils.isMobile()&&this.utils.browser("webkit")&&navigator.userAgent.match(/(iPad|iPhone|iPod)/i)){if(document.activeElement!==this.$editor[0]){this.$editor.focus()}}else{this.$editor.focus()}}h=h[0]||h;f=f[0]||f;if(this.utils.isBlockTag(h.tagName)&&h.innerHTML===""){h.innerHTML=this.opts.invisibleSpace}if(h.tagName=="BR"&&this.opts.linebreaks===false){var b=$(this.opts.emptyHtml)[0];$(h).replaceWith(b);h=b;f=h}this.selection.get();try{this.range.setStart(h,g);this.range.setEnd(f,c)}catch(d){}this.selection.addRange()}).bind(this);this.caret.setOffset=(function(h,b){if(typeof b=="undefined"){b=h}if(!this.focus.isFocused()){this.focus.setStart()}var c=document.createRange();var e=document.getSelection();var d,g=0;var f=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);while(d=f.nextNode()){g+=d.nodeValue.length;if(g>h||(h===b&&g===h)){c.setStart(d,d.nodeValue.length+h-g);h=Infinity}if(g>=b){c.setEnd(d,d.nodeValue.length+b-g);break}}e.removeAllRanges();e.addRange(c)}).bind(this)},clean:function(){var d=function(f){f=f.replace(/\u201D/g,"__wcf_preserve_character_1__");f=f.replace(/\u201C/g,"__wcf_preserve_character_2__");f=f.replace(/\u2018/g,"__wcf_preserve_character_3__");f=f.replace(/\u2019/g,"__wcf_preserve_character_4__");return f};var c=function(f){f=f.replace(/__wcf_preserve_character_1__/g,"\u201D");f=f.replace(/__wcf_preserve_character_2__/g,"\u201C");f=f.replace(/__wcf_preserve_character_3__/g,"\u2018");f=f.replace(/__wcf_preserve_character_4__/g,"\u2019");return f};var e=this.clean.onPaste;this.clean.onPaste=(function(g,f){this.opts.replaceDivs=true;g=d(g);g=e.call(this,g,f);this.opts.replaceDivs=false;return c(g)}).bind(this);this.clean.onPasteRemoveEmpty=function(f){return f.replace(/$/i,"")};var b=this.clean.onSet;this.clean.onSet=(function(f){f=d(f);f=b.call(this,f);return c(f)}).bind(this);this.clean.setVerified=(function(h){if(this.utils.browser("msie")){return h}h=h.replace(new RegExp("])>","gi"),'');h=h.replace(new RegExp("","gi"),'');var k=h.match(new RegExp('<(span|img)(.*?)style="(.*?)"(.*?[^>])>',"gi"));if(k){var f=k.length;for(var g=0;g').appendTo(f)}else{var h=$("
  • ");var g=$(''+i.title+"");g.on("click",$.proxy(function(l){var k="func";var m=i.func;if(i.command){k="command";m=i.command}else{if(i.dropdown){k="dropdown";m=i.dropdown}}this.button.onClick(l,j,k,m)},this));g.appendTo(h);h.appendTo(f)}}).bind(this))}).bind(this);var b=this.dropdown.show;this.dropdown.show=$.proxy(function(g,d){var f=this.button.get(d).data("dropdown");c(f);if($.browser.iOS){this.wutil.saveSelection()}b.call(this,g,d);f.off("mouseover mouseout")},this);var c=function(g){if(g.hasClass("dropdownMenu")){return}g.addClass("dropdownMenu");var f=g.children("a").detach();for(var e=0;e").appendTo(g);d.append(f[e])}}},image:function(){var d=this.image.setEditable;this.image.setEditable=(function(e){if(!e.hasClass("smiley")){d.call(this,e)}}).bind(this);var c=this.image.loadEditableControls;this.image.loadEditableControls=(function(e){var f=c.call(this,e);if(e.hasClass("redactorDisableResize")&&f!==false){f.hide()}return f}).bind(this);this.image.show=(function(){this.modal.load("image",this.lang.get("image"),0);var e=this.modal.createActionButton(this.lang.get("insert"));e.click($.proxy(this.wbutton._insertImage,this));this.selection.save();this.modal.show()}).bind(this);this.image.showEdit=(function(e){this.modal.load("imageEdit",this.lang.get("edit"),0);this.image.buttonSave=this.modal.createActionButton(this.lang.get("save"));this.image.buttonSave.click((function(){this.image.update(e)}).bind(this));$("#redactor-image-link-source").val(e.attr("src"));$("#redactor-image-align").val(e.css("float"));this.modal.show()}).bind(this);var b=(function(f){var e=f.parent();f=f.detach();f.prependTo(e);this.caret.setAfter(f)}).bind(this);this.image.update=(function(e){this.image.hideResize();this.buffer.set();e.attr("src",$("#redactor-image-link-source").val());this.image.setFloating(e);b(e);this.modal.close();this.observe.images()}).bind(this)},inline:function(){var c=this.inline.format;this.inline.format=(function(d,e,f){if($.browser.iOS){this.wutil.restoreSelection()}c.call(this,d,e,f)}).bind(this);var b=this.inline.removeStyleRule;this.inline.removeStyleRule=(function(d){if($.browser.iOS){this.wuil.restoreSelection()}b.call(this,d)}).bind(this)},insert:function(){var d=($.browser.webkit||document.documentElement.style.hasOwnProperty("WebkitAppearance")||window.hasOwnProperty("chrome"));var b=(function(h){var g=this.$editor.html();if(this.utils.isEmpty(g)){var j=false;if(h.match(/^<(blockquote|div|p)/i)){this.$editor.empty();j=true}this.$editor.focus();if(!j){this.caret.setEnd(this.$editor.children("p:eq(0)"))}}else{if(document.activeElement!==this.$editor[0]){this.wutil.restoreSelection()}if(h.match(/^<(blockquote|div|p)/i)&&getSelection().getRangeAt(0).collapsed){var i=getSelection().getRangeAt(0).startContainer;if(i.nodeType===Node.TEXT_NODE&&i.textContent==="\u200b"){this.caret.setEnd($(i.parentElement).html("
    "))}}}}).bind(this);var c=(function(){var g=false;this.$editor.find("span").each(function(){var h=$(this);if(h.data("verified")!=="redactor"){var i=$("helper").insertBefore(h);i.after(h.contents());i.remove();h.remove();g=true}});if(g){this.wutil.saveSelection()}}).bind(this);var f=this.insert.html;this.insert.html=(function(h,g){b(h);f.call(this,h,g);this.wutil.saveSelection();if(d){setTimeout(function(){c()},10)}}).bind(this);if(navigator.userAgent.match(/safari/i)){var e=this.insert.execHtml;this.insert.execHtml=(function(g){try{e.call(this,g)}catch(h){console.debug("[Redactor.wmonkeypatch] Suppressed error in Safari: "+h.message)}}).bind(this)}},keydown:function(){this.keydown.enterWithinBlockquote=false;var d=this.keydown.onTab;this.keydown.onTab=(function(h,f){var g=this.selection.getBlock();if(g&&g.tagName==="LI"){return d.call(this,h,f)}return true}).bind(this);var c=this.keydown.replaceDivToParagraph;this.keydown.replaceDivToParagraph=(function(){if(this.keydown.enterWithinBlockquote){this.keydown.enterWithinBlockquote=false}else{c.call(this)}}).bind(this);var b=this.keydown.setupBuffer;this.keydown.setupBuffer=(function(g,f){if(this.keydown.ctrl&&f===89&&!g.shiftKey&&!g.altKey&&this.opts.rebuffer.length!==0){g.preventDefault();this.buffer.redo();return}b.call(this,g,f)}).bind(this)},keyup:function(){var b=this.keyup.replaceToParagraph;this.keyup.replaceToParagraph=(function(c){if(this.keyup.current.tagName!=="DIV"||this.keyup.current.parentElement.tagName!=="BLOCKQUOTE"){b.call(this,c)}}).bind(this)},link:function(){var c=this.link.insert;this.link.insert=(function(){c.call(this);this.selection.get();var d=this.selection.getCurrent();if(d.nodeType===Node.TEXT_NODE){d=d.parentElement}if(d.tagName==="A"){this.caret.setAfter(d)}}).bind(this);var b=this.link.set;this.link.set=(function(g,e,f){b.call(this,g,e,f);if(g.length&&this.link.text!==g){this.selection.get();var d=this.selection.getCurrent();if(d.nodeType===Node.TEXT_NODE){d=d.parentElement}if(d.tagName==="A"){$(d).text(g)}}}).bind(this)},modal:function(){this.modal.dialog=null;var c=this.modal.addTemplate;this.modal.addTemplate=(function(d,e){if(d!=="table"){c.call(this,d,e)}}).bind(this);this.modal.build=function(){};this.modal.load=(function(d,f,e){this.modal.templateName=d;this.modal.title=f;this.modal.dialog=$("
    ").hide().appendTo(document.body);this.modal.dialog.html(this.modal.getTemplate(this.modal.templateName));this.$modalFooter=null}).bind(this);this.modal.show=(function(){this.modal.dialog.wcfDialog({onClose:$.proxy(this.modal.close,this),title:this.modal.title});this.modal.dialog.find("input:first").focus()}).bind(this);var b=this.modal.createButton;this.modal.createButton=(function(d,e){if(this.$modalFooter===null){this.$modalFooter=$('
    ').appendTo(this.modal.dialog);this.modal.dialog.addClass("dialogForm")}return b.call(this,d,e)}).bind(this);this.modal.close=(function(){if(this.modal.dialog===null){return}try{this.modal.dialog.wcfDialog("close");this.modal.dialog.remove()}catch(d){}this.modal.dialog=null}).bind(this);this.modal.createCancelButton=function(){return $()};this.modal.createDeleteButton=function(){return $()}},observe:function(){var e=(function(k,f,i,g,j,l){var h=this.$toolbar.find(i);if(k&&k.closest(f,this.$editor[0]).length!=0){h[(g?"removeClass":"addClass")](j)}else{if(l&&!this.opts.visual){return}h[(g?"addClass":"removeClass")](j)}}).bind(this);var d=this.observe.buttons;this.observe.buttons=(function(g,h){d.call(this,g,h);var f=this.selection.getParent();f=(f===false)?null:$(f);e(f,"ul, ol","a.re-indent, a.re-outdent",true,"redactor-button-disabled");e(f,"blockquote.quoteBox","a.re-__wcf_quote",false,"redactor-button-disabled",true);e(f,"sub","a.re-subscript",false,"redactor-act");e(f,"sup","a.re-superscript",false,"redactor-act")}).bind(this);var b=this.observe.load;this.observe.load=(function(){b.call(this);WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","observe_load_"+this.$textarea.wcfIdentify())}).bind(this);var c=this.observe.showTooltip;this.observe.showTooltip=(function(g){var f=$(g.target);if(!f.hasClass("redactorQuoteEdit")){c.call(this,g)}}).bind(this)},paste:function(){var b=this.paste.insert;this.paste.insert=(function(c){b.call(this,c);setTimeout((function(){this.wutil.fixDOM();if($.browser.msie){getSelection().getRangeAt(0).collapse(false)}this.wutil.saveSelection()}).bind(this),20)}).bind(this)},selection:function(){this.selection.implicitRange=null;var b=(function(f,d){var c=d.nextSibling;if(c!==null&&c.nodeType===Node.TEXT_NODE&&c.length===0){$(c).remove()}var e=null;if((d.id==="selection-marker-1"&&!this.$editor.find("#selection-marker-2").length)||d.id==="nodes-marker-1"&&!this.$editor.find("#nodes-marker-2").length){e=d.previousSibling}$(d).remove();if(e!==null){this.selection.implicitRange=document.createRange();this.selection.implicitRange.setStart(e,e.length);this.selection.implicitRange.setEnd(e,e.length)}else{this.selection.implicitRange=null}}).bind(this);this.selection.removeMarkers=(function(){this.$editor.find("span.redactor-selection-marker").each(b)}).bind(this);this.selection.removeNodesMarkers=(function(){$(document).find("span.redactor-nodes-marker").each(b);this.$editor.find("span.redactor-nodes-marker").each(b)}).bind(this)},utils:function(){this.utils.removeEmpty=function(b,c){}},rebuildTemplates:function(){this.opts.modal.image='
    ";this.opts.modal.imageEdit=this.opts.modal.image;this.opts.modal.link='';this.opts.modal.quote='
    ';var b="";$.each(__REDACTOR_CODE_HIGHLIGHTERS,function(d,c){if(d==="plain"){return true}b+='"});this.opts.modal.code="
    "+WCF.Language.get("wcf.bbcode.code.settings")+'
    "+WCF.Language.get("wcf.bbcode.code.highlighter.description")+'
    '+WCF.Language.get("wcf.bbcode.code.lineNumber.description")+'
    '+WCF.Language.get("wcf.bbcode.code.filename.description")+"
    "+WCF.Language.get("wcf.bbcode.code")+'