tabit 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tabit/config.rb +2 -0
- data/lib/tabit/item.rb +10 -3
- data/lib/tabit/version.rb +2 -2
- data/tabit.gemspec +1 -1
- metadata +2 -2
data/lib/tabit/config.rb
CHANGED
@@ -3,6 +3,7 @@ module Tabit
|
|
3
3
|
class Config
|
4
4
|
attr_accessor :builder_class
|
5
5
|
|
6
|
+
attr_accessor :active_scope
|
6
7
|
attr_accessor :active_detect
|
7
8
|
attr_accessor :active_class
|
8
9
|
attr_accessor :heading_class
|
@@ -11,6 +12,7 @@ module Tabit
|
|
11
12
|
def initialize(&block)
|
12
13
|
@builder_class = Tabit::Builder
|
13
14
|
|
15
|
+
@active_scope = :outer
|
14
16
|
@active_detect = :exclusive
|
15
17
|
@active_class = 'active'
|
16
18
|
@heading_class = 'nav-header'
|
data/lib/tabit/item.rb
CHANGED
@@ -61,9 +61,16 @@ module Tabit
|
|
61
61
|
''
|
62
62
|
end
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
64
|
+
case configuration.active_scope
|
65
|
+
when :outer
|
66
|
+
options[:outer][:class] = '' if @options[:outer][:class].nil?
|
67
|
+
options[:outer][:class] << " #{clazz}"
|
68
|
+
options[:outer][:class].strip!
|
69
|
+
when :inner
|
70
|
+
options[:inner][:class] = '' if @options[:inner][:class].nil?
|
71
|
+
options[:inner][:class] << " #{clazz}"
|
72
|
+
options[:inner][:class].strip!
|
73
|
+
end
|
67
74
|
|
68
75
|
case @type
|
69
76
|
when :dropdown
|
data/lib/tabit/version.rb
CHANGED
data/tabit.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tabit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -147,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
segments:
|
149
149
|
- 0
|
150
|
-
hash:
|
150
|
+
hash: 1497893305618295686
|
151
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
152
|
none: false
|
153
153
|
requirements:
|