data-confirm-modal 1.4.0 → 1.5.0
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/.npmignore +6 -0
- data/data-confirm-modal.gemspec +1 -0
- data/lib/data-confirm-modal/version.rb +1 -1
- data/package.json +1 -1
- data/vendor/assets/javascripts/data-confirm-modal.js +5 -5
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5a0e9ea89cbad2ba0d296d89a8aace861403af1
|
4
|
+
data.tar.gz: 461e536d152b506114f72651cd89afa6e5e11be8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0e632bbd63b7f5ad39d12f01daab6d7460148c8fc5ac7abafc00cd8fa0b2291a59f8a5534d0c742448f198edd9e125f33a3cb298e7aef61becd7453877d1e86
|
7
|
+
data.tar.gz: ccf22556fd0c3d837de3f89da51335b1e343eff299de6f1decf130a3226ad225a9fb355695d705fd473017f7fe43ee14270ea8b47b884f890a22f814ecfbd682
|
data/.npmignore
ADDED
data/data-confirm-modal.gemspec
CHANGED
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.homepage = "http://github.com/ifad/data-confirm-modal"
|
11
11
|
s.summary = "Use bootstrap modals with Rails' UJS data-confirm"
|
12
12
|
s.description = "This gem overrides Rails' UJS behaviour to open up a Bootstrap Modal instead of the browser's built in confirm() dialog"
|
13
|
+
s.license = 'MIT'
|
13
14
|
|
14
15
|
s.required_rubygems_version = ">= 1.3.6"
|
15
16
|
|
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "data-confirm-modal",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.5.0",
|
4
4
|
"description": "Makes Rails' link_to confirm: 'foo' build a Bootstrap Modal instead of calling the browser's confirm() API.",
|
5
5
|
"main": "vendor/assets/javascripts/data-confirm-modal.js",
|
6
6
|
"repository": "https://github.com/ifad/data-confirm-modal.git",
|
@@ -129,11 +129,11 @@
|
|
129
129
|
|
130
130
|
var modal = $(
|
131
131
|
'<div id="'+id+'" class="modal '+modalClass+' '+fade+'" tabindex="-1" role="dialog" aria-labelledby="'+id+'Label" aria-hidden="true">' +
|
132
|
-
'<div class="modal-dialog">' +
|
132
|
+
'<div class="modal-dialog" role="document">' +
|
133
133
|
'<div class="modal-content">' +
|
134
134
|
'<div class="modal-header">' +
|
135
|
+
'<h5 id="'+id+'Label" class="modal-title"></h5> ' +
|
135
136
|
'<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>' +
|
136
|
-
'<h4 id="'+id+'Label" class="modal-title"></h4> ' +
|
137
137
|
'</div>' +
|
138
138
|
'<div class="modal-body"></div>' +
|
139
139
|
'<div class="modal-footer">' +
|
@@ -272,7 +272,7 @@
|
|
272
272
|
* is briefly overriden, and afterwards reset when the modal is closed.
|
273
273
|
*
|
274
274
|
*/
|
275
|
-
var
|
275
|
+
var window_confirm = window.confirm;
|
276
276
|
|
277
277
|
$(document).delegate(settings.elements.join(', '), 'confirm', function() {
|
278
278
|
var element = $(this), modal = getModal(element);
|
@@ -285,13 +285,13 @@
|
|
285
285
|
|
286
286
|
} else {
|
287
287
|
// Modal has been confirmed. Override Rails' handler
|
288
|
-
|
288
|
+
window.confirm = function () {
|
289
289
|
return true;
|
290
290
|
}
|
291
291
|
|
292
292
|
modal.one('hidden.bs.modal', function() {
|
293
293
|
// Reset it after modal is closed.
|
294
|
-
|
294
|
+
window.confirm = window_confirm;
|
295
295
|
});
|
296
296
|
|
297
297
|
// Proceed with Rails' handlers
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data-confirm-modal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcello Barnaba
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -33,6 +33,7 @@ extensions: []
|
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
35
|
- ".gitignore"
|
36
|
+
- ".npmignore"
|
36
37
|
- Gemfile
|
37
38
|
- LICENSE
|
38
39
|
- README.md
|
@@ -45,7 +46,8 @@ files:
|
|
45
46
|
- package.json
|
46
47
|
- vendor/assets/javascripts/data-confirm-modal.js
|
47
48
|
homepage: http://github.com/ifad/data-confirm-modal
|
48
|
-
licenses:
|
49
|
+
licenses:
|
50
|
+
- MIT
|
49
51
|
metadata: {}
|
50
52
|
post_install_message:
|
51
53
|
rdoc_options: []
|
@@ -63,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
65
|
version: 1.3.6
|
64
66
|
requirements: []
|
65
67
|
rubyforge_project:
|
66
|
-
rubygems_version: 2.4.
|
68
|
+
rubygems_version: 2.4.8
|
67
69
|
signing_key:
|
68
70
|
specification_version: 4
|
69
71
|
summary: Use bootstrap modals with Rails' UJS data-confirm
|