From 2f0ecbba120e25aecda75f48f0c35f12199d7700 Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Thu, 8 Jan 2015 18:16:45 +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 ecd4fbc124..ee626809f6 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js @@ -15,4 +15,4 @@ if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wmonkeypatch=functio // 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 -if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wutil=function(){var b="";var c=null;var a=false;var d=null;return{_autosaveWorker:null,_range: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 e=this.core.destroy;this.core.destroy=(function(){this.wutil.autosaveDisable();e.call(this)}).bind(this)},saveSelection:function(){var e=getSelection();if(e.rangeCount){this.wutil._range=e.getRangeAt(0)}},restoreSelection:function(){if(document.activeElement!==this.$editor[0]){this.$editor.focus()}if(this.wutil._range!==null){var e=window.getSelection();e.removeAllRanges();e.addRange(this.wutil._range);this.wutil._range=null}},clearSelection:function(){this._wutil.range=null},insertAtCaret:function(f){if(this.opts.visual){console.debug("insertAtCaret() failed: Editor is in WYSIWYG-mode.");return false}this.$textarea.focus();var g=this.$textarea.getCaret();if(g==-1){console.debug("insertAtCaret() failed: Source is not input[type=text], input[type=password] or textarea.")}var e=this.$textarea.val();e=e.substr(0,g)+f+e.substr(g);this.$textarea.val(e);return true},insertDynamic:function(e,f){if(this.wutil.inWysiwygMode()){this.insert.html(e,false)}else{if(f===undefined||f===null){f=e}this.wutil.insertAtCaret(f)}},setOption:function(e,f){if(e.indexOf(".")!==-1){e=e.split(".",2);this.opts[e[0]][e[1]]=f}else{this.opts[e]=f}},getOption:function(e){if(e.indexOf(".")!==-1){e=e.split(".",2);if(this.opts[e[0]][e[1]]){return this.opts[e[0]][e[1]]}}else{if(this.opts[e]){return this.opts[e]}}return null},inPlainMode:function(){return !this.opts.visual},inWysiwygMode:function(){return(this.opts.visual)},replaceRangesWith:function(e){getSelection().removeAllRanges();getSelection().addRange(e)},getText:function(){if(this.wutil.inWysiwygMode()){this.code.startSync();var e=this.$textarea.val();this.$textarea.val($.trim(this.wbbcode.convertFromHtml(e)))}var f=$.trim(this.$textarea.val());f=f.replace(/\[\/quote\]\n/g,"[/quote]");return f},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($.trim(this.wbbcode.convertFromHtml(this.$textarea.val())))}this.wutil.autosavePurge()},reset:function(){if(this.opts.visual){this.$editor.html("

"+this.opts.invisibleSpace+"

