From 22297c5551bf83628514f927a2dd04ea081bb64e Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Sun, 2 Aug 2015 11:37:17 +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 3381472776..6e0b482284 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js @@ -2,7 +2,7 @@ if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.table=function(){return{getTemplate:function(){return String()+'
'},init:function(){var t={};t.insert_table={title:this.lang.get("insert_table"),func:this.table.show},t.insert_row_above={title:this.lang.get("insert_row_above"),func:this.table.addRowAbove},t.insert_row_below={title:this.lang.get("insert_row_below"),func:this.table.addRowBelow},t.insert_column_left={title:this.lang.get("insert_column_left"),func:this.table.addColumnLeft},t.insert_column_right={title:this.lang.get("insert_column_right"),func:this.table.addColumnRight},t.add_head={title:this.lang.get("add_head"),func:this.table.addHead},t.delete_head={title:this.lang.get("delete_head"),func:this.table.deleteHead},t.delete_column={title:this.lang.get("delete_column"),func:this.table.deleteColumn},t.delete_row={title:this.lang.get("delete_row"),func:this.table.deleteRow},t.delete_table={title:this.lang.get("delete_table"),func:this.table.deleteTable},this.observe.addButton("td","table"),this.observe.addButton("th","table");var e=this.button.addBefore("link","table",this.lang.get("table"));this.button.addDropdown(e,t)},show:function(){this.modal.addTemplate("table",this.table.getTemplate()),this.modal.load("table",this.lang.get("insert_table"),300),this.modal.createCancelButton();var t=this.modal.createActionButton(this.lang.get("insert"));t.on("click",this.table.insert),this.selection.save(),this.modal.show(),$("#redactor-table-rows").focus()},insert:function(){var t,e,i,a,s=$("#redactor-table-rows").val(),l=$("#redactor-table-columns").val(),n=$("
"),r=Math.floor(99999*Math.random()),o=$('
');for(t=0;s>t;t++){for(e=$(""),i=0;l>i;i++)a=$(""+this.opts.invisibleSpace+""),0===t&&0===i&&a.append(this.selection.getMarker()),$(e).append(a);o.append(e)}n.append(o);var d=n.html();if(this.modal.close(),this.selection.restore(),!this.table.getTable()){this.buffer.set();var h=this.selection.getBlock()||this.selection.getCurrent();h&&"BODY"!=h.tagName?("LI"==h.tagName&&(h=$(h).closest("ul, ol")),$(h).after(d)):this.insert.html(d),this.selection.restore();var c=this.$editor.find("#table"+r);if(!this.opts.linebreaks&&(this.utils.browser("mozilla")||this.utils.browser("msie"))){var b=c.next();0===b.length&&c.after(this.opts.emptyHtml)}this.observe.buttons(),c.find("span.redactor-selection-marker").remove(),c.removeAttr("id"),this.code.sync(),this.core.setCallback("insertedTable",c)}},getTable:function(){var t=$(this.selection.getParent()).closest("table");return this.utils.isRedactorParent(t)?0===t.size()?!1:t:!1},restoreAfterDelete:function(t){this.selection.restore(),t.find("span.redactor-selection-marker").remove(),this.code.sync()},deleteTable:function(){var t=this.table.getTable();if(t){this.buffer.set();var e=t.next();this.opts.linebreaks||0===e.length?this.caret.setAfter(t):this.caret.setStart(e),t.remove(),this.code.sync()}},deleteRow:function(){var t=this.table.getTable();if(t){var e=$(this.selection.getCurrent());this.buffer.set();var i=e.closest("tr"),a=i.prev().length?i.prev():i.next();if(a.length){var s=a.children("td, th").first();s.length&&s.prepend(this.selection.getMarker())}i.remove(),this.table.restoreAfterDelete(t)}},deleteColumn:function(){var t=this.table.getTable();if(t){this.buffer.set();var e=$(this.selection.getCurrent()),i=e.closest("td, th"),a=i[0].cellIndex;t.find("tr").each($.proxy(function(t,e){var i=$(e),s=0>a-1?a+1:a-1;0===t&&i.find("td, th").eq(s).prepend(this.selection.getMarker()),i.find("td, th").eq(a).remove()},this)),this.table.restoreAfterDelete(t)}},addHead:function(){var t=this.table.getTable();if(t){if(this.buffer.set(),0!==t.find("thead").size())return void this.table.deleteHead();var e=t.find("tr").first().clone();e.find("td").html(this.opts.invisibleSpace),$thead=$("").append(e),t.prepend($thead),this.code.sync()}},deleteHead:function(){var t=this.table.getTable();if(t){var e=t.find("thead");0!==e.size()&&(this.buffer.set(),e.remove(),this.code.sync())}},addRowAbove:function(){this.table.addRow("before")},addRowBelow:function(){this.table.addRow("after")},addColumnLeft:function(){this.table.addColumn("before")},addColumnRight:function(){this.table.addColumn("after")},addRow:function(t){var e=this.table.getTable();if(e){this.buffer.set();var i=$(this.selection.getCurrent()),a=i.closest("tr"),s=a.clone();s.find("th").replaceWith(function(){var t=$("");return t[0].attributes=this.attributes,t.append($(this).contents())}),s.find("td").html(this.opts.invisibleSpace),"after"==t?a.after(s):a.before(s),this.code.sync()}},addColumn:function(t){var e=this.table.getTable();if(e){var i=0,a=$(this.selection.getCurrent());this.buffer.set();var s=a.closest("tr"),l=a.closest("td, th");s.find("td, th").each($.proxy(function(t,e){$(e)[0]===l[0]&&(i=t)},this)),e.find("tr").each($.proxy(function(e,a){var s=$(a).find("td, th").eq(i),l=s.clone();l.html(this.opts.invisibleSpace),"after"==t?s.after(l):s.before(l)},this)),this.code.sync()}}}}; // wautosave.js -if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wautosave=function(){"use strict";var e=!1,t="",a=null,s=null,o=!1,i=null,n=null;return{init:function(){i=this.$textarea[0],this.wutil.getOption("woltlab.autosave").active&&(this.wautosave.enable(),this.wutil.getOption("woltlab.autosave").saveOnInit||this.$textarea.data("saveOnInit")?this.wutil.setOption("woltlab.autosaveOnce",!0):this.wautosave.restore()),this.wutil.setOption("autosave",!1);var e=this.core.destroy;this.core.destroy=function(){this.wautosave.disable(),e.call(this)}.bind(this)},enable:function(e){this.wutil.getOption("woltlab.autosave").active||this.wutil.setOption("woltlab.autosave",{active:!0,key:e}),null===n&&(this.wautosave.purgeOutdated(),n=new WCF.PeriodicalExecuter(this.wautosave.save.bind(this),15e3))},save:function(a){a!==!0&&(a=!1);var i=this.wutil.getText();if(t!==i||a)try{localStorage.setItem(this.wutil.getOption("woltlab.autosave").key,JSON.stringify({content:i,timestamp:Date.now()})),t=i,e=!0,null===s&&(s=new WCF.PeriodicalExecuter(function(t){if(o!==!0){if(e===!1)return t.stop(),void(s=null);this.wautosave.showNotice("saved"),e=!1}}.bind(this),12e4))}catch(e){console.debug("[wautosave.save] Unable to access local storage: "+e.message)}},disable:function(){this.wutil.getOption("woltlab.autosave").active&&(n.stop(),n=null,this.wutil.setOption("woltlab.autosave",{active:!1,key:""}))},purge:function(){try{localStorage.removeItem(this.wutil.getOption("woltlab.autosave").key)}catch(e){console.debug("[wautosave.purge] Unable to access local storage: "+e.message)}},restore:function(){var e=this.wutil.getOption("woltlab.autosave"),t=null;try{t=localStorage.getItem(e.key)}catch(e){console.debug("[wutil.autosaveRestore] Unable to access local storage: "+e.message)}try{null!==t&&(t=JSON.parse(t))}catch(e){t=null}return null!==t&&t.content?e.lastEditTime&&1e3*e.lastEditTime>t.timestamp?(this.wautosave.purge(),!1):e.prompt?(this.autosave.showNotice("prompt",t),!1):(this.wutil.inWysiwygMode()?this.wutil.setOption("woltlab.originalValue",t.content):i.value=t.content,this.wautosave.showNotice("restored",{timestamp:t.timestamp}),!0):!1},showNotice:function(e,t){if(null===a){a=$('
'),a.appendTo(this.$box);var s=function(e){(null===e||"opacity"===e.originalEvent.propertyName)&&(a.hasClass("open")&&null!==e?a.data("callbackOpen")&&a.data("callbackOpen")():(a.data("callbackClose")&&a.data("callbackClose")(),a.removeData("callbackClose"),a.removeData("callbackOpen"),a.removeClass("redactorAutosaveNoticeIcons"),a.empty(),$('').appendTo(a)))}.bind(this);a.on("transitionend webkitTransitionEnd",s)}var o="",n="";switch(e){case"prompt":$('').prependTo(a);var l=$('').appendTo(a),c=$('').appendTo(a);l.click(function(){this.wutil.replaceText(t.content),s(null),this.wautosave.showNotice("restored",t)}.bind(this)),c.click(function(){this.wautosave.purge(),a.removeClass("open")}.bind(this)),o=WCF.Language.get("wcf.message.autosave.prompt"),a.addClass("redactorAutosaveNoticeIcons"),n=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+i.id,function(e){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+i.id,n),setTimeout(function(){a.removeClass("open")},3e3)}.bind(this));break;case"restored":$('').prependTo(a);var l=$('').appendTo(a),c=$('').appendTo(a);l.click(function(){a.removeClass("open")}),c.click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.message.autosave.restored.revert.confirmMessage"),function(e){"confirm"===e&&(this.wutil.reset(),this.wautosave.purge(),a.removeClass("open"))}.bind(this))}.bind(this)),o=WCF.Language.get("wcf.message.autosave.restored"),a.addClass("redactorAutosaveNoticeIcons"),n=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+i.id,function(e){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+i.id,n),setTimeout(function(){l.trigger("click")},3e3)}.bind(this));break;case"saved":if(a.hasClass("open"))return;setTimeout(function(){a.removeClass("open")},2e3),o=WCF.Language.get("wcf.message.autosave.saved")}a.children("span.redactorAutosaveMessage").text(o),a.addClass("open"),"saved"!==e&&WCF.DOMNodeInsertedHandler.execute()},purgeOutdated:function(){var e=0,t=this.wutil.getOption("woltlab.autosave").prefix,a=t+"_wcf_master";try{e=localStorage.getItem(a)}catch(e){console.debug("[wautosave.purgeOutdated] Unable to access local storage: "+e.message)}if(0!==e){var s,o=Date.now()-6048e5;if(null===e||o>e){var i=new RegExp("^"+t+"_");for(var n in localStorage)if(n.match(i)&&n!==a){s=localStorage.getItem(n);try{s=JSON.parse(s)}catch(e){s={timestamp:0}}if(null===s||!s.timestamp||s.timestampt.timestamp?(this.wautosave.purge(),!1):e.prompt?(this.autosave.showNotice("prompt",t),!1):(this.wutil.inWysiwygMode()?this.wutil.setOption("woltlab.originalValue",t.content):i.value=t.content,this.wautosave.showNotice("restored",{timestamp:t.timestamp}),!0):!1},showNotice:function(e,t){if(null===a){a=$('
'),a.appendTo(this.$box);var s=function(e){(null===e||"opacity"===e.originalEvent.propertyName)&&(a.hasClass("open")&&null!==e?a.data("callbackOpen")&&a.data("callbackOpen")():(a.data("callbackClose")&&a.data("callbackClose")(),a.removeData("callbackClose"),a.removeData("callbackOpen"),a.removeClass("redactorAutosaveNoticeIcons"),a.empty(),$('').appendTo(a)))}.bind(this);a.on("transitionend webkitTransitionEnd",s)}var o="",n="";switch(e){case"prompt":$('').prependTo(a);var l=$('').appendTo(a),c=$('').appendTo(a);l.click(function(){this.wutil.replaceText(t.content),s(null),this.wautosave.showNotice("restored",t)}.bind(this)),c.click(function(){this.wautosave.purge(),a.removeClass("open")}.bind(this)),o=WCF.Language.get("wcf.message.autosave.prompt"),a.addClass("redactorAutosaveNoticeIcons"),n=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+i.id,function(e){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+i.id,n),setTimeout(function(){a.removeClass("open")},3e3)}.bind(this));break;case"restored":$('').prependTo(a);var l=$('').appendTo(a),c=$('').appendTo(a);l.click(function(){a.removeClass("open")}),c.click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.message.autosave.restored.revert.confirmMessage"),function(e){"confirm"===e&&(this.wutil.reset(),this.wautosave.purge(),a.removeClass("open"))}.bind(this))}.bind(this)),o=WCF.Language.get("wcf.message.autosave.restored"),a.addClass("redactorAutosaveNoticeIcons"),n=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+i.id,function(e){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+i.id,n),setTimeout(function(){l.trigger("click")},3e3)}.bind(this));break;case"saved":if(a.hasClass("open"))return;setTimeout(function(){a.removeClass("open")},2e3),o=WCF.Language.get("wcf.message.autosave.saved")}a.children("span.redactorAutosaveMessage").text(o),a.addClass("open"),"saved"!==e&&WCF.DOMNodeInsertedHandler.execute()},purgeOutdated:function(){var e=0,t=this.wutil.getOption("woltlab.autosave").prefix,a=t+"_wcf_master";try{e=localStorage.getItem(a)}catch(e){console.debug("[wautosave.purgeOutdated] Unable to access local storage: "+e.message)}if(0!==e){var s,o=Date.now()-6048e5;if(null===e||o>e){var i=new RegExp("^"+t+"_");for(var n in localStorage)if(n.match(i)&&n!==a){s=localStorage.getItem(n);try{s=JSON.parse(s)}catch(e){s={timestamp:0}}if(null===s||!s.timestamp||s.timestamp]+)?><\/p>/g,"

@@@wcf_empty_line@@@

"),t=i.call(this,t),t=t.replace(/__wcf_zwnj__/g,"‌"),t.replace(/__wcf_zwj__/g,"‍")}.bind(this),this.wutil.getOption("woltlab.autosaveOnce")&&(this.wutil.saveTextToStorage(),delete this.opts.woltlab.autosaveOnce);var a=this.button.get("table");if(a.length){var o=a.data("dropdown");o.find(".redactor-dropdown-add_head").parent().remove(),o.find(".redactor-dropdown-delete_head").parent().remove(),$('";c.append($(h)),this.modal.close()},this))}},fixBlockLevelElements:function(){return},fixFormatting:function(e){for(var t=function(e){e.style.removeProperty("text-align");for(var i=0;i