olay-rails 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/olay/rails/version.rb +2 -2
- data/vendor/assets/javascripts/olay.js +4 -6
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA512:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 264661718909d32e93b29d68712520ea6b0301495d465b2dcd4223fc6c8aa49e7c801f33c7ee9f41150c2bda763012d4f1cd213e783596bc21857f034cb5d272
|
4
|
+
data.tar.gz: 554a7ba228552a5f3283478f3e8c9b2f6209286c01384164ee15a266c90ea8d1157cf485e9123192e12fd15c2ae1a6432862b5f4b25ddf329b2cc95ec214e08d
|
5
5
|
SHA1:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b5dea07f700ee7306bfcbcd9e7bd9c585cad7f6
|
7
|
+
data.tar.gz: 5967126d2f4c7db420c471e661c35104fcfdb59d
|
data/lib/olay/rails/version.rb
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
//
|
31
31
|
// ```js
|
32
32
|
// var olay = new Olay('Howdy!', {duration: 5000});
|
33
|
-
// ```
|
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
|
-
|
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.
|
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-
|
13
|
+
date: 2013-04-12 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
|
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
|
-
|
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: []
|