From 238e2ab2e26ea570823707ffc9a16272f3a8fdc3 Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Sat, 13 Dec 2014 15:46:44 +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 ff2d3a7386..aee0023935 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(){return{init:function(){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.link();this.wmonkeypatch.modal();this.wmonkeypatch.paste();this.wmonkeypatch.observe();this.wmonkeypatch.utils();this.wmonkeypatch.rebuildTemplates();this.wmonkeypatch.bindEvents();this.wmonkeypatch.fixWebKit()},bindEvents:function(){var a=this.$textarea.wcfIdentify();this.wutil.setOption("keydownCallback",function(c){var b={cancel:false,event:c};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keydown_"+a,b);return(b.cancel?false:true)});this.wutil.setOption("keyupCallback",(function(c){this.wutil.saveSelection();var b={cancel:false,event:c};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keyup_"+a,b);return(b.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))}},button:function(){var a=this.button.addDropdown;this.button.addDropdown=(function(b,d){var c=a.call(this,b,d);if(!d){c.addClass("dropdownMenu")}return c}).bind(this)},caret:function(){this.caret.set=(function(g,f,d,b){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()}}g=g[0]||g;d=d[0]||d;if(this.utils.isBlockTag(g.tagName)&&g.innerHTML===""){g.innerHTML=this.opts.invisibleSpace}if(g.tagName=="BR"&&this.opts.linebreaks===false){var a=$(this.opts.emptyHtml)[0];$(g).replaceWith(a);g=a;d=g}this.selection.get();try{this.range.setStart(g,f);this.range.setEnd(d,b)}catch(c){}this.selection.addRange()}).bind(this);this.caret.setOffset=(function(g,a){if(typeof a=="undefined"){a=g}if(!this.focus.isFocused()){this.focus.setStart()}var b=document.createRange();var d=document.getSelection();var c,f=0;var e=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);while(c=e.nextNode()){f+=c.nodeValue.length;if(f>g||(g===a&&f===g)){b.setStart(c,c.nodeValue.length+g-f);g=Infinity}if(f>=a){b.setEnd(c,c.nodeValue.length+a-f);break}}d.removeAllRanges();d.addRange(b)}).bind(this)},clean:function(){var c=function(e){e=e.replace(/\u201D/g,"__wcf_preserve_character_1__");e=e.replace(/\u201C/g,"__wcf_preserve_character_2__");e=e.replace(/\u2018/g,"__wcf_preserve_character_3__");e=e.replace(/\u2019/g,"__wcf_preserve_character_4__");return e};var b=function(e){e=e.replace(/__wcf_preserve_character_1__/g,"\u201D");e=e.replace(/__wcf_preserve_character_2__/g,"\u201C");e=e.replace(/__wcf_preserve_character_3__/g,"\u2018");e=e.replace(/__wcf_preserve_character_4__/g,"\u2019");return e};var d=this.clean.onPaste;this.clean.onPaste=(function(f,e){this.opts.replaceDivs=true;f=c(f);f=d.call(this,f,e);this.opts.replaceDivs=false;return b(f)}).bind(this);var a=this.clean.onSet;this.clean.onSet=(function(e){e=c(e);e=a.call(this,e);return b(e)}).bind(this);this.clean.setVerified=(function(g){if(this.utils.browser("msie")){return g}g=g.replace(new RegExp("])>","gi"),'');g=g.replace(new RegExp("","gi"),'');var j=g.match(new RegExp('<(span|img)(.*?)style="(.*?)"(.*?[^>])>',"gi"));if(j){var e=j.length;for(var f=0;f').appendTo(e)}else{var g=$("
  • ");var f=$(''+h.title+"");f.on("click",$.proxy(function(k){var j="func";var l=h.func;if(h.command){j="command";l=h.command}else{if(h.dropdown){j="dropdown";l=h.dropdown}}this.button.onClick(k,i,j,l)},this));f.appendTo(g);g.appendTo(e)}}).bind(this))}).bind(this);var a=this.dropdown.show;this.dropdown.show=$.proxy(function(f,c){var d=this.button.get(c).data("dropdown");b(d);if($.browser.iOS){this.wutil.saveSelection()}a.call(this,f,c);d.off("mouseover mouseout")},this);var b=function(f){if(f.hasClass("dropdownMenu")){return}f.addClass("dropdownMenu");var e=f.children("a").detach();for(var d=0;d").appendTo(f);c.append(e[d])}}},image:function(){var b=this.image.setEditable;this.image.setEditable=(function(c){if(!c.hasClass("smiley")){b.call(this,c)}}).bind(this);var a=this.image.loadEditableControls;this.image.loadEditableControls=(function(c){var d=a.call(this,c);if(c.hasClass("redactorDisableResize")&&d!==false){d.hide()}return d}).bind(this);this.image.show=(function(){this.modal.load("image",this.lang.get("image"),0);var c=this.modal.createActionButton(this.lang.get("insert"));c.click($.proxy(this.wbutton._insertImage,this));this.selection.save();this.modal.show()}).bind(this);this.image.showEdit=(function(c){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(c)}).bind(this));$("#redactor-image-link-source").val(c.attr("src"));$("#redactor-image-align").val(c.css("float"));this.modal.show()}).bind(this);this.image.update=(function(c){this.image.hideResize();this.buffer.set();c.attr("src",$("#redactor-image-link-source").val());this.image.setFloating(c);this.modal.close();this.observe.images()}).bind(this)},inline:function(){var b=this.inline.format;this.inline.format=(function(c,d,e){if($.browser.iOS){this.wmonkeypatch.restoreSelection()}b.call(this,c,d,e)}).bind(this);var a=this.inline.removeStyleRule;this.inline.removeStyleRule=(function(c){if($.browser.iOS){this.wmonkeypatch.restoreSelection()}a.call(this,c)}).bind(this)},insert:function(){var c=($.browser.webkit||document.documentElement.style.hasOwnProperty("WebkitAppearance")||window.hasOwnProperty("chrome"));var a=(function(g){var f=this.$editor.html();if(this.utils.isEmpty(f)){var h=false;if(g.match(/^<(blockquote|div|p)/)){this.$editor.empty();h=true}this.$editor.focus();if(!h){this.caret.setEnd(this.$editor.children("p:eq(0)"))}}else{if(document.activeElement!==this.$editor[0]){this.wutil.restoreSelection()}}}).bind(this);var b=(function(){var f=false;this.$editor.find("span").each(function(){var g=$(this);if(g.data("verified")!=="redactor"){var h=$("helper").insertBefore(g);h.after(g.contents());h.remove();g.remove();f=true}});if(f){this.wutil.saveSelection()}}).bind(this);var e=this.insert.html;this.insert.html=(function(g,f){a(g);e.call(this,g,f);this.wutil.saveSelection();if(c){setTimeout(function(){b()},10)}}).bind(this);if(navigator.userAgent.match(/safari/i)){var d=this.insert.execHtml;this.insert.execHtml=(function(f){try{d.call(this,f)}catch(g){console.debug("[Redactor.wmonkeypatch] Suppressed error in Safari: "+g.message)}}).bind(this)}},keydown:function(){this.keydown.enterWithinBlockquote=false;var b=this.keydown.onTab;this.keydown.onTab=(function(f,c){var d=this.selection.getBlock();if(d&&d.tagName==="LI"){return b.call(this,f,c)}return true}).bind(this);var a=this.keydown.replaceDivToParagraph;this.keydown.replaceDivToParagraph=(function(){if(this.keydown.enterWithinBlockquote){this.keydown.enterWithinBlockquote=false}else{a.call(this)}}).bind(this)},link:function(){var a=this.link.insert;this.link.insert=(function(){a.call(this);this.selection.get();var b=this.selection.getCurrent();if(b.tagName==="A"){this.caret.setAfter(b)}}).bind(this)},modal:function(){this.modal.dialog=null;var b=this.modal.addTemplate;this.modal.addTemplate=(function(c,d){if(c!=="table"){b.call(this,c,d)}}).bind(this);this.modal.build=function(){};this.modal.load=(function(c,e,d){this.modal.templateName=c;this.modal.title=e;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 a=this.modal.createButton;this.modal.createButton=(function(c,d){if(this.$modalFooter===null){this.$modalFooter=$('
    ').appendTo(this.modal.dialog);this.modal.dialog.addClass("dialogForm")}return a.call(this,c,d)}).bind(this);this.modal.close=(function(){if(this.modal.dialog===null){return}try{this.modal.dialog.wcfDialog("close");this.modal.dialog.remove()}catch(c){}this.modal.dialog=null}).bind(this);this.modal.createCancelButton=function(){return $()};this.modal.createDeleteButton=function(){return $()}},observe:function(){var c=(function(i,d,g,e,h,j){var f=this.$toolbar.find(g);if(i&&i.closest(d,this.$editor[0]).length!=0){f[(e?"removeClass":"addClass")](h)}else{if(j&&!this.opts.visual){return}f[(e?"addClass":"removeClass")](h)}}).bind(this);var b=this.observe.buttons;this.observe.buttons=(function(f,g){b.call(this,f,g);var d=this.selection.getParent();d=(d===false)?null:$(d);c(d,"ul, ol","a.re-indent, a.re-outdent",true,"redactor-button-disabled");c(d,"blockquote.quoteBox","a.re-__wcf_quote",false,"redactor-button-disabled",true);c(d,"sub","a.re-subscript",false,"redactor-act");c(d,"sup","a.re-superscript",false,"redactor-act")}).bind(this);var a=this.observe.showTooltip;this.observe.showTooltip=(function(f){var d=$(f.target);if(!d.hasClass("redactorQuoteEdit")){a.call(this,f)}}).bind(this)},paste:function(){var b=(function(){var e=this.$editor[0].childNodes[0];var c=e;var d=null;while(c){e=c;c=e.nextSibling;if(e.nodeType===Element.ELEMENT_NODE){if(this.reIsBlock.test(e.tagName)){d=null}else{if(d===null){d=$("

    ").insertBefore(e)}d.append(e)}}else{if(e.nodeType===Element.TEXT_NODE){if(d===null){d=$("

    ").insertBefore(e)}d.append(e)}}}}).bind(this);var a=this.paste.insert;this.paste.insert=(function(c){a.call(this,c);setTimeout(b,20)}).bind(this)},utils:function(){this.utils.removeEmpty=function(a,b){}},rebuildTemplates:function(){this.opts.modal.image='

    ";this.opts.modal.imageEdit=this.opts.modal.image;this.opts.modal.link='';this.opts.modal.quote='
    ';this.opts.modal.table='
    '},fixWebKit:function(){return;if(!$.browser.webkit&&!document.documentElement.style.hasOwnProperty("WebkitAppearance")&&!window.hasOwnProperty("chrome")){return}var a={fontSize:this.$editor.css("font-size"),lineHeight:this.$editor.css("line-height")};var c=this.$editor.wcfIdentify();var b=document.createElement("style");b.type="text/css";b.innerHTML="#"+c+" span { font-size: "+a.fontSize+"; line-height: "+a.lineHeight+" }";document.head.appendChild(b)}}}; +if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wmonkeypatch=function(){return{init:function(){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.link();this.wmonkeypatch.modal();this.wmonkeypatch.paste();this.wmonkeypatch.observe();this.wmonkeypatch.utils();this.wmonkeypatch.rebuildTemplates();this.wmonkeypatch.bindEvents();this.wmonkeypatch.fixWebKit()},bindEvents:function(){var a=this.$textarea.wcfIdentify();this.wutil.setOption("keydownCallback",function(c){var b={cancel:false,event:c};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keydown_"+a,b);return(b.cancel?false:true)});this.wutil.setOption("keyupCallback",(function(c){this.wutil.saveSelection();var b={cancel:false,event:c};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keyup_"+a,b);return(b.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))}this.$editor.on("mousedown.wmonkeypatch mouseup.wmonkeypatch",(function(){this.wutil.saveSelection()}).bind(this))},button:function(){var a=this.button.addDropdown;this.button.addDropdown=(function(b,d){var c=a.call(this,b,d);if(!d){c.addClass("dropdownMenu")}return c}).bind(this)},caret:function(){this.caret.set=(function(g,f,d,b){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()}}g=g[0]||g;d=d[0]||d;if(this.utils.isBlockTag(g.tagName)&&g.innerHTML===""){g.innerHTML=this.opts.invisibleSpace}if(g.tagName=="BR"&&this.opts.linebreaks===false){var a=$(this.opts.emptyHtml)[0];$(g).replaceWith(a);g=a;d=g}this.selection.get();try{this.range.setStart(g,f);this.range.setEnd(d,b)}catch(c){}this.selection.addRange()}).bind(this);this.caret.setOffset=(function(g,a){if(typeof a=="undefined"){a=g}if(!this.focus.isFocused()){this.focus.setStart()}var b=document.createRange();var d=document.getSelection();var c,f=0;var e=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);while(c=e.nextNode()){f+=c.nodeValue.length;if(f>g||(g===a&&f===g)){b.setStart(c,c.nodeValue.length+g-f);g=Infinity}if(f>=a){b.setEnd(c,c.nodeValue.length+a-f);break}}d.removeAllRanges();d.addRange(b)}).bind(this)},clean:function(){var c=function(e){e=e.replace(/\u201D/g,"__wcf_preserve_character_1__");e=e.replace(/\u201C/g,"__wcf_preserve_character_2__");e=e.replace(/\u2018/g,"__wcf_preserve_character_3__");e=e.replace(/\u2019/g,"__wcf_preserve_character_4__");return e};var b=function(e){e=e.replace(/__wcf_preserve_character_1__/g,"\u201D");e=e.replace(/__wcf_preserve_character_2__/g,"\u201C");e=e.replace(/__wcf_preserve_character_3__/g,"\u2018");e=e.replace(/__wcf_preserve_character_4__/g,"\u2019");return e};var d=this.clean.onPaste;this.clean.onPaste=(function(f,e){this.opts.replaceDivs=true;f=c(f);f=d.call(this,f,e);this.opts.replaceDivs=false;return b(f)}).bind(this);var a=this.clean.onSet;this.clean.onSet=(function(e){e=c(e);e=a.call(this,e);return b(e)}).bind(this);this.clean.setVerified=(function(g){if(this.utils.browser("msie")){return g}g=g.replace(new RegExp("])>","gi"),'');g=g.replace(new RegExp("","gi"),'');var j=g.match(new RegExp('<(span|img)(.*?)style="(.*?)"(.*?[^>])>',"gi"));if(j){var e=j.length;for(var f=0;f').appendTo(e)}else{var g=$("
  • ");var f=$(''+h.title+"");f.on("click",$.proxy(function(k){var j="func";var l=h.func;if(h.command){j="command";l=h.command}else{if(h.dropdown){j="dropdown";l=h.dropdown}}this.button.onClick(k,i,j,l)},this));f.appendTo(g);g.appendTo(e)}}).bind(this))}).bind(this);var a=this.dropdown.show;this.dropdown.show=$.proxy(function(f,c){var d=this.button.get(c).data("dropdown");b(d);if($.browser.iOS){this.wutil.saveSelection()}a.call(this,f,c);d.off("mouseover mouseout")},this);var b=function(f){if(f.hasClass("dropdownMenu")){return}f.addClass("dropdownMenu");var e=f.children("a").detach();for(var d=0;d").appendTo(f);c.append(e[d])}}},image:function(){var b=this.image.setEditable;this.image.setEditable=(function(c){if(!c.hasClass("smiley")){b.call(this,c)}}).bind(this);var a=this.image.loadEditableControls;this.image.loadEditableControls=(function(c){var d=a.call(this,c);if(c.hasClass("redactorDisableResize")&&d!==false){d.hide()}return d}).bind(this);this.image.show=(function(){this.modal.load("image",this.lang.get("image"),0);var c=this.modal.createActionButton(this.lang.get("insert"));c.click($.proxy(this.wbutton._insertImage,this));this.selection.save();this.modal.show()}).bind(this);this.image.showEdit=(function(c){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(c)}).bind(this));$("#redactor-image-link-source").val(c.attr("src"));$("#redactor-image-align").val(c.css("float"));this.modal.show()}).bind(this);this.image.update=(function(c){this.image.hideResize();this.buffer.set();c.attr("src",$("#redactor-image-link-source").val());this.image.setFloating(c);this.modal.close();this.observe.images()}).bind(this)},inline:function(){var b=this.inline.format;this.inline.format=(function(c,d,e){if($.browser.iOS){this.wmonkeypatch.restoreSelection()}b.call(this,c,d,e)}).bind(this);var a=this.inline.removeStyleRule;this.inline.removeStyleRule=(function(c){if($.browser.iOS){this.wmonkeypatch.restoreSelection()}a.call(this,c)}).bind(this)},insert:function(){var c=($.browser.webkit||document.documentElement.style.hasOwnProperty("WebkitAppearance")||window.hasOwnProperty("chrome"));var a=(function(g){var f=this.$editor.html();if(this.utils.isEmpty(f)){var h=false;if(g.match(/^<(blockquote|div|p)/)){this.$editor.empty();h=true}this.$editor.focus();if(!h){this.caret.setEnd(this.$editor.children("p:eq(0)"))}}else{if(document.activeElement!==this.$editor[0]){this.wutil.restoreSelection()}}}).bind(this);var b=(function(){var f=false;this.$editor.find("span").each(function(){var g=$(this);if(g.data("verified")!=="redactor"){var h=$("helper").insertBefore(g);h.after(g.contents());h.remove();g.remove();f=true}});if(f){this.wutil.saveSelection()}}).bind(this);var e=this.insert.html;this.insert.html=(function(g,f){a(g);e.call(this,g,f);this.wutil.saveSelection();if(c){setTimeout(function(){b()},10)}}).bind(this);if(navigator.userAgent.match(/safari/i)){var d=this.insert.execHtml;this.insert.execHtml=(function(f){try{d.call(this,f)}catch(g){console.debug("[Redactor.wmonkeypatch] Suppressed error in Safari: "+g.message)}}).bind(this)}},keydown:function(){this.keydown.enterWithinBlockquote=false;var b=this.keydown.onTab;this.keydown.onTab=(function(f,c){var d=this.selection.getBlock();if(d&&d.tagName==="LI"){return b.call(this,f,c)}return true}).bind(this);var a=this.keydown.replaceDivToParagraph;this.keydown.replaceDivToParagraph=(function(){if(this.keydown.enterWithinBlockquote){this.keydown.enterWithinBlockquote=false}else{a.call(this)}}).bind(this)},link:function(){var a=this.link.insert;this.link.insert=(function(){a.call(this);this.selection.get();var b=this.selection.getCurrent();if(b.tagName==="A"){this.caret.setAfter(b)}}).bind(this)},modal:function(){this.modal.dialog=null;var b=this.modal.addTemplate;this.modal.addTemplate=(function(c,d){if(c!=="table"){b.call(this,c,d)}}).bind(this);this.modal.build=function(){};this.modal.load=(function(c,e,d){this.modal.templateName=c;this.modal.title=e;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 a=this.modal.createButton;this.modal.createButton=(function(c,d){if(this.$modalFooter===null){this.$modalFooter=$('
    ').appendTo(this.modal.dialog);this.modal.dialog.addClass("dialogForm")}return a.call(this,c,d)}).bind(this);this.modal.close=(function(){if(this.modal.dialog===null){return}try{this.modal.dialog.wcfDialog("close");this.modal.dialog.remove()}catch(c){}this.modal.dialog=null}).bind(this);this.modal.createCancelButton=function(){return $()};this.modal.createDeleteButton=function(){return $()}},observe:function(){var c=(function(i,d,g,e,h,j){var f=this.$toolbar.find(g);if(i&&i.closest(d,this.$editor[0]).length!=0){f[(e?"removeClass":"addClass")](h)}else{if(j&&!this.opts.visual){return}f[(e?"addClass":"removeClass")](h)}}).bind(this);var b=this.observe.buttons;this.observe.buttons=(function(f,g){b.call(this,f,g);var d=this.selection.getParent();d=(d===false)?null:$(d);c(d,"ul, ol","a.re-indent, a.re-outdent",true,"redactor-button-disabled");c(d,"blockquote.quoteBox","a.re-__wcf_quote",false,"redactor-button-disabled",true);c(d,"sub","a.re-subscript",false,"redactor-act");c(d,"sup","a.re-superscript",false,"redactor-act")}).bind(this);var a=this.observe.showTooltip;this.observe.showTooltip=(function(f){var d=$(f.target);if(!d.hasClass("redactorQuoteEdit")){a.call(this,f)}}).bind(this)},paste:function(){var b=(function(){var e=this.$editor[0].childNodes[0];var c=e;var d=null;while(c){e=c;c=e.nextSibling;if(e.nodeType===Element.ELEMENT_NODE){if(this.reIsBlock.test(e.tagName)){d=null}else{if(d===null){d=$("

    ").insertBefore(e)}d.append(e)}}else{if(e.nodeType===Element.TEXT_NODE){if(d===null){d=$("

    ").insertBefore(e)}d.append(e)}}}}).bind(this);var a=this.paste.insert;this.paste.insert=(function(c){a.call(this,c);setTimeout(b,20)}).bind(this)},utils:function(){this.utils.removeEmpty=function(a,b){}},rebuildTemplates:function(){this.opts.modal.image='

    ";this.opts.modal.imageEdit=this.opts.modal.image;this.opts.modal.link='';this.opts.modal.quote='
    ';this.opts.modal.table='
    '},fixWebKit:function(){return;if(!$.browser.webkit&&!document.documentElement.style.hasOwnProperty("WebkitAppearance")&&!window.hasOwnProperty("chrome")){return}var a={fontSize:this.$editor.css("font-size"),lineHeight:this.$editor.css("line-height")};var c=this.$editor.wcfIdentify();var b=document.createElement("style");b.type="text/css";b.innerHTML="#"+c+" span { font-size: "+a.fontSize+"; line-height: "+a.lineHeight+" }";document.head.appendChild(b)}}}; // wupload.js if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wupload=function(){return{_boundGlobalUploadEvents:false,_dropArea:{},_timer:null,_isDragging:false,_isFile:false,init:function(){var a=".redactor_"+this.$textarea.wcfIdentify();$(document).on("dragover"+a,$.proxy(this.wupload._dragOver,this));$(document).on("dragleave"+a,$.proxy(this.wupload._dragLeave,this));$(document).on("drop"+a,(function(b){b.preventDefault();this.wupload._revertDropArea(undefined,this.$textarea.wcfIdentify())}).bind(this));if(!this.wupload._boundGlobalUploadEvents){this.wupload._boundGlobalUploadEvents=true;$(document).on("dragend",function(b){b.preventDefault()})}WCF.System.Event.addListener("com.woltlab.wcf.attachment","autoInsert_"+this.$textarea.wcfIdentify(),$.proxy(this.wupload.insertPastedImageAttachment,this))},_dragOver:function(d){d=d.originalEvent;if(!d.dataTransfer||!d.dataTransfer.types){return}var e=false;for(var c in d.dataTransfer){if(/^moz/.test(c)){e=true;break}}this.wupload._isFile=false;if(e){if(d.dataTransfer.types[0]==="application/x-moz-file"){this.wupload._isFile=true}}else{for(var g=0;g'+WCF.Language.get("wcf.attachment.dragAndDrop.dropHere")+"
    ").hide().appendTo(document.body);this.wupload._dropArea[b].on("dragover",$.proxy(this.wupload._hoverDropArea,this)).on("dragleave",$.proxy(this.wupload._revertDropArea,this)).on("drop",$.proxy(this.wupload._drop,this))}var a=(this.wutil.inWysiwygMode())?this.$editor.getDimensions("outer"):this.$textarea.getDimensions("outer");var f=(this.wutil.inWysiwygMode())?this.$editor.getOffsets("offset"):this.$textarea.getOffsets("offset");this.wupload._dropArea[b].css({height:a.height+"px",left:f.left+"px",lineHeight:a.height+"px",top:f.top+"px",width:a.width+"px"}).show();this.wupload._isDragging=true}d.preventDefault()},_hoverDropArea:function(a){this.wupload._dropArea[this.$textarea.wcfIdentify()].addClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropNow"))},_revertDropArea:function(c,a){if(!this.wupload._isFile){return}var b=a||this.$textarea.wcfIdentify();this.wupload._dropArea[b].removeClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropHere"));if(a){this.wupload._dropArea[b].hide()}},_dragLeave:function(){if(!this.wupload._isDragging||!this.wupload._isFile){return}if(this.wupload._timer===null){this.wupload._timer=new WCF.PeriodicalExecuter((function(a){a.stop();if(!this.wupload._isDragging){this.wupload._dropArea[this.$textarea.wcfIdentify()].hide()}}).bind(this),100)}else{this.wupload._timer.resume()}this.wupload._isDragging=false},_drop:function(c){if(!this.wupload._isFile){return}c=c.originalEvent||c;if(c.dataTransfer&&c.dataTransfer.files.length){c.preventDefault();var b=this.$textarea.wcfIdentify();this.wupload._revertDropArea(undefined,b);for(var d=0;d')},this))},insertPastedImageAttachment:function(b){var a=this.$editor.find("span.redactor-pastedImageFromClipboard-"+b.uploadID);a.before(b.attachment);a.remove()}}}; // wutil.js -- 2.20.1