Module: Card::Set::Abstract::Filterable::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
card/tmpsets/set/mod035-card-mod-search/abstract/filterable.rb,
card/tmpsets/set/mod036-card-mod-search/abstract/filterable.rb

Instance Method Summary collapse

Instance Method Details

#filterable(filter_hash = {}, html_opts = {}) ⇒ Object



9
10
11
12
13
14
# File 'card/tmpsets/set/mod035-card-mod-search/abstract/filterable.rb', line 9

def filterable filter_hash={}, html_opts={}
  add_class html_opts, "_filterable _noFilterUrlUpdates"
  html_opts[:data] ||= {}
  html_opts[:data][:filter] = filter_hash
  wrap_with :div, yield, html_opts
end

#filtering(selector = nil) ⇒ Object



16
17
18
19
# File 'card/tmpsets/set/mod035-card-mod-search/abstract/filterable.rb', line 16

def filtering selector=nil
  selector ||= "._filter-widget:visible"
  wrap_with :div, yield, class: "_filtering", "data-filter-selector": selector
end