diff --git a/core/js/dist/main.js b/core/js/dist/main.js index c20cb72631..ff94590df9 100644 --- a/core/js/dist/main.js +++ b/core/js/dist/main.js @@ -895,26 +895,6 @@ o.a.fn.filterAttr=function(e,t){return this.filter((function(){return o()(this). */ o.a.widget("oc.ocdialog",{options:{width:"auto",height:"auto",closeButton:!0,closeOnEscape:!0,modal:!1},_create:function(){var e=this;this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,height:this.element[0].style.height},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this.$dialog=o()('
').attr({tabIndex:-1,role:"dialog"}).insertBefore(this.element),this.$dialog.append(this.element.detach()),this.element.removeAttr("title").addClass("oc-dialog-content").appendTo(this.$dialog),this.$dialog.css({display:"inline-block",position:"fixed"}),this.enterCallback=null,o()(document).on("keydown keyup",(function(t){if(t.target===e.$dialog.get(0)||0!==e.$dialog.find(o()(t.target)).length){if(27===t.keyCode&&"keydown"===t.type&&e.options.closeOnEscape)return t.stopImmediatePropagation(),e.close(),!1;if(13===t.keyCode){if(t.stopImmediatePropagation(),null!==e.enterCallback)return e.enterCallback(),t.preventDefault(),!1;if("keyup"===t.type)return t.preventDefault(),!1;if(e.$buttonrow&&0===e.$buttonrow.find(o()(t.target)).length){var n=e.$buttonrow.find("button.primary");n&&!n.prop("disabled")&&n.trigger("click")}else e.$buttonrow&&o()(t.target).trigger("click");return!1}}})),this._setOptions(this.options),this._createOverlay()},_init:function(){this.$dialog.focus(),this._trigger("open")},_setOption:function(e,t){var n=this;switch(e){case"title":if(this.$title)this.$title.text(t);else{var i=o()('

'+t+"

");this.$title=i.prependTo(this.$dialog)}this._setSizes();break;case"buttons":if(this.$buttonrow)this.$buttonrow.empty();else{var r=o()('
');this.$buttonrow=r.appendTo(this.$dialog)}1===t.length?this.$buttonrow.addClass("onebutton"):2===t.length?this.$buttonrow.addClass("twobuttons"):3===t.length&&this.$buttonrow.addClass("threebuttons"),o.a.each(t,(function(e,t){var i=o()("