\").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
+{"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","animate","opacity","clearInterval","this","remove","removeData","Resize","Text","hide","show","Progress","v","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,OAAO,CAAC,UAAWD,GACM,iBAAXG,QAAuBA,OAAOC,QAE5CJ,EAAQK,QAAQ,WAGhBL,EAAQM,QATf,CAWC,SAASC,EAAGC,GACV,aAGA,IAAIC,EAAY,CAEZC,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,EAE1B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EAAEoF,QAAO,EAAM,GAAIlF,EAAWgL,IAE7C,MAEJ,IAAK,OACDlD,EAAK,OAAQkD,GACb,MAEJ,IAAK,SACD1C,EAAO,QACP,MAEJ,IAAK,OACDC,EAAK,OAAQyC,GACb,MAEJ,IAAK,WACDtC,EAAS,OAAQsC,KAK7BlL,EAAEmL,GAAGH,eAAiB,SAASC,EAAQC,GACnC,OAAQD,EAAOzF,eACX,IAAK,OACD,IAAInB,EAAWrE,EAAEoF,QAAO,EAAM,GAAIlF,EAAWgL,GAC7C,OAAO7C,KAAKkB,KAAK,WACbzE,EAAKuD,KAAMhE,KAGnB,IAAK,OACD,OAAOgE,KAAKkB,KAAK,WACbvB,EAAKK,KAAM6C,KAGlB,IAAK,SACF,OAAO7C,KAAKkB,KAAK,WACbf,EAAOH,QAGf,IAAK,OACD,OAAOA,KAAKkB,KAAK,WACbd,EAAKJ,KAAM6C,KAGnB,IAAK,WACD,OAAO7C,KAAKkB,KAAK,WACbX,EAASP,KAAM6C,OA0a/BlL,EAAE,WACEA,EAAE,QAAQgG,OAAO,CACb,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.6\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 overlay.animate({\r\n \"opacity\" : 0\r\n }, data.settings.fade[1], function(){\r\n if (data.resizeIntervalId) clearInterval(data.resizeIntervalId);\r\n $(this).remove();\r\n container.removeData(\"loadingoverlay\");\r\n });\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 47457ec..eec5921 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "gasparesganga-jquery-loading-overlay",
- "version": "2.1.5",
+ "version": "2.1.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -606,9 +606,9 @@
"dev": true
},
"commander": {
- "version": "2.14.1",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz",
- "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==",
+ "version": "2.17.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
+ "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==",
"dev": true
},
"component-emitter": {
@@ -2318,9 +2318,9 @@
}
},
"gulp-rename": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.3.0.tgz",
- "integrity": "sha512-nEuZB7/9i0IZ8AXORTizl2QLP9tcC9uWc/s329zElBLJw1CfOhmMXBxwVlCRKjDyrWuhVP0uBKl61KeQ32TiCg==",
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.4.0.tgz",
+ "integrity": "sha512-swzbIGb/arEoFK89tPY58vg3Ok1bw+d35PfUNwWqdo7KM4jkmuGA78JiDNqR+JeZFaeeHnRg9N7aihX3YPmsyg==",
"dev": true
},
"gulp-replace": {
@@ -2362,18 +2362,27 @@
}
},
"gulp-uglify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.0.tgz",
- "integrity": "sha1-DfAzHXKg0wLj434QlIXd3zPG0co=",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.1.tgz",
+ "integrity": "sha512-KVffbGY9d4Wv90bW/B1KZJyunLMyfHTBbilpDvmcrj5Go0/a1G3uVpt+1gRBWSw/11dqR3coJ1oWNTt1AiXuWQ==",
"dev": true,
"requires": {
"gulplog": "1.0.0",
"has-gulplog": "0.1.0",
"lodash": "4.17.5",
"make-error-cause": "1.2.2",
+ "safe-buffer": "5.1.2",
"through2": "2.0.3",
- "uglify-js": "3.3.10",
+ "uglify-js": "3.4.9",
"vinyl-sourcemaps-apply": "0.2.1"
+ },
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ }
}
},
"gulplog": {
@@ -2956,9 +2965,9 @@
}
},
"make-error": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz",
- "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==",
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz",
+ "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==",
"dev": true
},
"make-error-cause": {
@@ -2967,7 +2976,7 @@
"integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=",
"dev": true,
"requires": {
- "make-error": "1.3.4"
+ "make-error": "1.3.5"
}
},
"make-iterator": {
@@ -4363,12 +4372,12 @@
"dev": true
},
"uglify-js": {
- "version": "3.3.10",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.10.tgz",
- "integrity": "sha512-dNib7aUDNZFJNTXFyq0CDmLRVOsnY1F+IQgt2FAOdZFx2+LvKVLbbIb/fL+BYKCv3YH3bPCE/6M/JaxChtQLHQ==",
+ "version": "3.4.9",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz",
+ "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==",
"dev": true,
"requires": {
- "commander": "2.14.1",
+ "commander": "2.17.1",
"source-map": "0.6.1"
},
"dependencies": {
diff --git a/package.json b/package.json
index d453457..136a744 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "gasparesganga-jquery-loading-overlay",
- "version": "2.1.5",
+ "version": "2.1.6",
"description": "A flexible loading overlay jQuery plugin",
"homepage": "https://gasparesganga.com/labs/jquery-loading-overlay/",
"author": "Gaspare Sganga (https://gasparesganga.com)",
@@ -28,10 +28,10 @@
"del": "^3.0.0",
"gulp": "^4.0.0",
"gulp-header": "^2.0.5",
- "gulp-rename": "^1.3.0",
+ "gulp-rename": "^1.4.0",
"gulp-replace": "^0.6.1",
"gulp-sourcemaps": "^2.6.4",
- "gulp-uglify": "^3.0.0",
+ "gulp-uglify": "^3.0.1",
"inquirer": "^5.2.0"
}
}
diff --git a/src/loadingoverlay.js b/src/loadingoverlay.js
index 2561e90..3e6d275 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.6dev
+ Version : 2.1.6
License : MIT
Documentation : https://gasparesganga.com/labs/jquery-loading-overlay/
***************************************************************************************************/