bootstrap-modal-rails 2.1.1 → 2.2.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
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YTBhYmUzNTI3Y2VkYjFjMzEwZGQyMzg0ODk5NGVjODNmOGI5NTkzZg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MmZjNWFjNThhMjI4OWVhODY3N2ViZjAyY2NmZGIzODM1NTFjNDI2NA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZmZjNjEzOTc1N2VjMGVmOWM4YWYzOTRhMDRkMjY5ZTk5YTllNjAwN2ZhNzlh
|
10
|
+
YWY3MzlmNDg0ODIwZDJjMjU0MjI5OGM4MzcwNDM2OWE1Nzk2ZjM0ZGE2ZmE0
|
11
|
+
NzUwOWYyNjM1ZmEyOThlNzJmOGY5NWMzY2Y2MjlhNDRlYjJlYWI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OGFlM2I4YzVlNDRhNjI2YzkxZjYwY2Y4OGM2YmNlZTkxYmU4ZTRmZmRiNTBm
|
14
|
+
MTgwZjAxZmZmYWZlZTU5OWE3NjQxNTAyODU2MWI3NDM3N2YwNjQyNjNjZjYx
|
15
|
+
NTU1Zjc1ZDJlYWFhOTk2NTUzZDliNjIwMGQxNDAyOTdjYTRjYTg=
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-modal.js v2.
|
2
|
+
* bootstrap-modal.js v2.2.0
|
3
3
|
* ===========================================================
|
4
4
|
* Copyright 2012 Jordan Schroter
|
5
5
|
*
|
@@ -33,12 +33,17 @@
|
|
33
33
|
constructor: Modal,
|
34
34
|
|
35
35
|
init: function (element, options) {
|
36
|
+
var that = this;
|
37
|
+
|
36
38
|
this.options = options;
|
37
39
|
|
38
40
|
this.$element = $(element)
|
39
41
|
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this));
|
40
42
|
|
41
|
-
this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
|
43
|
+
this.options.remote && this.$element.find('.modal-body').load(this.options.remote, function () {
|
44
|
+
var e = $.Event('loaded');
|
45
|
+
that.$element.trigger(e);
|
46
|
+
});
|
42
47
|
|
43
48
|
var manager = typeof this.options.manager === 'function' ?
|
44
49
|
this.options.manager.call(this) : this.options.manager;
|
@@ -202,10 +207,6 @@
|
|
202
207
|
},
|
203
208
|
|
204
209
|
hideModal: function () {
|
205
|
-
this.$element
|
206
|
-
.hide()
|
207
|
-
.trigger('hidden');
|
208
|
-
|
209
210
|
var prop = this.options.height ? 'height' : 'max-height';
|
210
211
|
var value = this.options.height || this.options.maxHeight;
|
211
212
|
|
@@ -215,6 +216,9 @@
|
|
215
216
|
.css(prop, '');
|
216
217
|
}
|
217
218
|
|
219
|
+
this.$element
|
220
|
+
.hide()
|
221
|
+
.trigger('hidden');
|
218
222
|
},
|
219
223
|
|
220
224
|
removeLoading: function () {
|
@@ -346,7 +350,8 @@
|
|
346
350
|
resize: false,
|
347
351
|
attentionAnimation: 'shake',
|
348
352
|
manager: 'body',
|
349
|
-
spinner: '<div class="loading-spinner" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div>'
|
353
|
+
spinner: '<div class="loading-spinner" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div>',
|
354
|
+
backdropTemplate: '<div class="modal-backdrop" />'
|
350
355
|
};
|
351
356
|
|
352
357
|
$.fn.modal.Constructor = Modal;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-modalmanager.js v2.
|
2
|
+
* bootstrap-modalmanager.js v2.2.0
|
3
3
|
* ===========================================================
|
4
4
|
* Copyright 2012 Jordan Schroter.
|
5
5
|
*
|
@@ -79,7 +79,6 @@
|
|
79
79
|
modal.$element.appendTo(modal.$container);
|
80
80
|
|
81
81
|
that.backdrop(modal, function () {
|
82
|
-
|
83
82
|
modal.$element.show();
|
84
83
|
|
85
84
|
if (transition) {
|
@@ -113,8 +112,12 @@
|
|
113
112
|
modal.$element.on('hidden.modalmanager', targetIsSelf(function (e) {
|
114
113
|
|
115
114
|
that.backdrop(modal);
|
116
|
-
|
117
115
|
if (modal.$backdrop){
|
116
|
+
var transition = $.support.transition && modal.$element.hasClass('fade');
|
117
|
+
|
118
|
+
// trigger a relayout due to firebox's buggy transition end event
|
119
|
+
if (transition) { modal.$element[0].offsetWidth; }
|
120
|
+
|
118
121
|
$.support.transition && modal.$element.hasClass('fade') ?
|
119
122
|
modal.$backdrop.one($.support.transition.end, function () { that.destroyModal(modal) }) :
|
120
123
|
that.destroyModal(modal);
|
@@ -131,7 +134,6 @@
|
|
131
134
|
},
|
132
135
|
|
133
136
|
destroyModal: function (modal) {
|
134
|
-
|
135
137
|
modal.destroy();
|
136
138
|
|
137
139
|
var hasOpenModal = this.hasOpenModal();
|
@@ -147,12 +149,17 @@
|
|
147
149
|
this.setFocus();
|
148
150
|
},
|
149
151
|
|
150
|
-
|
152
|
+
getOpenModals: function () {
|
153
|
+
var openModals = [];
|
151
154
|
for (var i = 0; i < this.stack.length; i++){
|
152
|
-
if (this.stack[i].isShown)
|
155
|
+
if (this.stack[i].isShown) openModals.push(this.stack[i]);
|
153
156
|
}
|
154
157
|
|
155
|
-
return
|
158
|
+
return openModals;
|
159
|
+
},
|
160
|
+
|
161
|
+
hasOpenModal: function () {
|
162
|
+
return this.getOpenModals().length > 0;
|
156
163
|
},
|
157
164
|
|
158
165
|
setFocus: function () {
|
@@ -209,11 +216,12 @@
|
|
209
216
|
modal.$backdrop = null;
|
210
217
|
},
|
211
218
|
|
212
|
-
createBackdrop: function (animate) {
|
219
|
+
createBackdrop: function (animate, tmpl) {
|
213
220
|
var $backdrop;
|
214
221
|
|
215
222
|
if (!this.$backdropHandle) {
|
216
|
-
$backdrop = $(
|
223
|
+
$backdrop = $(tmpl)
|
224
|
+
.addClass(animate)
|
217
225
|
.appendTo(this.$element);
|
218
226
|
} else {
|
219
227
|
$backdrop = this.$backdropHandle;
|
@@ -234,8 +242,7 @@
|
|
234
242
|
var $container;
|
235
243
|
|
236
244
|
$container = $('<div class="modal-scrollable">')
|
237
|
-
.css('z-index', getzIndex(
|
238
|
-
modal ? this.getIndexOfModal(modal) : this.stack.length ))
|
245
|
+
.css('z-index', getzIndex('modal', this.getOpenModals().length))
|
239
246
|
.appendTo(this.$element);
|
240
247
|
|
241
248
|
if (modal && modal.options.backdrop != 'static') {
|
@@ -260,9 +267,9 @@
|
|
260
267
|
if (modal.isShown && showBackdrop) {
|
261
268
|
var doAnimate = $.support.transition && animate && !this.$backdropHandle;
|
262
269
|
|
263
|
-
modal.$backdrop = this.createBackdrop(animate);
|
270
|
+
modal.$backdrop = this.createBackdrop(animate, modal.options.backdropTemplate);
|
264
271
|
|
265
|
-
modal.$backdrop.css('z-index', getzIndex( 'backdrop', this.
|
272
|
+
modal.$backdrop.css('z-index', getzIndex( 'backdrop', this.getOpenModals().length ));
|
266
273
|
|
267
274
|
if (doAnimate) modal.$backdrop[0].offsetWidth; // force reflow
|
268
275
|
|
@@ -311,16 +318,18 @@
|
|
311
318
|
|
312
319
|
if (!this.isLoading) {
|
313
320
|
|
314
|
-
this.$backdropHandle = this.createBackdrop('fade');
|
321
|
+
this.$backdropHandle = this.createBackdrop('fade', this.options.backdropTemplate);
|
315
322
|
|
316
323
|
this.$backdropHandle[0].offsetWidth; // force reflow
|
317
324
|
|
325
|
+
var openModals = this.getOpenModals();
|
326
|
+
|
318
327
|
this.$backdropHandle
|
319
|
-
.css('z-index', getzIndex('backdrop',
|
328
|
+
.css('z-index', getzIndex('backdrop', openModals.length + 1))
|
320
329
|
.addClass('in');
|
321
330
|
|
322
331
|
var $spinner = $(this.options.spinner)
|
323
|
-
.css('z-index', getzIndex('modal',
|
332
|
+
.css('z-index', getzIndex('modal', openModals.length + 1))
|
324
333
|
.appendTo(this.$element)
|
325
334
|
.addClass('in');
|
326
335
|
|
@@ -404,7 +413,8 @@
|
|
404
413
|
$.fn.modalmanager.defaults = {
|
405
414
|
backdropLimit: 999,
|
406
415
|
resize: true,
|
407
|
-
spinner: '<div class="loading-spinner fade" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div>'
|
416
|
+
spinner: '<div class="loading-spinner fade" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div>',
|
417
|
+
backdropTemplate: '<div class="modal-backdrop" />'
|
408
418
|
};
|
409
419
|
|
410
420
|
$.fn.modalmanager.Constructor = ModalManager
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap Modal
|
3
|
+
*
|
4
|
+
* Copyright Jordan Schroter
|
5
|
+
* Licensed under the Apache License v2.0
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
*
|
8
|
+
* Boostrap 3 patch for for bootstrap-modal. Include BEFORE bootstrap-modal.css!
|
9
|
+
*/
|
10
|
+
|
11
|
+
body.modal-open,
|
12
|
+
.modal-open .navbar-fixed-top,
|
13
|
+
.modal-open .navbar-fixed-bottom {
|
14
|
+
margin-right: 0;
|
15
|
+
}
|
16
|
+
|
17
|
+
.modal {
|
18
|
+
left: 50%;
|
19
|
+
bottom: auto;
|
20
|
+
right: auto;
|
21
|
+
padding: 0;
|
22
|
+
width: 500px;
|
23
|
+
margin-left: -250px;
|
24
|
+
background-color: #ffffff;
|
25
|
+
border: 1px solid #999999;
|
26
|
+
border: 1px solid rgba(0, 0, 0, 0.2);
|
27
|
+
border-radius: 6px;
|
28
|
+
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
|
29
|
+
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
|
30
|
+
background-clip: padding-box;
|
31
|
+
}
|
32
|
+
|
33
|
+
.modal.container {
|
34
|
+
max-width: none;
|
35
|
+
}
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-modal-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
5
|
-
prerelease:
|
4
|
+
version: 2.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Vicente Reig
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-12-27 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: railties
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -38,37 +35,31 @@ files:
|
|
38
35
|
- lib/bootstrap-modal-rails.rb
|
39
36
|
- vendor/assets/javascripts/bootstrap-modal.js
|
40
37
|
- vendor/assets/javascripts/bootstrap-modalmanager.js
|
38
|
+
- vendor/assets/stylesheets/bootstrap-modal-bs3patch.css
|
41
39
|
- vendor/assets/stylesheets/bootstrap-modal.css
|
42
40
|
- LICENSE.txt
|
43
41
|
- README.md
|
44
42
|
homepage: http://github.com/vicentereig/bootstrap-modal-rails
|
45
43
|
licenses: []
|
44
|
+
metadata: {}
|
46
45
|
post_install_message:
|
47
46
|
rdoc_options: []
|
48
47
|
require_paths:
|
49
48
|
- lib
|
50
49
|
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
50
|
requirements:
|
53
51
|
- - ! '>='
|
54
52
|
- !ruby/object:Gem::Version
|
55
53
|
version: '0'
|
56
|
-
segments:
|
57
|
-
- 0
|
58
|
-
hash: 731218777553422648
|
59
54
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
55
|
requirements:
|
62
56
|
- - ! '>='
|
63
57
|
- !ruby/object:Gem::Version
|
64
58
|
version: '0'
|
65
|
-
segments:
|
66
|
-
- 0
|
67
|
-
hash: 731218777553422648
|
68
59
|
requirements: []
|
69
60
|
rubyforge_project:
|
70
|
-
rubygems_version: 1.8
|
61
|
+
rubygems_version: 2.1.8
|
71
62
|
signing_key:
|
72
|
-
specification_version:
|
63
|
+
specification_version: 4
|
73
64
|
summary: Rails gemified bootstrap-modal extension by Jordan Schroter.
|
74
65
|
test_files: []
|