bootstrap_modal_rails 2.0.4 → 2.1.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.
- data/README.md +3 -3
- data/lib/bootstrap_modal_rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap_modal_rails/all.js +0 -1
- data/vendor/assets/javascripts/bootstrap_modal_rails/bootstrap-modal.js +339 -320
- data/vendor/assets/javascripts/bootstrap_modal_rails/bootstrap-modalmanager.js +305 -269
- data/vendor/assets/javascripts/bootstrap_modal_rails/index.js +1 -1
- data/vendor/assets/stylesheets/bootstrap_modal_rails/bootstrap-modal.css +113 -108
- metadata +38 -6
- data/vendor/assets/javascripts/bootstrap_modal_rails/dynamic-modal.js +0 -49
@@ -1,2 +1,2 @@
|
|
1
1
|
//= require ./bootstrap-modalmanager.js
|
2
|
-
//= require ./bootstrap-modal.js
|
2
|
+
//= require ./bootstrap-modal.js
|
@@ -8,8 +8,7 @@
|
|
8
8
|
*/
|
9
9
|
|
10
10
|
.modal-open {
|
11
|
-
|
12
|
-
overflow: hidden;
|
11
|
+
overflow: hidden;
|
13
12
|
}
|
14
13
|
|
15
14
|
|
@@ -18,69 +17,75 @@
|
|
18
17
|
.modal-open.page-overflow .page-container .navbar-fixed-top,
|
19
18
|
.modal-open.page-overflow .page-container .navbar-fixed-bottom,
|
20
19
|
.modal-open.page-overflow .modal-scrollable {
|
21
|
-
|
20
|
+
overflow-y: scroll;
|
22
21
|
}
|
23
22
|
|
24
23
|
@media (max-width: 979px) {
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
.modal-open.page-overflow .page-container .navbar-fixed-top,
|
25
|
+
.modal-open.page-overflow .page-container .navbar-fixed-bottom {
|
26
|
+
overflow-y: visible;
|
27
|
+
}
|
29
28
|
}
|
30
29
|
|
31
30
|
|
32
31
|
.modal-scrollable {
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
32
|
+
position: fixed;
|
33
|
+
top: 0;
|
34
|
+
bottom: 0;
|
35
|
+
left: 0;
|
36
|
+
right: 0;
|
37
|
+
overflow: auto;
|
39
38
|
}
|
40
39
|
|
41
40
|
.modal {
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
outline: none;
|
42
|
+
position: absolute;
|
43
|
+
margin-top: 0;
|
44
|
+
top: 50%;
|
45
|
+
overflow: visible; /* allow content to popup out (i.e tooltips) */
|
47
46
|
}
|
48
47
|
|
49
48
|
.modal.fade {
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
top: -100%;
|
50
|
+
-webkit-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
|
51
|
+
-moz-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
|
52
|
+
-o-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
|
53
|
+
transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
|
55
54
|
}
|
56
55
|
|
57
56
|
.modal.fade.in {
|
58
|
-
|
57
|
+
top: 50%;
|
59
58
|
}
|
60
59
|
|
61
60
|
.modal-body {
|
62
|
-
|
63
|
-
|
61
|
+
max-height: none;
|
62
|
+
overflow: visible;
|
64
63
|
}
|
65
64
|
|
66
65
|
.modal.modal-absolute {
|
67
|
-
|
68
|
-
|
66
|
+
position: absolute;
|
67
|
+
z-index: 950;
|
69
68
|
}
|
70
69
|
|
71
70
|
.modal .loading-mask {
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
71
|
+
position: absolute;
|
72
|
+
top: 0;
|
73
|
+
bottom: 0;
|
74
|
+
left: 0;
|
75
|
+
right: 0;
|
76
|
+
background: #fff;
|
77
|
+
border-radius: 6px;
|
79
78
|
}
|
80
79
|
|
81
|
-
.modal-backdrop.modal-absolute{
|
82
|
-
|
83
|
-
|
80
|
+
.modal-backdrop.modal-absolute {
|
81
|
+
position: absolute;
|
82
|
+
z-index: 940;
|
83
|
+
}
|
84
|
+
|
85
|
+
.modal-backdrop,
|
86
|
+
.modal-backdrop.fade.in {
|
87
|
+
opacity: 0.7;
|
88
|
+
filter: alpha(opacity=70);
|
84
89
|
}
|
85
90
|
|
86
91
|
.modal.container {
|
@@ -91,72 +96,72 @@
|
|
91
96
|
/* Modal Overflow */
|
92
97
|
|
93
98
|
.modal-overflow.modal {
|
94
|
-
|
99
|
+
top: 1%;
|
95
100
|
}
|
96
101
|
|
97
102
|
.modal-overflow.modal.fade {
|
98
|
-
|
103
|
+
top: -100%;
|
99
104
|
}
|
100
105
|
|
101
106
|
.modal-overflow.modal.fade.in {
|
102
|
-
|
107
|
+
top: 1%;
|
103
108
|
}
|
104
109
|
|
105
110
|
.modal-overflow .modal-body {
|
106
|
-
|
107
|
-
|
111
|
+
overflow: auto;
|
112
|
+
-webkit-overflow-scrolling: touch;
|
108
113
|
}
|
109
114
|
|
110
115
|
/* Responsive */
|
111
116
|
|
112
117
|
@media (min-width: 1200px) {
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
118
|
+
.modal.container {
|
119
|
+
width: 1170px;
|
120
|
+
margin-left: -585px;
|
121
|
+
}
|
117
122
|
}
|
118
123
|
|
119
124
|
@media (max-width: 979px) {
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
125
|
+
.modal,
|
126
|
+
.modal.container,
|
127
|
+
.modal.modal-overflow {
|
128
|
+
top: 1%;
|
129
|
+
right: 1%;
|
130
|
+
left: 1%;
|
131
|
+
bottom: auto;
|
132
|
+
width: auto !important;
|
133
|
+
height: auto !important;
|
134
|
+
margin: 0 !important;
|
135
|
+
padding: 0 !important;
|
136
|
+
}
|
137
|
+
|
138
|
+
.modal.fade.in,
|
139
|
+
.modal.container.fade.in,
|
140
|
+
.modal.modal-overflow.fade.in {
|
141
|
+
top: 1%;
|
142
|
+
bottom: auto;
|
143
|
+
}
|
144
|
+
|
145
|
+
.modal-body,
|
146
|
+
.modal-overflow .modal-body {
|
147
|
+
position: static;
|
148
|
+
margin: 0;
|
149
|
+
height: auto !important;
|
150
|
+
max-height: none !important;
|
151
|
+
overflow: visible !important;
|
152
|
+
}
|
153
|
+
|
154
|
+
.modal-footer,
|
155
|
+
.modal-overflow .modal-footer {
|
156
|
+
position: static;
|
157
|
+
}
|
153
158
|
}
|
154
159
|
|
155
160
|
.loading-spinner {
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
161
|
+
position: absolute;
|
162
|
+
top: 50%;
|
163
|
+
left: 50%;
|
164
|
+
margin: -12px 0 0 -12px;
|
160
165
|
}
|
161
166
|
|
162
167
|
/*
|
@@ -166,43 +171,43 @@ Licensed under the ☺ license (http://licence.visualidiot.com/)
|
|
166
171
|
Copyright (c) 2012 Dan Eden*/
|
167
172
|
|
168
173
|
.animated {
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
174
|
+
-webkit-animation-duration: 1s;
|
175
|
+
-moz-animation-duration: 1s;
|
176
|
+
-o-animation-duration: 1s;
|
177
|
+
animation-duration: 1s;
|
178
|
+
-webkit-animation-fill-mode: both;
|
179
|
+
-moz-animation-fill-mode: both;
|
180
|
+
-o-animation-fill-mode: both;
|
181
|
+
animation-fill-mode: both;
|
177
182
|
}
|
178
183
|
|
179
184
|
@-webkit-keyframes shake {
|
180
|
-
|
181
|
-
|
182
|
-
|
185
|
+
0%, 100% {-webkit-transform: translateX(0);}
|
186
|
+
10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);}
|
187
|
+
20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);}
|
183
188
|
}
|
184
189
|
|
185
190
|
@-moz-keyframes shake {
|
186
|
-
|
187
|
-
|
188
|
-
|
191
|
+
0%, 100% {-moz-transform: translateX(0);}
|
192
|
+
10%, 30%, 50%, 70%, 90% {-moz-transform: translateX(-10px);}
|
193
|
+
20%, 40%, 60%, 80% {-moz-transform: translateX(10px);}
|
189
194
|
}
|
190
195
|
|
191
196
|
@-o-keyframes shake {
|
192
|
-
|
193
|
-
|
194
|
-
|
197
|
+
0%, 100% {-o-transform: translateX(0);}
|
198
|
+
10%, 30%, 50%, 70%, 90% {-o-transform: translateX(-10px);}
|
199
|
+
20%, 40%, 60%, 80% {-o-transform: translateX(10px);}
|
195
200
|
}
|
196
201
|
|
197
202
|
@keyframes shake {
|
198
|
-
|
199
|
-
|
200
|
-
|
203
|
+
0%, 100% {transform: translateX(0);}
|
204
|
+
10%, 30%, 50%, 70%, 90% {transform: translateX(-10px);}
|
205
|
+
20%, 40%, 60%, 80% {transform: translateX(10px);}
|
201
206
|
}
|
202
207
|
|
203
208
|
.shake {
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
209
|
+
-webkit-animation-name: shake;
|
210
|
+
-moz-animation-name: shake;
|
211
|
+
-o-animation-name: shake;
|
212
|
+
animation-name: shake;
|
208
213
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap_modal_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -28,9 +28,41 @@ dependencies:
|
|
28
28
|
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '3.1'
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: jquery-rails
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
type: :runtime
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: coffee-rails
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
31
63
|
description: Gem to include bootstrap-modal extension in Rails
|
32
64
|
email:
|
33
|
-
- cmcknight@
|
65
|
+
- cmcknight@gmail.com
|
34
66
|
- jschr
|
35
67
|
executables: []
|
36
68
|
extensions: []
|
@@ -42,7 +74,6 @@ files:
|
|
42
74
|
- vendor/assets/javascripts/bootstrap_modal_rails/all.js
|
43
75
|
- vendor/assets/javascripts/bootstrap_modal_rails/bootstrap-modal.js
|
44
76
|
- vendor/assets/javascripts/bootstrap_modal_rails/bootstrap-modalmanager.js
|
45
|
-
- vendor/assets/javascripts/bootstrap_modal_rails/dynamic-modal.js
|
46
77
|
- vendor/assets/javascripts/bootstrap_modal_rails/index.js
|
47
78
|
- vendor/assets/stylesheets/bootstrap_modal_rails/bootstrap-modal.css
|
48
79
|
- LICENSE
|
@@ -50,7 +81,8 @@ files:
|
|
50
81
|
- README.md
|
51
82
|
homepage: http://jschr.github.com/bootstrap-modal/
|
52
83
|
licenses: []
|
53
|
-
post_install_message:
|
84
|
+
post_install_message: ! 'Note: dynamic-modal.js has been removed in gem versions >=
|
85
|
+
2.1.0'
|
54
86
|
rdoc_options: []
|
55
87
|
require_paths:
|
56
88
|
- lib
|
@@ -62,7 +94,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
94
|
version: '0'
|
63
95
|
segments:
|
64
96
|
- 0
|
65
|
-
hash: -
|
97
|
+
hash: -2372622881791272487
|
66
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
99
|
none: false
|
68
100
|
requirements:
|
@@ -71,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
103
|
version: '0'
|
72
104
|
segments:
|
73
105
|
- 0
|
74
|
-
hash: -
|
106
|
+
hash: -2372622881791272487
|
75
107
|
requirements: []
|
76
108
|
rubyforge_project:
|
77
109
|
rubygems_version: 1.8.23
|
@@ -1,49 +0,0 @@
|
|
1
|
-
var $modal;
|
2
|
-
|
3
|
-
$modal = $('#ajax-modal');
|
4
|
-
|
5
|
-
$('[data-dynamic_modal]').on('click', function() {
|
6
|
-
var create, related_element, submit_button, url;
|
7
|
-
$('body').modalmanager('loading');
|
8
|
-
url = $(this).data('source');
|
9
|
-
create = $(this).data('create');
|
10
|
-
related_element = $(this).siblings('select:first');
|
11
|
-
submit_button = $modal.find('.ajax-modal-submit');
|
12
|
-
return setTimeout((function() {
|
13
|
-
return $('#ajax-modal .modal-body').load(url, '', function() {
|
14
|
-
$modal.modal();
|
15
|
-
submit_button.data('source', create);
|
16
|
-
if (related_element !== void 0) {
|
17
|
-
return submit_button.data('related_element', related_element);
|
18
|
-
}
|
19
|
-
});
|
20
|
-
}), 1000);
|
21
|
-
});
|
22
|
-
|
23
|
-
$('.ajax-modal-submit').click(function(e) {
|
24
|
-
var related_element, submit_button, url;
|
25
|
-
submit_button = $(this);
|
26
|
-
related_element = submit_button.data('related_element');
|
27
|
-
url = submit_button.data('source');
|
28
|
-
return $.ajax(url, {
|
29
|
-
type: 'POST',
|
30
|
-
dataType: 'json',
|
31
|
-
data: $('#ajax-modal .modal-body form').serialize(),
|
32
|
-
success: function(data) {
|
33
|
-
if (related_element !== void 0) {
|
34
|
-
$(related_element).append($('<option></option>').attr('value', data.id).text(data.name));
|
35
|
-
$(related_element).select2('val', data.id);
|
36
|
-
}
|
37
|
-
$modal.modal('hide');
|
38
|
-
$('#ajax-modal .modal-body').empty();
|
39
|
-
$(submit_button).removeData('source');
|
40
|
-
return $(submit_button).removeData('related_element');
|
41
|
-
},
|
42
|
-
error: function(data) {
|
43
|
-
var errors;
|
44
|
-
return errors = $.map($.parseJSON(data.responseText), function(index, value) {
|
45
|
-
return "" + index + " " + value[0] + " ";
|
46
|
-
});
|
47
|
-
}
|
48
|
-
});
|
49
|
-
});
|