vertebra 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/vertebra.coffee +7 -2
- data/lib/vertebra/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aee5b797d2e144c38249699d73cac501a73861ad
|
4
|
+
data.tar.gz: 2c21ed65b76242c82d32e3d28c700692e867b920
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21a54bd20537667b1a70ada63d1931011261aa740aba0bc10255bb587bb72a4aac70cf84887c99faa4c9245f51951908290f8e2bf0090c7e26af68b6c82536b9
|
7
|
+
data.tar.gz: d3424595ead0de486f4cac96edb8b256f56f8419185c03b2eb4289d1d88125b2741f8e611e4b31d326f077c6d9cafe4883e4c7342b4f7e3db582469542842329
|
@@ -15,6 +15,9 @@ delegateEventSplitter = /^(\S+)\s*(.*)$/
|
|
15
15
|
@trim = (str) ->
|
16
16
|
str.replace(/^\s+|\s+$/g, '')
|
17
17
|
|
18
|
+
@isFunction = (obj) ->
|
19
|
+
!!(obj and obj.constructor and obj.call and obj.apply)
|
20
|
+
|
18
21
|
_now = Date.now || -> new Date().getTime()
|
19
22
|
|
20
23
|
# Throttle function borrowed from underscore.js
|
@@ -72,10 +75,12 @@ class Vertebra.View
|
|
72
75
|
@delegateEvents()
|
73
76
|
|
74
77
|
delegateEvents: ->
|
75
|
-
return unless @events
|
76
78
|
@_undelegateEvents()
|
79
|
+
return unless @events
|
80
|
+
|
81
|
+
events = if isFunction(@events) then @events() else @events
|
77
82
|
|
78
|
-
for key, method of
|
83
|
+
for key, method of events
|
79
84
|
method = @[method]
|
80
85
|
continue unless method
|
81
86
|
match = key.match(delegateEventSplitter)
|
data/lib/vertebra/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vertebra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vala
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|