2012-02-05 23:54:09 +00:00
|
|
|
module Locomotive
|
|
|
|
class SubMenuCell < MenuCell
|
2011-10-18 16:45:45 +00:00
|
|
|
|
2012-02-05 23:54:09 +00:00
|
|
|
protected
|
2011-10-18 16:45:45 +00:00
|
|
|
|
2012-02-05 23:54:09 +00:00
|
|
|
def build_item(name, attributes)
|
|
|
|
item = super
|
2012-02-07 14:20:38 +00:00
|
|
|
enhanced_class = "#{'on' if name.to_s == sections(:sub).to_s} #{item[:class]}"
|
2012-02-05 23:54:09 +00:00
|
|
|
item.merge(:class => enhanced_class)
|
|
|
|
end
|
2011-10-18 16:45:45 +00:00
|
|
|
|
2012-02-05 23:54:09 +00:00
|
|
|
end
|
|
|
|
end
|