simple_alert 0.1.2 → 1.0.6
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 +4 -4
- data/CHANGELOG +3 -4
- data/README.md +19 -16
- data/lib/simple_alert/version.rb +1 -1
- data/vendor/assets/javascripts/simple_alert/simple_alert.js +6 -6
- data/vendor/assets/stylesheets/{simple_alert.css → simple_alert/simple_alert.css} +0 -0
- metadata +4 -5
- data/vendor/assets/javascripts/simple_alert.js +0 -26
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a41d5f2b4ba11b6730ae5870c9540135aca217c0
|
|
4
|
+
data.tar.gz: abd6a395319c62b027ff6900799448ec7effb7c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16483e03e5562fab4202698dfea702affd482cb1b380c6d66b7ad1103dae15c9ff771fa716a863af80fd59ceb667e0788b36396b2e0ffbec51eb9814420f0f08
|
|
7
|
+
data.tar.gz: 453f2f95261b6010e357d99deb3c3d44755928e19513778390a1fda6cdedae3662c1ff975ef7d2bf04b393d0fa0e3e275de327cf91403d530ba155990576630d
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
|
@@ -1,32 +1,24 @@
|
|
|
1
1
|
# SimpleAlert
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/simple_alert`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
+
|
|
5
|
+
[demo](https://dev.thiago.pro/simple-alert)
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
Add this line to your application's Gemfile:
|
|
8
10
|
|
|
9
|
-
### Rails 4
|
|
10
|
-
```ruby
|
|
11
|
-
gem 'simple_alert', '0.1.2'
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### Rails 5
|
|
15
11
|
```ruby
|
|
16
12
|
gem 'simple_alert'
|
|
17
13
|
```
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
And then execute:
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
*= require simple_alert
|
|
23
|
-
````
|
|
17
|
+
$ bundle
|
|
24
18
|
|
|
25
|
-
|
|
19
|
+
Or install it yourself as:
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
//= require simple_alert
|
|
29
|
-
````
|
|
21
|
+
$ gem install simple_alert
|
|
30
22
|
|
|
31
23
|
## Usage
|
|
32
24
|
|
|
@@ -97,6 +89,17 @@ Dependencies
|
|
|
97
89
|
- [transit](http://ricostacruz.com/jquery.transit/)
|
|
98
90
|
- [topzindex](https://code.google.com/p/topzindex/)
|
|
99
91
|
|
|
92
|
+
## Development
|
|
93
|
+
|
|
94
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
95
|
+
|
|
96
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
97
|
+
|
|
98
|
+
## Contributing
|
|
99
|
+
|
|
100
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/simple_alert. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
101
|
+
|
|
102
|
+
|
|
100
103
|
## License
|
|
101
104
|
|
|
102
|
-
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
105
|
+
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
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
if(!$().transition ){
|
|
2
2
|
var transit = document.createElement('script');
|
|
3
|
-
transit.src = '
|
|
3
|
+
transit.src = './assets/simple_alert/dependences/transit/transit.js';
|
|
4
4
|
document.head.appendChild(transit);
|
|
5
5
|
}
|
|
6
6
|
if(!"".include){
|
|
7
7
|
var transit = document.createElement('script');
|
|
8
|
-
transit.src = '
|
|
8
|
+
transit.src = './assets/simple_alert/dependences/core/string.js';
|
|
9
9
|
document.head.appendChild(transit);
|
|
10
10
|
}
|
|
11
11
|
if(typeof ElementQueries == 'undefined'){
|
|
12
12
|
var transit = document.createElement('script');
|
|
13
|
-
transit.src = '
|
|
13
|
+
transit.src = './assets/simple_alert/dependences/event_resize/ElementQueries.js';
|
|
14
14
|
document.head.appendChild(transit);
|
|
15
15
|
}
|
|
16
16
|
if(typeof ResizeSensor == 'undefined'){
|
|
17
17
|
var transit = document.createElement('script');
|
|
18
|
-
transit.src = '
|
|
18
|
+
transit.src = './assets/simple_alert/dependences/event_resize/ResizeSensor.js';
|
|
19
19
|
document.head.appendChild(transit);
|
|
20
20
|
}
|
|
21
21
|
if(!$().topZIndex){
|
|
22
22
|
var transit = document.createElement('script');
|
|
23
|
-
transit.src = '
|
|
23
|
+
transit.src = './assets/simple_alert/dependences/top_z_index/topZIndex.js';
|
|
24
24
|
document.head.appendChild(transit);
|
|
25
25
|
}
|
|
26
|
-
(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,
|
|
26
|
+
(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,keys,modal,open_modal,preventDefault,preventDefaultForScrollKeys,process_hash,resize_btns,shadow,show_shadow;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"]).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"]).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\t<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\t<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);
|
|
File without changes
|
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: 0.
|
|
4
|
+
version: 1.0.6
|
|
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: 2016-08-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -73,14 +73,13 @@ files:
|
|
|
73
73
|
- lib/simple_alert.rb
|
|
74
74
|
- lib/simple_alert/version.rb
|
|
75
75
|
- simple_alert.gemspec
|
|
76
|
-
- vendor/assets/javascripts/simple_alert.js
|
|
77
76
|
- vendor/assets/javascripts/simple_alert/dependences/core/string.js
|
|
78
77
|
- vendor/assets/javascripts/simple_alert/dependences/event_resize/ElementQueries.js
|
|
79
78
|
- vendor/assets/javascripts/simple_alert/dependences/event_resize/ResizeSensor.js
|
|
80
79
|
- vendor/assets/javascripts/simple_alert/dependences/top_z_index/topZIndex.js
|
|
81
80
|
- vendor/assets/javascripts/simple_alert/dependences/transit/transit.js
|
|
82
81
|
- vendor/assets/javascripts/simple_alert/simple_alert.js
|
|
83
|
-
- vendor/assets/stylesheets/simple_alert.css
|
|
82
|
+
- vendor/assets/stylesheets/simple_alert/simple_alert.css
|
|
84
83
|
homepage: https://dev.thiago.pro/simple-alert
|
|
85
84
|
licenses:
|
|
86
85
|
- MIT
|
|
@@ -101,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
101
100
|
version: '0'
|
|
102
101
|
requirements: []
|
|
103
102
|
rubyforge_project:
|
|
104
|
-
rubygems_version: 2.
|
|
103
|
+
rubygems_version: 2.4.8
|
|
105
104
|
signing_key:
|
|
106
105
|
specification_version: 4
|
|
107
106
|
summary: Simple Alert
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
if(!$().transition ){
|
|
2
|
-
var transit = document.createElement('script');
|
|
3
|
-
transit.src = '/assets/simple_alert/dependences/transit/transit.js';
|
|
4
|
-
document.head.appendChild(transit);
|
|
5
|
-
}
|
|
6
|
-
if(!"".include){
|
|
7
|
-
var transit = document.createElement('script');
|
|
8
|
-
transit.src = '/assets/simple_alert/dependences/core/string.js';
|
|
9
|
-
document.head.appendChild(transit);
|
|
10
|
-
}
|
|
11
|
-
if(typeof ElementQueries == 'undefined'){
|
|
12
|
-
var transit = document.createElement('script');
|
|
13
|
-
transit.src = '/assets/simple_alert/dependences/event_resize/ElementQueries.js';
|
|
14
|
-
document.head.appendChild(transit);
|
|
15
|
-
}
|
|
16
|
-
if(typeof ResizeSensor == 'undefined'){
|
|
17
|
-
var transit = document.createElement('script');
|
|
18
|
-
transit.src = '/assets/simple_alert/dependences/event_resize/ResizeSensor.js';
|
|
19
|
-
document.head.appendChild(transit);
|
|
20
|
-
}
|
|
21
|
-
if(!$().topZIndex){
|
|
22
|
-
var transit = document.createElement('script');
|
|
23
|
-
transit.src = '/assets/simple_alert/dependences/top_z_index/topZIndex.js';
|
|
24
|
-
document.head.appendChild(transit);
|
|
25
|
-
}
|
|
26
|
-
(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()});$(h["shadow"]).transition({opacity:0},h["closeTime"],function(){return $(this).remove()});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);
|