From f7fe4527650ea786458bcd5fd5ef39986bba7459 Mon Sep 17 00:00:00 2001 From: mpetty Date: Fri, 31 Jan 2020 13:19:43 -0500 Subject: [PATCH] ran build --- dist/jquery.modal.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/jquery.modal.min.js b/dist/jquery.modal.min.js index 2fc3891..5e9635b 100644 --- a/dist/jquery.modal.min.js +++ b/dist/jquery.modal.min.js @@ -1 +1 @@ -!function(t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(window.jQuery)}(function(i){"use strict";function a(t,s){this.namespace="modal-"+i.fn.modal2.count,this.$container=i(s.container),this.$selector=t,this.staticModal=!1,this.settings=s,this.$modalInside=null,this.modalOpen=!1,this.$overlay=null,this.$modal=null,!this.$selector||this.$selector.is("."+s.modalName)?this.show():i(this.$selector).off("click.modal").on("click.modal",i.proxy(this.show,this)),i.fn.modal2.count++}a.prototype.addEvents=function(){var s=this;i(this.settings.closeModalName).on("click."+this.namespace,i.proxy(this.close,this)),i(document).on("keydown."+this.namespace,i.proxy(this.close,this)),this.settings.allowCloseOverlay&&this.$modal.on("click."+this.namespace,function(t){i(t.target).closest("."+s.settings.modalContentName).length||s.close()})},a.prototype.removeEvents=function(){i(this.settings.closeModalName).off("."+this.namespace),this.$modalInside.off("."+this.namespace),this.$modal.off("."+this.namespace),i(document).off("."+this.namespace)},a.prototype.show=function(t){"object"==typeof t&&t.preventDefault&&(t.preventDefault(),t.stopPropagation()),this.settings.html?this.append(this.settings.html).open():this.settings.ajax&&"string"==typeof this.settings.ajax.url?this.load(this.settings.ajax.url):i(this.$selector).is("."+this.settings.modalName)?(this.staticModal=!0,this.append()):i(this.$selector).data("target")?this.append(i(i(this.$selector).data("target")).html()).open():i(this.$selector).attr("href")&&this.load(i(this.$selector).attr("href")),this.settings.afterInit.call(this,i(this.$selector))},a.prototype.close=function(t){var s,e=this,o=!1;if(this.modalOpen){if("object"==typeof t){if(o=t.type,"keydown"===t.type&&(27!==t.keyCode||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey))return;t.preventDefault(),t.stopPropagation()}s=this.$modal.children("."+this.settings.modalDialogName).length,!this.settings.allowClose&&"closeModal"!==o&&"ajaxComplete"!==o||(this.settings.onBeforeClose.call(this,i(this.$selector)),this.modalOpen=!1,this.staticModal?s<=1?(i("body").removeClass("modal-open"),this.$overlay.removeClass("show in"),this.$modal.removeClass("show in"),this.$modal.animate({top:-2*this.$modal.outerHeight(!0)},function(){e.$modal.css({top:"0"}),e.$modal.hide(),e.$overlay.hide(),e.removeEvents(),e.settings.afterClose.call(e,i(e.$selector))})):(this.$modalDialog.hide(),this.$modalDialog.prev("."+this.settings.modalDialogName).show(),this.removeEvents(),this.settings.afterClose.call(this,i(this.$selector))):s<=1?(i("body").removeClass("modal-open"),this.$overlay.removeClass("show in"),this.$modal.removeClass("show in"),this.$modal.animate({top:-2*this.$modal.outerHeight(!0)},function(){e.$modal.remove(),e.$overlay.remove(),e.removeEvents(),e.settings.afterClose.call(e,i(e.$selector))})):(this.$modalDialog.prev("."+this.settings.modalDialogName).show(),this.$modalDialog.remove(),this.removeEvents(),this.settings.afterClose.call(this,i(this.$selector))))}},a.prototype.load=function(t){var o=this,s=i.extend({},this.settings.ajax);this.append(),this.$modalInside.addClass("loading"),this.$overlay.addClass("show in"),this.$modal.addClass("show in"),s.error=function(t,s,e){o.close(),"function"==typeof o.settings.ajax.error&&o.settings.ajax.error.call(o,t,s,e)},s.complete=function(t,s){var e=t.responseText;o.$modalInside.removeClass("loading"),e&&(o.$modalInside.empty().append(e),o.open(),"function"==typeof o.settings.ajax.success&&o.settings.ajax.success.call(o,e,s,t)),"function"==typeof o.settings.ajax.complete&&o.settings.ajax.complete.call(o,t,s)},i.ajax(s)},a.prototype.open=function(){var t=this;this.$modal&&!this.modalOpen&&(this.modalOpen=!0,1'),this.$modalDialog=i("."+this.settings.modalDialogName,this.$modal),this.$modalInside=i("."+this.settings.modalContentName,this.$modal),this.$closeBtn=i(this.settings.closeModalName,this.$modalInside);else{var s=i("."+this.settings.modalName,this.$container),e=i("."+this.settings.backdropName);this.$modal=s.length&&s||i(''),this.$overlay=e.length&&e||i('
'),this.$modalDialog=i('
'),this.$modalInside=i('
'),this.$closeBtn=i(this.settings.closeModalName,this.$modalInside),this.$modalDialog.append(this.$modalInside),this.$modal.append(this.$modalDialog),t&&this.$modalInside.empty().append(t)}return this.settings.centered&&this.$modal.addClass("modal-centered"),"body"===this.settings.container&&this.$modal.addClass("fixed"),this.settings.width&&this.$modalDialog.css({"max-width":this.settings.width}),this.$container.append(this.$overlay),this.$container.append(this.$modal),this.$overlay.show(),this.$modal.show(),this};function e(t,s,e){var o;return t=i(t),e=i.extend(!0,{},i.fn.modal2.defaults,e),o=t.data("modal"),s?"object"==typeof o&&("hide"!==s&&"close"!==s||!i.isFunction(o.close)?"show"===s&&i.isFunction(o.open)&&o.open():o.close()):(t.is(document)?o=new a(!1,e):"object"!=typeof o&&(o=new a(t,e)),t.data("modal",o)),o}return i.fn.modal2=function(t,s){return"object"==typeof t&&(s=t,t=!1),this.each(function(){return e(this,t,s),this})},i.modal2=function(t){return e(document,!1,t)},i.fn.modal2.count=0,i.fn.modal2.defaults={closeModalName:'[data-dismiss="modal2"]',modalContentName:"modal-content",modalDialogName:"modal-dialog",backdropName:"modal-backdrop",allowCloseOverlay:!0,onBeforeClose:i.noop,modalSkin:"default",modalName:"modal",afterClose:i.noop,container:"body",afterInit:i.noop,afterOpen:i.noop,allowClose:!0,centered:!1,width:!1,html:!1,ajax:!1},i.modal2}); \ No newline at end of file +!function(t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(window.jQuery)}(function(a){"use strict";function i(t,s){this.namespace="modal-"+a.fn.modal2.count,this.$container=a(s.container),this.$selector=t,this.staticModal=!1,this.settings=s,this.$modalInside=null,this.modalOpen=!1,this.$overlay=null,this.$modal=null,!this.$selector||this.$selector.is("."+s.modalName)?this.show():a(this.$selector).off("click.modal").on("click.modal",a.proxy(this.show,this)),a.fn.modal2.count++}i.prototype.addEvents=function(){var s=this;a(this.settings.closeModalName).on("click."+this.namespace,a.proxy(this.close,this)),a(document).on("keydown."+this.namespace,a.proxy(this.close,this)),this.settings.allowCloseOverlay&&this.$modal.on("click."+this.namespace,function(t){a(t.target).closest("."+s.settings.modalContentName).length||s.close()})},i.prototype.removeEvents=function(){a(this.settings.closeModalName).off("."+this.namespace),this.$modalInside.off("."+this.namespace),this.$modal.off("."+this.namespace),a(document).off("."+this.namespace)},i.prototype.show=function(t){"object"==typeof t&&t.preventDefault&&(t.preventDefault(),t.stopPropagation()),this.settings.html?this.append(this.settings.html).open():this.settings.ajax&&"string"==typeof this.settings.ajax.url?this.load(this.settings.ajax.url):a(this.$selector).is("."+this.settings.modalName)?(this.staticModal=!0,this.append()):a(this.$selector).data("target")?this.append(a(a(this.$selector).data("target")).html()).open():a(this.$selector).attr("href")&&this.load(a(this.$selector).attr("href")),this.settings.afterInit.call(this,a(this.$selector))},i.prototype.close=function(t){var s,e=this,o=!1;if(this.modalOpen){if("object"==typeof t){if(o=t.type,"keydown"===t.type&&(27!==t.keyCode||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey))return;t.preventDefault(),t.stopPropagation()}s=this.$modal.children("."+this.settings.modalDialogName).length,!this.settings.allowClose&&"closeModal"!==o&&"ajaxComplete"!==o||(this.settings.onBeforeClose.call(this,a(this.$selector)),this.modalOpen=!1,this.staticModal?s<=1?(a("body").removeClass("modal-open"),this.$overlay.removeClass("show in"),this.$modal.removeClass("show in"),this.$modal.animate({top:-2*this.$modal.outerHeight(!0)},function(){e.$modal.css({top:"0"}),e.$modal.hide(),e.$overlay.hide(),e.removeEvents(),e.settings.afterClose.call(e,a(e.$selector))})):(this.$modalDialog.hide(),this.$modalDialog.prev("."+this.settings.modalDialogName).show(),this.removeEvents(),this.settings.afterClose.call(this,a(this.$selector))):s<=1?(a("body").removeClass("modal-open"),this.$overlay.removeClass("show in"),this.$modal.removeClass("show in"),this.$modal.animate({top:-2*this.$modal.outerHeight(!0)},function(){e.$modal.remove(),e.$overlay.remove(),e.removeEvents(),e.settings.afterClose.call(e,a(e.$selector))})):(this.$modalDialog.prev("."+this.settings.modalDialogName).show(),this.$modalDialog.remove(),this.removeEvents(),this.settings.afterClose.call(this,a(this.$selector))))}},i.prototype.load=function(t){var o=this,s=a.extend({},this.settings.ajax);this.append(),this.$modalInside.addClass("loading"),this.$overlay.addClass("show in"),this.$modal.addClass("show in"),s.error=function(t,s,e){o.close(),"function"==typeof o.settings.ajax.error&&o.settings.ajax.error.call(o,t,s,e)},s.complete=function(t,s){var e=t.responseText;o.$modalInside.removeClass("loading"),e&&(o.$modalInside.empty().append(e),o.open(),"function"==typeof o.settings.ajax.success&&o.settings.ajax.success.call(o,e,s,t)),"function"==typeof o.settings.ajax.complete&&o.settings.ajax.complete.call(o,t,s)},a.ajax(s)},i.prototype.open=function(){var t=this;this.$modal&&!this.modalOpen&&(this.modalOpen=!0,1'),this.$modalDialog=a("."+this.settings.modalDialogName,this.$modal),this.$modalInside=a("."+this.settings.modalContentName,this.$modal),this.$closeBtn=a(this.settings.closeModalName,this.$modalInside);else{var s=a("."+this.settings.modalName,this.$container),e=a("."+this.settings.backdropName);this.$modal=s.length&&s||a(''),this.$overlay=e.length&&e||a('
'),this.$modalDialog=a('
'),this.$modalInside=a('
'),this.$closeBtn=a(this.settings.closeModalName,this.$modalInside),this.$modalDialog.append(this.$modalInside),this.$modal.append(this.$modalDialog),t&&this.$modalInside.empty().append(t)}return this.settings.centered&&this.$modal.addClass("modal-centered"),"body"===this.settings.container&&this.$modal.addClass("fixed"),this.settings.width&&this.$modalDialog.css({"max-width":this.settings.width}),this.$container.append(this.$overlay),this.$container.append(this.$modal),this.$overlay.show(),this.$modal.show(),this};function e(t,s,e){e=a.extend(!0,{},a.fn.modal2.defaults,e);var o=!!(t=!!t&&a(t))&&t.data("modal");if(s)switch("object"!=typeof o&&(o=new i(t,e)),s){case"hide":case"close":a.isFunction(o.close)&&o.close();break;case"open":case"show":a.isFunction(o.open)&&o.open()}else t.is(document)?o=new i(!1,e):"object"!=typeof o&&(o=new i(t,e));return t.data("modal",o),o}return a.fn.modal2=function(t,s){return"object"==typeof t&&(s=t,t=!1),this.each(function(){return e(this,t,s),this})},a.modal2=function(t){return e(document,!1,t)},a.fn.modal2.count=0,a.fn.modal2.defaults={closeModalName:'[data-dismiss="modal2"]',modalContentName:"modal-content",modalDialogName:"modal-dialog",backdropName:"modal-backdrop",allowCloseOverlay:!0,onBeforeClose:a.noop,modalSkin:"default",modalName:"modal",afterClose:a.noop,container:"body",afterInit:a.noop,afterOpen:a.noop,allowClose:!0,centered:!1,width:!1,html:!1,ajax:!1},a.modal2}); \ No newline at end of file