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.
@@ -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
- @items.click ->
12
- showFor @
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
@@ -1,5 +1,5 @@
1
1
  class YouthTreeJS
2
- VERSION = "0.1.0".freeze
2
+ VERSION = "0.1.1".freeze
3
3
 
4
4
  def self.register_framework!
5
5
  Barista::Framework.register 'youthtree', File.expand_path('../coffeescripts', File.dirname(__FILE__))
data/youthtree-js.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{youthtree-js}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Darcy Laycock"]
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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Darcy Laycock