bootstrap-modal-rails 2.2.0 → 2.2.4
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODc3NDI2N2Q4YWFhOGFmN2QzM2E4NmI2MWNjODRlMzYzZTIyYTYwMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGZiZjc2ZjI3MjdjZDQ1ZjQ3OTQ0MjFjNzczMTZjMzFmOGU1ZjdkNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTY3YTY4NGQxODBiNzdkYjE4ODA1YTM4ODU0ZjA0YjMwMGMwMDdkYWQ0MWU2
|
10
|
+
N2FlZTM2ODU0MjVmN2IxODYwZGFiMjliZjk5ODkzZTgyZTBlYzg0NjNhOWZk
|
11
|
+
NTYwMzQ5NmYxOTIwYzNjNmY5YWE4ODhjMDIyMzg0MjkzZWEzZDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTFlODNkNmE4MjNlNWE1MzhjN2JkNzVmNTQ5ZTQ3YmQxZTEwNGVmN2QyNWE0
|
14
|
+
NmI1ZTg5YmJlNzBjZGRmZmVkOWNkNDA2MjQ4ZTRkNDUxN2FlMGE5Y2UxYjg3
|
15
|
+
NTBjMGU1MTM5NGMxZWU1ZDY4NGIwYTliYjdmNWY1MDRmNWQzNWM=
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-modal.js v2.2.
|
2
|
+
* bootstrap-modal.js v2.2.4
|
3
3
|
* ===========================================================
|
4
4
|
* Copyright 2012 Jordan Schroter
|
5
5
|
*
|
@@ -315,7 +315,8 @@
|
|
315
315
|
this.$element.removeData('modal');
|
316
316
|
this.$element
|
317
317
|
.removeClass('in')
|
318
|
-
.attr('aria-hidden', true)
|
318
|
+
.attr('aria-hidden', true)
|
319
|
+
.trigger('destroyed');
|
319
320
|
}
|
320
321
|
};
|
321
322
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-modalmanager.js v2.2.
|
2
|
+
* bootstrap-modalmanager.js v2.2.4
|
3
3
|
* ===========================================================
|
4
4
|
* Copyright 2012 Jordan Schroter.
|
5
5
|
*
|
@@ -110,43 +110,27 @@
|
|
110
110
|
}));
|
111
111
|
|
112
112
|
modal.$element.on('hidden.modalmanager', targetIsSelf(function (e) {
|
113
|
-
|
114
113
|
that.backdrop(modal);
|
115
|
-
|
114
|
+
// handle the case when a modal may have been removed from the dom before this callback executes
|
115
|
+
if (!modal.$element.parent().length) {
|
116
|
+
that.destroyModal(modal);
|
117
|
+
} else if (modal.$backdrop){
|
116
118
|
var transition = $.support.transition && modal.$element.hasClass('fade');
|
117
119
|
|
118
120
|
// trigger a relayout due to firebox's buggy transition end event
|
119
121
|
if (transition) { modal.$element[0].offsetWidth; }
|
120
|
-
|
121
122
|
$.support.transition && modal.$element.hasClass('fade') ?
|
122
|
-
modal.$backdrop.one($.support.transition.end, function () {
|
123
|
-
|
123
|
+
modal.$backdrop.one($.support.transition.end, function () { modal.destroy(); }) :
|
124
|
+
modal.destroy();
|
124
125
|
} else {
|
125
|
-
|
126
|
+
modal.destroy();
|
126
127
|
}
|
127
128
|
|
128
129
|
}));
|
129
130
|
|
130
|
-
modal.$element.on('
|
131
|
-
that.
|
131
|
+
modal.$element.on('destroyed.modalmanager', targetIsSelf(function (e) {
|
132
|
+
that.destroyModal(modal);
|
132
133
|
}));
|
133
|
-
|
134
|
-
},
|
135
|
-
|
136
|
-
destroyModal: function (modal) {
|
137
|
-
modal.destroy();
|
138
|
-
|
139
|
-
var hasOpenModal = this.hasOpenModal();
|
140
|
-
|
141
|
-
this.$element.toggleClass('modal-open', hasOpenModal);
|
142
|
-
|
143
|
-
if (!hasOpenModal){
|
144
|
-
this.$element.removeClass('page-overflow');
|
145
|
-
}
|
146
|
-
|
147
|
-
this.removeContainer(modal);
|
148
|
-
|
149
|
-
this.setFocus();
|
150
134
|
},
|
151
135
|
|
152
136
|
getOpenModals: function () {
|
@@ -172,13 +156,24 @@
|
|
172
156
|
if (!topModal) return;
|
173
157
|
|
174
158
|
topModal.focus();
|
175
|
-
|
176
159
|
},
|
177
160
|
|
178
|
-
|
161
|
+
destroyModal: function (modal) {
|
179
162
|
modal.$element.off('.modalmanager');
|
180
163
|
if (modal.$backdrop) this.removeBackdrop(modal);
|
181
164
|
this.stack.splice(this.getIndexOfModal(modal), 1);
|
165
|
+
|
166
|
+
var hasOpenModal = this.hasOpenModal();
|
167
|
+
|
168
|
+
this.$element.toggleClass('modal-open', hasOpenModal);
|
169
|
+
|
170
|
+
if (!hasOpenModal){
|
171
|
+
this.$element.removeClass('page-overflow');
|
172
|
+
}
|
173
|
+
|
174
|
+
this.removeContainer(modal);
|
175
|
+
|
176
|
+
this.setFocus();
|
182
177
|
},
|
183
178
|
|
184
179
|
getModalAt: function (index) {
|
@@ -419,4 +414,10 @@
|
|
419
414
|
|
420
415
|
$.fn.modalmanager.Constructor = ModalManager
|
421
416
|
|
417
|
+
// ModalManager handles the modal-open class so we need
|
418
|
+
// to remove conflicting bootstrap 3 event handlers
|
419
|
+
$(function () {
|
420
|
+
$(document).off('show.bs.modal').off('hidden.bs.modal');
|
421
|
+
});
|
422
|
+
|
422
423
|
}(jQuery);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-modal-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vicente Reig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|