");this.wutil.saveSelection()}this.$textarea.val("");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","reset",{wysiwygContainerID:this.$textarea.wcfIdentify()})},autosaveEnable:function(e){if(!this.wutil.getOption("woltlab.autosave").active){this.wutil.setOption("woltlab.autosave",{active:true,key:e})}if(this.wutil._autosaveWorker===null){this.wutil.autosavePurgeOutdated();this.wutil._autosaveWorker=new WCF.PeriodicalExecuter((function(f){this.wutil.saveTextToStorage(false)}).bind(this),15*1000)}return true},saveTextToStorage:function(g){var f=this.wutil.getText();if(b==f&&!g){return}try{localStorage.setItem(this.wutil.getOption("woltlab.autosave").key,JSON.stringify({content:f,timestamp:Date.now()}));b=f;a=true;if(d===null){d=new WCF.PeriodicalExecuter((function(e){if(a===false){e.stop();d=null;return}this.wutil.autosaveShowNotice("saved");a=false}).bind(this),120*1000)}}catch(h){console.debug("[wutil.saveTextToStorage] Unable to access local storage: "+h.message)}},autosaveDisable:function(){if(!this.wutil.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(){try{localStorage.removeItem(this.wutil.getOption("woltlab.autosave").key)}catch(f){console.debug("[wutil.autosavePurge] Unable to access local storage: "+f.message)}},autosaveRestore:function(){var f=this.wutil.getOption("woltlab.autosave");var g=null;try{g=localStorage.getItem(f.key)}catch(h){console.debug("[wutil.autosaveRestore] Unable to access local storage: "+h.message)}try{g=(g===null)?null:JSON.parse(g)}catch(h){g=null}if(g===null||!g.content){return false}if(f.lastEditTime&&(f.lastEditTime*1000)>g.timestamp){this.wutil.autosavePurge();return false}if(f.prompt){this.wutil.autosaveShowNotice("prompt",g);return false}if(this.wutil.inWysiwygMode()){this.wutil.setOption("woltlab.originalValue",g.content)}else{this.$textarea.val(g.content)}this.wutil.autosaveShowNotice("restored",{timestamp:g.timestamp});return true},autosaveShowNotice:function(i,k){if(c===null){c=$('
');c.appendTo(this.$box);var g=(function(l){if(l!==null&&l.originalEvent.propertyName!=="opacity"){return}if(c.hasClass("open")&&l!==null){if(c.data("callbackOpen")){c.data("callbackOpen")()}}else{if(c.data("callbackClose")){c.data("callbackClose")()}c.removeData("callbackClose");c.removeData("callbackOpen");c.removeClass("redactorAutosaveNoticeIcons");c.empty();$('').appendTo(c)}}).bind(this);c.on("transitionend webkitTransitionEnd",g)}var h="";switch(i){case"prompt":$('').prependTo(c);var j=$('').appendTo(c);var e=$('').appendTo(c);console.debug(k);j.click((function(){this.wutil.replaceText(k.content);g(null);this.wutil.autosaveShowNotice("restored",k)}).bind(this));e.click((function(){this.wutil.autosavePurge();c.removeClass("open")}).bind(this));h=WCF.Language.get("wcf.message.autosave.prompt");c.addClass("redactorAutosaveNoticeIcons");var f="";f=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),(function(l){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),f);setTimeout(function(){c.removeClass("open")},3000)}).bind(this));break;case"restored":$('').prependTo(c);var j=$('').appendTo(c);var e=$('').appendTo(c);j.click(function(){c.removeClass("open")});e.click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.message.autosave.restored.revert.confirmMessage"),(function(l){if(l==="confirm"){this.wutil.reset();this.wutil.autosavePurge();c.removeClass("open")}}).bind(this))}).bind(this));h=WCF.Language.get("wcf.message.autosave.restored");c.addClass("redactorAutosaveNoticeIcons");var f="";f=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),(function(l){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),f);setTimeout(function(){j.trigger("click")},3000)}).bind(this));break;case"saved":if(c.hasClass("open")){return}setTimeout(function(){c.removeClass("open")},2000);h=WCF.Language.get("wcf.message.autosave.saved");break}c.children("span.redactorAutosaveMessage").text(h);c.addClass("open");if(i!=="saved"){WCF.DOMNodeInsertedHandler.execute()}},autosavePurgeOutdated:function(){var j=0;var m=this.wutil.getOption("woltlab.autosave").prefix;var l=m+"_wcf_master";try{j=localStorage.getItem(l)}catch(k){console.debug("[wutil.autosavePurgeOutdated] Unable to access local storage: "+k.message)}if(j===0){return}var f=Date.now()-(7*24*3600*1000);if(j===null||j

").insertAfter(e);this.caret.setEnd(f)}}}},isCaret:function(){this.selection.get();return this.range.collapsed},isEndOfElement:function(e){this.selection.get();if(!this.wutil.isCaret()){return false}if(this.range.endContainer.nodeType===Element.TEXT_NODE){if(this.range.endOffset").insertBefore(h)}f.append(h)}}else{if(h.nodeType===Element.TEXT_NODE){if(f===null){if(e){if(e.nodeType===Element.ELEMENT_NODE&&e.tagName==="P"&&e.innerHTML==="\u200B"){var g=e.nextSibling;this.$editor[0].removeChild(e);e=g}}f=$("

").insertBefore(h)}f.append(h)}}}}}}; +if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wutil=function(){var b="";var c=null;var a=false;var d=null;return{_autosaveWorker:null,_range: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 e=this.core.destroy;this.core.destroy=(function(){this.wutil.autosaveDisable();e.call(this)}).bind(this)},saveSelection:function(){var e=getSelection();if(e.rangeCount){this.wutil._range=e.getRangeAt(0)}},restoreSelection:function(){if(document.activeElement!==this.$editor[0]){this.$editor.focus()}if(this.wutil._range!==null){var e=window.getSelection();e.removeAllRanges();e.addRange(this.wutil._range);this.wutil._range=null}},clearSelection:function(){this._wutil.range=null},insertAtCaret:function(f){if(this.opts.visual){console.debug("insertAtCaret() failed: Editor is in WYSIWYG-mode.");return false}this.$textarea.focus();var g=this.$textarea.getCaret();if(g==-1){console.debug("insertAtCaret() failed: Source is not input[type=text], input[type=password] or textarea.")}var e=this.$textarea.val();e=e.substr(0,g)+f+e.substr(g);this.$textarea.val(e);return true},insertDynamic:function(e,f){if(this.wutil.inWysiwygMode()){this.insert.html(e,false)}else{if(f===undefined||f===null){f=e}this.wutil.insertAtCaret(f)}},setOption:function(e,f){if(e.indexOf(".")!==-1){e=e.split(".",2);this.opts[e[0]][e[1]]=f}else{this.opts[e]=f}},getOption:function(e){if(e.indexOf(".")!==-1){e=e.split(".",2);if(this.opts[e[0]][e[1]]){return this.opts[e[0]][e[1]]}}else{if(this.opts[e]){return this.opts[e]}}return null},inPlainMode:function(){return !this.opts.visual},inWysiwygMode:function(){return(this.opts.visual)},replaceRangesWith:function(e){getSelection().removeAllRanges();getSelection().addRange(e)},getText:function(){if(this.wutil.inWysiwygMode()){this.code.startSync();var e=this.$textarea.val();this.$textarea.val($.trim(this.wbbcode.convertFromHtml(e)))}var f=$.trim(this.$textarea.val());f=f.replace(/\[\/quote\]\n/g,"[/quote]");return f},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($.trim(this.wbbcode.convertFromHtml(this.$textarea.val())))}this.wutil.autosavePurge()},reset:function(){if(this.opts.visual){this.$editor.html("

"+this.opts.invisibleSpace+"

");this.wutil.saveSelection()}this.$textarea.val("");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","reset",{wysiwygContainerID:this.$textarea.wcfIdentify()})},autosaveEnable:function(e){if(!this.wutil.getOption("woltlab.autosave").active){this.wutil.setOption("woltlab.autosave",{active:true,key:e})}if(this.wutil._autosaveWorker===null){this.wutil.autosavePurgeOutdated();this.wutil._autosaveWorker=new WCF.PeriodicalExecuter((function(f){this.wutil.saveTextToStorage(false)}).bind(this),15*1000)}return true},saveTextToStorage:function(g){var f=this.wutil.getText();if(b==f&&!g){return}try{localStorage.setItem(this.wutil.getOption("woltlab.autosave").key,JSON.stringify({content:f,timestamp:Date.now()}));b=f;a=true;if(d===null){d=new WCF.PeriodicalExecuter((function(e){if(a===false){e.stop();d=null;return}this.wutil.autosaveShowNotice("saved");a=false}).bind(this),120*1000)}}catch(h){console.debug("[wutil.saveTextToStorage] Unable to access local storage: "+h.message)}},autosaveDisable:function(){if(!this.wutil.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(){try{localStorage.removeItem(this.wutil.getOption("woltlab.autosave").key)}catch(f){console.debug("[wutil.autosavePurge] Unable to access local storage: "+f.message)}},autosaveRestore:function(){var f=this.wutil.getOption("woltlab.autosave");var g=null;try{g=localStorage.getItem(f.key)}catch(h){console.debug("[wutil.autosaveRestore] Unable to access local storage: "+h.message)}try{g=(g===null)?null:JSON.parse(g)}catch(h){g=null}if(g===null||!g.content){return false}if(f.lastEditTime&&(f.lastEditTime*1000)>g.timestamp){this.wutil.autosavePurge();return false}if(f.prompt){this.wutil.autosaveShowNotice("prompt",g);return false}if(this.wutil.inWysiwygMode()){this.wutil.setOption("woltlab.originalValue",g.content)}else{this.$textarea.val(g.content)}this.wutil.autosaveShowNotice("restored",{timestamp:g.timestamp});return true},autosaveShowNotice:function(i,k){if(c===null){c=$('
');c.appendTo(this.$box);var g=(function(l){if(l!==null&&l.originalEvent.propertyName!=="opacity"){return}if(c.hasClass("open")&&l!==null){if(c.data("callbackOpen")){c.data("callbackOpen")()}}else{if(c.data("callbackClose")){c.data("callbackClose")()}c.removeData("callbackClose");c.removeData("callbackOpen");c.removeClass("redactorAutosaveNoticeIcons");c.empty();$('').appendTo(c)}}).bind(this);c.on("transitionend webkitTransitionEnd",g)}var h="";switch(i){case"prompt":$('').prependTo(c);var j=$('').appendTo(c);var e=$('').appendTo(c);j.click((function(){this.wutil.replaceText(k.content);g(null);this.wutil.autosaveShowNotice("restored",k)}).bind(this));e.click((function(){this.wutil.autosavePurge();c.removeClass("open")}).bind(this));h=WCF.Language.get("wcf.message.autosave.prompt");c.addClass("redactorAutosaveNoticeIcons");var f="";f=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),(function(l){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),f);setTimeout(function(){c.removeClass("open")},3000)}).bind(this));break;case"restored":$('').prependTo(c);var j=$('').appendTo(c);var e=$('').appendTo(c);j.click(function(){c.removeClass("open")});e.click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.message.autosave.restored.revert.confirmMessage"),(function(l){if(l==="confirm"){this.wutil.reset();this.wutil.autosavePurge();c.removeClass("open")}}).bind(this))}).bind(this));h=WCF.Language.get("wcf.message.autosave.restored");c.addClass("redactorAutosaveNoticeIcons");var f="";f=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),(function(l){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),f);setTimeout(function(){j.trigger("click")},3000)}).bind(this));break;case"saved":if(c.hasClass("open")){return}setTimeout(function(){c.removeClass("open")},2000);h=WCF.Language.get("wcf.message.autosave.saved");break}c.children("span.redactorAutosaveMessage").text(h);c.addClass("open");if(i!=="saved"){WCF.DOMNodeInsertedHandler.execute()}},autosavePurgeOutdated:function(){var j=0;var m=this.wutil.getOption("woltlab.autosave").prefix;var l=m+"_wcf_master";try{j=localStorage.getItem(l)}catch(k){console.debug("[wutil.autosavePurgeOutdated] Unable to access local storage: "+k.message)}if(j===0){return}var f=Date.now()-(7*24*3600*1000);if(j===null||j

").insertAfter(e);this.caret.setEnd(f)}}}},isCaret:function(){this.selection.get();return this.range.collapsed},isEndOfElement:function(e){this.selection.get();if(!this.wutil.isCaret()){return false}if(this.range.endContainer.nodeType===Element.TEXT_NODE){if(this.range.endOffset").insertBefore(h)}f.append(h)}}else{if(h.nodeType===Element.TEXT_NODE){if(f===null){if(e){if(e.nodeType===Element.ELEMENT_NODE&&e.tagName==="P"&&e.innerHTML==="\u200B"){var g=e.nextSibling;this.$editor[0].removeChild(e);e=g}}f=$("

").insertBefore(h)}f.append(h)}}}}}}; -- 2.20.1