Class: BBMB::Html::View::CurrentPriorities
- Inherits:
-
HtmlGrid::Composite
- Object
- HtmlGrid::Composite
- BBMB::Html::View::CurrentPriorities
- Defined in:
- lib/bbmb/html/view/current_order.rb
Constant Summary collapse
- COMPONENTS =
{ [0,0] => :priority, [0,1,0] => :priority_0, [0,1,1] => 'priority_0', [0,2,0] => :priority_1, [0,2,1] => 'priority_1', [1,2] => 'priority_explain_1', [0,3,0] => :priority_13, [0,3,1] => 'priority_13', [1,3] => 'priority_explain_13', [0,4,0] => :priority_16, [0,4,1] => 'priority_16', [1,4] => 'priority_explain_16', [0,5,0] => :priority_21, [0,5,1] => 'priority_21', [1,5] => 'priority_explain_21', [0,6,0] => :priority_40, [0,6,1] => 'priority_40', [1,6] => 'priority_explain_40', [0,7,0] => :priority_41, [0,7,1] => 'priority_41', [1,7] => 'priority_explain_41', }
- SYMBOL_MAP =
{ :priority => HtmlGrid::LabelText, }
Constants inherited from HtmlGrid::Composite
HtmlGrid::Composite::LEGACY_INTERFACE
Instance Method Summary collapse
- #priority_0(model) ⇒ Object
- #priority_1(model) ⇒ Object
- #priority_13(model) ⇒ Object
- #priority_16(model) ⇒ Object
- #priority_21(model) ⇒ Object
- #priority_40(model) ⇒ Object
- #priority_41(model) ⇒ Object
- #priority_input(model, num) ⇒ Object
Instance Method Details
#priority_0(model) ⇒ Object
177 178 179 |
# File 'lib/bbmb/html/view/current_order.rb', line 177 def priority_0(model) priority_input(model, '') end |
#priority_1(model) ⇒ Object
180 181 182 |
# File 'lib/bbmb/html/view/current_order.rb', line 180 def priority_1(model) priority_input(model, 1) end |
#priority_13(model) ⇒ Object
183 184 185 |
# File 'lib/bbmb/html/view/current_order.rb', line 183 def priority_13(model) priority_input(model, 13) end |
#priority_16(model) ⇒ Object
186 187 188 |
# File 'lib/bbmb/html/view/current_order.rb', line 186 def priority_16(model) priority_input(model, 16) end |
#priority_21(model) ⇒ Object
189 190 191 |
# File 'lib/bbmb/html/view/current_order.rb', line 189 def priority_21(model) priority_input(model, 21) end |
#priority_40(model) ⇒ Object
192 193 194 |
# File 'lib/bbmb/html/view/current_order.rb', line 192 def priority_40(model) priority_input(model, 40) end |
#priority_41(model) ⇒ Object
195 196 197 |
# File 'lib/bbmb/html/view/current_order.rb', line 195 def priority_41(model) priority_input(model, 41) end |
#priority_input(model, num) ⇒ Object
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/bbmb/html/view/current_order.rb', line 162 def priority_input(model, num) radio = HtmlGrid::InputRadio.new(:priority, model, @session, self) num = num.to_i radio.value = num radio.label = false test = model.priority || @session.user_input(:priority) if(test == num) radio.set_attribute('checked', true) end url = @lookandfeel._event_url(:ajax) script = "update_order('#{url}', this.form)" radio.set_attribute('onclick', script) radio end |