From b32e9baae9567beae2aa61620637ee062d9c8080 Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Mon, 6 Oct 2014 20:11:52 +0200 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 17750c2a8c..8dd157675b 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js @@ -13,6 +13,6 @@ if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontsize=function() // wmonkeypatch.js if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wmonkeypatch=function(){return{init:function(){this.wmonkeypatch.button();this.wmonkeypatch.clean();this.wmonkeypatch.dropdown();this.wmonkeypatch.image();this.wmonkeypatch.insert();this.wmonkeypatch.keydown();this.wmonkeypatch.modal();this.wmonkeypatch.paste();this.wmonkeypatch.observe();this.wmonkeypatch.utils();this.wmonkeypatch.rebuildTemplates();this.wmonkeypatch.bindEvents()},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){var b={cancel:false,event:c};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keyup_"+a,b);return(b.cancel?false:true)});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)},clean:function(){var a=this.clean.onPaste;this.clean.onPaste=(function(c,b){this.opts.replaceDivs=true;c=a.call(this,c,b);this.opts.replaceDivs=false;return c}).bind(this)},dropdown:function(){this.dropdown.build=(function(b,d,c){d.addClass("dropdownMenu");$.each(c,(function(h,g){if(h=="dropdownDivider"){$('
  • ");var e=$(''+g.title+"");e.on("click",$.proxy(function(j){var i="func";var k=g.func;if(g.command){i="command";k=g.command}else{if(g.dropdown){i="dropdown";k=g.dropdown}}this.button.onClick(j,h,i,k)},this));e.appendTo(f);f.appendTo(d)}}).bind(this))}).bind(this);var a=this.dropdown.show;this.dropdown.show=$.proxy(function(c,b){a.call(this,c,b);this.button.get(b).data("dropdown").off("mouseover mouseout")},this)},image:function(){this.image.setEditable=(function(a){if(!this.opts.imageEditable){return}a.on("dragstart",$.proxy(this.image.onDrag,this));a.on("mousedown",$.proxy(this.image.hideResize,this));a.on("click touchstart",$.proxy(function(b){this.observe.image=a;if(this.$editor.find("#redactor-image-box").size()!==0){return false}if(!this.opts.imageEditable&&!this.opts.imageResizable){return}this.image.resizer=this.image.loadEditableControls(a);if(this.image.resizer===false){this.image.resizer=$()}else{this.image.resizer.on("mousedown.redactor touchstart.redactor",$.proxy(function(c){c.preventDefault();this.image.resizeHandle={x:c.pageX,y:c.pageY,el:a,ratio:a.width()/a.height(),h:a.height()};c=c.originalEvent||c;if(c.targetTouches){this.image.resizeHandle.x=c.targetTouches[0].pageX;this.image.resizeHandle.y=c.targetTouches[0].pageY}this.image.startResize()},this))}$(document).on("click.redactor-image-resize-hide",$.proxy(this.image.hideResize,this));this.$editor.on("click.redactor-image-resize-hide",$.proxy(this.image.hideResize,this))},this))}).bind(this);this.image.show=(function(){this.modal.load("image",this.lang.get("image"),0);var a=this.modal.createActionButton(this.lang.get("insert"));a.click($.proxy(this.wbutton._insertImage,this));this.selection.save();this.modal.show()}).bind(this);this.image.showEdit=(function(a){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(a)}).bind(this));$("#redactor-image-link-source").val(a.attr("src"));$("#redactor-image-align").val(a.css("float"));this.modal.show()}).bind(this);this.image.update=(function(a){this.image.hideResize();this.buffer.set();a.attr("src",$("#redactor-image-link-source").val());this.image.setFloating(a);this.modal.close();this.observe.images()}).bind(this)},insert:function(){var a=(function(){var c=this.$editor.html();if(this.utils.isEmpty(c)){this.$editor.focus();this.caret.setEnd(this.$editor.children("p:eq(0)"))}}).bind(this);var b=this.insert.html;this.insert.html=(function(d,c){a();b.call(this,d,c)}).bind(this)},keydown:function(){this.keydown.enterWithinBlockquote=false;this.keydown.onTab=(function(c,b){c.preventDefault();if(c.metaKey&&b===219){this.indent.decrease()}else{if(c.metaKey&&b===221){this.indent.increase()}else{if(!c.shiftKey){this.indent.increase()}else{this.indent.decrease()}}}return false}).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)},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})}).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(){this.modal.dialog.wcfDialog("close");this.modal.dialog.remove()}).bind(this);this.modal.createCancelButton=function(){return $()};this.modal.createDeleteButton=function(){return $()}},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)},observe:function(){var b=(function(h,c,f,d,g,i){var e=this.$toolbar.find(f);if(h&&h.closest(c,this.$editor[0]).length!=0){e[(d?"removeClass":"addClass")](g)}else{if(i&&!this.opts.visual){return}e[(d?"addClass":"removeClass")](g)}}).bind(this);var a=this.observe.buttons;this.observe.buttons=(function(d,f){a.call(this,d,f);var c=this.selection.getParent();c=(c===false)?null:$(c);b(c,"ul, ol","a.re-indent, a.re-outdent",true,"redactor-button-disabled");b(c,"blockquote.quoteBox","a.re-__wcf_quote",false,"redactor-button-disabled",true);b(c,"sub","a.re-subscript",false,"redactor-act");b(c,"sup","a.re-superscript",false,"redactor-act")}).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.quote='
    ';this.opts.modal.table='
    '}}}; // wupload.js -if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wupload=function(){return{_boundGlobalUploadEvents:false,_wUploadDropArea:{},_timer:null,_isDragging:false,_isFile:false,init:function(){var a=".redactor_"+this.$textarea.wcfIdentify();$(document).on("dragover"+a,$.proxy(this._dragOver,this));$(document).on("dragleave"+a,$.proxy(this._dragLeave,this));$(document).on("drop"+a,$.proxy(function(b){b.preventDefault();this._revertDropArea(undefined,this.$textarea.wcfIdentify())},this));if(!this._boundGlobalUploadEvents){this._boundGlobalUploadEvents=true;$(document).on("dragend",function(b){b.preventDefault()})}WCF.System.Event.addListener("com.woltlab.wcf.attachment","autoInsert_"+this.$textarea.wcfIdentify(),$.proxy(this.insertPastedImageAttachment,this))},_dragOver:function(c){c=c.originalEvent;if(!c.dataTransfer||!c.dataTransfer.types){return}this._isFile=false;if(c.dataTransfer.types[0]==="application/x-moz-file"){this._isFile=true}else{for(var e=0;e'+WCF.Language.get("wcf.attachment.dragAndDrop.dropHere")+"
    ").hide().appendTo(document.body);this._wUploadDropArea[b].on("dragover",$.proxy(this._hoverDropArea,this)).on("dragleave",$.proxy(this._revertDropArea,this)).on("drop",$.proxy(this._drop,this))}var a=(this.inWysiwygMode())?this.$editor.getDimensions("outer"):this.$textarea.getDimensions("outer");var d=(this.inWysiwygMode())?this.$editor.getOffsets("offset"):this.$textarea.getOffsets("offset");this._wUploadDropArea[b].css({height:a.height+"px",left:d.left+"px",lineHeight:a.height+"px",top:d.top+"px",width:a.width+"px"}).show();this._isDragging=true}c.preventDefault()},_hoverDropArea:function(a){this._wUploadDropArea[this.$textarea.wcfIdentify()].addClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropNow"))},_revertDropArea:function(c,a){if(!this._isFile){return}var b=a||this.$textarea.wcfIdentify();this._wUploadDropArea[b].removeClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropHere"));if(a){this._wUploadDropArea[b].hide()}},_dragLeave:function(){if(!this._isDragging||!this._isFile){return}if(this._timer===null){var a=this;this._timer=new WCF.PeriodicalExecuter(function(b){b.stop();if(!a._isDragging){a._wUploadDropArea[a.$source.wcfIdentify()].hide()}},100)}else{this._timer.resume()}this._isDragging=false},_drop:function(c){if(!this._isFile){return}c=c.originalEvent||c;if(c.dataTransfer&&c.dataTransfer.files.length){c.preventDefault();var b=this.$textarea.wcfIdentify();this._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()}}}; +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(c){c=c.originalEvent;if(!c.dataTransfer||!c.dataTransfer.types){return}this.wupload._isFile=false;if(c.dataTransfer.types[0]==="application/x-moz-file"){this.wupload._isFile=true}else{for(var e=0;e'+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 d=(this.wutil.inWysiwygMode())?this.$editor.getOffsets("offset"):this.$textarea.getOffsets("offset");this.wupload._dropArea[b].css({height:a.height+"px",left:d.left+"px",lineHeight:a.height+"px",top:d.top+"px",width:a.width+"px"}).show();this.wupload._isDragging=true}c.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.$source.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 if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wutil=function(){return{_autosaveWorker:null,init:function(){this.$textarea.parents("form").submit($.proxy(this.wutil.submit,this));if(this.wutil.getOption("woltlab.autosave").active){this.wutil.autosaveEnable();if(this.wutil.getOption("woltlab.autosave").saveOnInit||this.$textarea.data("saveOnInit")){this.wutil.setOption("woltlab.autosaveOnce",true)}else{this.wutil.autosaveRestore()}}this.wutil.setOption("autosave",false);var b=this.destroy;var a=this;this.destroy=function(){a.autosaveDisable();b.call(a)}},insertAtCaret:function(b){if(this.opts.visual){console.debug("insertAtCaret() failed: Editor is in WYSIWYG-mode.");return false}this.$textarea.focus();var c=this.$textarea.getCaret();if(c==-1){console.debug("insertAtCaret() failed: Source is not input[type=text], input[type=password] or textarea.")}var a=this.$textarea.val();a=a.substr(0,c)+b+a.substr(c);this.$textarea.val(a);return true},insertDynamic:function(a,b){if(this.inWysiwygMode()){this.insertHtml(a)}else{if(b===undefined||b===null){b=a}this.insertAtCaret(b)}},setOption:function(a,b){if(a.indexOf(".")!==-1){a=a.split(".",2);this.opts[a[0]][a[1]]=b}else{this.opts[a]=b}},getOption:function(a){if(a.indexOf(".")!==-1){a=a.split(".",2);if(this.opts[a[0]][a[1]]){return this.opts[a[0]][a[1]]}}else{if(this.opts[a]){return this.opts[a]}}return null},inPlainMode:function(){return !this.opts.visual},inWysiwygMode:function(){return(this.opts.visual)},replaceRangesWith:function(a){getSelection().removeAllRanges();getSelection().addRange(a)},getText:function(){if(this.inWysiwygMode()){this.code.startSync();this.$textarea.val(this.wbbcode.convertFromHtml(this.$textarea.val()))}return this.$textarea.val()},isEmptyEditor:function(){if(this.opts.visual){return this.utils.isEmpty(this.$editor.html())}return(!$.trim(this.$textarea.val()))},submit:function(){if(this.wutil.inWysiwygMode()){this.code.startSync();this.$textarea.val(this.wbbcode.convertFromHtml(this.$textarea.val()))}this.autosavePurge()},reset:function(){if(this.opts.visual){this.$editor.html("

    "+this.opts.invisibleSpace+"

    ")}this.$textarea.val("");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","reset",{wysiwygContainerID:this.$textarea.wcfIdentify()})},autosaveEnable:function(a){if(!this.wutil.getOption("woltlab.autosave").active){this.wutil.setOption("woltlab.autosave",{active:true,key:a})}if(this.wutil._autosaveWorker===null){this.wutil._autosaveWorker=new WCF.PeriodicalExecuter($.proxy(this.wutil._saveTextToStorage,this),60*1000)}return true},_saveTextToStorage:function(){localStorage.setItem(this.wutil.getOption("woltlab.autosave").key,this.wutil.getText())},autosaveDisable:function(){if(!this.getOption("woltlab.autosave").active){return false}this.wutil._autosaveWorker.stop();this.wutil._autosaveWorker=null;this.wutil.setOption("woltlab.autosave",{active:false,key:""});return true},autosavePurge:function(){localStorage.removeItem(this.wutil.getOption("woltlab.autosave").key)},autosaveRestore:function(){var a=this.wutil.getOption("woltlab.autosave");var b=localStorage.getItem(a.key);if(b!==null){if(this.wutil.inWysiwygMode()){this.wutil.setOption("woltlab.originalValue",b)}else{this.$textarea.val(b)}return true}return false},buttonReplace:function(d,b,e,g,f){var a=this.buttonGet(d);var c=this.buttonAddAfter(d,b,e,g,f);if(a.parent().hasClass("separator")){c.parent().addClass("separator")}a.parent().remove();return c},removeZeroWidthSpace:function(a){var b="";for(var e=0,d=a.length;e