hootstrap 0.6.0 → 0.7.0

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
  SHA256:
3
- metadata.gz: 0ea61b5e5b8b619c3bb9163569f32905ff654f6f5df7a27f7bd2fe5738946262
4
- data.tar.gz: aa17204ccd13290cf5b8503a52226a933d9d54c64676f5be66b02a18b3e97f25
3
+ metadata.gz: 5276c288b04cc5d5e4f7bc7e7ca5abae4748db5db90b01861ba6a76b9ce25769
4
+ data.tar.gz: 435b7e344a52a5f635e8349437d36840b488e6964db2f05fa434fca376df2898
5
5
  SHA512:
6
- metadata.gz: b891489d55711ee77cb02d609949179f9071f1053236a9e1ccf5013b3dfb056bbf7eb448be6aacc245b8da7e0baabc07b0284e23376e89fcce02d8bacadbbfa0
7
- data.tar.gz: 9a4b7b98fcf0a744b8633a98c898a495647bcd2e1dbc1a5f24a3625321797dac4116d722b5c920204e5d48cebf79917b476abb8962a69f2131904685f787e7da
6
+ metadata.gz: d81eb6f0e3f88402c993dd73a3a10cf6585ebbd6a90961818e762db19fd937285788ea26af664ad5917851258fb92dcfcdced82bd3f5b1a946e12bbf5a5c767c
7
+ data.tar.gz: 41dffe5bd0e277f2b25f434b9b140b1830903b89bb604aedf9c078bacc326e1efe93b8de2863a2e2e7aa57dc17897f16f883f780a57a8852a091d3201ab6a9a8
@@ -14,11 +14,13 @@ document.addEventListener(Hootstrap.turbolinks.event, () => {
14
14
  Rails.stopEverything(event);
15
15
 
16
16
  const target = event.target;
17
+ const type = target.getAttribute('data-type');
18
+ const action = target.getAttribute('data-action');
17
19
 
18
20
  new Toast({
19
21
  message: target.getAttribute('data-prompt'),
20
- type: 'danger',
21
- action: 'OK',
22
+ type: type || 'danger',
23
+ action: action || 'OK',
22
24
  onClick: () => {
23
25
  confirmed = true;
24
26
  target.click();
@@ -1,3 +1,3 @@
1
1
  module Hootstrap
2
- VERSION = '0.6.0'
2
+ VERSION = '0.7.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Licata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-13 00:00:00.000000000 Z
11
+ date: 2018-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails