HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/HBergman/delifestyle.nl/wwwroot/wp-content/plugins/maxbuttons/js/min/maxmodal.js
var maxModal;jQuery(document).ready(function(t){maxModal=function(){},maxModal.prototype={currentModal:null,modals:[],controls:[],parent:"#maxbuttons",multiple:!1,windowHeight:!1,windowWidth:!1,setWidth:!1,setHeight:!1},maxModal.prototype.init=function(){this.windowHeight=t(window).height(),this.windowWidth=t(window).width(),t(document).on("click",".maxmodal",t.proxy(this.buildModal,this)),t(window).on("resize",t.proxy(this.checkResize,this))},maxModal.prototype.focus=function(){this.currentModal.show()},maxModal.prototype.get=function(){return this.currentModal},maxModal.prototype.show=function(){t(".maxmodal_overlay").remove(),this.writeOverlay(),this.setWidth&&this.currentModal.width(this.setWidth),this.setHeight&&this.currentModal.height(this.setHeight);var o=this.currentModal.height(),e=this.currentModal.width(),i=(this.windowHeight-o)/2,a=(this.windowWidth-e)/2;30>i&&(i=30),o>this.windowHeight&&this.currentModal.height(this.windowHeight-i-5+"px"),this.currentModal.css("left",a+"px"),this.currentModal.css("top",i+"px"),this.currentModal.show(),t(".maxmodal_overlay").show()},maxModal.prototype.checkResize=function(){null!==this.currentModal&&(this.currentModal.removeAttr("style"),this.windowHeight=t(window).height(),this.windowWidth=t(window).width(),this.show())},maxModal.prototype.close=function(){this.currentModal.remove(),this.currentModal=null,t(".maxmodal_overlay").remove()},maxModal.prototype.setTitle=function(t){this.currentModal.find(".modal_title").text(t)},maxModal.prototype.setControls=function(o){var e=this.currentModal.find(".modal_content"),a=t('<div class="controls">');for(i=0;i<this.controls.length;i++)a.append(this.controls[i]);"undefined"!=typeof o&&a.append(o),e.append(a),t(this.currentModal).find(".modal_close").off("click"),t(this.currentModal).find(".modal_close").on("click",t.proxy(this.close,this))},maxModal.prototype.addControl=function(o,e,i){var a="";switch(o){case"yes":a=modaltext.yes;break;case"ok":a=modaltext.ok;break;case"no":a=modaltext.no;break;case"cancel":a=modaltext.cancel}var d=t('<a class="button-primary ">'+a+"</a>");d.on("click",e,i),this.controls.push(d)},maxModal.prototype.setContent=function(t){this.currentModal.find(".modal_content").html(t)},maxModal.prototype.buildModal=function(o){var e=t(o.target);"undefined"==typeof e.data("modal")&&(e=e.parents(".maxmodal"));var i=e.data("modal"),a=t("#"+i);this.setWidth="undefined"!=typeof a.data("width")?a.data("width"):!1,this.setHeight="undefined"!=typeof a.data("height")?a.data("height"):!1;var d=t(a).find(".title").text(),n=t(a).find(".controls").html(),l=t(a).find(".content").html();if(this.newModal(i),this.setTitle(d),this.setContent(l),this.setControls(n),"undefined"!=typeof a.data("load")){var s=a.data("load")+"(modal)",h=new Function("modal",s);try{h(this)}catch(r){console.log("MB Modal Callback Error: "+r.message)}}this.show()},maxModal.prototype.newModal=function(o){null!==this.currentModal&&this.close();var e=t('<div class="max-modal '+o+'" > 						   <div class="modal_header"> 							   <div class="modal_close dashicons dashicons-no"></div><h3 class="modal_title"></h3> 						   </div> 						   <div class="inner modal_content"></div>					   </div>');return t(this.parent).length>0?t(this.parent).append(e):t("body").append(e),t(e).draggable({handle:".modal_header"}),this.modals.push(e),this.currentModal=e,this.controls=[],this},maxModal.prototype.writeOverlay=function(){t(this.parent).append('<div class="maxmodal_overlay"></div>'),t(".maxmodal_overlay").on("click",t.proxy(this.close,this))}});