simple_alert 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +2 -2
- data/lib/simple_alert/version.rb +1 -1
- data/vendor/assets/javascripts/simple_alert.js.erb +9 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c8dc57f6ccf8f1d70f5c84949166582ba922d059da5fd13ece1457e926f72a4f
|
4
|
+
data.tar.gz: a72289ffca30b9d9232db6b1f5c9ff92bf786bb4b02c3966ca7358c2c60a2b82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67b923a9049a9935b67bd8c2790bccf98264e0f04d8da6c40b2f88a2bf37eded39e44621d70d897ed6caadfa604ef76d167439754fb1d3bbb11bf621a4439089
|
7
|
+
data.tar.gz: bf55e8e79ae20cba2355074a52a7ef748d00d32a74e5eddf730a75258697ed4afaa4a65489141c7fc25d64891e33cc290d2bd7baf2b32d6f6a992978e6ac46fc
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ gem 'simple_alert'
|
|
13
13
|
|
14
14
|
### Rails 4
|
15
15
|
```ruby
|
16
|
-
gem 'simple_alert', '0.1.
|
16
|
+
gem 'simple_alert', '0.1.2'
|
17
17
|
```
|
18
18
|
|
19
19
|
In application.css
|
@@ -99,4 +99,4 @@ Dependencies
|
|
99
99
|
|
100
100
|
## License
|
101
101
|
|
102
|
-
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
102
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/lib/simple_alert/version.rb
CHANGED
@@ -20,4 +20,12 @@ if(!$().topZIndex){
|
|
20
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:""}
|
23
|
+
(function(){this.SimpleAlert={bt_close_class:"",bt_confirm_class:""},this.ba=function(){var o,e,n,i,t,s,c,l,d,r,a,u,m,f,v,w,_,b,h,C,p,g
|
24
|
+
return m=$.topZIndex(),f={37:1,38:1,39:1,40:1},_=function(o){o=o||window.event,o.preventDefault&&o.preventDefault(),o.returnValue=!1},b=function(o){if(f[o.keyCode])return _(o),!1},s=function(){window.addEventListener&&window.addEventListener("DOMMouseScroll",_,!1),window.onwheel=_,window.onmousewheel=document.onmousewheel=_,window.ontouchmove=_,document.onkeydown=b},c=function(){window.removeEventListener&&window.removeEventListener("DOMMouseScroll",_,!1),window.onmousewheel=document.onmousewheel=null,window.onwheel=null,window.ontouchmove=null,document.onkeydown=null},a=function(){var o
|
25
|
+
for(o=(Math.random()+"").substring(2);$("#shadow_"+o).size()>0;)o=(Math.random()+"").substring(2)
|
26
|
+
return o},h=function(o){var e,n
|
27
|
+
if(o[0].constructor===Object)e=o[0]
|
28
|
+
else switch(e={},o.length){case 1:e.message=o[0]
|
29
|
+
break
|
30
|
+
case 2:e.title=o[0],e.message=o[1]}return n={},n.title=void 0!==e.title&&e.title,n.message=void 0!==e.message&&e.message,n.showConfirmBtn=void 0!==e.showConfirmBtn||(void 0!==e.onConfirm||void 0!==e.confirmClass||void 0!==e.confirmText),n.showCloseBtn=void 0!==e.showCloseBtn,n.confirmText=void 0!==e.confirmText?e.confirmText:"Confirm",n.confirmClass=void 0!==e.confirmClass?e.confirmClass:SimpleAlert.bt_confirm_class,n.closeText=void 0!==e.closeText?e.closeText:"Close",n.closeClass=void 0!==e.closeClass?e.closeClass:SimpleAlert.bt_close_class,n.onConfirm=void 0!==e.onConfirm&&e.onConfirm,n.onClose=void 0!==e.onClose&&e.onClose,n.message=void 0!==e.message?e.message:"",n.openTime=void 0!==e.time?e.time:void 0!==e.openTime?e.openTime:250,n.closeTime=void 0!==e.time?e.time:void 0!==e.closeTime?e.closeTime:250,n.effectShow=void 0!==e.effectShow?e.effectShow:e.effect?e.effect:"easeInOutBack",n.effectHide=void 0!==e.effectHide?e.effectHide:e.effect?e.effect:"easeInBack",n.closeOnClickShadow=void 0!==e.closeOnClickShadow&&e.closeOnClickShadow,n.autoClose=void 0!==e.autoClose&&e.autoClose,n.id=e.id?e.id:a(),n.modal="#modal_"+n.id,n.shadow="#shadow_"+n.id,n.bt_close="#bt_close_"+n.id,n.div_bt_close="#div_bt_close_"+n.id,n.bt_confirm="#bt_confirm_"+n.id,n.div_bt_confirm="#div_bt_confirm_"+n.id,n},u=h(arguments),n=function(){return $(u.modal).css("marginLeft",$(u.modal).width()/2*-1+"px"),$(u.modal).css("marginTop",$(u.modal).height()/2*-1+"px"),$(u.modal).css("top","50%"),$(u.modal).css("left","50%")},g=function(){if($(u.shadow).css("zIndex",m+1),$(u.shadow).animate({opacity:"0.4"},u.openTime,function(){return s()}),u.autoClose)return setTimeout(function(){if(u.autoClose)return t()},1e3*u.autoClose)},w=function(){return $(u.modal).css("zIndex",m+2),$(u.modal).transition({scale:0},0),$(u.modal).transition({scale:1},u.openTime,u.effectShow),$(u.modal).find("input:first").focus()},i=function(){if($(u.bt_close).click(function(){return t()}),u.closeOnClickShadow)return $(u.shadow).click(function(){return t()})},C=function(){var o,e
|
31
|
+
try{return o=$(u.bt_close).outerWidth(),e=$(u.bt_confirm).outerWidth(),o>e?$(u.bt_confirm).css("width",o):$(u.bt_close).css("width",e)}catch(o){o}},d=function(){return'<div id="'+u.modal.substring(1)+'" class="ba_modal" ><div class="ba_modal_content" >'},l=function(){return u.message?'<div class="ba_modal_message" >'+u.message+"</div>":""},r=function(){return u.title?'<div class="ba_modal_title">'+u.title+"</div>":""},p=function(){return'<div id="'+u.shadow.substring(1)+'" class="ba_shadow"></div>'},t=function(o){return null==o&&(o=!1),u.autoClose=!1,u.onClose&&!o&&u.onClose(),$(u.modal).transition({scale:0,opacity:0},u.closeTime,u.effectHide,function(){return $(this).remove()}),$(u.shadow).transition({opacity:0},u.closeTime,function(){return $(this).remove()}),c()},e=function(){return u.showConfirmBtn?'<div id="'+u.div_bt_confirm.substring(1)+'" class="ba_modal_bt">\n\t<input type="button" id="'+u.bt_confirm.substring(1)+'" '+(u.confirmClass?' class="'+u.confirmClass+'" ':"")+'value="'+u.confirmText+'"></input>\n\n</div>':""},o=function(){return'<div id="'+u.div_bt_close.substring(1)+'" class="ba_modal_bt">\n\t<input type="button" id="'+u.bt_close.substring(1)+'" '+(u.closeClass?' class="'+u.closeClass+'" ':"")+'value="'+u.closeText+'"></input>\n</div>'},v=d(),v+=r(),v+=l(),v+='<div class="ba_list_bt" >',v+=e(),v+=o(),v+="</div>",v+="</div></div>",$("body").append(p()),$("body").append(v),s(),C(),g(),w(),i(),u.showConfirmBtn?$(u.bt_confirm).click(function(){if(t(!0),u.onConfirm)return u.onConfirm()}):$(u.div_bt_close).css("width","100%"),n(),$(window).resize(function(){return n()})}}).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.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thiago Feitosa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -99,8 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
|
-
|
103
|
-
rubygems_version: 2.5.1
|
102
|
+
rubygems_version: 3.0.1
|
104
103
|
signing_key:
|
105
104
|
specification_version: 4
|
106
105
|
summary: Simple Alert
|