All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.web.lib.dialog.dialog-plus.min.js Maven / Gradle / Ivy

There is a newer version: 6.2.04
Show newest version
/*! [email protected] | https://github.com/aui/artDialog */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jQuery")):"function"==typeof define&&define.amd?define(["jQuery"],e):"object"==typeof exports?exports.dialog=e(require("jQuery")):t.dialog=e(t.jQuery)}(this,function(t){return function(t){function e(r){if(o[r])return o[r].exports;var i=o[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var o={};return e.m=t,e.c=o,e.i=function(t){return t},e.d=function(t,o,r){e.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=15)}([function(e,o){e.exports=t},function(t,e,o){var r=o(7);"string"==typeof r&&(r=[[t.i,r,""]]);o(5)(r,{});r.locals&&(t.exports=r.locals)},function(t,e){t.exports={backdropBackground:"#000",backdropOpacity:.7,content:'Loading..',title:"",statusbar:"",button:null,ok:null,cancel:null,okValue:"ok",cancelValue:"cancel",cancelDisplay:!0,width:"",height:"",padding:"",skin:"",quickClose:!1,innerHTML:'
'}},function(t,e,o){function r(){this.destroyed=!1,this.__popup=i("
").css({display:"none",position:"absolute",outline:0}).attr("tabindex","-1").html(this.innerHTML).appendTo("body"),this.__backdrop=this.__mask=i("
").css({opacity:.7,background:"#000"}),this.node=this.__popup[0],this.backdrop=this.__backdrop[0],n++}var i=o(0),n=0,a=!("minWidth"in i("html")[0].style),s=!a;i.extend(r.prototype,{node:null,backdrop:null,fixed:!1,destroyed:!0,open:!1,returnValue:"",autofocus:!0,align:"bottom left",innerHTML:"",className:"ui-popup",show:function(t){if(this.destroyed)return this;var e=this.__popup,o=this.__backdrop;if(this.__activeElement=this.__getActive(),this.open=!0,this.follow=t||this.follow,!this.__ready){if(e.addClass(this.className).attr("role",this.modal?"alertdialog":"dialog").css("position",this.fixed?"fixed":"absolute"),a||i(window).on("resize",i.proxy(this.reset,this)),this.modal){var n={position:"fixed",left:0,top:0,width:"100%",height:"100%",overflow:"hidden",userSelect:"none",zIndex:this.zIndex||r.zIndex};e.addClass(this.className+"-modal"),s||i.extend(n,{position:"absolute",width:i(window).width()+"px",height:i(document).height()+"px"}),o.css(n).attr({tabindex:"0"}).on("focus",i.proxy(this.focus,this)),this.__mask=o.clone(!0).attr("style","").insertAfter(e),o.addClass(this.className+"-backdrop").insertBefore(e),this.__ready=!0}e.html()||e.html(this.innerHTML)}return e.addClass(this.className+"-show").show(),o.show(),this.reset().focus(),this.__dispatchEvent("show"),this},showModal:function(){return this.modal=!0,this.show.apply(this,arguments)},close:function(t){return!this.destroyed&&this.open&&(void 0!==t&&(this.returnValue=t),this.__popup.hide().removeClass(this.className+"-show"),this.__backdrop.hide(),this.open=!1,this.blur(),this.__dispatchEvent("close")),this},remove:function(){if(this.destroyed)return this;this.__dispatchEvent("beforeremove"),r.current===this&&(r.current=null),this.__popup.remove(),this.__backdrop.remove(),this.__mask.remove(),a||i(window).off("resize",this.reset),this.__dispatchEvent("remove");for(var t in this)delete this[t];return this},reset:function(){var t=this.follow;return t?this.__follow(t):this.__center(),this.__dispatchEvent("reset"),this},focus:function(){var t=this.node,e=this.__popup,o=r.current,n=this.zIndex=r.zIndex++;if(o&&o!==this&&o.blur(!1),!i.contains(t,this.__getActive())){var a=e.find("[autofocus]")[0];!this._autofocus&&a?this._autofocus=!0:a=t,this.__focus(a)}return e.css("zIndex",n),r.current=this,e.addClass(this.className+"-focus"),this.__dispatchEvent("focus"),this},blur:function(){var t=this.__activeElement;return arguments[0]!==!1&&this.__focus(t),this._autofocus=!1,this.__popup.removeClass(this.className+"-focus"),this.__dispatchEvent("blur"),this},addEventListener:function(t,e){return this.__getEventListener(t).push(e),this},removeEventListener:function(t,e){for(var o=this.__getEventListener(t),r=0;rC[P[e]][1]&&(e=T[t]=U[e]),L[t][e]




© 2015 - 2024 Weber Informatics LLC | Privacy Policy