simple_alert 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fab386be1707b571159f0bdc94c33741197dc675
4
- data.tar.gz: 8ff56d15738afaae7e2af24b0a6bf11f65ca435b
3
+ metadata.gz: 998c66c2c637c531c35ecf4a5f998a5a856d115c
4
+ data.tar.gz: 14d2af3159ad46e71e629f63fca93ccb4174a767
5
5
  SHA512:
6
- metadata.gz: 8376789ed51e39f7245c0f950d53f8025ff28dbc483bf29831addc14e2c1a1d9c276124825dd1b82d1acfe520ec8e975f0a2afa6d55786dd0f701ba952953d1d
7
- data.tar.gz: 59395a9e2eca83d1d0a306dba280fa3545031d06075b6ba6e284325d99f2a542ad52094c0ce527a0bb6f16089b9cde7080451475b6f1dfbc05c0f2b2fe9cdb62
6
+ metadata.gz: fbe2dd47de85e72bf78ad1a7423758c8684018c14c80a060d5820991670da78f3fc7fe101bbff33e3ed5f30f08f90939c46a39c838db337c9ed70f0b23521082
7
+ data.tar.gz: f913c4a10edebca3fc3d710ecd5f50bd0a0b57e444e81cd82e939c4e222a00fa91d268b9b368dc1c0b1ad114548208ce852bb8c80366fe63d1f601fe3718cebf
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v 1.2.1
2
+ - update method of load dependencies
1
3
  v 1.2.0
2
4
  - unification of dependencies
3
5
  v 1.1.0
