olay-rails 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA512:
3
- data.tar.gz: 5b642a78813dbad0b298734f7ee2d19e6ed7cb5590dc819d098f3dbd03834e92de05e999e5266e0a2a6c90ea68f9c18e5859b5cc21aadb46378a831118a62b85
4
- metadata.gz: c81b19768914cdcf0dfe1abb7ce806b37804b1f10c389bd59015d9a4602e49e8c631645f5fac30c377e2b452f4321944d7a009342c8735f46ddee5bad9489a1e
5
2
  SHA1:
6
- data.tar.gz: 7a8c03371b6f7a35e301f3db345170309781dc23
7
- metadata.gz: 854ad8f089a4b6757cf8ff9ed0efbd06aa99f477
3
+ metadata.gz: d865996f1310571f34aaaf0ef4b6fcd43890fbaf
4
+ data.tar.gz: 0d23f8982d580c25398fadb25d9c00f5e5f1087a
5
+ SHA512:
6
+ metadata.gz: 37a68accc0d3151a40d73000f5c2eb45ad155b70e725c560a972ed8ccaa3845c7da0299d23777e74b44a096b464244fb7af9f8dd0f41d0717ecbd24095090c64
7
+ data.tar.gz: 6cbb597fa03e856ddd592308218dd7e2758101c035882c9a7f95c5323549def287696f3db6bc456c3d9c27f1e8aed2acd1ba67f21d5844c8650a734afce430f6
@@ -1,6 +1,6 @@
1
1
  module Olay
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
3
3
  module Rails
4
- VERSION = '0.1.7'
4
+ VERSION = '0.1.8'
5
5
  end
6
6
  end
@@ -8,8 +8,8 @@
8
8
  var stopPropagation = function (ev) { ev.stopPropagation(); };
9
9
 
10
10
  // Selector for tabbable elements.
11
- var tabbable = 'a[href], area[href], :input, iframe, object, embed, ' +
12
- '*[tabindex], *[contenteditable]';
11
+ var tabbable =
12
+ ':input, [tabindex], [contenteditable], [href], iframe, object, embed';
13
13
 
14
14
  // Listen for keydown events.
15
15
  $(document).keydown(function (ev) {
@@ -148,10 +148,10 @@
148
148
  $olays.last() :
149
149
  $(active);
150
150
  $(tabbable).each(function () {
151
+ if ('olayTabindex' in this) return;
151
152
  var $t = $(this);
152
- if ('olayTabindex' in $t.data()) return;
153
- $t.data('olayTabindex', $t.attr('tabindex') || null)
154
- .attr('tabindex', -1);
153
+ this.olayTabindex = $t.attr('tabindex') || null;
154
+ $t.attr('tabindex', -1);
155
155
  });
156
156
  $body.addClass('js-olay-visible').append(this.$container);
157
157
  this.$content.attr('tabindex', 0).focus().removeAttr('tabindex');
@@ -165,9 +165,8 @@
165
165
  var $olays = $('.js-olay-container');
166
166
  ($olays.length ? $olays.last() : $('body').removeClass('js-olay-visible'))
167
167
  .find(tabbable).each(function () {
168
- var $t = $(this);
169
- $t.attr('tabindex', $t.data('olayTabindex'))
170
- .removeData('olayTabindex');
168
+ $(this).attr('tabindex', this.olayTabindex);
169
+ delete this.olayTabindex;
171
170
  });
172
171
  this.$el.trigger('hide');
173
172
  if (!this.preserve) this.destroy();
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.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Casey Foster
@@ -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.7 in the Rails asset pipeline.
25
+ description: Places Olay 0.1.8 in the Rails asset pipeline.
26
26
  email:
27
27
  - c@sey.me
28
28
  executables: []