Edit file File name : jquery-ui.dialog.extended-1-24-9.min.js Content :!function(o){o.widget("ui.dialog",o.ui.dialog,{options:{height:200,closeModalOnClick:!0,dialogClass:"updraft-dialog",forceFullscreen:!1,resizeOnWindowResize:!1,scrollWithViewport:!1,resizeAccordingToViewport:!0,resizeToBestPossibleSize:!1,useContentSize:!1,useAnimation:!0,animateOptions:{duration:500,queue:!1},resized:null},change:function(t,i,e,s){(s="boolean"!=typeof s?this.options.useAnimation:s)?(this.setAriaLive(!0),this.element.one(this.widgetEventPrefix+"resized",this,function(i){i.data.element.html(t),i.data.setAriaLive(!1),i.data.focusTabbable()})):this.element.html(t),this.changeSize(i,e)},changeSize:function(i,t){this._setOptions({width:i,height:t})},_setOption:function(i,t){"width"===i&&(this._oldSize.width=t),"height"===i&&(this._oldSize.height=t),this.options.useAnimation&&this.options.useContentSize&&this._isVisible&&("width"===i&&(t+=this.uiDialog.width()-this.element.width()),"height"===i)&&(t+=this.uiDialog.outerHeight()-this.element.height()),this._super(i,t)},_getSize:function(i){var t=this.options,e=o.position.getWithinInfo(t.position.of),s=e.height>=e.width,e={width:e.width-(this.uiDialog.outerWidth()-this.uiDialog.width()),height:e.height};return t.forceFullscreen?e:(t.resizeToBestPossibleSize&&(i=s?this._calcSize(i,e.width,"width","height"):this._calcSize(i,e.height,"height","width")),(t.resizeAccordingToViewport||t.resizeToBestPossibleSize)&&(e.width<i.width&&(i=this._calcSize(i,e.width,"width","height")),e.height<i.height)?this._calcSize(i,e.height,"height","width"):i)},_calcSize:function(i,t,e,s){var o={};return o[s]=Math.max(0,i[s]/i[e]*t),o[e]=t,o},_size:function(){o.extend(this.options,this._getSize(this.options)),this._isVisible&&this.options.useAnimation?this._animateSize():this.options.useContentSize?this._contentSize():this._super()},_contentSize:function(){var i,t=this.options,e=this.element.show().css({width:t.width,minHeight:0,maxHeight:"none",height:0}).outerWidth()-t.width;this.element.css("width","auto"),t.minWidth>t.width+e&&(t.width=t.minWidth),i=this.uiDialog.css({height:"auto",width:t.width+e}).outerHeight(),e=this._getSize({width:t.width+e,height:t.height+i}),this.uiDialog.css("width",e.width),this.element.height(Math.max(0,e.height-i)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight()),o.extend(t,e)},_animateUsing:function(i,t){var e=this;i.left=t.target.left+(t.target.width-this.options.width-(this.uiDialog.outerWidth()-this.uiDialog.width()))/2,i.top=t.target.top+(t.target.height-this.options.height)/2,i.top<0&&(i.top=0),this.uiDialog.animate(i,o.extend({},this.options.animateOptions,{complete:function(){e._trigger("resized")}}))},_animateSize:function(){var i=this.options;this.uiDialog.animate({width:i.width},i.animateOptions),this.element.animate({height:i.height-(this.uiDialog.outerHeight()-this.element.height())},i.animateOptions)},_position:function(){var e=this;this._positionOptions=this.options.position,this.options.useAnimation&&this._isVisible&&(this.options.position.using=function(i,t){e._animateUsing(i,t)}),this._super(),this.options.position=this._positionOptions},setAriaLive:function(i){this.uiDialog.attr({"aria-live":"assertive","aria-relevant":"additions removals text","aria-busy":i})},_create:function(){this._super(),this._isVisible=!1,this._oldSize={width:this.options.width,height:this.options.height},this._on(window,this._windowResizeEvents),o(".updraft-dialog").not(".updraft-container > .updraft-dialog").wrap('<div class="updraft-container" />')},_windowResizeEvents:{resize:function(i){this.options.resizeOnWindowResize&&(window===i.target?this._addTimeout(function(){this._setOptions(this._oldSize)}):this._addTimeout(function(){this._position()}))},scroll:function(){this.options.scrollWithViewport&&this.timeout?this._addTimeout(function(){this._position()}):this.timeout=!0}},_addTimeout:function(i){clearTimeout(this.timeout),this._isVisible&&(this.timeout=this._delay(i,250))},_makeResizable:function(){this._super(),this.element.on(this.widgetEventPrefix+"resizestop",this,function(i){i.data.element.css("width","auto"),i.data.uiDialog.css("height","auto")})},_makeDraggable:function(){this._super(),this.element.on(this.widgetEventPrefix+"dragstop",this,function(i){i.data.options.position=i.data._positionOptions})},open:function(){this._super(),this._isVisible=!0},close:function(){this._super(),this._isVisible=!1},focusTabbable:function(){this._focusTabbable()},_createOverlay:function(){this._super(),this.options.modal&&this.options.closeModalOnClick&&this._on(this.overlay,{mousedown:function(i){this.close(i)}})}})}(jQuery); Save