Class: BBMB::Html::View::ClearOrder

Inherits:
HtmlGrid::SpanComposite
  • Object
show all
Includes:
HtmlGrid::FormMethods
Defined in:
lib/bbmb/html/view/current_order.rb

Direct Known Subclasses

ClearFavorites

Constant Summary collapse

FORM_ID =
'clear'
EVENT =
:clear_order
COMPONENTS =
{
  [0,0] => :clear,
}

Instance Method Summary collapse

Instance Method Details

#clear(model) ⇒ Object



98
99
100
101
102
103
104
# File 'lib/bbmb/html/view/current_order.rb', line 98

def clear(model)
  button = HtmlGrid::Button.new(event, model, @session, self)
  condition = "if(confirm('#{@lookandfeel.lookup(event.to_s << "_confirm")}'))"
  condition << "this.form.submit();"
  button.set_attribute('onclick', condition)
  button
end