youthtree-js 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/coffeescripts/youth_tree/gallery.coffee +6 -3
- data/lib/youthtree-js.rb +1 -1
- data/youthtree-js.gemspec +1 -1
- metadata +3 -3
@@ -6,17 +6,20 @@ YouthTree.withNS 'Gallery', (ns) ->
|
|
6
6
|
@selector: selector
|
7
7
|
@items: $ @selector
|
8
8
|
@urls: @items.map(-> @href).toArray()
|
9
|
+
@bindEvents()
|
9
10
|
|
10
11
|
bindEvents: ->
|
11
|
-
@
|
12
|
-
|
12
|
+
self: @
|
13
|
+
@items.click (e) ->
|
14
|
+
e.preventDefault()
|
15
|
+
self.showFor @
|
13
16
|
false
|
14
17
|
|
15
18
|
showFor: (element) ->
|
16
19
|
href: element.href
|
17
20
|
index: @urls.indexOf href
|
18
21
|
if index >= 0
|
19
|
-
showImages @urls.slice(index).concat(@urls.slice(0, index))
|
22
|
+
@showImages @urls.slice(index).concat(@urls.slice(0, index))
|
20
23
|
|
21
24
|
showImages: (images) ->
|
22
25
|
$.facybox {images: images}
|
data/lib/youthtree-js.rb
CHANGED
data/youthtree-js.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: youthtree-js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Darcy Laycock
|