@@ -1,3 +1,3 @@
1
1
  module SimpleAlert
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -0,0 +1 @@
1
+ !function(){var e=this.ElementQueries=function(){function t(e){e||(e=document.documentElement);var t=getComputedStyle(e,"fontSize");return parseFloat(t)||16}function n(e,n){var i=n.replace(/[0-9]*/,"");switch(n=parseFloat(n),i){case"px":return n;case"em":return n*t(e);case"rem":return n*t();case"vw":return n*document.documentElement.clientWidth/100;case"vh":return n*document.documentElement.clientHeight/100;case"vmin":case"vmax":var o=document.documentElement.clientWidth/100,r=document.documentElement.clientHeight/100,s=Math["vmin"===i?"min":"max"];return n*s(o,r);default:return n}}function i(e){this.element=e,this.options={};var t,i,o,r,s,a,u,d=0,c=0;this.addOption=function(e){var t=[e.mode,e.property,e.value].join(",");this.options[t]=e};var l=["min-width","min-height","max-width","max-height"];this.call=function(){d=this.element.offsetWidth,c=this.element.offsetHeight,s={};for(t in this.options)this.options.hasOwnProperty(t)&&(i=this.options[t],o=n(this.element,i.value),r="width"==i.property?d:c,u=i.mode+"-"+i.property,a="","min"==i.mode&&r>=o&&(a+=i.value),"max"==i.mode&&o>=r&&(a+=i.value),s[u]||(s[u]=""),a&&-1===(" "+s[u]+" ").indexOf(" "+a+" ")&&(s[u]+=" "+a));for(var e in l)s[l[e]]?this.element.setAttribute(l[e],s[l[e]].substr(1)):this.element.removeAttribute(l[e])}}function o(e,t){e.elementQueriesSetupInformation?e.elementQueriesSetupInformation.addOption(t):(e.elementQueriesSetupInformation=new i(e),e.elementQueriesSetupInformation.addOption(t),e.elementQueriesSensor=new ResizeSensor(e,function(){e.elementQueriesSetupInformation.call()})),e.elementQueriesSetupInformation.call(),this.withTracking&&u.push(e)}function r(e,t,n,i){var r;if(document.querySelectorAll&&(r=document.querySelectorAll.bind(document)),r||"undefined"==typeof $$||(r=$$),r||"undefined"==typeof jQuery||(r=jQuery),!r)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";for(var s=r(e),a=0,u=s.length;u>a;a++)o(s[a],{mode:t,property:n,value:i})}function s(e){var t;for(e=e.replace(/'/g,'"');null!==(t=d.exec(e));)5<t.length&&r(t[1]||t[5],t[2],t[3],t[4])}function a(e){var t="";if(e)if("string"==typeof e)e=e.toLowerCase(),(-1!==e.indexOf("min-width")||-1!==e.indexOf("max-width"))&&s(e);else for(var n=0,i=e.length;i>n;n++)1===e[n].type?(t=e[n].selectorText||e[n].cssText,-1!==t.indexOf("min-height")||-1!==t.indexOf("max-height")?s(t):(-1!==t.indexOf("min-width")||-1!==t.indexOf("max-width"))&&s(t)):4===e[n].type&&a(e[n].cssRules||e[n].rules)}this.withTracking=!1;var u=[],d=/,?([^,\n]*)\[[\s\t]*(min|max)-(width|height)[\s\t]*[~$\^]?=[\s\t]*"([^"]*)"[\s\t]*]([^\n\s\{]*)/gim;this.init=function(e){this.withTracking=e;for(var t=0,n=document.styleSheets.length;n>t;t++)a(document.styleSheets[t].cssText||document.styleSheets[t].cssRules||document.styleSheets[t].rules)},this.update=function(e){this.withTracking=e,this.init()},this.detach=function(){if(!this.withTracking)throw"withTracking is not enabled. We can not detach elements since we don not store it.Use ElementQueries.withTracking = true; before domready.";for(var t;t=u.pop();)e.detach(t);u=[]}};e.update=function(t){e.instance.update(t)},e.detach=function(e){e.elementQueriesSetupInformation?(e.elementQueriesSensor.detach(),delete e.elementQueriesSetupInformation,delete e.elementQueriesSensor,console.log("detached")):console.log("detached already",e)},e.withTracking=!1,e.init=function(){e.instance||(e.instance=new e),e.instance.init(e.withTracking)};var t=function(e){if(document.addEventListener&&document.addEventListener("DOMContentLoaded",e,!1),/KHTML|WebKit|iCab/i.test(navigator.userAgent))var t=setInterval(function(){/loaded|complete/i.test(document.readyState)&&(e(),clearInterval(t))},10);window.onload=e};window.addEventListener?window.addEventListener("load",e.init,!1):window.attachEvent("onload",e.init),t(e.init)}();
@@ -0,0 +1 @@
1
+ !function(){this.ResizeSensor=function(e,t){function i(){this.q=[],this.add=function(e){this.q.push(e)};var e,t;this.call=function(){for(e=0,t=this.q.length;t>e;e++)this.q[e].call()}}function s(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):e.style[t]}function o(e,t){if(e.resizedAttached){if(e.resizedAttached)return void e.resizedAttached.add(t)}else e.resizedAttached=new i,e.resizedAttached.add(t);e.resizeSensor=document.createElement("div"),e.resizeSensor.className="resize-sensor";var o="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: scroll; z-index: -1; visibility: hidden;",n="position: absolute; left: 0; top: 0;";e.resizeSensor.style.cssText=o,e.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+o+'"><div style="'+n+'"></div></div><div class="resize-sensor-shrink" style="'+o+'"><div style="'+n+' width: 200%; height: 200%"></div></div>',e.appendChild(e.resizeSensor),{fixed:1,absolute:1}[s(e,"position")]||(e.style.position="relative");var r,d,l=e.resizeSensor.childNodes[0],c=l.childNodes[0],h=e.resizeSensor.childNodes[1],f=(h.childNodes[0],function(){c.style.width=l.offsetWidth+10+"px",c.style.height=l.offsetHeight+10+"px",l.scrollLeft=l.scrollWidth,l.scrollTop=l.scrollHeight,h.scrollLeft=h.scrollWidth,h.scrollTop=h.scrollHeight,r=e.offsetWidth,d=e.offsetHeight});f();var a=function(){e.resizedAttached&&e.resizedAttached.call()},u=function(e,t,i){e.attachEvent?e.attachEvent("on"+t,i):e.addEventListener(t,i)};u(l,"scroll",function(){(e.offsetWidth>r||e.offsetHeight>d)&&a(),f()}),u(h,"scroll",function(){(e.offsetWidth<r||e.offsetHeight<d)&&a(),f()})}if("[object Array]"===Object.prototype.toString.call(e)||"undefined"!=typeof jQuery&&e instanceof jQuery||"undefined"!=typeof Elements&&e instanceof Elements)for(var n=0,r=e.length;r>n;n++)o(e[n],t);else o(e,t);this.detach=function(){ResizeSensor.detach(e)}},this.ResizeSensor.detach=function(e){e.resizeSensor&&(e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached)}}();
@@ -0,0 +1 @@
1
+ (function(){if(!String.prototype.include){String.prototype.include=function(){"use strict";return String.prototype.indexOf.apply(this,arguments)!==-1}}}).call(this);
@@ -0,0 +1 @@
1
+ (function(a){a.topZIndex=function(b){return Math.max(0,Math.max.apply(null,a.map((b||"*")==="*"?a.makeArray(document.getElementsByTagName("*")):a(b),function(b){return parseFloat(a(b).css("z-index"))||null})))};a.fn.topZIndex=function(b){if(this.length===0)return this;b=a.extend({increment:1},b);var c=a.topZIndex(b.selector),d=b.increment;return this.each(function(){this.style.zIndex=c+=d})}})(jQuery);
@@ -0,0 +1 @@
1
+ (function(t,e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof exports==="object"){module.exports=e(require("jquery"))}else{e(t.jQuery)}})(this,function(t){t.transit={version:"0.9.12",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var e=document.createElement("div");var n={};function i(t){if(t in e.style)return t;var n=["Moz","Webkit","O","ms"];var i=t.charAt(0).toUpperCase()+t.substr(1);for(var r=0;r<n.length;++r){var s=n[r]+i;if(s in e.style){return s}}}function r(){e.style[n.transform]="";e.style[n.transform]="rotateY(90deg)";return e.style[n.transform]!==""}var s=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;n.transition=i("transition");n.transitionDelay=i("transitionDelay");n.transform=i("transform");n.transformOrigin=i("transformOrigin");n.filter=i("Filter");n.transform3d=r();var a={transition:"transitionend",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var o=n.transitionEnd=a[n.transition]||null;for(var u in n){if(n.hasOwnProperty(u)&&typeof t.support[u]==="undefined"){t.support[u]=n[u]}}e=null;t.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeInCubic:"cubic-bezier(.550,.055,.675,.190)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};t.cssHooks["transit:transform"]={get:function(e){return t(e).data("transform")||new f},set:function(e,i){var r=i;if(!(r instanceof f)){r=new f(r)}if(n.transform==="WebkitTransform"&&!s){e.style[n.transform]=r.toString(true)}else{e.style[n.transform]=r.toString()}t(e).data("transform",r)}};t.cssHooks.transform={set:t.cssHooks["transit:transform"].set};t.cssHooks.filter={get:function(t){return t.style[n.filter]},set:function(t,e){t.style[n.filter]=e}};if(t.fn.jquery<"1.8"){t.cssHooks.transformOrigin={get:function(t){return t.style[n.transformOrigin]},set:function(t,e){t.style[n.transformOrigin]=e}};t.cssHooks.transition={get:function(t){return t.style[n.transition]},set:function(t,e){t.style[n.transition]=e}}}p("scale");p("scaleX");p("scaleY");p("translate");p("rotate");p("rotateX");p("rotateY");p("rotate3d");p("perspective");p("skewX");p("skewY");p("x",true);p("y",true);function f(t){if(typeof t==="string"){this.parse(t)}return this}f.prototype={setFromString:function(t,e){var n=typeof e==="string"?e.split(","):e.constructor===Array?e:[e];n.unshift(t);f.prototype.set.apply(this,n)},set:function(t){var e=Array.prototype.slice.apply(arguments,[1]);if(this.setter[t]){this.setter[t].apply(this,e)}else{this[t]=e.join(",")}},get:function(t){if(this.getter[t]){return this.getter[t].apply(this)}else{return this[t]||0}},setter:{rotate:function(t){this.rotate=b(t,"deg")},rotateX:function(t){this.rotateX=b(t,"deg")},rotateY:function(t){this.rotateY=b(t,"deg")},scale:function(t,e){if(e===undefined){e=t}this.scale=t+","+e},skewX:function(t){this.skewX=b(t,"deg")},skewY:function(t){this.skewY=b(t,"deg")},perspective:function(t){this.perspective=b(t,"px")},x:function(t){this.set("translate",t,null)},y:function(t){this.set("translate",null,t)},translate:function(t,e){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(t!==null&&t!==undefined){this._translateX=b(t,"px")}if(e!==null&&e!==undefined){this._translateY=b(e,"px")}this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var t=(this.scale||"1,1").split(",");if(t[0]){t[0]=parseFloat(t[0])}if(t[1]){t[1]=parseFloat(t[1])}return t[0]===t[1]?t[0]:t},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var e=0;e<=3;++e){if(t[e]){t[e]=parseFloat(t[e])}}if(t[3]){t[3]=b(t[3],"deg")}return t}},parse:function(t){var e=this;t.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,n,i){e.setFromString(n,i)})},toString:function(t){var e=[];for(var i in this){if(this.hasOwnProperty(i)){if(!n.transform3d&&(i==="rotateX"||i==="rotateY"||i==="perspective"||i==="transformOrigin")){continue}if(i[0]!=="_"){if(t&&i==="scale"){e.push(i+"3d("+this[i]+",1)")}else if(t&&i==="translate"){e.push(i+"3d("+this[i]+",0)")}else{e.push(i+"("+this[i]+")")}}}}return e.join(" ")}};function c(t,e,n){if(e===true){t.queue(n)}else if(e){t.queue(e,n)}else{t.each(function(){n.call(this)})}}function l(e){var i=[];t.each(e,function(e){e=t.camelCase(e);e=t.transit.propertyMap[e]||t.cssProps[e]||e;e=h(e);if(n[e])e=h(n[e]);if(t.inArray(e,i)===-1){i.push(e)}});return i}function d(e,n,i,r){var s=l(e);if(t.cssEase[i]){i=t.cssEase[i]}var a=""+y(n)+" "+i;if(parseInt(r,10)>0){a+=" "+y(r)}var o=[];t.each(s,function(t,e){o.push(e+" "+a)});return o.join(", ")}t.fn.transition=t.fn.transit=function(e,i,r,s){var a=this;var u=0;var f=true;var l=t.extend(true,{},e);if(typeof i==="function"){s=i;i=undefined}if(typeof i==="object"){r=i.easing;u=i.delay||0;f=typeof i.queue==="undefined"?true:i.queue;s=i.complete;i=i.duration}if(typeof r==="function"){s=r;r=undefined}if(typeof l.easing!=="undefined"){r=l.easing;delete l.easing}if(typeof l.duration!=="undefined"){i=l.duration;delete l.duration}if(typeof l.complete!=="undefined"){s=l.complete;delete l.complete}if(typeof l.queue!=="undefined"){f=l.queue;delete l.queue}if(typeof l.delay!=="undefined"){u=l.delay;delete l.delay}if(typeof i==="undefined"){i=t.fx.speeds._default}if(typeof r==="undefined"){r=t.cssEase._default}i=y(i);var p=d(l,i,r,u);var h=t.transit.enabled&&n.transition;var b=h?parseInt(i,10)+parseInt(u,10):0;if(b===0){var g=function(t){a.css(l);if(s){s.apply(a)}if(t){t()}};c(a,f,g);return a}var m={};var v=function(e){var i=false;var r=function(){if(i){a.unbind(o,r)}if(b>0){a.each(function(){this.style[n.transition]=m[this]||null})}if(typeof s==="function"){s.apply(a)}if(typeof e==="function"){e()}};if(b>0&&o&&t.transit.useTransitionEnd){i=true;a.bind(o,r)}else{window.setTimeout(r,b)}a.each(function(){if(b>0){this.style[n.transition]=p}t(this).css(l)})};var z=function(t){this.offsetWidth;v(t)};c(a,f,z);return this};function p(e,i){if(!i){t.cssNumber[e]=true}t.transit.propertyMap[e]=n.transform;t.cssHooks[e]={get:function(n){var i=t(n).css("transit:transform");return i.get(e)},set:function(n,i){var r=t(n).css("transit:transform");r.setFromString(e,i);t(n).css({"transit:transform":r})}}}function h(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function b(t,e){if(typeof t==="string"&&!t.match(/^[\-0-9\.]+$/)){return t}else{return""+t+e}}function y(e){var n=e;if(typeof n==="string"&&!n.match(/^[\-0-9\.]+/)){n=t.fx.speeds[n]||t.fx.speeds._default}return b(n,"ms")}t.transit.getTransitionValue=d;return t});
@@ -1,24 +1,23 @@
1
1
  // load dependencies
2
2
  // Transit
3
3
  if(!$().transition ){
4
- (function(t,e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof exports==="object"){module.exports=e(require("jquery"))}else{e(t.jQuery)}})(this,function(t){t.transit={version:"0.9.12",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var e=document.createElement("div");var n={};function i(t){if(t in e.style)return t;var n=["Moz","Webkit","O","ms"];var i=t.charAt(0).toUpperCase()+t.substr(1);for(var r=0;r<n.length;++r){var s=n[r]+i;if(s in e.style){return s}}}function r(){e.style[n.transform]="";e.style[n.transform]="rotateY(90deg)";return e.style[n.transform]!==""}var s=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;n.transition=i("transition");n.transitionDelay=i("transitionDelay");n.transform=i("transform");n.transformOrigin=i("transformOrigin");n.filter=i("Filter");n.transform3d=r();var a={transition:"transitionend",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var o=n.transitionEnd=a[n.transition]||null;for(var u in n){if(n.hasOwnProperty(u)&&typeof t.support[u]==="undefined"){t.support[u]=n[u]}}e=null;t.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeInCubic:"cubic-bezier(.550,.055,.675,.190)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};t.cssHooks["transit:transform"]={get:function(e){return t(e).data("transform")||new f},set:function(e,i){var r=i;if(!(r instanceof f)){r=new f(r)}if(n.transform==="WebkitTransform"&&!s){e.style[n.transform]=r.toString(true)}else{e.style[n.transform]=r.toString()}t(e).data("transform",r)}};t.cssHooks.transform={set:t.cssHooks["transit:transform"].set};t.cssHooks.filter={get:function(t){return t.style[n.filter]},set:function(t,e){t.style[n.filter]=e}};if(t.fn.jquery<"1.8"){t.cssHooks.transformOrigin={get:function(t){return t.style[n.transformOrigin]},set:function(t,e){t.style[n.transformOrigin]=e}};t.cssHooks.transition={get:function(t){return t.style[n.transition]},set:function(t,e){t.style[n.transition]=e}}}p("scale");p("scaleX");p("scaleY");p("translate");p("rotate");p("rotateX");p("rotateY");p("rotate3d");p("perspective");p("skewX");p("skewY");p("x",true);p("y",true);function f(t){if(typeof t==="string"){this.parse(t)}return this}f.prototype={setFromString:function(t,e){var n=typeof e==="string"?e.split(","):e.constructor===Array?e:[e];n.unshift(t);f.prototype.set.apply(this,n)},set:function(t){var e=Array.prototype.slice.apply(arguments,[1]);if(this.setter[t]){this.setter[t].apply(this,e)}else{this[t]=e.join(",")}},get:function(t){if(this.getter[t]){return this.getter[t].apply(this)}else{return this[t]||0}},setter:{rotate:function(t){this.rotate=b(t,"deg")},rotateX:function(t){this.rotateX=b(t,"deg")},rotateY:function(t){this.rotateY=b(t,"deg")},scale:function(t,e){if(e===undefined){e=t}this.scale=t+","+e},skewX:function(t){this.skewX=b(t,"deg")},skewY:function(t){this.skewY=b(t,"deg")},perspective:function(t){this.perspective=b(t,"px")},x:function(t){this.set("translate",t,null)},y:function(t){this.set("translate",null,t)},translate:function(t,e){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(t!==null&&t!==undefined){this._translateX=b(t,"px")}if(e!==null&&e!==undefined){this._translateY=b(e,"px")}this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var t=(this.scale||"1,1").split(",");if(t[0]){t[0]=parseFloat(t[0])}if(t[1]){t[1]=parseFloat(t[1])}return t[0]===t[1]?t[0]:t},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var e=0;e<=3;++e){if(t[e]){t[e]=parseFloat(t[e])}}if(t[3]){t[3]=b(t[3],"deg")}return t}},parse:function(t){var e=this;t.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,n,i){e.setFromString(n,i)})},toString:function(t){var e=[];for(var i in this){if(this.hasOwnProperty(i)){if(!n.transform3d&&(i==="rotateX"||i==="rotateY"||i==="perspective"||i==="transformOrigin")){continue}if(i[0]!=="_"){if(t&&i==="scale"){e.push(i+"3d("+this[i]+",1)")}else if(t&&i==="translate"){e.push(i+"3d("+this[i]+",0)")}else{e.push(i+"("+this[i]+")")}}}}return e.join(" ")}};function c(t,e,n){if(e===true){t.queue(n)}else if(e){t.queue(e,n)}else{t.each(function(){n.call(this)})}}function l(e){var i=[];t.each(e,function(e){e=t.camelCase(e);e=t.transit.propertyMap[e]||t.cssProps[e]||e;e=h(e);if(n[e])e=h(n[e]);if(t.inArray(e,i)===-1){i.push(e)}});return i}function d(e,n,i,r){var s=l(e);if(t.cssEase[i]){i=t.cssEase[i]}var a=""+y(n)+" "+i;if(parseInt(r,10)>0){a+=" "+y(r)}var o=[];t.each(s,function(t,e){o.push(e+" "+a)});return o.join(", ")}t.fn.transition=t.fn.transit=function(e,i,r,s){var a=this;var u=0;var f=true;var l=t.extend(true,{},e);if(typeof i==="function"){s=i;i=undefined}if(typeof i==="object"){r=i.easing;u=i.delay||0;f=typeof i.queue==="undefined"?true:i.queue;s=i.complete;i=i.duration}if(typeof r==="function"){s=r;r=undefined}if(typeof l.easing!=="undefined"){r=l.easing;delete l.easing}if(typeof l.duration!=="undefined"){i=l.duration;delete l.duration}if(typeof l.complete!=="undefined"){s=l.complete;delete l.complete}if(typeof l.queue!=="undefined"){f=l.queue;delete l.queue}if(typeof l.delay!=="undefined"){u=l.delay;delete l.delay}if(typeof i==="undefined"){i=t.fx.speeds._default}if(typeof r==="undefined"){r=t.cssEase._default}i=y(i);var p=d(l,i,r,u);var h=t.transit.enabled&&n.transition;var b=h?parseInt(i,10)+parseInt(u,10):0;if(b===0){var g=function(t){a.css(l);if(s){s.apply(a)}if(t){t()}};c(a,f,g);return a}var m={};var v=function(e){var i=false;var r=function(){if(i){a.unbind(o,r)}if(b>0){a.each(function(){this.style[n.transition]=m[this]||null})}if(typeof s==="function"){s.apply(a)}if(typeof e==="function"){e()}};if(b>0&&o&&t.transit.useTransitionEnd){i=true;a.bind(o,r)}else{window.setTimeout(r,b)}a.each(function(){if(b>0){this.style[n.transition]=p}t(this).css(l)})};var z=function(t){this.offsetWidth;v(t)};c(a,f,z);return this};function p(e,i){if(!i){t.cssNumber[e]=true}t.transit.propertyMap[e]=n.transform;t.cssHooks[e]={get:function(n){var i=t(n).css("transit:transform");return i.get(e)},set:function(n,i){var r=t(n).css("transit:transform");r.setFromString(e,i);t(n).css({"transit:transform":r})}}}function h(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function b(t,e){if(typeof t==="string"&&!t.match(/^[\-0-9\.]+$/)){return t}else{return""+t+e}}function y(e){var n=e;if(typeof n==="string"&&!n.match(/^[\-0-9\.]+/)){n=t.fx.speeds[n]||t.fx.speeds._default}return b(n,"ms")}t.transit.getTransitionValue=d;return t});
4
+ alert("Transition is required \nAdd //= require simple_alert/transit before require simple_alert on your application.js")
5
5
  }
6
6
  // String.include
7
7
  if(!"".include){
8
- (function(){if(!String.prototype.include){String.prototype.include=function(){"use strict";return String.prototype.indexOf.apply(this,arguments)!==-1}}}).call(this);
8
+ alert("String has no method include! \nAdd //= require simple_alert/string before require simple_alert on your application.js")
9
9
  }
10
10
  // ElementQueries
11
11
  if(typeof ElementQueries == 'undefined'){
12
- !function(){var e=this.ElementQueries=function(){function t(e){e||(e=document.documentElement);var t=getComputedStyle(e,"fontSize");return parseFloat(t)||16}function n(e,n){var i=n.replace(/[0-9]*/,"");switch(n=parseFloat(n),i){case"px":return n;case"em":return n*t(e);case"rem":return n*t();case"vw":return n*document.documentElement.clientWidth/100;case"vh":return n*document.documentElement.clientHeight/100;case"vmin":case"vmax":var o=document.documentElement.clientWidth/100,r=document.documentElement.clientHeight/100,s=Math["vmin"===i?"min":"max"];return n*s(o,r);default:return n}}function i(e){this.element=e,this.options={};var t,i,o,r,s,a,u,d=0,c=0;this.addOption=function(e){var t=[e.mode,e.property,e.value].join(",");this.options[t]=e};var l=["min-width","min-height","max-width","max-height"];this.call=function(){d=this.element.offsetWidth,c=this.element.offsetHeight,s={};for(t in this.options)this.options.hasOwnProperty(t)&&(i=this.options[t],o=n(this.element,i.value),r="width"==i.property?d:c,u=i.mode+"-"+i.property,a="","min"==i.mode&&r>=o&&(a+=i.value),"max"==i.mode&&o>=r&&(a+=i.value),s[u]||(s[u]=""),a&&-1===(" "+s[u]+" ").indexOf(" "+a+" ")&&(s[u]+=" "+a));for(var e in l)s[l[e]]?this.element.setAttribute(l[e],s[l[e]].substr(1)):this.element.removeAttribute(l[e])}}function o(e,t){e.elementQueriesSetupInformation?e.elementQueriesSetupInformation.addOption(t):(e.elementQueriesSetupInformation=new i(e),e.elementQueriesSetupInformation.addOption(t),e.elementQueriesSensor=new ResizeSensor(e,function(){e.elementQueriesSetupInformation.call()})),e.elementQueriesSetupInformation.call(),this.withTracking&&u.push(e)}function r(e,t,n,i){var r;if(document.querySelectorAll&&(r=document.querySelectorAll.bind(document)),r||"undefined"==typeof $$||(r=$$),r||"undefined"==typeof jQuery||(r=jQuery),!r)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";for(var s=r(e),a=0,u=s.length;u>a;a++)o(s[a],{mode:t,property:n,value:i})}function s(e){var t;for(e=e.replace(/'/g,'"');null!==(t=d.exec(e));)5<t.length&&r(t[1]||t[5],t[2],t[3],t[4])}function a(e){var t="";if(e)if("string"==typeof e)e=e.toLowerCase(),(-1!==e.indexOf("min-width")||-1!==e.indexOf("max-width"))&&s(e);else for(var n=0,i=e.length;i>n;n++)1===e[n].type?(t=e[n].selectorText||e[n].cssText,-1!==t.indexOf("min-height")||-1!==t.indexOf("max-height")?s(t):(-1!==t.indexOf("min-width")||-1!==t.indexOf("max-width"))&&s(t)):4===e[n].type&&a(e[n].cssRules||e[n].rules)}this.withTracking=!1;var u=[],d=/,?([^,\n]*)\[[\s\t]*(min|max)-(width|height)[\s\t]*[~$\^]?=[\s\t]*"([^"]*)"[\s\t]*]([^\n\s\{]*)/gim;this.init=function(e){this.withTracking=e;for(var t=0,n=document.styleSheets.length;n>t;t++)a(document.styleSheets[t].cssText||document.styleSheets[t].cssRules||document.styleSheets[t].rules)},this.update=function(e){this.withTracking=e,this.init()},this.detach=function(){if(!this.withTracking)throw"withTracking is not enabled. We can not detach elements since we don not store it.Use ElementQueries.withTracking = true; before domready.";for(var t;t=u.pop();)e.detach(t);u=[]}};e.update=function(t){e.instance.update(t)},e.detach=function(e){e.elementQueriesSetupInformation?(e.elementQueriesSensor.detach(),delete e.elementQueriesSetupInformation,delete e.elementQueriesSensor,console.log("detached")):console.log("detached already",e)},e.withTracking=!1,e.init=function(){e.instance||(e.instance=new e),e.instance.init(e.withTracking)};var t=function(e){if(document.addEventListener&&document.addEventListener("DOMContentLoaded",e,!1),/KHTML|WebKit|iCab/i.test(navigator.userAgent))var t=setInterval(function(){/loaded|complete/i.test(document.readyState)&&(e(),clearInterval(t))},10);window.onload=e};window.addEventListener?window.addEventListener("load",e.init,!1):window.attachEvent("onload",e.init),t(e.init)}();
12
+ alert("ElementQueries is required \nAdd //= require simple_alert/element_queries before require simple_alert on your application.js")
13
13
  }
14
14
  // ResizeSensor
15
15
  if(typeof ResizeSensor == 'undefined'){
16
- !function(){this.ResizeSensor=function(e,t){function i(){this.q=[],this.add=function(e){this.q.push(e)};var e,t;this.call=function(){for(e=0,t=this.q.length;t>e;e++)this.q[e].call()}}function s(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):e.style[t]}function o(e,t){if(e.resizedAttached){if(e.resizedAttached)return void e.resizedAttached.add(t)}else e.resizedAttached=new i,e.resizedAttached.add(t);e.resizeSensor=document.createElement("div"),e.resizeSensor.className="resize-sensor";var o="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: scroll; z-index: -1; visibility: hidden;",n="position: absolute; left: 0; top: 0;";e.resizeSensor.style.cssText=o,e.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+o+'"><div style="'+n+'"></div></div><div class="resize-sensor-shrink" style="'+o+'"><div style="'+n+' width: 200%; height: 200%"></div></div>',e.appendChild(e.resizeSensor),{fixed:1,absolute:1}[s(e,"position")]||(e.style.position="relative");var r,d,l=e.resizeSensor.childNodes[0],c=l.childNodes[0],h=e.resizeSensor.childNodes[1],f=(h.childNodes[0],function(){c.style.width=l.offsetWidth+10+"px",c.style.height=l.offsetHeight+10+"px",l.scrollLeft=l.scrollWidth,l.scrollTop=l.scrollHeight,h.scrollLeft=h.scrollWidth,h.scrollTop=h.scrollHeight,r=e.offsetWidth,d=e.offsetHeight});f();var a=function(){e.resizedAttached&&e.resizedAttached.call()},u=function(e,t,i){e.attachEvent?e.attachEvent("on"+t,i):e.addEventListener(t,i)};u(l,"scroll",function(){(e.offsetWidth>r||e.offsetHeight>d)&&a(),f()}),u(h,"scroll",function(){(e.offsetWidth<r||e.offsetHeight<d)&&a(),f()})}if("[object Array]"===Object.prototype.toString.call(e)||"undefined"!=typeof jQuery&&e instanceof jQuery||"undefined"!=typeof Elements&&e instanceof Elements)for(var n=0,r=e.length;r>n;n++)o(e[n],t);else o(e,t);this.detach=function(){ResizeSensor.detach(e)}},this.ResizeSensor.detach=function(e){e.resizeSensor&&(e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached)}}();
16
+ alert("ResizeSensor is required \nAdd //= require simple_alert/resize_sensor before require simple_alert on your application.js")
17
17
  }
18
18
  // topZIndex
19
19
  if(!$().topZIndex){
20
- (function(a){a.topZIndex=function(b){return Math.max(0,Math.max.apply(null,a.map((b||"*")==="*"?a.makeArray(document.getElementsByTagName("*")):a(b),function(b){return parseFloat(a(b).css("z-index"))||null})))};a.fn.topZIndex=function(b){if(this.length===0)return this;b=a.extend({increment:1},b);var c=a.topZIndex(b.selector),d=b.increment;return this.each(function(){this.style.zIndex=c+=d})}})(jQuery);
20
+ alert("TopZIndex is required \nAdd //= require simple_alert/top_z_index before require simple_alert on your application.js")
21
21
  }
22
22
 
23
- (function(){this.SimpleAlert={bt_close_class:"",bt_confirm_class:""};this.ba=function(){var bt_close,bt_confirm,center,close_btn_bind,close_modal,disableScroll,enableScroll,gen_message,gen_modal,gen_title,generate_random_id,h,index,keys,modal,open_modal,preventDefault,preventDefaultForScrollKeys,process_hash,resize_btns,shadow,show_shadow;index=$.topZIndex();keys={37:1,38:1,39:1,40:1};preventDefault=function(e){e=e||window.event;if(e.preventDefault){e.preventDefault()}e.returnValue=false};preventDefaultForScrollKeys=function(e){if(keys[e.keyCode]){preventDefault(e);return false}};disableScroll=function(){if(window.addEventListener){window.addEventListener("DOMMouseScroll",preventDefault,false)}window.onwheel=preventDefault;window.onmousewheel=document.onmousewheel=preventDefault;window.ontouchmove=preventDefault;document.onkeydown=preventDefaultForScrollKeys};enableScroll=function(){if(window.removeEventListener){window.removeEventListener("DOMMouseScroll",preventDefault,false)}window.onmousewheel=document.onmousewheel=null;window.onwheel=null;window.ontouchmove=null;document.onkeydown=null};generate_random_id=function(){var rr;rr=(Math.random()+"").substring(2);while($("#shadow_"+rr).size()>0){rr=(Math.random()+"").substring(2)}return rr};process_hash=function(params){var hash,r;if(params[0].constructor===Object){hash=params[0]}else{hash={};switch(params.length){case 1:hash["message"]=params[0];break;case 2:hash["title"]=params[0];hash["message"]=params[1]}}r={};r["title"]=hash["title"]!==void 0?hash["title"]:false;r["message"]=hash["message"]!==void 0?hash["message"]:false;r["showConfirmBtn"]=hash["showConfirmBtn"]!==void 0?true:hash["onConfirm"]!==void 0||(hash["confirmClass"]!==void 0||hash["confirmText"]!==void 0)?true:false;r["showCloseBtn"]=hash["showCloseBtn"]!==void 0?true:false;r["confirmText"]=hash["confirmText"]!==void 0?hash["confirmText"]:"Confirm";r["confirmClass"]=hash["confirmClass"]!==void 0?hash["confirmClass"]:SimpleAlert.bt_confirm_class;r["closeText"]=hash["closeText"]!==void 0?hash["closeText"]:"Close";r["closeClass"]=hash["closeClass"]!==void 0?hash["closeClass"]:SimpleAlert.bt_close_class;r["onConfirm"]=hash["onConfirm"]!==void 0?hash["onConfirm"]:false;r["onClose"]=hash["onClose"]!==void 0?hash["onClose"]:false;r["message"]=hash["message"]!==void 0?hash["message"]:"";r["openTime"]=hash["time"]!==void 0?hash["time"]:hash["openTime"]!==void 0?hash["openTime"]:250;r["closeTime"]=hash["time"]!==void 0?hash["time"]:hash["closeTime"]!==void 0?hash["closeTime"]:250;r["effectShow"]=hash["effectShow"]!==void 0?hash["effectShow"]:hash["effect"]?hash["effect"]:"easeInOutBack";r["effectHide"]=hash["effectHide"]!==void 0?hash["effectHide"]:hash["effect"]?hash["effect"]:"easeInBack";r["closeOnClickShadow"]=hash["closeOnClickShadow"]!==void 0?hash["closeOnClickShadow"]:false;r["autoClose"]=hash["autoClose"]!==void 0?hash["autoClose"]:false;r["id"]=hash["id"]?hash["id"]:generate_random_id();r["modal"]="#modal_"+r["id"];r["shadow"]="#shadow_"+r["id"];r["bt_close"]="#bt_close_"+r["id"];r["div_bt_close"]="#div_bt_close_"+r["id"];r["bt_confirm"]="#bt_confirm_"+r["id"];r["div_bt_confirm"]="#div_bt_confirm_"+r["id"];return r};h=process_hash(arguments);center=function(){$(h["modal"]).css("marginLeft",$(h["modal"]).width()/2*-1+"px");$(h["modal"]).css("marginTop",$(h["modal"]).height()/2*-1+"px");$(h["modal"]).css("top","50%");return $(h["modal"]).css("left","50%")};show_shadow=function(){$(h["shadow"]).css("zIndex",index+1);$(h["shadow"]).animate({opacity:"0.4"},h["openTime"],function(){return disableScroll()});if(h["autoClose"]){return setTimeout(function(){if(h["autoClose"]){return close_modal()}},h["autoClose"]*1e3)}};open_modal=function(){$(h["modal"]).css("zIndex",index+2);$(h["modal"]).transition({scale:0},0);return $(h["modal"]).transition({scale:1},h["openTime"],h["effectShow"])};close_btn_bind=function(){$(h["bt_close"]).click(function(){return close_modal()});if(h["closeOnClickShadow"]){return $(h["shadow"]).click(function(){return close_modal()})}};resize_btns=function(){var close,confirm,err,error;try{close=$(h["bt_close"]).outerWidth();confirm=$(h["bt_confirm"]).outerWidth();if(close>confirm){return $(h["bt_confirm"]).css("width",close)}else{return $(h["bt_close"]).css("width",confirm)}}catch(error){err=error}};gen_modal=function(){return'<div id="'+h["modal"].substring(1)+'" class="ba_modal" ><div class="ba_modal_content" >'};gen_message=function(){if(h["message"]){return'<div class="ba_modal_message" >'+h["message"]+"</div>"}else{return""}};gen_title=function(){if(h["title"]){return'<div class="ba_modal_title">'+h["title"]+"</div>"}else{return""}};shadow=function(){return'<div id="'+h["shadow"].substring(1)+'" class="ba_shadow"></div>'};close_modal=function(confirm){if(confirm==null){confirm=false}h["autoClose"]=false;if(h["onClose"]&&!confirm){h["onClose"]()}$(h["modal"]).transition({scale:0,opacity:0},h["closeTime"],h["effectHide"],function(){return $(this).remove()});return $(h["shadow"]).transition({opacity:0},h["closeTime"],function(){$(this).remove();if(!(h["onClose"]+"").include("ba")||!(h["onConfirm"]+"").include("ba")){return enableScroll()}})};bt_confirm=function(){if(h["showConfirmBtn"]){return'<div id="'+h["div_bt_confirm"].substring(1)+'" class="ba_modal_bt">\n <input type="button" id="'+h["bt_confirm"].substring(1)+'" '+(h["confirmClass"]?' class="'+h["confirmClass"]+'" ':"")+('value="'+h["confirmText"]+'"></input>\n\n</div>')}else{return""}};bt_close=function(){return'<div id="'+h["div_bt_close"].substring(1)+'" class="ba_modal_bt">\n <input type="button" id="'+h["bt_close"].substring(1)+'" '+(h["closeClass"]?' class="'+h["closeClass"]+'" ':"")+('value="'+h["closeText"]+'"></input>\n</div>')};modal=gen_modal();modal+=gen_title();modal+=gen_message();modal+='<div class="ba_list_bt" >';modal+=bt_confirm();modal+=bt_close();modal+="</div>";modal+="</div></div>";$("body").append(shadow());$("body").append(modal);disableScroll();resize_btns();show_shadow();open_modal();close_btn_bind();if(h["showConfirmBtn"]){$(h["bt_confirm"]).click(function(){close_modal(true);if(h["onConfirm"]){return h["onConfirm"]()}})}else{$(h["div_bt_close"]).css("width","100%")}center();return $(window).resize(function(){return center()})}}).call(this);
24
-
23
+ (function(){this.SimpleAlert={bt_close_class:"",bt_confirm_class:""};this.ba=function(){var bt_close,bt_confirm,center,close_btn_bind,close_modal,disableScroll,enableScroll,gen_message,gen_modal,gen_title,generate_random_id,h,index,keys,modal,open_modal,preventDefault,preventDefaultForScrollKeys,process_hash,resize_btns,shadow,show_shadow;index=$.topZIndex();keys={37:1,38:1,39:1,40:1};preventDefault=function(e){e=e||window.event;if(e.preventDefault){e.preventDefault()}e.returnValue=false};preventDefaultForScrollKeys=function(e){if(keys[e.keyCode]){preventDefault(e);return false}};disableScroll=function(){if(window.addEventListener){window.addEventListener("DOMMouseScroll",preventDefault,false)}window.onwheel=preventDefault;window.onmousewheel=document.onmousewheel=preventDefault;window.ontouchmove=preventDefault;document.onkeydown=preventDefaultForScrollKeys};enableScroll=function(){if(window.removeEventListener){window.removeEventListener("DOMMouseScroll",preventDefault,false)}window.onmousewheel=document.onmousewheel=null;window.onwheel=null;window.ontouchmove=null;document.onkeydown=null};generate_random_id=function(){var rr;rr=(Math.random()+"").substring(2);while($("#shadow_"+rr).size()>0){rr=(Math.random()+"").substring(2)}return rr};process_hash=function(params){var hash,r;if(params[0].constructor===Object){hash=params[0]}else{hash={};switch(params.length){case 1:hash["message"]=params[0];break;case 2:hash["title"]=params[0];hash["message"]=params[1]}}r={};r["title"]=hash["title"]!==void 0?hash["title"]:false;r["message"]=hash["message"]!==void 0?hash["message"]:false;r["showConfirmBtn"]=hash["showConfirmBtn"]!==void 0?true:hash["onConfirm"]!==void 0||(hash["confirmClass"]!==void 0||hash["confirmText"]!==void 0)?true:false;r["showCloseBtn"]=hash["showCloseBtn"]!==void 0?true:false;r["confirmText"]=hash["confirmText"]!==void 0?hash["confirmText"]:"Confirm";r["confirmClass"]=hash["confirmClass"]!==void 0?hash["confirmClass"]:SimpleAlert.bt_confirm_class;r["closeText"]=hash["closeText"]!==void 0?hash["closeText"]:"Close";r["closeClass"]=hash["closeClass"]!==void 0?hash["closeClass"]:SimpleAlert.bt_close_class;r["onConfirm"]=hash["onConfirm"]!==void 0?hash["onConfirm"]:false;r["onClose"]=hash["onClose"]!==void 0?hash["onClose"]:false;r["message"]=hash["message"]!==void 0?hash["message"]:"";r["openTime"]=hash["time"]!==void 0?hash["time"]:hash["openTime"]!==void 0?hash["openTime"]:250;r["closeTime"]=hash["time"]!==void 0?hash["time"]:hash["closeTime"]!==void 0?hash["closeTime"]:250;r["effectShow"]=hash["effectShow"]!==void 0?hash["effectShow"]:hash["effect"]?hash["effect"]:"easeInOutBack";r["effectHide"]=hash["effectHide"]!==void 0?hash["effectHide"]:hash["effect"]?hash["effect"]:"easeInBack";r["closeOnClickShadow"]=hash["closeOnClickShadow"]!==void 0?hash["closeOnClickShadow"]:false;r["autoClose"]=hash["autoClose"]!==void 0?hash["autoClose"]:false;r["id"]=hash["id"]?hash["id"]:generate_random_id();r["modal"]="#modal_"+r["id"];r["shadow"]="#shadow_"+r["id"];r["bt_close"]="#bt_close_"+r["id"];r["div_bt_close"]="#div_bt_close_"+r["id"];r["bt_confirm"]="#bt_confirm_"+r["id"];r["div_bt_confirm"]="#div_bt_confirm_"+r["id"];return r};h=process_hash(arguments);center=function(){$(h["modal"]).css("marginLeft",$(h["modal"]).width()/2*-1+"px");$(h["modal"]).css("marginTop",$(h["modal"]).height()/2*-1+"px");$(h["modal"]).css("top","50%");return $(h["modal"]).css("left","50%")};show_shadow=function(){$(h["shadow"]).css("zIndex",index+1);$(h["shadow"]).animate({opacity:"0.4"},h["openTime"],function(){return disableScroll()});if(h["autoClose"]){return setTimeout(function(){if(h["autoClose"]){return close_modal()}},h["autoClose"]*1e3)}};open_modal=function(){$(h["modal"]).css("zIndex",index+2);$(h["modal"]).transition({scale:0},0);return $(h["modal"]).transition({scale:1},h["openTime"],h["effectShow"])};close_btn_bind=function(){$(h["bt_close"]).click(function(){return close_modal()});if(h["closeOnClickShadow"]){return $(h["shadow"]).click(function(){return close_modal()})}};resize_btns=function(){var close,confirm,err,error;try{close=$(h["bt_close"]).outerWidth();confirm=$(h["bt_confirm"]).outerWidth();if(close>confirm){return $(h["bt_confirm"]).css("width",close)}else{return $(h["bt_close"]).css("width",confirm)}}catch(error){err=error}};gen_modal=function(){return'<div id="'+h["modal"].substring(1)+'" class="ba_modal" ><div class="ba_modal_content" >'};gen_message=function(){if(h["message"]){return'<div class="ba_modal_message" >'+h["message"]+"</div>"}else{return""}};gen_title=function(){if(h["title"]){return'<div class="ba_modal_title">'+h["title"]+"</div>"}else{return""}};shadow=function(){return'<div id="'+h["shadow"].substring(1)+'" class="ba_shadow"></div>'};close_modal=function(confirm){if(confirm==null){confirm=false}h["autoClose"]=false;if(h["onClose"]&&!confirm){h["onClose"]()}$(h["modal"]).transition({scale:0,opacity:0},h["closeTime"],h["effectHide"],function(){return $(this).remove()});return $(h["shadow"]).transition({opacity:0},h["closeTime"],function(){$(this).remove();if(!(h["onClose"]+"").include("ba")||!(h["onConfirm"]+"").include("ba")){return enableScroll()}})};bt_confirm=function(){if(h["showConfirmBtn"]){return'<div id="'+h["div_bt_confirm"].substring(1)+'" class="ba_modal_bt">\n <input type="button" id="'+h["bt_confirm"].substring(1)+'" '+(h["confirmClass"]?' class="'+h["confirmClass"]+'" ':"")+('value="'+h["confirmText"]+'"></input>\n\n</div>')}else{return""}};bt_close=function(){return'<div id="'+h["div_bt_close"].substring(1)+'" class="ba_modal_bt">\n <input type="button" id="'+h["bt_close"].substring(1)+'" '+(h["closeClass"]?' class="'+h["closeClass"]+'" ':"")+('value="'+h["closeText"]+'"></input>\n</div>')};modal=gen_modal();modal+=gen_title();modal+=gen_message();modal+='<div class="ba_list_bt" >';modal+=bt_confirm();modal+=bt_close();modal+="</div>";modal+="</div></div>";$("body").append(shadow());$("body").append(modal);disableScroll();resize_btns();show_shadow();open_modal();close_btn_bind();if(h["showConfirmBtn"]){$(h["bt_confirm"]).click(function(){close_modal(true);if(h["onConfirm"]){return h["onConfirm"]()}})}else{$(h["div_bt_close"]).css("width","100%")}center();return $(window).resize(function(){return center()})}}).call(this);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_alert
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thiago Feitosa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-27 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -74,6 +74,11 @@ files:
74
74
  - lib/simple_alert/version.rb
75
75
  - simple_alert.gemspec
76
76
  - vendor/assets/javascripts/simple_alert.js.erb
77
+ - vendor/assets/javascripts/simple_alert/element_queries.js.erb
78
+ - vendor/assets/javascripts/simple_alert/resize_sensor.js.erb
79
+ - vendor/assets/javascripts/simple_alert/string.js.erb
80
+ - vendor/assets/javascripts/simple_alert/top_z_index.js.erb
81
+ - vendor/assets/javascripts/simple_alert/transit.js.erb
77
82
  - vendor/assets/stylesheets/simple_alert.css
78
83
  homepage: https://dev.thiago.pro/simple-alert
79
84
  licenses: