jquery-modal-rails-assets 0.8.0 → 0.9.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +5 -1
- data/app/assets/javascripts/jquery.modal.js +15 -11
- data/app/assets/stylesheets/jquery.modal.css +53 -12
- data/jquery-modal-rails-assets.gemspec +2 -2
- data/lib/jquery-modal-rails-assets/version.rb +1 -1
- metadata +11 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2aa2aaae30edbe0872b2c147451e8f8a4bc7a4efa425779749068105fcad102b
|
4
|
+
data.tar.gz: 86831bedfba09e2037a59701e242c6717c6cd329278136b2a9b70c67a1aa0daa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7c82e7d7c5476f68eadc4974184cba9f86e1be6e9346e42d55c4aa114ecc9f4097b1f044df2cb9b6d77de5423ac6ffd2b1e9e197aa73cc64b00163f78493fb7
|
7
|
+
data.tar.gz: 856799cf31afddde1ca86ee191496996dc6ef67f9c7ff291ed5b42bcce5bf2b58672ee2e26ff3463564ea958393c9f3ae56d3406f75db344a20c333db7221ed4
|
data/README.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
#
|
1
|
+
# THIS GEM IS NO LONGER UPDATED
|
2
|
+
|
3
|
+
If you require newer versions of the asset files you can do 'yarn add jquery-modal' or download them from the [Github repository](https://github.com/kylefox/jquery-modal).
|
4
|
+
|
5
|
+
## Intro
|
2
6
|
|
3
7
|
This gem vendors the jQuery Modal assets for Rails 3.1 and greater.
|
4
8
|
The files will be added to the asset pipeline and available for you to use.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
A simple jQuery modal (http://github.com/kylefox/jquery-modal)
|
3
|
-
Version 0.
|
3
|
+
Version 0.9.1
|
4
4
|
*/
|
5
5
|
|
6
6
|
(function (factory) {
|
@@ -41,6 +41,7 @@
|
|
41
41
|
modals.push(this);
|
42
42
|
if (el.is('a')) {
|
43
43
|
target = el.attr('href');
|
44
|
+
this.anchor = el;
|
44
45
|
//Select element by id from href
|
45
46
|
if (/^#/.test(target)) {
|
46
47
|
this.$elm = $(target);
|
@@ -72,6 +73,7 @@
|
|
72
73
|
}
|
73
74
|
} else {
|
74
75
|
this.$elm = el;
|
76
|
+
this.anchor = el;
|
75
77
|
this.$body.append(this.$elm);
|
76
78
|
this.open();
|
77
79
|
}
|
@@ -83,6 +85,7 @@
|
|
83
85
|
open: function() {
|
84
86
|
var m = this;
|
85
87
|
this.block();
|
88
|
+
this.anchor.blur();
|
86
89
|
if(this.options.doFade) {
|
87
90
|
setTimeout(function() {
|
88
91
|
m.show();
|
@@ -92,11 +95,11 @@
|
|
92
95
|
}
|
93
96
|
$(document).off('keydown.modal').on('keydown.modal', function(event) {
|
94
97
|
var current = getCurrent();
|
95
|
-
if (event.which
|
98
|
+
if (event.which === 27 && current.options.escapeClose) current.close();
|
96
99
|
});
|
97
100
|
if (this.options.clickClose)
|
98
101
|
this.$blocker.click(function(e) {
|
99
|
-
if (e.target
|
102
|
+
if (e.target === this)
|
100
103
|
$.modal.close();
|
101
104
|
});
|
102
105
|
},
|
@@ -112,7 +115,7 @@
|
|
112
115
|
block: function() {
|
113
116
|
this.$elm.trigger($.modal.BEFORE_BLOCK, [this._ctx()]);
|
114
117
|
this.$body.css('overflow','hidden');
|
115
|
-
this.$blocker = $('<div class="
|
118
|
+
this.$blocker = $('<div class="' + this.options.blockerClass + ' blocker current"></div>').appendTo(this.$body);
|
116
119
|
selectCurrent();
|
117
120
|
if(this.options.doFade) {
|
118
121
|
this.$blocker.css('opacity',0).animate({opacity: 1}, this.options.fadeDuration);
|
@@ -141,9 +144,9 @@
|
|
141
144
|
}
|
142
145
|
this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker);
|
143
146
|
if(this.options.doFade) {
|
144
|
-
this.$elm.css(
|
147
|
+
this.$elm.css({opacity: 0, display: 'inline-block'}).animate({opacity: 1}, this.options.fadeDuration);
|
145
148
|
} else {
|
146
|
-
this.$elm.
|
149
|
+
this.$elm.css('display', 'inline-block');
|
147
150
|
}
|
148
151
|
this.$elm.trigger($.modal.OPEN, [this._ctx()]);
|
149
152
|
},
|
@@ -178,7 +181,7 @@
|
|
178
181
|
|
179
182
|
//Return context for custom events
|
180
183
|
_ctx: function() {
|
181
|
-
return { elm: this.$elm, $blocker: this.$blocker, options: this.options };
|
184
|
+
return { elm: this.$elm, $elm: this.$elm, $blocker: this.$blocker, options: this.options };
|
182
185
|
}
|
183
186
|
};
|
184
187
|
|
@@ -193,7 +196,7 @@
|
|
193
196
|
// Returns if there currently is an active modal
|
194
197
|
$.modal.isActive = function () {
|
195
198
|
return modals.length > 0;
|
196
|
-
}
|
199
|
+
};
|
197
200
|
|
198
201
|
$.modal.getCurrent = getCurrent;
|
199
202
|
|
@@ -204,7 +207,8 @@
|
|
204
207
|
closeText: 'Close',
|
205
208
|
closeClass: '',
|
206
209
|
modalClass: "modal",
|
207
|
-
|
210
|
+
blockerClass: "jquery-modal",
|
211
|
+
spinnerHtml: '<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',
|
208
212
|
showSpinner: true,
|
209
213
|
showClose: true,
|
210
214
|
fadeDuration: null, // Number of milliseconds the fade animation takes.
|
@@ -232,8 +236,8 @@
|
|
232
236
|
};
|
233
237
|
|
234
238
|
// Automatically bind links with rel="modal:close" to, well, close the modal.
|
235
|
-
$(document).on('click.modal', 'a[rel
|
236
|
-
$(document).on('click.modal', 'a[rel
|
239
|
+
$(document).on('click.modal', 'a[rel~="modal:close"]', $.modal.close);
|
240
|
+
$(document).on('click.modal', 'a[rel~="modal:open"]', function(event) {
|
237
241
|
event.preventDefault();
|
238
242
|
$(this).modal();
|
239
243
|
});
|
@@ -21,7 +21,7 @@
|
|
21
21
|
background-color: transparent;
|
22
22
|
}
|
23
23
|
.modal {
|
24
|
-
display:
|
24
|
+
display: none;
|
25
25
|
vertical-align: middle;
|
26
26
|
position: relative;
|
27
27
|
z-index: 2;
|
@@ -51,22 +51,63 @@
|
|
51
51
|
width: 30px;
|
52
52
|
height: 30px;
|
53
53
|
text-indent: -9999px;
|
54
|
-
background:
|
54
|
+
background-size: contain;
|
55
|
+
background-repeat: no-repeat;
|
56
|
+
background-position: center center;
|
57
|
+
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAA3hJREFUaAXlm8+K00Acx7MiCIJH/yw+gA9g25O49SL4AO3Bp1jw5NvktC+wF88qevK4BU97EmzxUBCEolK/n5gp3W6TTJPfpNPNF37MNsl85/vN/DaTmU6PknC4K+pniqeKJ3k8UnkvDxXJzzy+q/yaxxeVHxW/FNHjgRSeKt4rFoplzaAuHHDBGR2eS9G54reirsmienDCTRt7xwsp+KAoEmt9nLaGitZxrBbPFNaGfPloGw2t4JVamSt8xYW6Dg1oCYo3Yv+rCGViV160oMkcd8SYKnYV1Nb1aEOjCe6L5ZOiLfF120EjWhuBu3YIZt1NQmujnk5F4MgOpURzLfAwOBSTmzp3fpDxuI/pabxpqOoz2r2HLAb0GMbZKlNV5/Hg9XJypguryA7lPF5KMdTZQzHjqxNPhWhzIuAruOl1eNqKEx1tSh5rfbxdw7mOxCq4qS68ZTjKS1YVvilu559vWvFHhh4rZrdyZ69Vmpgdj8fJbDZLJpNJ0uv1cnr/gjrUhQMuI+ANjyuwftQ0bbL6Erp0mM/ny8Fg4M3LtdRxgMtKl3jwmIHVxYXChFy94/Rmpa/pTbNUhstKV+4Rr8lLQ9KlUvJKLyG8yvQ2s9SBy1Jb7jV5a0yapfF6apaZLjLLcWtd4sNrmJUMHyM+1xibTjH82Zh01TNlhsrOhdKTe00uAzZQmN6+KW+sDa/JD2PSVQ873m29yf+1Q9VDzfEYlHi1G5LKBBWZbtEsHbFwb1oYDwr1ZiF/2bnCSg1OBE/pfr9/bWx26UxJL3ONPISOLKUvQza0LZUxSKyjpdTGa/vDEr25rddbMM0Q3O6Lx3rqFvU+x6UrRKQY7tyrZecmD9FODy8uLizTmilwNj0kraNcAJhOp5aGVwsAGD5VmJBrWWbJSgWT9zrzWepQF47RaGSiKfeGx6Szi3gzmX/HHbihwBser4B9UJYpFBNX4R6vTn3VQnez0SymnrHQMsRYGTr1dSk34ljRqS/EMd2pLQ8YBp3a1PLfcqCpo8gtHkZFHKkTX6fs3MY0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==');
|
58
|
+
|
55
59
|
}
|
56
60
|
|
57
61
|
.modal-spinner {
|
58
62
|
display: none;
|
59
|
-
width: 64px;
|
60
|
-
height: 64px;
|
61
63
|
position: fixed;
|
62
64
|
top: 50%;
|
63
65
|
left: 50%;
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
66
|
+
transform: translateY(-50%) translateX(-50%);
|
67
|
+
padding: 12px 16px;
|
68
|
+
border-radius: 5px;
|
69
|
+
background-color: #111;
|
70
|
+
height: 20px;
|
71
|
+
}
|
72
|
+
|
73
|
+
.modal-spinner > div {
|
74
|
+
border-radius: 100px;
|
75
|
+
background-color: #fff;
|
76
|
+
height: 20px;
|
77
|
+
width: 2px;
|
78
|
+
margin: 0 1px;
|
79
|
+
display: inline-block;
|
80
|
+
|
81
|
+
-webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
|
82
|
+
animation: sk-stretchdelay 1.2s infinite ease-in-out;
|
83
|
+
}
|
84
|
+
|
85
|
+
.modal-spinner .rect2 {
|
86
|
+
-webkit-animation-delay: -1.1s;
|
87
|
+
animation-delay: -1.1s;
|
88
|
+
}
|
89
|
+
|
90
|
+
.modal-spinner .rect3 {
|
91
|
+
-webkit-animation-delay: -1.0s;
|
92
|
+
animation-delay: -1.0s;
|
93
|
+
}
|
94
|
+
|
95
|
+
.modal-spinner .rect4 {
|
96
|
+
-webkit-animation-delay: -0.9s;
|
97
|
+
animation-delay: -0.9s;
|
98
|
+
}
|
99
|
+
|
100
|
+
@-webkit-keyframes sk-stretchdelay {
|
101
|
+
0%, 40%, 100% { -webkit-transform: scaleY(0.5) }
|
102
|
+
20% { -webkit-transform: scaleY(1.0) }
|
103
|
+
}
|
104
|
+
|
105
|
+
@keyframes sk-stretchdelay {
|
106
|
+
0%, 40%, 100% {
|
107
|
+
transform: scaleY(0.5);
|
108
|
+
-webkit-transform: scaleY(0.5);
|
109
|
+
} 20% {
|
110
|
+
transform: scaleY(1.0);
|
111
|
+
-webkit-transform: scaleY(1.0);
|
112
|
+
}
|
72
113
|
}
|
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler", "
|
22
|
-
spec.add_development_dependency "rake", "
|
21
|
+
spec.add_development_dependency "bundler", ">= 2.2.10"
|
22
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
23
23
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-modal-rails-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RogerE
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.10
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.10
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
description: Provides the jQuery Modal assets for your Rails application.
|
42
42
|
email:
|
43
43
|
- roger@webfokus.no
|
@@ -74,8 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
|
-
|
78
|
-
rubygems_version: 2.6.4
|
77
|
+
rubygems_version: 3.2.16
|
79
78
|
signing_key:
|
80
79
|
specification_version: 4
|
81
80
|
summary: Use jQuery Modal with Rails Asset Pipeline
|