olay-rails 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA512:
3
- metadata.gz: 9ee8d8fee7e8684f7862e2d3401733fc6dbe2b90ecbbad72f84ae29ef6c135a5db160ca605926a7a2e02c1c9a080dac2d892dccb1bb3de22037f10704729da49
4
- data.tar.gz: 7687fad113c3ec55ec1e4392d7d1bf3947166ba1d6c2aa262b87267837c6057de95c23550a3dc6cda236ffc743ee9c299d60f0975d9f25be947c136dc70198b6
3
+ metadata.gz: 264661718909d32e93b29d68712520ea6b0301495d465b2dcd4223fc6c8aa49e7c801f33c7ee9f41150c2bda763012d4f1cd213e783596bc21857f034cb5d272
4
+ data.tar.gz: 554a7ba228552a5f3283478f3e8c9b2f6209286c01384164ee15a266c90ea8d1157cf485e9123192e12fd15c2ae1a6432862b5f4b25ddf329b2cc95ec214e08d
5
5
  SHA1:
6
- metadata.gz: 0635f67b6674a15a2c0ab0e8b5355707c11d76f1
7
- data.tar.gz: 5fa92a4ac5911e1fe0418065d05928474310d608
6
+ metadata.gz: 3b5dea07f700ee7306bfcbcd9e7bd9c585cad7f6
7
+ data.tar.gz: 5967126d2f4c7db420c471e661c35104fcfdb59d
@@ -1,6 +1,6 @@
1
1
  module Olay
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  module Rails
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
6
6
  end
@@ -30,7 +30,7 @@
30
30
  //
31
31
  // ```js
32
32
  // var olay = new Olay('Howdy!', {duration: 5000});
33
- // ```js
33
+ // ```
34
34
  var Olay = window.Olay = function (el, options) {
35
35
 
36
36
  // Extend the instance with its options.
@@ -40,15 +40,14 @@
40
40
  // ensure event callbacks can be removed consistently.
41
41
  var self = this;
42
42
  this._hide = function () { return self.hide(); };
43
- var event;
44
43
  this._$containerClick = function (ev) {
45
- if (self.hideOnClick && event !== ev.originalEvent) self.hide();
44
+ var contentClicked = $.contains(self.$cell[0], ev.target);
45
+ if (self.hideOnClick && !contentClicked) self.hide();
46
46
  };
47
- this._$contentClick = function (ev) { event = ev.originalEvent; };
48
47
 
49
48
  // Create the necessary DOM nodes.
50
49
  this.$container = $('<div>')
51
- .addClass('js-olay-container ')
50
+ .addClass('js-olay-container')
52
51
  .addClass(this.transition)
53
52
  .append(
54
53
  this.$table = $('<div>')
@@ -109,7 +108,6 @@
109
108
 
110
109
  // Delegate events, ensuring no double-binding.
111
110
  delegate(this.$container, 'click', this._$containerClick);
112
- delegate(this.$content, 'click', this._$contentClick);
113
111
  delegate(this.$content, 'click', '.js-olay-hide', this._hide);
114
112
 
115
113
  this.$el.trigger('olay:show');
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Casey Foster
@@ -10,19 +10,19 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-03-16 00:00:00 Z
13
+ date: 2013-04-12 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- prerelease: false
17
- name: rails
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ version_requirements: &id001 !ruby/object:Gem::Requirement
19
17
  requirements:
20
18
  - - ">="
21
19
  - !ruby/object:Gem::Version
22
20
  version: "3.1"
21
+ prerelease: false
22
+ name: rails
23
+ requirement: *id001
23
24
  type: :runtime
24
- version_requirements: *id001
25
- description: Places Olay 0.2.0 in the Rails asset pipeline.
25
+ description: Places Olay 0.2.1 in the Rails asset pipeline.
26
26
  email:
27
27
  - c@sey.me
28
28
  executables: []