Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Thu, 25 Aug 2016 10:02:22 +0000 (12:02 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Thu, 25 Aug 2016 10:02:22 +0000 (12:02 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/combined.min.js

index da196435dc9306a1d3a54a6b2185fe7fdf8729b3..a09beec479fd635afe12b8ef387f6e8bccf6f238 100644 (file)
@@ -30,6 +30,8 @@ $.Redactor.prototype.WoltLabEvent=function(){"use strict";return{init:function()
 $.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"><input id="redactor-image-caption" 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"),this.WoltLabModal.rebuild()},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.buffer.set(),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))}}};
+// WoltLabInsert.js
+$.Redactor.prototype.WoltLabInsert=function(){"use strict";return{init:function(){var t=this.insert.html;this.insert.html=function(e,i){this.placeholder.hide(),this.core.editor().focus();var n=this.selection.block();t.call(this,e,i),n&&"P"===n.nodeName&&n.nextElementSibling&&!n.childElementCount&&""===n.textContent.replace(/\u200B/g,"").trim()&&elRemove(n)}.bind(this)}}};
 // WoltLabKeydown.js
 $.Redactor.prototype.WoltLabKeydown=function(){"use strict";var t=[];return{init:function(){this.keydown.onArrowDown=function(){for(var t=this.WoltLabKeydown._getBlocks(),n=0;n<t.length;n++)if(t[n])return this.keydown.insertAfterLastElement(t[n]),!1}.bind(this),this.keydown.onArrowUp=function(){for(var t=this.WoltLabKeydown._getBlocks(),n=0;n<t.length;n++)if(t[n])return this.keydown.insertBeforeFirstElement(t[n]),!1}.bind(this);var t=this.keydown.onEnter;this.keydown.onEnter=function(n){var o=this.keydown.blockquote;o&&(this.keydown.blockquote=!1),t.call(this,n),o&&(this.keydown.blockquote=o)}.bind(this);var n=this.keydown.onTab;this.keydown.onTab=function(t,o){return this.keydown.pre||0!==$(this.selection.current()).closest("ul, ol",this.core.editor()[0]).length?n.call(this,t,o):!0}.bind(this)},register:function(n){-1===t.indexOf(n)&&t.push(n)},_getBlocks:function(){for(var n=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],o=0,e=t.length;e>o;o++)n.push(this.utils.isTag(this.keydown.current,t[o]));return n}}};
 // WoltLabLink.js