olay-rails 0.1.5 → 0.1.6
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/lib/olay/rails/version.rb +2 -2
- data/vendor/assets/javascripts/olay.js +11 -14
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA512:
|
|
3
|
-
data.tar.gz:
|
|
4
|
-
metadata.gz:
|
|
3
|
+
data.tar.gz: d922b625d2399db9fd9bc1b07fe3961000174b0baf3e59a7b45a1c75970a9e67be5a79054f086c6383d2225b67276933e54c37173d582a16c7a35c19a95b135a
|
|
4
|
+
metadata.gz: 67f7e9b7f7cef9e074b5c1c89e256874cb642a8fc01d85a1e936a40e9a749b3a8313c26acfcbea55ad30bbd66ecdbd665405065f531ab3cbdf00e541470ec9c4
|
|
5
5
|
SHA1:
|
|
6
|
-
data.tar.gz:
|
|
7
|
-
metadata.gz:
|
|
6
|
+
data.tar.gz: 9e1869334061f37dcd966ecb4dd2bec62f1273f7
|
|
7
|
+
metadata.gz: e0f758ec192a8b16e759de4a89a230264fcc4626
|
data/lib/olay/rails/version.rb
CHANGED
|
@@ -9,10 +9,18 @@
|
|
|
9
9
|
var $olay = $('.js-olay-container').last();
|
|
10
10
|
var olay = $olay.data('olay');
|
|
11
11
|
if (!olay) return;
|
|
12
|
-
var
|
|
12
|
+
var which = ev.which;
|
|
13
13
|
var keys = olay.hideOnKeys || [];
|
|
14
14
|
for (var i = 0, l = keys.length; i < l; ++i) {
|
|
15
|
-
if (
|
|
15
|
+
if (which === keys[i]) return olay.hide() && false;
|
|
16
|
+
}
|
|
17
|
+
if (which === 9) {
|
|
18
|
+
setTimeout(function () {
|
|
19
|
+
if (!$olay.find(':focus').length) {
|
|
20
|
+
$(':focus').blur();
|
|
21
|
+
$olay.find(':input').first().focus();
|
|
22
|
+
}
|
|
23
|
+
}, 0);
|
|
16
24
|
}
|
|
17
25
|
});
|
|
18
26
|
|
|
@@ -143,12 +151,6 @@
|
|
|
143
151
|
$olays.length && active === $body[0] ?
|
|
144
152
|
$olays.last() :
|
|
145
153
|
$(active);
|
|
146
|
-
$(':input').each(function () {
|
|
147
|
-
var $t = $(this);
|
|
148
|
-
if ('olayTabindex' in $t.data()) return;
|
|
149
|
-
$t.data('olayTabindex', $t.attr('tabindex') || null)
|
|
150
|
-
.attr('tabindex', -1);
|
|
151
|
-
});
|
|
152
154
|
$body.addClass('js-olay-visible').append(this.$container);
|
|
153
155
|
this.$content.attr('tabindex', 0).focus().removeAttr('tabindex');
|
|
154
156
|
return this;
|
|
@@ -159,12 +161,7 @@
|
|
|
159
161
|
this.$container.detach();
|
|
160
162
|
this._$active.attr('tabindex', 0).focus().removeAttr('tabindex');
|
|
161
163
|
var $olays = $('.js-olay-container');
|
|
162
|
-
(
|
|
163
|
-
.find(':input').each(function () {
|
|
164
|
-
var $t = $(this);
|
|
165
|
-
$t.attr('tabindex', $t.data('olayTabindex'))
|
|
166
|
-
.removeData('olayTabindex');
|
|
167
|
-
});
|
|
164
|
+
if (!$olays.length) $('body').removeClass('js-olay-visible');
|
|
168
165
|
this.$el.trigger('hide');
|
|
169
166
|
if (!this.preserve) this.destroy();
|
|
170
167
|
return this;
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: olay-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Casey Foster
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2013-03-
|
|
13
|
+
date: 2013-03-08 00:00:00 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
prerelease: false
|
|
@@ -22,7 +22,7 @@ dependencies:
|
|
|
22
22
|
version: "3.1"
|
|
23
23
|
type: :runtime
|
|
24
24
|
version_requirements: *id001
|
|
25
|
-
description: Places Olay 0.1.
|
|
25
|
+
description: Places Olay 0.1.6 in the Rails asset pipeline.
|
|
26
26
|
email:
|
|
27
27
|
- c@sey.me
|
|
28
28
|
executables: []
|