effective_bootstrap 0.8.2 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13069c885db1c7ecc88b9b09fe3da23ba6eecb8c45154cf6ecb705edd0910bf8
4
- data.tar.gz: e93591a88deec48ce908ae47f6bee319bda2ede3218b6a4ab181fd70b1726aa6
3
+ metadata.gz: 6d33c3af90acc774a7ae2426c06085e9d0395a168d59532586d17788f0fc4cb2
4
+ data.tar.gz: a9723f01115d8c7025b0a02aab7a79ca69174050cc5f839fd2ec98d7e401e6ff
5
5
  SHA512:
6
- metadata.gz: ab8b70579e1f9a81e7575c4fb6df6fcbd07a0df05d4a5bb6c65547cdaab4a6c36ff3f296ef560711fd9b76dfd8dfe1e2b66d8ad8794b0cbafd693de570332b5c
7
- data.tar.gz: a08b4fdc0bbb4fc94b513546e7be2fbe359ad41c1bf4378462fda34891a61b9cc2923aa2f8c9965ad9550b2649521c3f339d001bf874db8f79749d678a70498c
6
+ metadata.gz: 8776c093e66d79f264b1b1cb907b7716547b554ebc266f652255f98b3d22a47090fbd074508d4dc00fb11e480208072fd5cc1d9d55427e2e400bf1e2289efa19
7
+ data.tar.gz: daa01ad649fd5e49b9108b124ed7c4556264442c029c03eafaa39ed5d31c48ad0334d50106a65c3c9f221d0f00fe7e68cf0dcf064fb876e977a344b63828049e
@@ -1,6 +1,6 @@
1
- # These next three methods hijack jquery_ujs data-confirm and do it our own way with a double click confirm
1
+ # These next three methods hijack rails/ujs and jquery_ujs data-confirm and do it our own way with a double click confirm
2
2
 
3
- if <%= !!EffectiveBootstrap.use_custom_data_confirm %> && $.rails
3
+ if <%= !!EffectiveBootstrap.use_custom_data_confirm %> && (window.Rails || $.rails)
4
4
  $(document).on 'confirm', (event) ->
5
5
  $obj = $(event.target)
6
6
 
@@ -18,6 +18,11 @@ if <%= !!EffectiveBootstrap.use_custom_data_confirm %> && $.rails
18
18
  , 4000)
19
19
  false # don't show the confirmation dialog
20
20
 
21
- $.rails.confirm = (message) -> true
22
- $.rails.effective_bootstrap_custom_data_confirm = true
23
- $(document).on 'confirm:complete', (event) -> $(event.target).data('confirmed')
21
+ (window.Rails || $.rails).confirm = (message) -> true
22
+ (window.Rails || $.rails).effective_bootstrap_custom_data_confirm = true
23
+
24
+ $(document).on 'confirm:complete', (event) -> $(event.target).data('confirmed')
25
+
26
+ $(document).on 'click', 'a.dropdown-item[data-confirm]', (event) ->
27
+ event.preventDefault()
28
+ false
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.8.2'.freeze
2
+ VERSION = '0.8.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-29 00:00:00.000000000 Z
11
+ date: 2020-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails