Class: ODDB::View::Ajax::DDDPrice

Inherits:
HtmlGrid::DivComposite
  • Object
show all
Defined in:
src/view/ajax/ddd_price.rb

Constant Summary

COMPONENTS =
{
  [0,0] => DDDPriceTable,
}

Instance Method Summary (collapse)

Instance Method Details

- (Object) ddd_chart(model)



96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'src/view/ajax/ddd_price.rb', line 96

def ddd_chart(model)
  link = HtmlGrid::Link.new(:ddd_chart, model, @session, self)
  img = HtmlGrid::Image.new(:ddd_chart, model, @session, self)
  args = [
    :for, "#{model.ikskey}_#{model.name_base.gsub(/\s+/, '_')}.png"
  ]
  link.href = @lookandfeel._event_url(:ddd_chart, args)
  args.unshift :factor, '0.8'
  img.set_attribute('src', @lookandfeel._event_url(:ddd_chart, args))
  link.set_attribute('title', @lookandfeel.lookup(:ddd_chart_link_title))
  link.value = img
  link
end

- (Object) init



89
90
91
92
93
94
95
# File 'src/view/ajax/ddd_price.rb', line 89

def init
  if @lookandfeel.enabled?(:ddd_chart)
    components.store [0,1], :ddd_chart
    css_map.store 1, 'big'
  end
  super
end