Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Sun, 17 Jul 2016 02:00:35 +0000 (04:00 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Sun, 17 Jul 2016 02:00:35 +0000 (04:00 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js

index ca2cfda6e028a33e76b6606e4c2b28bb7d37e4e0..40c4f1e8e6039a69ee57e75dd89bf07629f41616 100644 (file)
@@ -42,3 +42,38 @@ $.Redactor.prototype.WoltLabSize=function(){"use strict";return{init:function(){
 $.Redactor.prototype.WoltLabSmiley=function(){"use strict";return{init:function(){require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","insertSmiley_"+this.$element[0].id,this.WoltLabSmiley._insert.bind(this))}.bind(this))},_insert:function(t){this.insert.html('<img src="'+t.path+'" class="smiley" alt="'+t.code+'">')}}};
 // WoltLabSpoiler.js
 $.Redactor.prototype.WoltLabSpoiler=function(){"use strict";return{init:function(){require(["WoltLab/WCF/Ui/Redactor/Spoiler"],function(t){new t(this)}.bind(this))}}};
+
+// WoltLabBlock.js
+$.Redactor.prototype.WoltLabBlock=function(){"use strict";return{init:function(){this.block.tags=["p","blockquote","pre","h1","h2","h3","h4","h5","h6","div","figure"],this.block.format=function(t,s,o,i){return t="quote"===t?"blockquote":t,-1!==$.inArray(t,this.block.tags)?("p"===t&&"undefined"==typeof s&&(s="class"),this.placeholder.hide(),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(t,s,o,i):this.block.formatUncollapsed(t,s,o,i)):void 0}.bind(this)},register:function(t){-1===this.block.tags.indexOf(t)&&(this.block.tags.push(t),-1===this.opts.blockTags.indexOf(t)&&(this.opts.blockTags.push(t),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i")))}}};
+// WoltLabButton.js
+$.Redactor.prototype.WoltLabButton=function(){"use strict";return{init:function(){var t,o,s,e;for(s=0,e=this.opts.woltlab.customButtons.length;e>s;s++)o=this.opts.woltlab.customButtons[s],t=this.button.add(o,""),this.button.addCallback(t,this.WoltLabButton._handleCustomButton);var n;for(s=0,e=this.opts.buttons.length;e>s;s++)if(o=this.opts.buttons[s],"wcfSeparator"!==o){if(!this.opts.woltlab.buttons.hasOwnProperty(o))throw new Error("Missing button definition for '"+o+"'.");if(n=this.opts.woltlab.buttons[o],"subscript"===o||"superscript"===o?(t=this.button.addAfter(this.opts.buttons[s-1],o,""),this.button.setEvent(t,o,{func:"inline.format"})):t=this.button.get(o),this.button.setIcon(t,'<span class="icon icon16 '+n.icon+'"></span>'),!t[0])throw new Error("Missing button element for '"+o+"'.");elAttr(t[0],"title",n.title),t[0].classList.add("jsTooltip")}for(var i,r={},l=[],a=this.core.toolbar()[0];a.childElementCount;)i=a.removeChild(a.children[0]),o=elAttr(i.children[0],"rel"),r[o]=i,l.push(o);var h=!1;for(s=0,e=this.opts.buttons.length;e>s;s++)o=this.opts.buttons[s],"wcfSeparator"!==o?(i=r[o],a.appendChild(i),l.splice(l.indexOf(o),1),h&&(i.classList.add("redactor-toolbar-separator"),h=!1)):h=!0;l.forEach(function(t){a.appendChild(r[t])}),WCF.DOMNodeInsertedHandler.execute()},_handleCustomButton:function(t){var o={cancel:!1};if(WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","bbcode_"+t+"_"+this.$element[0].id,o),o.cancel!==!0){this.buffer.set();var s="["+t+"]"+this.selection.html()+(this.selection.is()?"":this.marker.html())+"[/"+t+"]";this.insert.html(s),this.selection.restore()}}}};
+// WoltLabCode.js
+$.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){require(["WoltLab/WCF/Ui/Redactor/Code"],function(t){new t(this)}.bind(this))}}};
+// WoltLabColor.js
+$.Redactor.prototype.WoltLabColor=function(){"use strict";return{init:function(){for(var o,t=["000000","800000","8B4513","2F4F4F","008080","000080","4B0082","696969","B22222","A52A2A","DAA520","006400","40E0D0","0000CD","800080","808080","FF0000","FF8C00","FFD700","008000","00FFFF","0000FF","EE82EE","A9A9A9","FFA07A","FFA500","FFFF00","00FF00","AFEEEE","ADD8E6","DDA0DD","D3D3D3","FFF0F5","FAEBD7","FFFFE0","F0FFF0","F0FFFF","F0F8FF","E6E6FA","FFFFFF"],F=this.WoltLabColor.setColor.bind(this),r={removeColor:{title:"remove color",func:this.WoltLabColor.removeColor.bind(this)}},e=0,l=t.length;l>e;e++)o=t[e],r["color_"+o]={title:"#"+o,func:F};var i=this.button.add("woltlabColor","");this.button.addDropdown(i,r),i.data("dropdown").find("a").each(function(o,t){t.className.match(/redactor-dropdown-color_([A-F0-9]{6})/)&&(t.parentNode.classList.add("woltlab-color-"+RegExp.$1),t.parentNode.classList.add("woltlab-color-selection"))})},setColor:function(o){o=o.replace(/^color_/,""),require(["WoltLab/WCF/Ui/Redactor/Format"],function(t){this.selection.save(),t.format(this.$editor[0],"woltlab-color","woltlab-color-"+o),this.selection.restore()}.bind(this))},removeColor:function(){require(["WoltLab/WCF/Ui/Redactor/Format"],function(o){this.selection.save(),o.removeFormat(this.$editor[0],"woltlab-color"),this.selection.restore()}.bind(this))}}};
+// WoltLabDropdown.js
+$.Redactor.prototype.WoltLabDropdown=function(){"use strict";return{init:function(){this.utils.disableBodyScroll=function(){},this.utils.enableBodyScroll=function(){},this.WoltLabDropdown._hideAll(),this.WoltLabDropdown._show()},_hideAll:function(){var o=this.dropdown.hideAll;this.dropdown.hideAll=function(t,i){o.call(this,t,i),$(".redactor-dropdown-"+this.uuid).stop(!0,!0).hide()}.bind(this)},_show:function(){var o=this.dropdown.show;this.dropdown.show=function(t,i){var l=this.button.get(i),d=l.data("dropdown");if(!elDataBool(d[0],"woltlab")){var n=elCreate("ul");for(n.className="dropdownMenu";d[0].childElementCount;)n.appendChild(d[0].children[0]);d[0].appendChild(n),elData(d[0],"woltlab",!0)}var s=l.hasClass("dropact");o.call(this,t,i),s||d.stop(!0).show()}.bind(this)}}};
+// WoltLabEvent.js
+$.Redactor.prototype.WoltLabEvent=function(){"use strict";return{init:function(){this._callbacks=[],this._elementId=this.$element[0].id,require(["EventHandler"],this.WoltLabEvent._setEvents.bind(this))},_setEvents:function(t){var e=this.$element[0].id,i=this.observe.load;this.observe.load=function(){i.call(this),t.fire("com.woltlab.wcf.redactor2","observe_load_"+e,{editor:this.$editor[0]})}.bind(this),this.opts.callbacks.keyup=function(i){var n={cancel:!1,event:i};return t.fire("com.woltlab.wcf.redactor","keyup_"+e,n),n.cancel===!1},t.add("com.woltlab.wcf.redactor2","getText_"+e,function(t){t.message=this.code.get()}.bind(this)),t.add("com.woltlab.wcf.redactor2","reset_"+e,function(){this.code.set("")}.bind(this))},register:function(t,e){require(["EventHandler"],function(i){-1===this._callbacks.indexOf(t)&&(this.opts.callbacks[t]=function(e){var n={cancel:!1,event:e,redactor:this};return i.fire("com.woltlab.wcf.redactor2",t+"_"+this.WoltLabEvent._elementId,n),n.cancel===!1}.bind(this),this._callbacks.push(t)),require(["EventHandler"],function(i){i.add("com.woltlab.wcf.redactor2",t+"_"+this.WoltLabEvent._elementId,e)}.bind(this))}.bind(this))}}};
+// WoltLabImage.js
+$.Redactor.prototype.WoltLabImage=function(){"use strict";return{init:function(){var t=this.button.add("woltlabImage","");this.button.addCallback(t,this.WoltLabImage.add);var e=this.image.showEdit;this.image.showEdit=function(t){var a=t[0];if(!a.classList.contains("smiley")){e(t),this.modal.setTitle(WCF.Language.get("wcf.editor.image.edit")),this.modal.getActionButton().text(WCF.Language.get("wcf.global.button.save")),this.modal.getDeleteButton().text(WCF.Language.get("wcf.global.button.delete")),elById("redactor-image-source").value=a.src;var i=elById("redactor-image-float");a.classList.contains("messageFloatObjectLeft")?i.value="left":a.classList.contains("messageFloatObjectRight")&&(i.value="right"),a.classList.contains("woltlabAttachment")&&elRemove(elById("redactor-image-source-container"))}}.bind(this);var a=this.image.update;this.image.update=function(){var t=this.observe.image[0],e=elById("redactor-image-source"),i=function(t,e){$('<small class="innerError" />').text(e).insertAfter(t)};if(!t.classList.contains("woltlabAttachment")){var o=e.value.trim();if(""===o)return i(e,WCF.Language.get("wcf.global.form.error.empty"));if(!o.match(this.opts.regexps.url))return i(e,WCF.Language.get("wcf.editor.image.source.error.invalid"));t.src=o}t.classList.remove("messageFloatObjectLeft"),t.classList.remove("messageFloatObjectRight");var r=elById("redactor-image-float").value;("left"===r||"right"===r)&&t.classList.add("messageFloatObject"+WCF.String.ucfirst(r)),a(),t.removeAttribute("alt"),t.removeAttribute("title")}.bind(this),this.opts.modal["image-edit"]='<div class="section"><dl id="redactor-image-source-container"><dt><label for="redactor-image-source">'+WCF.Language.get("wcf.editor.image.source")+'</label></dt><dd><input type="text" id="redactor-image-source" class="long"></dd></dl><dl><dt><label for="redactor-image-link">'+WCF.Language.get("wcf.editor.image.link")+'</label></dt><dd><input type="text" id="redactor-image-link" class="long"></dd></dl><dl><dt><label for="redactor-image-float">'+WCF.Language.get("wcf.editor.image.float")+'</label></dt><dd><select id="redactor-image-float"><option value="none">'+WCF.Language.get("wcf.global.noSelection")+'</option><option value="left">'+WCF.Language.get("wcf.editor.image.float.left")+'</option><option value="right">'+WCF.Language.get("wcf.editor.image.float.right")+'</option></select></dd></dl><input id="redactor-image-title" style="display: none"><div class="formSubmit"><button id="redactor-modal-button-action" class="buttonPrimary">Insert</button><button id="redactor-modal-button-delete" class="redactor-modal-button-offset">Delete</button></div></div>'},add:function(){this.modal.load("image-edit",WCF.Language.get("wcf.editor.image.insert")),this.modal.show(),this.modal.getDeleteButton().hide();var t=this.modal.getActionButton()[0];t.addEventListener(WCF_CLICK_EVENT,this.WoltLabImage.insert),t.textContent=WCF.Language.get("wcf.global.button.insert")},insert:function(t){t.preventDefault(),this.modal.getModal().find(".innerError").remove();var e=elById("redactor-image-source"),a=function(t,e){$('<small class="innerError" />').text(e).insertAfter(t)},i=e.value.trim();if(""===i)return a(e,WCF.Language.get("wcf.global.form.error.empty"));if(!i.match(this.opts.regexps.url))return a(e,WCF.Language.get("wcf.editor.image.source.error.invalid"));var o=elById("redactor-image-link"),r=o.value.trim();if(""!==r&&!r.match(this.opts.regexps.url))return a(o,WCF.Language.get("wcf.editor.image.link.error.invalid"));var l=elById("redactor-image-float").value,s="";("left"===l||"right"===l)&&(s="messageFloatObject"+WCF.String.ucfirst(l));var n='<img src="'+WCF.String.escapeHTML(i)+'"'+(s?' class="'+s+'"':"")+">";r&&(n='<a href="'+WCF.String.escapeHTML(r)+'">'+n+"</a>"),this.modal.close(),this.insert.html(n)}}};
+// WoltLabInlineCode.js
+$.Redactor.prototype.WoltLabInlineCode=function(){"use strict";return{init:function(){this.opts.activeButtonsStates.kbd="tt",require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","bbcode_tt_"+this.$element[0].id,function(t){t.cancel=!0,this.button.toggle({},"kbd","func","inline.format")}.bind(this))}.bind(this))}}};
+// WoltLabLink.js
+$.Redactor.prototype.WoltLabLink=function(){"use strict";var i=null;return{init:function(){this.link.show=this.WoltLabLink.show.bind(this),require(["WoltLab/WCF/Ui/Redactor/Link"],function(t){i=t})},show:function(t){"undefined"!=typeof t&&t.preventDefault&&t.preventDefault(),this.observe.closeAllTooltip();var e=this.link.is();i.showDialog({insert:e===!1,submitCallback:function(){var i=this.link.buildLinkFromModal();return i===!1?!1:(this.selection.restore(),this.link.insert(i,!0),!0)}.bind(this)});var n=this.link.buildLinkFromElement(e);n.url=this.link.removeSelfHostFromUrl(n.url),this.link.setModalValues(n),this.detect.isDesktop()&&$("#redactor-link-url").focus()}}};
+// WoltLabMedia.js
+$.Redactor.prototype.WoltLabMedia=function(){"use strict";return{init:function(){var t=this.button.add("woltlabMedia","");$(t).addClass("jsMediaEditorButton"),require(["WoltLab/WCF/Media/Manager/Editor"],function(t){new t({editor:this})}.bind(this))}}};
+// WoltLabMention.js
+$.Redactor.prototype.WoltLabMention=function(){"use strict";return{init:function(){document.registerElement("woltlab-mention");require(["WoltLab/WCF/Ui/Redactor/Mention"],function(t){new t(this)}.bind(this))}}};
+// WoltLabModal.js
+$.Redactor.prototype.WoltLabModal=function(){"use strict";var t=null,i="",e=null,o={close:function(){e.close(this)},load:function(e,o){t.innerHTML=this.modal.getTemplate(e),i=o},setTitle:function(t){e.setTitle(this,t)},show:function(){e.open(this),e.setTitle(this,i)}};return{init:function(){t=elCreate("div"),t.className="redactorModalWrapper",t.id="redactorOverlay-"+this.uuid,elHide(t),document.body.appendChild(t),this.$modalBody=$(t),require(["Ui/Dialog"],function(t){e=t;for(var i in o)o.hasOwnProperty(i)&&(this.modal[i]=o[i].bind(this))}.bind(this)),this._dialogSetup=function(){return{id:"redactorOverlay-"+this.uuid,options:{onClose:function(t){var i=e.getDialog(t);elBySelAll("[id]",i.content,function(t){t.removeAttribute("id")})}}}}}}};
+// WoltLabPage.js
+$.Redactor.prototype.WoltLabPage=function(){"use strict";return{init:function(){var t=this.button.add("woltlabPage","");require(["WoltLab/WCF/Ui/Redactor/Page"],function(i){new i(this,t[0])}.bind(this))}}};
+// WoltLabQuote.js
+$.Redactor.prototype.WoltLabQuote=function(){"use strict";return{init:function(){var t=this.button.add("woltlabQuote","");require(["WoltLab/WCF/Ui/Redactor/Quote"],function(o){new o(this,t)}.bind(this))}}};
+// WoltLabSize.js
+$.Redactor.prototype.WoltLabSize=function(){"use strict";return{init:function(){for(var t,e=[8,10,12,14,18,24,36],i=this.WoltLabSize.setSize.bind(this),o={},s=0,a=e.length;a>s;s++)t=e[s],o["size_"+t]={title:t,func:i};o.removeSize={title:"remove size",func:this.WoltLabSize.removeSize.bind(this)};var r=this.button.add("woltlabSize","");this.button.addDropdown(r,o),r.data("dropdown").find("a").each(function(t,e){e.className.match(/redactor-dropdown-size_(\d{1,2})/)&&(e.parentNode.classList.add("woltlab-size-"+RegExp.$1),e.parentNode.classList.add("woltlab-size-selection"))})},setSize:function(t){require(["WoltLab/WCF/Ui/Redactor/Format"],function(e){this.selection.save(),e.format(this.$editor[0],"woltlab-size","woltlab-size-"+t.replace(/^size_/,"")),this.selection.restore()}.bind(this))},removeSize:function(){require(["WoltLab/WCF/Ui/Redactor/Format"],function(t){this.selection.save(),t.removeFormat(this.$editor[0],"woltlab-size"),this.selection.restore()}.bind(this))}}};
+// WoltLabSmiley.js
+$.Redactor.prototype.WoltLabSmiley=function(){"use strict";return{init:function(){require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","insertSmiley_"+this.$element[0].id,this.WoltLabSmiley._insert.bind(this))}.bind(this))},_insert:function(t){this.insert.html('<img src="'+t.path+'" class="smiley" alt="'+t.code+'">')}}};
+// WoltLabSpoiler.js
+$.Redactor.prototype.WoltLabSpoiler=function(){"use strict";return{init:function(){require(["WoltLab/WCF/Ui/Redactor/Spoiler"],function(t){new t(this)}.bind(this))}}};