spurs 0.0.5.alpha.2 → 0.0.5.alpha.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1,2 @@
1
- //= require ./responsive-tables
1
+ //= require ./responsive-tables
2
+ //= require ./sticky-subnav
@@ -0,0 +1,24 @@
1
+ not ($) ->
2
+ $ ->
3
+ processScroll = ->
4
+ i = undefined
5
+ scrollTop = $win.scrollTop()
6
+ if scrollTop >= navTop and not isFixed
7
+ isFixed = 1
8
+ $nav.addClass "subnav-fixed"
9
+ else if scrollTop <= navTop and isFixed
10
+ isFixed = 0
11
+ $nav.removeClass "subnav-fixed"
12
+ $win = $(window)
13
+ $nav = $(".subnav")
14
+ navTop = $(".subnav").length and $(".subnav").offset().top - 40
15
+ isFixed = 0
16
+ processScroll()
17
+ $nav.on "click", ->
18
+ unless isFixed
19
+ setTimeout (->
20
+ $win.scrollTop $win.scrollTop() - 47
21
+ ), 10
22
+
23
+ $win.on "scroll", processScroll
24
+ (window.jQuery)
@@ -108,6 +108,9 @@ module Spurs
108
108
  if opts[:method] then
109
109
  a_opts[:method] = opts[:method]
110
110
  end
111
+ if opts[:target] then
112
+ a_opts[:target] = opts[:target]
113
+ end
111
114
  end
112
115
  if opts[:onclick]
113
116
  a_opts[:onclick] = opts[:onclick]
data/lib/spurs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spurs
2
- VERSION = "0.0.5.alpha.2"
2
+ VERSION = "0.0.5.alpha.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spurs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.alpha.2
4
+ version: 0.0.5.alpha.3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-17 00:00:00.000000000 Z
12
+ date: 2012-06-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -86,6 +86,7 @@ files:
86
86
  - app/assets/images/spurs/jquery_ui_theme/images/ui-icons_f6cf3b_256x240.png
87
87
  - app/assets/javascripts/spurs/beyond_bootstrap/all.js
88
88
  - app/assets/javascripts/spurs/beyond_bootstrap/responsive-tables.js
89
+ - app/assets/javascripts/spurs/beyond_bootstrap/sticky-subnav.js.coffee
89
90
  - app/assets/javascripts/spurs/beyond_bootstrap.js
90
91
  - app/assets/javascripts/spurs/flashes.js.coffee
91
92
  - app/assets/javascripts/spurs/flashes.js.erb
@@ -187,7 +188,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
187
188
  version: '0'
188
189
  segments:
189
190
  - 0
190
- hash: -1938495796542850974
191
+ hash: -3079610937684309672
191
192
  required_rubygems_version: !ruby/object:Gem::Requirement
192
193
  none: false
193
194
  requirements: