Class: BBMB::Html::View::CurrentAdditionalInformation

Inherits:
HtmlGrid::Composite show all
Defined in:
lib/bbmb/html/view/current_order.rb

Constant Summary collapse

COMPONENTS =
{
  [0,0]  =>  :reference,
  [0,2]  =>  :comment,
}
LABELS =
true
VERTICAL =
true

Constants inherited from HtmlGrid::Composite

HtmlGrid::Composite::LEGACY_INTERFACE

Instance Method Summary collapse

Instance Method Details

#_input_value(key, model) ⇒ Object



127
128
129
130
131
132
133
# File 'lib/bbmb/html/view/current_order.rb', line 127

def _input_value(key, model)
  input = HtmlGrid::InputText.new(key, model, @session, self)
  url = @lookandfeel._event_url(:ajax)
  input.set_attribute('onchange', "update_order('#{url}', this.form)")
  input.set_attribute('id', key)
  input
end

#comment(model) ⇒ Object



113
114
115
116
117
118
119
120
121
122
123
# File 'lib/bbmb/html/view/current_order.rb', line 113

def comment(model)
  input = HtmlGrid::Textarea.new(:comment, model, @session, self)
  input.set_attribute('onKeyUp', 
    'if(this.value.length > 60) this.value=this.value.substring(0,60);')
  input.value = model.comment
  input.label = true
  url = @lookandfeel._event_url(:ajax)
  input.set_attribute('onchange', "update_order('#{url}', this.form)")
  input.set_attribute('id', :comment)
  input
end

#reference(model) ⇒ Object



124
125
126
# File 'lib/bbmb/html/view/current_order.rb', line 124

def reference(model)
  _input_value(:reference, model)
end