From dd80239320f43d560bfdb1bb47d4774d34fc1bf0 Mon Sep 17 00:00:00 2001 From: Gaspare Sganga Date: Tue, 3 Jul 2018 18:49:55 +0200 Subject: [PATCH] v2.1.5 --- CHANGELOG.md | 7 +++++++ dist/loadingoverlay.js | 38 ++++++++++++++++++++-------------- dist/loadingoverlay.min.js | 4 ++-- dist/loadingoverlay.min.js.map | 2 +- package-lock.json | 8 +++---- package.json | 4 ++-- src/loadingoverlay.js | 2 +- 7 files changed, 40 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2c4518..0f0c3d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## v2.1.5 - 2018-07-03 +### Fixed +- Toggle LoadingOverlay visibility according to target element +- Clear orphaned intervals when target element is arbitrary removed from DOM + + + ## v2.1.4 - 2018-06-07 ### Fixed - Replaced the `.load()` method with a custom `ajax()` request to load external SVG images in order to prevent conflicts with `ajaxStart()` and `ajaxSend()` event handlers diff --git a/dist/loadingoverlay.js b/dist/loadingoverlay.js index dbb9629..e32d14c 100644 --- a/dist/loadingoverlay.js +++ b/dist/loadingoverlay.js @@ -1,7 +1,7 @@ /*************************************************************************************************** LoadingOverlay - A flexible loading overlay jQuery plugin Author : Gaspare Sganga - Version : 2.1.4 + Version : 2.1.5 License : MIT Documentation : https://gasparesganga.com/labs/jquery-loading-overlay/ ***************************************************************************************************/ @@ -217,8 +217,8 @@ LoadingOverlay - A flexible loading overlay jQuery plugin settings.minSize = parseInt(settings.minSize, 10) || 0; settings.resizeInterval = parseInt(settings.resizeInterval, 10) || 0; - var overlay = container.data("loadingoverlay"); - var data = _GetData(overlay); + var overlay = _GetOverlay(container); + var data = _GetData(container); if (data === false) { // Init data data = $.extend({}, _dataTemplate); @@ -407,8 +407,8 @@ LoadingOverlay - A flexible loading overlay jQuery plugin function Hide(container, force){ container = $(container); - var overlay = container.data("loadingoverlay"); - var data = _GetData(overlay); + var overlay = _GetOverlay(container); + var data = _GetData(container); if (data === false) return; data.count--; @@ -427,8 +427,7 @@ LoadingOverlay - A flexible loading overlay jQuery plugin function Text(container, value){ container = $(container); - var overlay = container.data("loadingoverlay"); - var data = _GetData(overlay); + var data = _GetData(container); if (data === false || !data.text) return; if (value === false) { @@ -442,8 +441,7 @@ LoadingOverlay - A flexible loading overlay jQuery plugin function Progress(container, value){ container = $(container); - var overlay = container.data("loadingoverlay"); - var data = _GetData(overlay); + var data = _GetData(container); if (data === false || !data.progress) return; if (value === false) { @@ -462,8 +460,8 @@ LoadingOverlay - A flexible loading overlay jQuery plugin function _IntervalResize(container, force){ - var overlay = container.data("loadingoverlay"); - var data = _GetData(overlay); + var overlay = _GetOverlay(container); + var data = _GetData(container); if (data === false) return; // Overlay @@ -517,16 +515,26 @@ LoadingOverlay - A flexible loading overlay jQuery plugin } - function _GetData(overlay){ - var data = (typeof overlay === "undefined") ? undefined : overlay.data("loadingoverlay_data"); + function _GetOverlay(container){ + return container.data("loadingoverlay"); + } + + function _GetData(container){ + var overlay = _GetOverlay(container); + var data = (typeof overlay === "undefined") ? undefined : overlay.data("loadingoverlay_data"); if (typeof data === "undefined") { // Clean DOM $(".loadingoverlay").each(function(){ - var $this = $(this); - if (!document.body.contains($this.data("loadingoverlay_data").container[0])) $this.remove(); + var $this = $(this); + var data = $this.data("loadingoverlay_data"); + if (!document.body.contains(data.container[0])) { + if (data.resizeIntervalId) clearInterval(data.resizeIntervalId); + $this.remove(); + } }); return false; } else { + overlay.toggle(container.is(":visible")); return data; } } diff --git a/dist/loadingoverlay.min.js b/dist/loadingoverlay.min.js index 7d08301..0c078f1 100644 --- a/dist/loadingoverlay.min.js +++ b/dist/loadingoverlay.min.js @@ -1,8 +1,8 @@ /*************************************************************************************************** LoadingOverlay - A flexible loading overlay jQuery plugin Author : Gaspare Sganga - Version : 2.1.4 + Version : 2.1.5 License : MIT Documentation : https://gasparesganga.com/labs/jquery-loading-overlay/ ***************************************************************************************************/ -!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?e(require("jquery")):e(jQuery)}(function(e,s){"use strict";var a={background:"rgba(255, 255, 255, 0.8)",backgroundClass:"",image:"",imageAnimation:"2000ms rotate_right",imageAutoResize:!0,imageResizeFactor:1,imageColor:"#202020",imageClass:"",imageOrder:1,fontawesome:"",fontawesomeAnimation:"",fontawesomeAutoResize:!0,fontawesomeResizeFactor:1,fontawesomeColor:"#202020",fontawesomeOrder:2,custom:"",customAnimation:"",customAutoResize:!0,customResizeFactor:1,customOrder:3,text:"",textAnimation:"",textAutoResize:!0,textResizeFactor:.5,textColor:"#202020",textClass:"",textOrder:4,progress:!1,progressAutoResize:!0,progressResizeFactor:.25,progressColor:"#a0a0a0",progressClass:"",progressOrder:5,progressFixedPosition:"",progressSpeed:200,progressMin:0,progressMax:100,size:50,maxSize:120,minSize:20,direction:"column",fade:!0,resizeInterval:50,zIndex:2147483647},t={overlay:{"box-sizing":"border-box",position:"relative",display:"flex","flex-wrap":"nowrap","align-items":"center","justify-content":"space-around"},element:{"box-sizing":"border-box",overflow:"visible",flex:"0 0 auto",display:"flex","justify-content":"center","align-items":"center"},element_svg:{width:"100%",height:"100%"},progress_fixed:{position:"absolute",left:"0",width:"100%"},progress_wrapper:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},progress_bar:{position:"absolute",left:"0"}},o={count:0,container:s,settings:s,wholePage:s,resizeIntervalId:s,text:s,progress:s},r={animations:["rotate_right","rotate_left","fadein","pulse"],progressPosition:["top","bottom"]},i={animations:{name:"rotate_right",time:"2000ms"},fade:[400,200]};function n(s,a){s=e(s),a.size=y(a.size),a.maxSize=parseInt(a.maxSize,10)||0,a.minSize=parseInt(a.minSize,10)||0,a.resizeInterval=parseInt(a.resizeInterval,10)||0;var r=s.data("loadingoverlay"),n=f(r);if(!1===n){if((n=e.extend({},o)).container=s,n.wholePage=s.is("body"),r=e("
",{class:"loadingoverlay"}).css(t.overlay).css("flex-direction","row"===a.direction.toLowerCase()?"row":"column"),a.backgroundClass?r.addClass(a.backgroundClass):r.css("background",a.background),n.wholePage&&r.css({position:"fixed",top:0,left:0,width:"100%",height:"100%"}),void 0!==a.zIndex&&r.css("z-index",a.zIndex),a.image){e.isArray(a.imageColor)?0===a.imageColor.length?a.imageColor=!1:1===a.imageColor.length?a.imageColor={fill:a.imageColor[0]}:a.imageColor={fill:a.imageColor[0],stroke:a.imageColor[1]}:a.imageColor&&(a.imageColor={fill:a.imageColor});var l=p(r,a.imageOrder,a.imageAutoResize,a.imageResizeFactor,a.imageAnimation);""===a.image.slice(-6).toLowerCase()?(l.append(a.image),l.children().css(t.element_svg),!a.imageClass&&a.imageColor&&l.find("*").css(a.imageColor)):".svg"===a.image.slice(-4).toLowerCase()||"data:image/svg"===a.image.slice(0,14).toLowerCase()?e.ajax({url:a.image,type:"GET",dataType:"html",global:!1}).done(function(e){l.html(e),l.children().css(t.element_svg),!a.imageClass&&a.imageColor&&l.find("*").css(a.imageColor)}):l.css({"background-image":"url("+a.image+")","background-position":"center","background-repeat":"no-repeat","background-size":"cover"}),a.imageClass&&l.addClass(a.imageClass)}if(a.fontawesome){l=p(r,a.fontawesomeOrder,a.fontawesomeAutoResize,a.fontawesomeResizeFactor,a.fontawesomeAnimation).addClass("loadingoverlay_fa");e("
",{class:a.fontawesome}).appendTo(l),a.fontawesomeColor&&l.css("color",a.fontawesomeColor)}if(a.custom)l=p(r,a.customOrder,a.customAutoResize,a.customResizeFactor,a.customAnimation).append(a.custom);if(a.text&&(n.text=p(r,a.textOrder,a.textAutoResize,a.textResizeFactor,a.textAnimation).addClass("loadingoverlay_text").text(a.text),a.textClass?n.text.addClass(a.textClass):a.textColor&&n.text.css("color",a.textColor)),a.progress){l=p(r,a.progressOrder,a.progressAutoResize,a.progressResizeFactor,!1).addClass("loadingoverlay_progress");var g=e("
").css(t.progress_wrapper).appendTo(l);n.progress={bar:e("
").css(t.progress_bar).appendTo(g),fixed:!1,margin:0,min:parseFloat(a.progressMin),max:parseFloat(a.progressMax),speed:parseInt(a.progressSpeed,10)};var d=(a.progressFixedPosition+"").replace(/\s\s+/g," ").toLowerCase().split(" ");2===d.length&&x(d[0])?(n.progress.fixed=d[0],n.progress.margin=y(d[1])):2===d.length&&x(d[1])?(n.progress.fixed=d[1],n.progress.margin=y(d[0])):1===d.length&&x(d[0])&&(n.progress.fixed=d[0],n.progress.margin=0),"top"===n.progress.fixed?l.css(t.progress_fixed).css("top",n.progress.margin?n.progress.margin.value+(n.progress.margin.fixed?n.progress.margin.units:"%"):0):"bottom"===n.progress.fixed&&l.css(t.progress_fixed).css("top","auto"),a.progressClass?n.progress.bar.addClass(a.progressClass):a.progressColor&&n.progress.bar.css("background",a.progressColor)}a.fade?!0===a.fade?a.fade=i.fade:"string"==typeof a.fade||"number"==typeof a.fade?a.fade=[a.fade,a.fade]:e.isArray(a.fade)&&a.fade.length<2&&(a.fade=[a.fade[0],a.fade[0]]):a.fade=[0,0],a.fade=[parseInt(a.fade[0],10),parseInt(a.fade[1],10)],n.settings=a,r.data("loadingoverlay_data",n),s.data("loadingoverlay",r),r.fadeTo(0,.01).appendTo("body"),m(s,!0),a.resizeInterval>0&&(n.resizeIntervalId=setInterval(function(){m(s,!1)},a.resizeInterval)),r.fadeTo(a.fade[0],1)}n.count++}function l(s,a){var t=(s=e(s)).data("loadingoverlay"),o=f(t);!1!==o&&(o.count--,(a||o.count<=0)&&(o.resizeIntervalId&&clearInterval(o.resizeIntervalId),t.fadeOut(o.settings.fade[1],function(){e(this).remove()}),s.removeData("loadingoverlay")))}function g(s){m(e(s),!0)}function d(s,a){var t=f((s=e(s)).data("loadingoverlay"));!1!==t&&t.text&&(!1===a?t.text.hide():t.text.show().text(a))}function c(s,a){var t=f((s=e(s)).data("loadingoverlay"));if(!1!==t&&t.progress)if(!1===a)t.progress.bar.hide();else{var o=100*((parseFloat(a)||0)-t.progress.min)/(t.progress.max-t.progress.min);o<0&&(o=0),o>100&&(o=100),t.progress.bar.show().animate({width:o+"%"},t.progress.speed)}}function m(s,a){var t=s.data("loadingoverlay"),o=f(t);if(!1!==o){if(!o.wholePage){var r="fixed"===s.css("position"),i=r?s[0].getBoundingClientRect():s.offset();t.css({position:r?"fixed":"absolute",top:i.top+parseInt(s.css("border-top-width"),10),left:i.left+parseInt(s.css("border-left-width"),10),width:s.innerWidth(),height:s.innerHeight()})}if(o.settings.size){var n=o.wholePage?e(window):s,l=o.settings.size.value;o.settings.size.fixed||(l=Math.min(n.innerWidth(),n.innerHeight())*l/100,o.settings.maxSize&&l>o.settings.maxSize&&(l=o.settings.maxSize),o.settings.minSize&&l",{class:"loadingoverlay_element",css:{order:a}}).css(t.element).data({loadingoverlay_autoresize:o,loadingoverlay_resizefactor:r}).appendTo(s);if(!0===n&&(n=i.animations.time+" "+i.animations.name),"string"==typeof n){var g,d,c=n.replace(/\s\s+/g," ").toLowerCase().split(" ");2===c.length&&u(c[0])&&v(c[1])?(g=c[1],d=c[0]):2===c.length&&u(c[1])&&v(c[0])?(g=c[0],d=c[1]):1===c.length&&u(c[0])?(g=i.animations.name,d=c[0]):1===c.length&&v(c[0])&&(g=c[0],d=i.animations.time),l.css({"animation-name":"loadingoverlay_animation__"+g,"animation-duration":d,"animation-timing-function":"linear","animation-iteration-count":"infinite"})}return l}function u(e){return!isNaN(parseFloat(e))&&("s"===e.slice(-1)||"ms"===e.slice(-2))}function v(e){return r.animations.indexOf(e)>-1}function x(e){return r.progressPosition.indexOf(e)>-1}function y(e){return!(!e||e<0)&&("string"==typeof e&&["vmin","vmax"].indexOf(e.slice(-4))>-1?{fixed:!0,units:e.slice(-4),value:e.slice(0,-4)}:"string"==typeof e&&["rem"].indexOf(e.slice(-3))>-1?{fixed:!0,units:e.slice(-3),value:e.slice(0,-3)}:"string"==typeof e&&["px","em","cm","mm","in","pt","pc","vh","vw"].indexOf(e.slice(-2))>-1?{fixed:!0,units:e.slice(-2),value:e.slice(0,-2)}:{fixed:!1,units:"px",value:parseFloat(e)})}e.LoadingOverlaySetup=function(s){e.extend(!0,a,s)},e.LoadingOverlay=function(s,t){switch(s.toLowerCase()){case"show":n("body",e.extend(!0,{},a,t));break;case"hide":l("body",t);break;case"resize":g("body");break;case"text":d("body",t);break;case"progress":c("body",t)}},e.fn.LoadingOverlay=function(s,t){switch(s.toLowerCase()){case"show":var o=e.extend(!0,{},a,t);return this.each(function(){n(this,o)});case"hide":return this.each(function(){l(this,t)});case"resize":return this.each(function(){g(this)});case"text":return this.each(function(){d(this,t)});case"progress":return this.each(function(){c(this,t)})}},e(function(){e("head").append([""].join(" "))})}); \ No newline at end of file +!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?e(require("jquery")):e(jQuery)}(function(e,s){"use strict";var t={background:"rgba(255, 255, 255, 0.8)",backgroundClass:"",image:"",imageAnimation:"2000ms rotate_right",imageAutoResize:!0,imageResizeFactor:1,imageColor:"#202020",imageClass:"",imageOrder:1,fontawesome:"",fontawesomeAnimation:"",fontawesomeAutoResize:!0,fontawesomeResizeFactor:1,fontawesomeColor:"#202020",fontawesomeOrder:2,custom:"",customAnimation:"",customAutoResize:!0,customResizeFactor:1,customOrder:3,text:"",textAnimation:"",textAutoResize:!0,textResizeFactor:.5,textColor:"#202020",textClass:"",textOrder:4,progress:!1,progressAutoResize:!0,progressResizeFactor:.25,progressColor:"#a0a0a0",progressClass:"",progressOrder:5,progressFixedPosition:"",progressSpeed:200,progressMin:0,progressMax:100,size:50,maxSize:120,minSize:20,direction:"column",fade:!0,resizeInterval:50,zIndex:2147483647},a={overlay:{"box-sizing":"border-box",position:"relative",display:"flex","flex-wrap":"nowrap","align-items":"center","justify-content":"space-around"},element:{"box-sizing":"border-box",overflow:"visible",flex:"0 0 auto",display:"flex","justify-content":"center","align-items":"center"},element_svg:{width:"100%",height:"100%"},progress_fixed:{position:"absolute",left:"0",width:"100%"},progress_wrapper:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},progress_bar:{position:"absolute",left:"0"}},o={count:0,container:s,settings:s,wholePage:s,resizeIntervalId:s,text:s,progress:s},r={animations:["rotate_right","rotate_left","fadein","pulse"],progressPosition:["top","bottom"]},i={animations:{name:"rotate_right",time:"2000ms"},fade:[400,200]};function n(s,t){s=e(s),t.size=y(t.size),t.maxSize=parseInt(t.maxSize,10)||0,t.minSize=parseInt(t.minSize,10)||0,t.resizeInterval=parseInt(t.resizeInterval,10)||0;var r=f(s),n=p(s);if(!1===n){if((n=e.extend({},o)).container=s,n.wholePage=s.is("body"),r=e("
",{class:"loadingoverlay"}).css(a.overlay).css("flex-direction","row"===t.direction.toLowerCase()?"row":"column"),t.backgroundClass?r.addClass(t.backgroundClass):r.css("background",t.background),n.wholePage&&r.css({position:"fixed",top:0,left:0,width:"100%",height:"100%"}),void 0!==t.zIndex&&r.css("z-index",t.zIndex),t.image){e.isArray(t.imageColor)?0===t.imageColor.length?t.imageColor=!1:1===t.imageColor.length?t.imageColor={fill:t.imageColor[0]}:t.imageColor={fill:t.imageColor[0],stroke:t.imageColor[1]}:t.imageColor&&(t.imageColor={fill:t.imageColor});var l=u(r,t.imageOrder,t.imageAutoResize,t.imageResizeFactor,t.imageAnimation);""===t.image.slice(-6).toLowerCase()?(l.append(t.image),l.children().css(a.element_svg),!t.imageClass&&t.imageColor&&l.find("*").css(t.imageColor)):".svg"===t.image.slice(-4).toLowerCase()||"data:image/svg"===t.image.slice(0,14).toLowerCase()?e.ajax({url:t.image,type:"GET",dataType:"html",global:!1}).done(function(e){l.html(e),l.children().css(a.element_svg),!t.imageClass&&t.imageColor&&l.find("*").css(t.imageColor)}):l.css({"background-image":"url("+t.image+")","background-position":"center","background-repeat":"no-repeat","background-size":"cover"}),t.imageClass&&l.addClass(t.imageClass)}if(t.fontawesome){l=u(r,t.fontawesomeOrder,t.fontawesomeAutoResize,t.fontawesomeResizeFactor,t.fontawesomeAnimation).addClass("loadingoverlay_fa");e("
",{class:t.fontawesome}).appendTo(l),t.fontawesomeColor&&l.css("color",t.fontawesomeColor)}if(t.custom)l=u(r,t.customOrder,t.customAutoResize,t.customResizeFactor,t.customAnimation).append(t.custom);if(t.text&&(n.text=u(r,t.textOrder,t.textAutoResize,t.textResizeFactor,t.textAnimation).addClass("loadingoverlay_text").text(t.text),t.textClass?n.text.addClass(t.textClass):t.textColor&&n.text.css("color",t.textColor)),t.progress){l=u(r,t.progressOrder,t.progressAutoResize,t.progressResizeFactor,!1).addClass("loadingoverlay_progress");var g=e("
").css(a.progress_wrapper).appendTo(l);n.progress={bar:e("
").css(a.progress_bar).appendTo(g),fixed:!1,margin:0,min:parseFloat(t.progressMin),max:parseFloat(t.progressMax),speed:parseInt(t.progressSpeed,10)};var c=(t.progressFixedPosition+"").replace(/\s\s+/g," ").toLowerCase().split(" ");2===c.length&&h(c[0])?(n.progress.fixed=c[0],n.progress.margin=y(c[1])):2===c.length&&h(c[1])?(n.progress.fixed=c[1],n.progress.margin=y(c[0])):1===c.length&&h(c[0])&&(n.progress.fixed=c[0],n.progress.margin=0),"top"===n.progress.fixed?l.css(a.progress_fixed).css("top",n.progress.margin?n.progress.margin.value+(n.progress.margin.fixed?n.progress.margin.units:"%"):0):"bottom"===n.progress.fixed&&l.css(a.progress_fixed).css("top","auto"),t.progressClass?n.progress.bar.addClass(t.progressClass):t.progressColor&&n.progress.bar.css("background",t.progressColor)}t.fade?!0===t.fade?t.fade=i.fade:"string"==typeof t.fade||"number"==typeof t.fade?t.fade=[t.fade,t.fade]:e.isArray(t.fade)&&t.fade.length<2&&(t.fade=[t.fade[0],t.fade[0]]):t.fade=[0,0],t.fade=[parseInt(t.fade[0],10),parseInt(t.fade[1],10)],n.settings=t,r.data("loadingoverlay_data",n),s.data("loadingoverlay",r),r.fadeTo(0,.01).appendTo("body"),m(s,!0),t.resizeInterval>0&&(n.resizeIntervalId=setInterval(function(){m(s,!1)},t.resizeInterval)),r.fadeTo(t.fade[0],1)}n.count++}function l(s,t){var a=f(s=e(s)),o=p(s);!1!==o&&(o.count--,(t||o.count<=0)&&(o.resizeIntervalId&&clearInterval(o.resizeIntervalId),a.fadeOut(o.settings.fade[1],function(){e(this).remove()}),s.removeData("loadingoverlay")))}function g(s){m(e(s),!0)}function c(s,t){var a=p(s=e(s));!1!==a&&a.text&&(!1===t?a.text.hide():a.text.show().text(t))}function d(s,t){var a=p(s=e(s));if(!1!==a&&a.progress)if(!1===t)a.progress.bar.hide();else{var o=100*((parseFloat(t)||0)-a.progress.min)/(a.progress.max-a.progress.min);o<0&&(o=0),o>100&&(o=100),a.progress.bar.show().animate({width:o+"%"},a.progress.speed)}}function m(s,t){var a=f(s),o=p(s);if(!1!==o){if(!o.wholePage){var r="fixed"===s.css("position"),i=r?s[0].getBoundingClientRect():s.offset();a.css({position:r?"fixed":"absolute",top:i.top+parseInt(s.css("border-top-width"),10),left:i.left+parseInt(s.css("border-left-width"),10),width:s.innerWidth(),height:s.innerHeight()})}if(o.settings.size){var n=o.wholePage?e(window):s,l=o.settings.size.value;o.settings.size.fixed||(l=Math.min(n.innerWidth(),n.innerHeight())*l/100,o.settings.maxSize&&l>o.settings.maxSize&&(l=o.settings.maxSize),o.settings.minSize&&l",{class:"loadingoverlay_element",css:{order:t}}).css(a.element).data({loadingoverlay_autoresize:o,loadingoverlay_resizefactor:r}).appendTo(s);if(!0===n&&(n=i.animations.time+" "+i.animations.name),"string"==typeof n){var g,c,d=n.replace(/\s\s+/g," ").toLowerCase().split(" ");2===d.length&&v(d[0])&&x(d[1])?(g=d[1],c=d[0]):2===d.length&&v(d[1])&&x(d[0])?(g=d[0],c=d[1]):1===d.length&&v(d[0])?(g=i.animations.name,c=d[0]):1===d.length&&x(d[0])&&(g=d[0],c=i.animations.time),l.css({"animation-name":"loadingoverlay_animation__"+g,"animation-duration":c,"animation-timing-function":"linear","animation-iteration-count":"infinite"})}return l}function v(e){return!isNaN(parseFloat(e))&&("s"===e.slice(-1)||"ms"===e.slice(-2))}function x(e){return r.animations.indexOf(e)>-1}function h(e){return r.progressPosition.indexOf(e)>-1}function y(e){return!(!e||e<0)&&("string"==typeof e&&["vmin","vmax"].indexOf(e.slice(-4))>-1?{fixed:!0,units:e.slice(-4),value:e.slice(0,-4)}:"string"==typeof e&&["rem"].indexOf(e.slice(-3))>-1?{fixed:!0,units:e.slice(-3),value:e.slice(0,-3)}:"string"==typeof e&&["px","em","cm","mm","in","pt","pc","vh","vw"].indexOf(e.slice(-2))>-1?{fixed:!0,units:e.slice(-2),value:e.slice(0,-2)}:{fixed:!1,units:"px",value:parseFloat(e)})}e.LoadingOverlaySetup=function(s){e.extend(!0,t,s)},e.LoadingOverlay=function(s,a){switch(s.toLowerCase()){case"show":n("body",e.extend(!0,{},t,a));break;case"hide":l("body",a);break;case"resize":g("body");break;case"text":c("body",a);break;case"progress":d("body",a)}},e.fn.LoadingOverlay=function(s,a){switch(s.toLowerCase()){case"show":var o=e.extend(!0,{},t,a);return this.each(function(){n(this,o)});case"hide":return this.each(function(){l(this,a)});case"resize":return this.each(function(){g(this)});case"text":return this.each(function(){c(this,a)});case"progress":return this.each(function(){d(this,a)})}},e(function(){e("head").append([""].join(" "))})}); \ No newline at end of file diff --git a/dist/loadingoverlay.min.js.map b/dist/loadingoverlay.min.js.map index 7ddc1d1..16c61d1 100644 --- a/dist/loadingoverlay.min.js.map +++ b/dist/loadingoverlay.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["loadingoverlay.js"],"names":["factory","define","amd","module","exports","require","jQuery","$","undefined","_defaults","background","backgroundClass","image","imageAnimation","imageAutoResize","imageResizeFactor","imageColor","imageClass","imageOrder","fontawesome","fontawesomeAnimation","fontawesomeAutoResize","fontawesomeResizeFactor","fontawesomeColor","fontawesomeOrder","custom","customAnimation","customAutoResize","customResizeFactor","customOrder","text","textAnimation","textAutoResize","textResizeFactor","textColor","textClass","textOrder","progress","progressAutoResize","progressResizeFactor","progressColor","progressClass","progressOrder","progressFixedPosition","progressSpeed","progressMin","progressMax","size","maxSize","minSize","direction","fade","resizeInterval","zIndex","_css","overlay","box-sizing","position","display","flex-wrap","align-items","justify-content","element","overflow","flex","element_svg","width","height","progress_fixed","left","progress_wrapper","top","progress_bar","_dataTemplate","count","container","settings","wholePage","resizeIntervalId","_whitelists","animations","progressPosition","_defaultValues","name","time","Show","_ParseSize","parseInt","data","_GetData","extend","is","class","css","toLowerCase","addClass","isArray","length","fill","stroke","_CreateElement","slice","append","children","find","ajax","url","type","dataType","global","done","html","background-image","background-position","background-repeat","background-size","appendTo","wrapper","bar","fixed","margin","min","parseFloat","max","speed","progressPositionParts","replace","split","_ValidateProgressPosition","value","units","fadeTo","_IntervalResize","setInterval","Hide","force","clearInterval","fadeOut","this","remove","removeData","Resize","Text","hide","show","Progress","v","animate","isFixed","pos","getBoundingClientRect","offset","innerWidth","innerHeight","c","window","Math","each","$this","resizeFactor","hasClass","document","body","contains","order","autoResize","animation","loadingoverlay_autoresize","loadingoverlay_resizefactor","animationName","animationTime","parts","_ValidateCssTime","_ValidateAnimation","animation-name","animation-duration","animation-timing-function","animation-iteration-count","isNaN","indexOf","LoadingOverlaySetup","LoadingOverlay","action","options","fn","join"],"mappings":";;;;;;;CAOE,SAASA,GACe,mBAAXC,QAAyBA,OAAOC,IAEvCD,QAAQ,UAAWD,GACM,iBAAXG,QAAuBA,OAAOC,QAE5CJ,EAAQK,QAAQ,WAGhBL,EAAQM,QATf,CAWC,SAASC,EAAGC,GACV,aAGA,IAAIC,GAEAC,WAA0B,2BAC1BC,gBAA0B,GAE1BC,MAA0B,uVAC1BC,eAA0B,sBAC1BC,iBAA0B,EAC1BC,kBAA0B,EAC1BC,WAA0B,UAC1BC,WAA0B,GAC1BC,WAA0B,EAE1BC,YAA0B,GAC1BC,qBAA0B,GAC1BC,uBAA0B,EAC1BC,wBAA0B,EAC1BC,iBAA0B,UAC1BC,iBAA0B,EAE1BC,OAA0B,GAC1BC,gBAA0B,GAC1BC,kBAA0B,EAC1BC,mBAA0B,EAC1BC,YAA0B,EAE1BC,KAA0B,G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AAK,WACbhB,EAAOH,QAGf,IAAK,OACD,OAAOA,KAAKmB,KAAK,WACbf,EAAKJ,KAAM6C,KAGnB,IAAK,WACD,OAAO7C,KAAKmB,KAAK,WACbZ,EAASP,KAAM6C,OAga/BhL,EAAE,WACEA,EAAE,QAAQ+F,QACN,UACI,8DACE,OACE,sCACQ,8BACV,IACF,IACA,sDACE,OACE,sCACQ,8BACV,IACF,IAEA,6DACE,OACE,uCACQ,+BACV,IACF,IACA,qDACE,OACE,uCACQ,+BACV,IACF,IAEA,wDACE,OACU,iBACR,uCACQ,+BACV,IACA,QACU,iBACV,IACA,SACU,iBACR,mCACQ,2BACV,IACF,IACA,gDACE,OACU,iBACR,uCACQ,+BACV,IACA,QACU,iBACV,IACA,SACU,iBACR,mCACQ,2BACV,IACF,IAEA,uDACE,OACE,mCACQ,2BACV,IACA,QACE,mCACQ,2BACV,IACA,SACE,mCACQ,2BACV,IACF,IACA,+CACE,OACE,mCACQ,2BACV,IACA,QACE,mCACQ,2BACV,IACA,SACE,mCACQ,2BACV,IACF,IACJ,YACFmF,KAAK","file":"loadingoverlay.min.js","sourcesContent":["/***************************************************************************************************\r\nLoadingOverlay - A flexible loading overlay jQuery plugin\r\n Author : Gaspare Sganga\r\n Version : 2.1.4\r\n License : MIT\r\n Documentation : https://gasparesganga.com/labs/jquery-loading-overlay/\r\n***************************************************************************************************/\r\n;(function(factory){\r\n if (typeof define === \"function\" && define.amd) {\r\n // AMD. Register as an anonymous module\r\n define([\"jquery\"], factory);\r\n } else if (typeof module === \"object\" && module.exports) {\r\n // Node/CommonJS\r\n factory(require(\"jquery\"));\r\n } else {\r\n // Browser globals\r\n factory(jQuery);\r\n }\r\n}(function($, undefined){\r\n \"use strict\";\r\n \r\n // Default Settings\r\n var _defaults = {\r\n // Background\r\n background : \"rgba(255, 255, 255, 0.8)\",\r\n backgroundClass : \"\",\r\n // Image\r\n image : \"\",\r\n imageAnimation : \"2000ms rotate_right\",\r\n imageAutoResize : true,\r\n imageResizeFactor : 1,\r\n imageColor : \"#202020\",\r\n imageClass : \"\",\r\n imageOrder : 1,\r\n // Font Awesome\r\n fontawesome : \"\",\r\n fontawesomeAnimation : \"\",\r\n fontawesomeAutoResize : true,\r\n fontawesomeResizeFactor : 1,\r\n fontawesomeColor : \"#202020\",\r\n fontawesomeOrder : 2,\r\n // Custom\r\n custom : \"\",\r\n customAnimation : \"\",\r\n customAutoResize : true,\r\n customResizeFactor : 1,\r\n customOrder : 3,\r\n // Text\r\n text : \"\",\r\n textAnimation : \"\",\r\n textAutoResize : true,\r\n textResizeFactor : 0.5,\r\n textColor : \"#202020\",\r\n textClass : \"\",\r\n textOrder : 4,\r\n // Progress\r\n progress : false,\r\n progressAutoResize : true,\r\n progressResizeFactor : 0.25,\r\n progressColor : \"#a0a0a0\",\r\n progressClass : \"\",\r\n progressOrder : 5,\r\n progressFixedPosition : \"\",\r\n progressSpeed : 200,\r\n progressMin : 0,\r\n progressMax : 100,\r\n // Sizing\r\n size : 50,\r\n maxSize : 120,\r\n minSize : 20,\r\n // Misc\r\n direction : \"column\",\r\n fade : true,\r\n resizeInterval : 50,\r\n zIndex : 2147483647\r\n };\r\n \r\n // Required CSS\r\n var _css = {\r\n overlay : {\r\n \"box-sizing\" : \"border-box\",\r\n \"position\" : \"relative\",\r\n \"display\" : \"flex\",\r\n \"flex-wrap\" : \"nowrap\",\r\n \"align-items\" : \"center\",\r\n \"justify-content\" : \"space-around\"\r\n },\r\n element : {\r\n \"box-sizing\" : \"border-box\",\r\n \"overflow\" : \"visible\",\r\n \"flex\" : \"0 0 auto\",\r\n \"display\" : \"flex\",\r\n \"justify-content\" : \"center\",\r\n \"align-items\" : \"center\"\r\n },\r\n element_svg : {\r\n \"width\" : \"100%\",\r\n \"height\" : \"100%\"\r\n },\r\n progress_fixed : {\r\n \"position\" : \"absolute\",\r\n \"left\" : \"0\",\r\n \"width\" : \"100%\"\r\n },\r\n progress_wrapper : {\r\n \"position\" : \"absolute\",\r\n \"top\" : \"0\",\r\n \"left\" : \"0\",\r\n \"width\" : \"100%\",\r\n \"height\" : \"100%\"\r\n },\r\n progress_bar : {\r\n \"position\" : \"absolute\",\r\n \"left\" : \"0\"\r\n }\r\n };\r\n \r\n // Data Template\r\n var _dataTemplate = {\r\n \"count\" : 0,\r\n \"container\" : undefined,\r\n \"settings\" : undefined,\r\n \"wholePage\" : undefined,\r\n \"resizeIntervalId\" : undefined,\r\n \"text\" : undefined,\r\n \"progress\" : undefined\r\n };\r\n \r\n // Whitelists\r\n var _whitelists = {\r\n animations : [\r\n \"rotate_right\",\r\n \"rotate_left\",\r\n \"fadein\",\r\n \"pulse\"\r\n ],\r\n progressPosition : [\r\n \"top\",\r\n \"bottom\"\r\n ]\r\n };\r\n \r\n // Default Values\r\n var _defaultValues = {\r\n animations : {\r\n name : \"rotate_right\",\r\n time : \"2000ms\"\r\n },\r\n fade : [400, 200]\r\n };\r\n \r\n \r\n $.LoadingOverlaySetup = function(settings){\r\n $.extend(true, _defaults, settings);\r\n };\r\n \r\n $.LoadingOverlay = function(action, options){\r\n switch (action.toLowerCase()) {\r\n case \"show\":\r\n var settings = $.extend(true, {}, _defaults, options);\r\n Show(\"body\", settings);\r\n break;\r\n \r\n case \"hide\":\r\n Hide(\"body\", options);\r\n break;\r\n \r\n case \"resize\":\r\n Resize(\"body\", options);\r\n break; \r\n \r\n case \"text\":\r\n Text(\"body\", options);\r\n break;\r\n \r\n case \"progress\":\r\n Progress(\"body\", options);\r\n break;\r\n }\r\n };\r\n \r\n $.fn.LoadingOverlay = function(action, options){\r\n switch (action.toLowerCase()) {\r\n case \"show\":\r\n var settings = $.extend(true, {}, _defaults, options);\r\n return this.each(function(){\r\n Show(this, settings);\r\n });\r\n \r\n case \"hide\":\r\n return this.each(function(){\r\n Hide(this, options);\r\n });\r\n \r\n case \"resize\":\r\n return this.each(function(){\r\n Resize(this, options);\r\n });\r\n \r\n case \"text\":\r\n return this.each(function(){\r\n Text(this, options);\r\n });\r\n \r\n case \"progress\":\r\n return this.each(function(){\r\n Progress(this, options);\r\n });\r\n }\r\n };\r\n \r\n \r\n function Show(container, settings){\r\n container = $(container);\r\n settings.size = _ParseSize(settings.size);\r\n settings.maxSize = parseInt(settings.maxSize, 10) || 0;\r\n settings.minSize = parseInt(settings.minSize, 10) || 0;\r\n settings.resizeInterval = parseInt(settings.resizeInterval, 10) || 0;\r\n \r\n var overlay = container.data(\"loadingoverlay\");\r\n var data = _GetData(overlay);\r\n if (data === false) {\r\n // Init data\r\n data = $.extend({}, _dataTemplate);\r\n data.container = container;\r\n data.wholePage = container.is(\"body\");\r\n \r\n // Overlay\r\n overlay = $(\"
\", {\r\n \"class\" : \"loadingoverlay\"\r\n })\r\n .css(_css.overlay)\r\n .css(\"flex-direction\", settings.direction.toLowerCase() === \"row\" ? \"row\" : \"column\");\r\n if (settings.backgroundClass) {\r\n overlay.addClass(settings.backgroundClass);\r\n } else {\r\n overlay.css(\"background\", settings.background);\r\n }\r\n if (data.wholePage) {\r\n overlay.css({\r\n \"position\" : \"fixed\",\r\n \"top\" : 0,\r\n \"left\" : 0,\r\n \"width\" : \"100%\",\r\n \"height\" : \"100%\"\r\n });\r\n }\r\n if (typeof settings.zIndex !== \"undefined\") overlay.css(\"z-index\", settings.zIndex);\r\n \r\n // Image\r\n if (settings.image) {\r\n if ($.isArray(settings.imageColor)) {\r\n if (settings.imageColor.length === 0) {\r\n settings.imageColor = false;\r\n } else if (settings.imageColor.length === 1) {\r\n settings.imageColor = {\r\n \"fill\" : settings.imageColor[0]\r\n };\r\n } else {\r\n settings.imageColor = {\r\n \"fill\" : settings.imageColor[0],\r\n \"stroke\" : settings.imageColor[1]\r\n };\r\n }\r\n } else if (settings.imageColor) {\r\n settings.imageColor = {\r\n \"fill\" : settings.imageColor\r\n };\r\n }\r\n var element = _CreateElement(overlay, settings.imageOrder, settings.imageAutoResize, settings.imageResizeFactor, settings.imageAnimation);\r\n if (settings.image.slice(0, 4).toLowerCase() === \"\") {\r\n // Inline SVG\r\n element.append(settings.image);\r\n element.children().css(_css.element_svg);\r\n if (!settings.imageClass && settings.imageColor) element.find(\"*\").css(settings.imageColor);\r\n } else if (settings.image.slice(-4).toLowerCase() === \".svg\" || settings.image.slice(0, 14).toLowerCase() === \"data:image/svg\") {\r\n // SVG file or base64-encoded SVG\r\n $.ajax({\r\n url : settings.image,\r\n type : \"GET\",\r\n dataType : \"html\",\r\n global : false\r\n }).done(function(data){\r\n element.html(data);\r\n element.children().css(_css.element_svg);\r\n if (!settings.imageClass && settings.imageColor) element.find(\"*\").css(settings.imageColor);\r\n });\r\n } else {\r\n // Raster\r\n element.css({\r\n \"background-image\" : \"url(\" + settings.image + \")\",\r\n \"background-position\" : \"center\",\r\n \"background-repeat\" : \"no-repeat\",\r\n \"background-size\" : \"cover\"\r\n });\r\n }\r\n if (settings.imageClass) element.addClass(settings.imageClass);\r\n }\r\n \r\n // Font Awesome\r\n if (settings.fontawesome) {\r\n var element = _CreateElement(overlay, settings.fontawesomeOrder, settings.fontawesomeAutoResize, settings.fontawesomeResizeFactor, settings.fontawesomeAnimation)\r\n .addClass(\"loadingoverlay_fa\");\r\n $(\"
\", {\r\n \"class\" : settings.fontawesome\r\n }).appendTo(element);\r\n if (settings.fontawesomeColor) element.css(\"color\", settings.fontawesomeColor);\r\n }\r\n \r\n // Custom\r\n if (settings.custom) {\r\n var element = _CreateElement(overlay, settings.customOrder, settings.customAutoResize, settings.customResizeFactor, settings.customAnimation)\r\n .append(settings.custom);\r\n }\r\n \r\n // Text\r\n if (settings.text) {\r\n data.text = _CreateElement(overlay, settings.textOrder, settings.textAutoResize, settings.textResizeFactor, settings.textAnimation)\r\n .addClass(\"loadingoverlay_text\")\r\n .text(settings.text);\r\n if (settings.textClass) {\r\n data.text.addClass(settings.textClass);\r\n } else if (settings.textColor) {\r\n data.text.css(\"color\", settings.textColor);\r\n }\r\n }\r\n \r\n // Progress\r\n if (settings.progress) {\r\n var element = _CreateElement(overlay, settings.progressOrder, settings.progressAutoResize, settings.progressResizeFactor, false)\r\n .addClass(\"loadingoverlay_progress\");\r\n var wrapper = $(\"
\")\r\n .css(_css.progress_wrapper)\r\n .appendTo(element);\r\n data.progress = {\r\n bar : $(\"
\").css(_css.progress_bar).appendTo(wrapper),\r\n fixed : false,\r\n margin : 0,\r\n min : parseFloat(settings.progressMin),\r\n max : parseFloat(settings.progressMax),\r\n speed : parseInt(settings.progressSpeed, 10)\r\n };\r\n var progressPositionParts = (settings.progressFixedPosition + \"\").replace(/\\s\\s+/g, \" \").toLowerCase().split(\" \");\r\n if (progressPositionParts.length === 2 && _ValidateProgressPosition(progressPositionParts[0])) {\r\n data.progress.fixed = progressPositionParts[0];\r\n data.progress.margin = _ParseSize(progressPositionParts[1]);\r\n } else if (progressPositionParts.length === 2 && _ValidateProgressPosition(progressPositionParts[1])) {\r\n data.progress.fixed = progressPositionParts[1];\r\n data.progress.margin = _ParseSize(progressPositionParts[0]);\r\n } else if (progressPositionParts.length === 1 && _ValidateProgressPosition(progressPositionParts[0])) {\r\n data.progress.fixed = progressPositionParts[0];\r\n data.progress.margin = 0;\r\n }\r\n if (data.progress.fixed === \"top\") {\r\n element\r\n .css(_css.progress_fixed)\r\n .css(\"top\", data.progress.margin ? data.progress.margin.value + (data.progress.margin.fixed ? data.progress.margin.units : \"%\") : 0);\r\n } else if (data.progress.fixed === \"bottom\") {\r\n element\r\n .css(_css.progress_fixed)\r\n .css(\"top\", \"auto\");\r\n }\r\n if (settings.progressClass) {\r\n data.progress.bar.addClass(settings.progressClass);\r\n } else if (settings.progressColor) {\r\n data.progress.bar.css(\"background\", settings.progressColor);\r\n } \r\n }\r\n \r\n // Fade\r\n if (!settings.fade) {\r\n settings.fade = [0, 0];\r\n } else if (settings.fade === true) {\r\n settings.fade = _defaultValues.fade;\r\n } else if (typeof settings.fade === \"string\" || typeof settings.fade === \"number\") {\r\n settings.fade = [settings.fade, settings.fade];\r\n } else if ($.isArray(settings.fade) && settings.fade.length < 2) {\r\n settings.fade = [settings.fade[0], settings.fade[0]];\r\n }\r\n settings.fade = [parseInt(settings.fade[0], 10), parseInt(settings.fade[1], 10)]\r\n \r\n \r\n // Save settings\r\n data.settings = settings;\r\n // Save data\r\n overlay.data(\"loadingoverlay_data\", data);\r\n // Save reference to overlay\r\n container.data(\"loadingoverlay\", overlay);\r\n \r\n \r\n // Resize\r\n overlay\r\n .fadeTo(0, 0.01)\r\n .appendTo(\"body\");\r\n _IntervalResize(container, true);\r\n if (settings.resizeInterval > 0) {\r\n data.resizeIntervalId = setInterval(function(){\r\n _IntervalResize(container, false);\r\n }, settings.resizeInterval);\r\n }\r\n \r\n // Show LoadingOverlay\r\n overlay.fadeTo(settings.fade[0], 1);\r\n }\r\n data.count++;\r\n }\r\n \r\n function Hide(container, force){\r\n container = $(container);\r\n var overlay = container.data(\"loadingoverlay\");\r\n var data = _GetData(overlay);\r\n if (data === false) return;\r\n \r\n data.count--;\r\n if (force || data.count <= 0) {\r\n if (data.resizeIntervalId) clearInterval(data.resizeIntervalId);\r\n overlay.fadeOut(data.settings.fade[1], function(){\r\n $(this).remove();\r\n });\r\n container.removeData(\"loadingoverlay\");\r\n }\r\n }\r\n \r\n function Resize(container){\r\n _IntervalResize($(container), true);\r\n }\r\n \r\n function Text(container, value){\r\n container = $(container);\r\n var overlay = container.data(\"loadingoverlay\");\r\n var data = _GetData(overlay);\r\n if (data === false || !data.text) return;\r\n \r\n if (value === false) {\r\n data.text.hide();\r\n } else {\r\n data.text\r\n .show()\r\n .text(value);\r\n }\r\n }\r\n \r\n function Progress(container, value){\r\n container = $(container);\r\n var overlay = container.data(\"loadingoverlay\");\r\n var data = _GetData(overlay);\r\n if (data === false || !data.progress) return;\r\n \r\n if (value === false) {\r\n data.progress.bar.hide();\r\n } else {\r\n var v = ((parseFloat(value) || 0) - data.progress.min) * 100 / (data.progress.max - data.progress.min);\r\n if (v < 0) v = 0;\r\n if (v > 100) v = 100;\r\n data.progress.bar\r\n .show()\r\n .animate({\r\n \"width\" : v + \"%\"\r\n }, data.progress.speed);\r\n }\r\n }\r\n \r\n \r\n function _IntervalResize(container, force){\r\n var overlay = container.data(\"loadingoverlay\");\r\n var data = _GetData(overlay);\r\n if (data === false) return;\r\n \r\n // Overlay\r\n if (!data.wholePage) {\r\n var isFixed = container.css(\"position\") === \"fixed\";\r\n var pos = isFixed ? container[0].getBoundingClientRect() : container.offset(); \r\n overlay.css({\r\n \"position\" : isFixed ? \"fixed\" : \"absolute\",\r\n \"top\" : pos.top + parseInt(container.css(\"border-top-width\"), 10),\r\n \"left\" : pos.left + parseInt(container.css(\"border-left-width\"), 10),\r\n \"width\" : container.innerWidth(),\r\n \"height\" : container.innerHeight()\r\n });\r\n }\r\n \r\n // Elements\r\n if (data.settings.size) {\r\n var c = data.wholePage ? $(window) : container;\r\n var size = data.settings.size.value;\r\n if (!data.settings.size.fixed) {\r\n size = Math.min(c.innerWidth(), c.innerHeight()) * size / 100;\r\n if (data.settings.maxSize && size > data.settings.maxSize) size = data.settings.maxSize;\r\n if (data.settings.minSize && size < data.settings.minSize) size = data.settings.minSize;\r\n }\r\n overlay.children(\".loadingoverlay_element\").each(function(){\r\n var $this = $(this);\r\n if (force || $this.data(\"loadingoverlay_autoresize\")) {\r\n var resizeFactor = $this.data(\"loadingoverlay_resizefactor\");\r\n if ($this.hasClass(\"loadingoverlay_fa\") || $this.hasClass(\"loadingoverlay_text\")) {\r\n $this.css(\"font-size\", (size * resizeFactor) + data.settings.size.units);\r\n } else if ($this.hasClass(\"loadingoverlay_progress\")) {\r\n data.progress.bar.css(\"height\", (size * resizeFactor) + data.settings.size.units);\r\n if (!data.progress.fixed) {\r\n data.progress.bar\r\n .css(\"top\", $this.position().top)\r\n .css(\"top\", \"-=\" + (size * resizeFactor * 0.5) + data.settings.size.units);\r\n } else if (data.progress.fixed === \"bottom\") {\r\n $this\r\n .css(\"bottom\", data.progress.margin ? data.progress.margin.value + (data.progress.margin.fixed ? data.progress.margin.units : \"%\") : 0)\r\n .css(\"bottom\", \"+=\" + (size * resizeFactor) + data.settings.size.units);\r\n }\r\n } else {\r\n $this.css({\r\n \"width\" : (size * resizeFactor) + data.settings.size.units,\r\n \"height\" : (size * resizeFactor) + data.settings.size.units\r\n });\r\n }\r\n }\r\n });\r\n }\r\n }\r\n \r\n \r\n function _GetData(overlay){\r\n var data = (typeof overlay === \"undefined\") ? undefined : overlay.data(\"loadingoverlay_data\");\r\n if (typeof data === \"undefined\") {\r\n // Clean DOM\r\n $(\".loadingoverlay\").each(function(){\r\n var $this = $(this);\r\n if (!document.body.contains($this.data(\"loadingoverlay_data\").container[0])) $this.remove();\r\n });\r\n return false;\r\n } else {\r\n return data;\r\n }\r\n }\r\n \r\n \r\n function _CreateElement(overlay, order, autoResize, resizeFactor, animation){\r\n var element = $(\"
\", {\r\n \"class\" : \"loadingoverlay_element\",\r\n \"css\" : {\r\n \"order\" : order\r\n }\r\n })\r\n .css(_css.element)\r\n .data({\r\n \"loadingoverlay_autoresize\" : autoResize,\r\n \"loadingoverlay_resizefactor\" : resizeFactor\r\n })\r\n .appendTo(overlay);\r\n \r\n // Parse animation\r\n if (animation === true) animation = _defaultValues.animations.time + \" \" + _defaultValues.animations.name;\r\n if (typeof animation === \"string\") {\r\n var animationName;\r\n var animationTime;\r\n var parts = animation.replace(/\\s\\s+/g, \" \").toLowerCase().split(\" \");\r\n if (parts.length === 2 && _ValidateCssTime(parts[0]) && _ValidateAnimation(parts[1])) {\r\n animationName = parts[1];\r\n animationTime = parts[0];\r\n } else if (parts.length === 2 && _ValidateCssTime(parts[1]) && _ValidateAnimation(parts[0])) {\r\n animationName = parts[0];\r\n animationTime = parts[1];\r\n } else if (parts.length === 1 && _ValidateCssTime(parts[0])) {\r\n animationName = _defaultValues.animations.name;\r\n animationTime = parts[0];\r\n } else if (parts.length === 1 && _ValidateAnimation(parts[0])) {\r\n animationName = parts[0];\r\n animationTime = _defaultValues.animations.time;\r\n }\r\n element.css({\r\n \"animation-name\" : \"loadingoverlay_animation__\" + animationName,\r\n \"animation-duration\" : animationTime,\r\n \"animation-timing-function\" : \"linear\",\r\n \"animation-iteration-count\" : \"infinite\"\r\n });\r\n }\r\n \r\n return element;\r\n }\r\n \r\n function _ValidateCssTime(value){\r\n return !isNaN(parseFloat(value)) && (value.slice(-1) === \"s\" || value.slice(-2) === \"ms\");\r\n }\r\n \r\n function _ValidateAnimation(value){\r\n return _whitelists.animations.indexOf(value) > -1;\r\n }\r\n \r\n function _ValidateProgressPosition(value){\r\n return _whitelists.progressPosition.indexOf(value) > -1;\r\n }\r\n \r\n \r\n function _ParseSize(value){\r\n if (!value || value < 0) {\r\n return false;\r\n } else if (typeof value === \"string\" && [\"vmin\", \"vmax\"].indexOf(value.slice(-4)) > -1) {\r\n return {\r\n fixed : true,\r\n units : value.slice(-4),\r\n value : value.slice(0, -4)\r\n };\r\n } else if (typeof value === \"string\" && [\"rem\"].indexOf(value.slice(-3)) > -1) {\r\n return {\r\n fixed : true,\r\n units : value.slice(-3),\r\n value : value.slice(0, -3)\r\n };\r\n } else if (typeof value === \"string\" && [\"px\", \"em\", \"cm\", \"mm\", \"in\", \"pt\", \"pc\", \"vh\", \"vw\"].indexOf(value.slice(-2)) > -1) {\r\n return {\r\n fixed : true,\r\n units : value.slice(-2),\r\n value : value.slice(0, -2)\r\n };\r\n } else {\r\n return {\r\n fixed : false,\r\n units : \"px\",\r\n value : parseFloat(value)\r\n }; \r\n }\r\n }\r\n \r\n \r\n $(function(){\r\n $(\"head\").append([\r\n \"\"\r\n ].join(\" \"));\r\n });\r\n \r\n}));"]} \ No newline at end of file +{"version":3,"sources":["loadingoverlay.js"],"names":["factory","define","amd","module","exports","require","jQuery","$","undefined","_defaults","background","backgroundClass","image","imageAnimation","imageAutoResize","imageResizeFactor","imageColor","imageClass","imageOrder","fontawesome","fontawesomeAnimation","fontawesomeAutoResize","fontawesomeResizeFactor","fontawesomeColor","fontawesomeOrder","custom","customAnimation","customAutoResize","customResizeFactor","customOrder","text","textAnimation","textAutoResize","textResizeFactor","textColor","textClass","textOrder","progress","progressAutoResize","progressResizeFactor","progressColor","progressClass","progressOrder","progressFixedPosition","progressSpeed","progressMin","progressMax","size","maxSize","minSize","direction","fade","resizeInterval","zIndex","_css","overlay","box-sizing","position","display","flex-wrap","align-items","justify-content","element","overflow","flex","element_svg","width","height","progress_fixed","left","progress_wrapper","top","progress_bar","_dataTemplate","count","container","settings","wholePage","resizeIntervalId","_whitelists","animations","progressPosition","_defaultValues","name","time","Show","_ParseSize","parseInt","_GetOverlay","data","_GetData","extend","is","class","css","toLowerCase","addClass","isArray","length","fill","stroke","_CreateElement","slice","append","children","find","ajax","url","type","dataType","global","done","html","background-image","background-position","background-repeat","background-size","appendTo","wrapper","bar","fixed","margin","min","parseFloat","max","speed","progressPositionParts","replace","split","_ValidateProgressPosition","value","units","fadeTo","_IntervalResize","setInterval","Hide","force","clearInterval","fadeOut","this","remove","removeData","Resize","Text","hide","show","Progress","v","animate","isFixed","pos","getBoundingClientRect","offset","innerWidth","innerHeight","c","window","Math","each","$this","resizeFactor","hasClass","document","body","contains","toggle","order","autoResize","animation","loadingoverlay_autoresize","loadingoverlay_resizefactor","animationName","animationTime","parts","_ValidateCssTime","_ValidateAnimation","animation-name","animation-duration","animation-timing-function","animation-iteration-count","isNaN","indexOf","LoadingOverlaySetup","LoadingOverlay","action","options","fn","join"],"mappings":";;;;;;;CAOE,SAASA,GACe,mBAAXC,QAAyBA,OAAOC,IAEvCD,QAAQ,UAAWD,GACM,iBAAXG,QAAuBA,OAAOC,QAE5CJ,EAAQK,QAAQ,WAGhBL,EAAQM,QATf,CAWC,SAASC,EAAGC,GACV,aAGA,IAAIC,GAEAC,WAA0B,2BAC1BC,gBAA0B,GAE1BC,MAA0B,uVAC1BC,eAA0B,sBAC1BC,iBAA0B,EAC1BC,kBAA0B,EAC1BC,WAA0B,UAC1BC,WAA0B,GAC1BC,WAA0B,EAE1BC,YAA0B,GAC1BC,qBAA0B,GAC1BC,uBAA0B,EAC1BC,wBAA0B,EAC1BC,iBAA0B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eACX,IAAK,OACD,IAAInB,EAAWrE,EAAEoF,QAAO,KAAUlF,EAAWgL,GAC7C,OAAO9C,KAAKmB,KAAK,WACbzE,EAAKsD,KAAM/D,KAGnB,IAAK,OACD,OAAO+D,KAAKmB,KAAK,WACbvB,EAAKI,KAAM8C,KAGlB,IAAK,SACF,OAAO9C,KAAKmB,KAAK,WACbhB,EAAOH,QAGf,IAAK,OACD,OAAOA,KAAKmB,KAAK,WACbf,EAAKJ,KAAM8C,KAGnB,IAAK,WACD,OAAO9C,KAAKmB,KAAK,WACbZ,EAASP,KAAM8C,OAwa/BlL,EAAE,WACEA,EAAE,QAAQgG,QACN,UACI,8DACE,OACE,sCACQ,8BACV,IACF,IACA,sDACE,OACE,sCACQ,8BACV,IACF,IAEA,6DACE,OACE,uCACQ,+BACV,IACF,IACA,qDACE,OACE,uCACQ,+BACV,IACF,IAEA,wDACE,OACU,iBACR,uCACQ,+BACV,IACA,QACU,iBACV,IACA,SACU,iBACR,mCACQ,2BACV,IACF,IACA,gDACE,OACU,iBACR,uCACQ,+BACV,IACA,QACU,iBACV,IACA,SACU,iBACR,mCACQ,2BACV,IACF,IAEA,uDACE,OACE,mCACQ,2BACV,IACA,QACE,mCACQ,2BACV,IACA,SACE,mCACQ,2BACV,IACF,IACA,+CACE,OACE,mCACQ,2BACV,IACA,QACE,mCACQ,2BACV,IACA,SACE,mCACQ,2BACV,IACF,IACJ,YACFoF,KAAK","file":"loadingoverlay.min.js","sourcesContent":["/***************************************************************************************************\r\nLoadingOverlay - A flexible loading overlay jQuery plugin\r\n Author : Gaspare Sganga\r\n Version : 2.1.5\r\n License : MIT\r\n Documentation : https://gasparesganga.com/labs/jquery-loading-overlay/\r\n***************************************************************************************************/\r\n;(function(factory){\r\n if (typeof define === \"function\" && define.amd) {\r\n // AMD. Register as an anonymous module\r\n define([\"jquery\"], factory);\r\n } else if (typeof module === \"object\" && module.exports) {\r\n // Node/CommonJS\r\n factory(require(\"jquery\"));\r\n } else {\r\n // Browser globals\r\n factory(jQuery);\r\n }\r\n}(function($, undefined){\r\n \"use strict\";\r\n \r\n // Default Settings\r\n var _defaults = {\r\n // Background\r\n background : \"rgba(255, 255, 255, 0.8)\",\r\n backgroundClass : \"\",\r\n // Image\r\n image : \"\",\r\n imageAnimation : \"2000ms rotate_right\",\r\n imageAutoResize : true,\r\n imageResizeFactor : 1,\r\n imageColor : \"#202020\",\r\n imageClass : \"\",\r\n imageOrder : 1,\r\n // Font Awesome\r\n fontawesome : \"\",\r\n fontawesomeAnimation : \"\",\r\n fontawesomeAutoResize : true,\r\n fontawesomeResizeFactor : 1,\r\n fontawesomeColor : \"#202020\",\r\n fontawesomeOrder : 2,\r\n // Custom\r\n custom : \"\",\r\n customAnimation : \"\",\r\n customAutoResize : true,\r\n customResizeFactor : 1,\r\n customOrder : 3,\r\n // Text\r\n text : \"\",\r\n textAnimation : \"\",\r\n textAutoResize : true,\r\n textResizeFactor : 0.5,\r\n textColor : \"#202020\",\r\n textClass : \"\",\r\n textOrder : 4,\r\n // Progress\r\n progress : false,\r\n progressAutoResize : true,\r\n progressResizeFactor : 0.25,\r\n progressColor : \"#a0a0a0\",\r\n progressClass : \"\",\r\n progressOrder : 5,\r\n progressFixedPosition : \"\",\r\n progressSpeed : 200,\r\n progressMin : 0,\r\n progressMax : 100,\r\n // Sizing\r\n size : 50,\r\n maxSize : 120,\r\n minSize : 20,\r\n // Misc\r\n direction : \"column\",\r\n fade : true,\r\n resizeInterval : 50,\r\n zIndex : 2147483647\r\n };\r\n \r\n // Required CSS\r\n var _css = {\r\n overlay : {\r\n \"box-sizing\" : \"border-box\",\r\n \"position\" : \"relative\",\r\n \"display\" : \"flex\",\r\n \"flex-wrap\" : \"nowrap\",\r\n \"align-items\" : \"center\",\r\n \"justify-content\" : \"space-around\"\r\n },\r\n element : {\r\n \"box-sizing\" : \"border-box\",\r\n \"overflow\" : \"visible\",\r\n \"flex\" : \"0 0 auto\",\r\n \"display\" : \"flex\",\r\n \"justify-content\" : \"center\",\r\n \"align-items\" : \"center\"\r\n },\r\n element_svg : {\r\n \"width\" : \"100%\",\r\n \"height\" : \"100%\"\r\n },\r\n progress_fixed : {\r\n \"position\" : \"absolute\",\r\n \"left\" : \"0\",\r\n \"width\" : \"100%\"\r\n },\r\n progress_wrapper : {\r\n \"position\" : \"absolute\",\r\n \"top\" : \"0\",\r\n \"left\" : \"0\",\r\n \"width\" : \"100%\",\r\n \"height\" : \"100%\"\r\n },\r\n progress_bar : {\r\n \"position\" : \"absolute\",\r\n \"left\" : \"0\"\r\n }\r\n };\r\n \r\n // Data Template\r\n var _dataTemplate = {\r\n \"count\" : 0,\r\n \"container\" : undefined,\r\n \"settings\" : undefined,\r\n \"wholePage\" : undefined,\r\n \"resizeIntervalId\" : undefined,\r\n \"text\" : undefined,\r\n \"progress\" : undefined\r\n };\r\n \r\n // Whitelists\r\n var _whitelists = {\r\n animations : [\r\n \"rotate_right\",\r\n \"rotate_left\",\r\n \"fadein\",\r\n \"pulse\"\r\n ],\r\n progressPosition : [\r\n \"top\",\r\n \"bottom\"\r\n ]\r\n };\r\n \r\n // Default Values\r\n var _defaultValues = {\r\n animations : {\r\n name : \"rotate_right\",\r\n time : \"2000ms\"\r\n },\r\n fade : [400, 200]\r\n };\r\n \r\n \r\n $.LoadingOverlaySetup = function(settings){\r\n $.extend(true, _defaults, settings);\r\n };\r\n \r\n $.LoadingOverlay = function(action, options){\r\n switch (action.toLowerCase()) {\r\n case \"show\":\r\n var settings = $.extend(true, {}, _defaults, options);\r\n Show(\"body\", settings);\r\n break;\r\n \r\n case \"hide\":\r\n Hide(\"body\", options);\r\n break;\r\n \r\n case \"resize\":\r\n Resize(\"body\", options);\r\n break; \r\n \r\n case \"text\":\r\n Text(\"body\", options);\r\n break;\r\n \r\n case \"progress\":\r\n Progress(\"body\", options);\r\n break;\r\n }\r\n };\r\n \r\n $.fn.LoadingOverlay = function(action, options){\r\n switch (action.toLowerCase()) {\r\n case \"show\":\r\n var settings = $.extend(true, {}, _defaults, options);\r\n return this.each(function(){\r\n Show(this, settings);\r\n });\r\n \r\n case \"hide\":\r\n return this.each(function(){\r\n Hide(this, options);\r\n });\r\n \r\n case \"resize\":\r\n return this.each(function(){\r\n Resize(this, options);\r\n });\r\n \r\n case \"text\":\r\n return this.each(function(){\r\n Text(this, options);\r\n });\r\n \r\n case \"progress\":\r\n return this.each(function(){\r\n Progress(this, options);\r\n });\r\n }\r\n };\r\n \r\n \r\n function Show(container, settings){\r\n container = $(container);\r\n settings.size = _ParseSize(settings.size);\r\n settings.maxSize = parseInt(settings.maxSize, 10) || 0;\r\n settings.minSize = parseInt(settings.minSize, 10) || 0;\r\n settings.resizeInterval = parseInt(settings.resizeInterval, 10) || 0;\r\n \r\n var overlay = _GetOverlay(container);\r\n var data = _GetData(container);\r\n if (data === false) {\r\n // Init data\r\n data = $.extend({}, _dataTemplate);\r\n data.container = container;\r\n data.wholePage = container.is(\"body\");\r\n \r\n // Overlay\r\n overlay = $(\"
\", {\r\n \"class\" : \"loadingoverlay\"\r\n })\r\n .css(_css.overlay)\r\n .css(\"flex-direction\", settings.direction.toLowerCase() === \"row\" ? \"row\" : \"column\");\r\n if (settings.backgroundClass) {\r\n overlay.addClass(settings.backgroundClass);\r\n } else {\r\n overlay.css(\"background\", settings.background);\r\n }\r\n if (data.wholePage) {\r\n overlay.css({\r\n \"position\" : \"fixed\",\r\n \"top\" : 0,\r\n \"left\" : 0,\r\n \"width\" : \"100%\",\r\n \"height\" : \"100%\"\r\n });\r\n }\r\n if (typeof settings.zIndex !== \"undefined\") overlay.css(\"z-index\", settings.zIndex);\r\n \r\n // Image\r\n if (settings.image) {\r\n if ($.isArray(settings.imageColor)) {\r\n if (settings.imageColor.length === 0) {\r\n settings.imageColor = false;\r\n } else if (settings.imageColor.length === 1) {\r\n settings.imageColor = {\r\n \"fill\" : settings.imageColor[0]\r\n };\r\n } else {\r\n settings.imageColor = {\r\n \"fill\" : settings.imageColor[0],\r\n \"stroke\" : settings.imageColor[1]\r\n };\r\n }\r\n } else if (settings.imageColor) {\r\n settings.imageColor = {\r\n \"fill\" : settings.imageColor\r\n };\r\n }\r\n var element = _CreateElement(overlay, settings.imageOrder, settings.imageAutoResize, settings.imageResizeFactor, settings.imageAnimation);\r\n if (settings.image.slice(0, 4).toLowerCase() === \"\") {\r\n // Inline SVG\r\n element.append(settings.image);\r\n element.children().css(_css.element_svg);\r\n if (!settings.imageClass && settings.imageColor) element.find(\"*\").css(settings.imageColor);\r\n } else if (settings.image.slice(-4).toLowerCase() === \".svg\" || settings.image.slice(0, 14).toLowerCase() === \"data:image/svg\") {\r\n // SVG file or base64-encoded SVG\r\n $.ajax({\r\n url : settings.image,\r\n type : \"GET\",\r\n dataType : \"html\",\r\n global : false\r\n }).done(function(data){\r\n element.html(data);\r\n element.children().css(_css.element_svg);\r\n if (!settings.imageClass && settings.imageColor) element.find(\"*\").css(settings.imageColor);\r\n });\r\n } else {\r\n // Raster\r\n element.css({\r\n \"background-image\" : \"url(\" + settings.image + \")\",\r\n \"background-position\" : \"center\",\r\n \"background-repeat\" : \"no-repeat\",\r\n \"background-size\" : \"cover\"\r\n });\r\n }\r\n if (settings.imageClass) element.addClass(settings.imageClass);\r\n }\r\n \r\n // Font Awesome\r\n if (settings.fontawesome) {\r\n var element = _CreateElement(overlay, settings.fontawesomeOrder, settings.fontawesomeAutoResize, settings.fontawesomeResizeFactor, settings.fontawesomeAnimation)\r\n .addClass(\"loadingoverlay_fa\");\r\n $(\"
\", {\r\n \"class\" : settings.fontawesome\r\n }).appendTo(element);\r\n if (settings.fontawesomeColor) element.css(\"color\", settings.fontawesomeColor);\r\n }\r\n \r\n // Custom\r\n if (settings.custom) {\r\n var element = _CreateElement(overlay, settings.customOrder, settings.customAutoResize, settings.customResizeFactor, settings.customAnimation)\r\n .append(settings.custom);\r\n }\r\n \r\n // Text\r\n if (settings.text) {\r\n data.text = _CreateElement(overlay, settings.textOrder, settings.textAutoResize, settings.textResizeFactor, settings.textAnimation)\r\n .addClass(\"loadingoverlay_text\")\r\n .text(settings.text);\r\n if (settings.textClass) {\r\n data.text.addClass(settings.textClass);\r\n } else if (settings.textColor) {\r\n data.text.css(\"color\", settings.textColor);\r\n }\r\n }\r\n \r\n // Progress\r\n if (settings.progress) {\r\n var element = _CreateElement(overlay, settings.progressOrder, settings.progressAutoResize, settings.progressResizeFactor, false)\r\n .addClass(\"loadingoverlay_progress\");\r\n var wrapper = $(\"
\")\r\n .css(_css.progress_wrapper)\r\n .appendTo(element);\r\n data.progress = {\r\n bar : $(\"
\").css(_css.progress_bar).appendTo(wrapper),\r\n fixed : false,\r\n margin : 0,\r\n min : parseFloat(settings.progressMin),\r\n max : parseFloat(settings.progressMax),\r\n speed : parseInt(settings.progressSpeed, 10)\r\n };\r\n var progressPositionParts = (settings.progressFixedPosition + \"\").replace(/\\s\\s+/g, \" \").toLowerCase().split(\" \");\r\n if (progressPositionParts.length === 2 && _ValidateProgressPosition(progressPositionParts[0])) {\r\n data.progress.fixed = progressPositionParts[0];\r\n data.progress.margin = _ParseSize(progressPositionParts[1]);\r\n } else if (progressPositionParts.length === 2 && _ValidateProgressPosition(progressPositionParts[1])) {\r\n data.progress.fixed = progressPositionParts[1];\r\n data.progress.margin = _ParseSize(progressPositionParts[0]);\r\n } else if (progressPositionParts.length === 1 && _ValidateProgressPosition(progressPositionParts[0])) {\r\n data.progress.fixed = progressPositionParts[0];\r\n data.progress.margin = 0;\r\n }\r\n if (data.progress.fixed === \"top\") {\r\n element\r\n .css(_css.progress_fixed)\r\n .css(\"top\", data.progress.margin ? data.progress.margin.value + (data.progress.margin.fixed ? data.progress.margin.units : \"%\") : 0);\r\n } else if (data.progress.fixed === \"bottom\") {\r\n element\r\n .css(_css.progress_fixed)\r\n .css(\"top\", \"auto\");\r\n }\r\n if (settings.progressClass) {\r\n data.progress.bar.addClass(settings.progressClass);\r\n } else if (settings.progressColor) {\r\n data.progress.bar.css(\"background\", settings.progressColor);\r\n } \r\n }\r\n \r\n // Fade\r\n if (!settings.fade) {\r\n settings.fade = [0, 0];\r\n } else if (settings.fade === true) {\r\n settings.fade = _defaultValues.fade;\r\n } else if (typeof settings.fade === \"string\" || typeof settings.fade === \"number\") {\r\n settings.fade = [settings.fade, settings.fade];\r\n } else if ($.isArray(settings.fade) && settings.fade.length < 2) {\r\n settings.fade = [settings.fade[0], settings.fade[0]];\r\n }\r\n settings.fade = [parseInt(settings.fade[0], 10), parseInt(settings.fade[1], 10)]\r\n \r\n \r\n // Save settings\r\n data.settings = settings;\r\n // Save data\r\n overlay.data(\"loadingoverlay_data\", data);\r\n // Save reference to overlay\r\n container.data(\"loadingoverlay\", overlay);\r\n \r\n \r\n // Resize\r\n overlay\r\n .fadeTo(0, 0.01)\r\n .appendTo(\"body\");\r\n _IntervalResize(container, true);\r\n if (settings.resizeInterval > 0) {\r\n data.resizeIntervalId = setInterval(function(){\r\n _IntervalResize(container, false);\r\n }, settings.resizeInterval);\r\n }\r\n \r\n // Show LoadingOverlay\r\n overlay.fadeTo(settings.fade[0], 1);\r\n }\r\n data.count++;\r\n }\r\n \r\n function Hide(container, force){\r\n container = $(container);\r\n var overlay = _GetOverlay(container);\r\n var data = _GetData(container);\r\n if (data === false) return;\r\n \r\n data.count--;\r\n if (force || data.count <= 0) {\r\n if (data.resizeIntervalId) clearInterval(data.resizeIntervalId);\r\n overlay.fadeOut(data.settings.fade[1], function(){\r\n $(this).remove();\r\n });\r\n container.removeData(\"loadingoverlay\");\r\n }\r\n }\r\n \r\n function Resize(container){\r\n _IntervalResize($(container), true);\r\n }\r\n \r\n function Text(container, value){\r\n container = $(container);\r\n var data = _GetData(container);\r\n if (data === false || !data.text) return;\r\n \r\n if (value === false) {\r\n data.text.hide();\r\n } else {\r\n data.text\r\n .show()\r\n .text(value);\r\n }\r\n }\r\n \r\n function Progress(container, value){\r\n container = $(container);\r\n var data = _GetData(container);\r\n if (data === false || !data.progress) return;\r\n \r\n if (value === false) {\r\n data.progress.bar.hide();\r\n } else {\r\n var v = ((parseFloat(value) || 0) - data.progress.min) * 100 / (data.progress.max - data.progress.min);\r\n if (v < 0) v = 0;\r\n if (v > 100) v = 100;\r\n data.progress.bar\r\n .show()\r\n .animate({\r\n \"width\" : v + \"%\"\r\n }, data.progress.speed);\r\n }\r\n }\r\n \r\n \r\n function _IntervalResize(container, force){\r\n var overlay = _GetOverlay(container);\r\n var data = _GetData(container);\r\n if (data === false) return;\r\n \r\n // Overlay\r\n if (!data.wholePage) {\r\n var isFixed = container.css(\"position\") === \"fixed\";\r\n var pos = isFixed ? container[0].getBoundingClientRect() : container.offset(); \r\n overlay.css({\r\n \"position\" : isFixed ? \"fixed\" : \"absolute\",\r\n \"top\" : pos.top + parseInt(container.css(\"border-top-width\"), 10),\r\n \"left\" : pos.left + parseInt(container.css(\"border-left-width\"), 10),\r\n \"width\" : container.innerWidth(),\r\n \"height\" : container.innerHeight()\r\n });\r\n }\r\n \r\n // Elements\r\n if (data.settings.size) {\r\n var c = data.wholePage ? $(window) : container;\r\n var size = data.settings.size.value;\r\n if (!data.settings.size.fixed) {\r\n size = Math.min(c.innerWidth(), c.innerHeight()) * size / 100;\r\n if (data.settings.maxSize && size > data.settings.maxSize) size = data.settings.maxSize;\r\n if (data.settings.minSize && size < data.settings.minSize) size = data.settings.minSize;\r\n }\r\n overlay.children(\".loadingoverlay_element\").each(function(){\r\n var $this = $(this);\r\n if (force || $this.data(\"loadingoverlay_autoresize\")) {\r\n var resizeFactor = $this.data(\"loadingoverlay_resizefactor\");\r\n if ($this.hasClass(\"loadingoverlay_fa\") || $this.hasClass(\"loadingoverlay_text\")) {\r\n $this.css(\"font-size\", (size * resizeFactor) + data.settings.size.units);\r\n } else if ($this.hasClass(\"loadingoverlay_progress\")) {\r\n data.progress.bar.css(\"height\", (size * resizeFactor) + data.settings.size.units);\r\n if (!data.progress.fixed) {\r\n data.progress.bar\r\n .css(\"top\", $this.position().top)\r\n .css(\"top\", \"-=\" + (size * resizeFactor * 0.5) + data.settings.size.units);\r\n } else if (data.progress.fixed === \"bottom\") {\r\n $this\r\n .css(\"bottom\", data.progress.margin ? data.progress.margin.value + (data.progress.margin.fixed ? data.progress.margin.units : \"%\") : 0)\r\n .css(\"bottom\", \"+=\" + (size * resizeFactor) + data.settings.size.units);\r\n }\r\n } else {\r\n $this.css({\r\n \"width\" : (size * resizeFactor) + data.settings.size.units,\r\n \"height\" : (size * resizeFactor) + data.settings.size.units\r\n });\r\n }\r\n }\r\n });\r\n }\r\n }\r\n \r\n \r\n function _GetOverlay(container){\r\n return container.data(\"loadingoverlay\");\r\n }\r\n \r\n function _GetData(container){\r\n var overlay = _GetOverlay(container);\r\n var data = (typeof overlay === \"undefined\") ? undefined : overlay.data(\"loadingoverlay_data\");\r\n if (typeof data === \"undefined\") {\r\n // Clean DOM\r\n $(\".loadingoverlay\").each(function(){\r\n var $this = $(this);\r\n var data = $this.data(\"loadingoverlay_data\");\r\n if (!document.body.contains(data.container[0])) {\r\n if (data.resizeIntervalId) clearInterval(data.resizeIntervalId);\r\n $this.remove();\r\n }\r\n });\r\n return false;\r\n } else {\r\n overlay.toggle(container.is(\":visible\"));\r\n return data;\r\n }\r\n }\r\n \r\n \r\n function _CreateElement(overlay, order, autoResize, resizeFactor, animation){\r\n var element = $(\"
\", {\r\n \"class\" : \"loadingoverlay_element\",\r\n \"css\" : {\r\n \"order\" : order\r\n }\r\n })\r\n .css(_css.element)\r\n .data({\r\n \"loadingoverlay_autoresize\" : autoResize,\r\n \"loadingoverlay_resizefactor\" : resizeFactor\r\n })\r\n .appendTo(overlay);\r\n \r\n // Parse animation\r\n if (animation === true) animation = _defaultValues.animations.time + \" \" + _defaultValues.animations.name;\r\n if (typeof animation === \"string\") {\r\n var animationName;\r\n var animationTime;\r\n var parts = animation.replace(/\\s\\s+/g, \" \").toLowerCase().split(\" \");\r\n if (parts.length === 2 && _ValidateCssTime(parts[0]) && _ValidateAnimation(parts[1])) {\r\n animationName = parts[1];\r\n animationTime = parts[0];\r\n } else if (parts.length === 2 && _ValidateCssTime(parts[1]) && _ValidateAnimation(parts[0])) {\r\n animationName = parts[0];\r\n animationTime = parts[1];\r\n } else if (parts.length === 1 && _ValidateCssTime(parts[0])) {\r\n animationName = _defaultValues.animations.name;\r\n animationTime = parts[0];\r\n } else if (parts.length === 1 && _ValidateAnimation(parts[0])) {\r\n animationName = parts[0];\r\n animationTime = _defaultValues.animations.time;\r\n }\r\n element.css({\r\n \"animation-name\" : \"loadingoverlay_animation__\" + animationName,\r\n \"animation-duration\" : animationTime,\r\n \"animation-timing-function\" : \"linear\",\r\n \"animation-iteration-count\" : \"infinite\"\r\n });\r\n }\r\n \r\n return element;\r\n }\r\n \r\n function _ValidateCssTime(value){\r\n return !isNaN(parseFloat(value)) && (value.slice(-1) === \"s\" || value.slice(-2) === \"ms\");\r\n }\r\n \r\n function _ValidateAnimation(value){\r\n return _whitelists.animations.indexOf(value) > -1;\r\n }\r\n \r\n function _ValidateProgressPosition(value){\r\n return _whitelists.progressPosition.indexOf(value) > -1;\r\n }\r\n \r\n \r\n function _ParseSize(value){\r\n if (!value || value < 0) {\r\n return false;\r\n } else if (typeof value === \"string\" && [\"vmin\", \"vmax\"].indexOf(value.slice(-4)) > -1) {\r\n return {\r\n fixed : true,\r\n units : value.slice(-4),\r\n value : value.slice(0, -4)\r\n };\r\n } else if (typeof value === \"string\" && [\"rem\"].indexOf(value.slice(-3)) > -1) {\r\n return {\r\n fixed : true,\r\n units : value.slice(-3),\r\n value : value.slice(0, -3)\r\n };\r\n } else if (typeof value === \"string\" && [\"px\", \"em\", \"cm\", \"mm\", \"in\", \"pt\", \"pc\", \"vh\", \"vw\"].indexOf(value.slice(-2)) > -1) {\r\n return {\r\n fixed : true,\r\n units : value.slice(-2),\r\n value : value.slice(0, -2)\r\n };\r\n } else {\r\n return {\r\n fixed : false,\r\n units : \"px\",\r\n value : parseFloat(value)\r\n }; \r\n }\r\n }\r\n \r\n \r\n $(function(){\r\n $(\"head\").append([\r\n \"\"\r\n ].join(\" \"));\r\n });\r\n \r\n}));"]} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 2c4d5ac..47457ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gasparesganga-jquery-loading-overlay", - "version": "2.1.4", + "version": "2.1.5", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2318,9 +2318,9 @@ } }, "gulp-rename": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.2.3.tgz", - "integrity": "sha512-CmdPM0BjJ105QCX1fk+j7NGhiN/1rCl9HLGss+KllBS/tdYadpjTxqdKyh/5fNV+M3yjT1MFz5z93bXdrTyzAw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.3.0.tgz", + "integrity": "sha512-nEuZB7/9i0IZ8AXORTizl2QLP9tcC9uWc/s329zElBLJw1CfOhmMXBxwVlCRKjDyrWuhVP0uBKl61KeQ32TiCg==", "dev": true }, "gulp-replace": { diff --git a/package.json b/package.json index 27f56ce..d453457 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gasparesganga-jquery-loading-overlay", - "version": "2.1.4", + "version": "2.1.5", "description": "A flexible loading overlay jQuery plugin", "homepage": "https://gasparesganga.com/labs/jquery-loading-overlay/", "author": "Gaspare Sganga (https://gasparesganga.com)", @@ -28,7 +28,7 @@ "del": "^3.0.0", "gulp": "^4.0.0", "gulp-header": "^2.0.5", - "gulp-rename": "^1.2.3", + "gulp-rename": "^1.3.0", "gulp-replace": "^0.6.1", "gulp-sourcemaps": "^2.6.4", "gulp-uglify": "^3.0.0", diff --git a/src/loadingoverlay.js b/src/loadingoverlay.js index 68c7f88..e32d14c 100644 --- a/src/loadingoverlay.js +++ b/src/loadingoverlay.js @@ -1,7 +1,7 @@ /*************************************************************************************************** LoadingOverlay - A flexible loading overlay jQuery plugin Author : Gaspare Sganga - Version : 2.1.5dev + Version : 2.1.5 License : MIT Documentation : https://gasparesganga.com/labs/jquery-loading-overlay/ ***************************************************************************************************/