Class: HtmlGrid::CenteredComposite
- Inherits:
-
Composite
- Object
- Component
- AbstractComposite
- Composite
- HtmlGrid::CenteredComposite
- Defined in:
- lib/htmlgrid/centeredcomposite.rb
Constant Summary collapse
- TABLE_ATTRIBUTES =
{ "style" => "margin-left:auto;margin-right:auto;text-align:left" }
- DIV_ATTRIBUTES =
{ "style" => "text-align:center;margin-left:auto;margin-right:auto;text-align:left" }
Constants inherited from Composite
HtmlGrid::Composite::COLSPAN_MAP, HtmlGrid::Composite::COMPONENT_CSS_MAP, HtmlGrid::Composite::CSS_MAP, HtmlGrid::Composite::DEFAULT_CLASS, HtmlGrid::Composite::VERTICAL
Constants inherited from AbstractComposite
AbstractComposite::CSS_CLASS, AbstractComposite::CSS_ID, AbstractComposite::CSS_ID_MAP, AbstractComposite::CSS_MAP, AbstractComposite::CSS_STYLE_MAP, AbstractComposite::DEFAULT_CLASS, AbstractComposite::LABELS, AbstractComposite::LEGACY_INTERFACE, AbstractComposite::LOOKANDFEEL_MAP, AbstractComposite::SYMBOL_MAP
Constants inherited from Component
HtmlGrid::Component::CSS_CLASS, HtmlGrid::Component::CSS_ID, HtmlGrid::Component::HTML_ATTRIBUTES, HtmlGrid::Component::HTTP_HEADERS, HtmlGrid::Component::LABEL
Instance Attribute Summary
Attributes inherited from Component
#attributes, #dojo_tooltip, #label, #model, #value
Instance Method Summary collapse
Methods inherited from Composite
#compose, #compose_colspan, #event, #full_colspan, #insert_row
Methods inherited from AbstractComposite
Methods inherited from Component
#_to_html, #autofill?, #css_class, #css_class=, #css_id, #css_id=, #dojo_dynamic_html, #dojo_parse_on_load, #dojo_tag, #dojo_title=, #dynamic_html, #escape, #escape_symbols, #formname, #http_headers, #initialize, #label?, #onclick=, #onload=, #onsubmit=, #set_attribute, #tabindex=
Constructor Details
This class inherits a constructor from HtmlGrid::Component
Instance Method Details
#init ⇒ Object
43 44 45 46 |
# File 'lib/htmlgrid/centeredcomposite.rb', line 43 def init super @attributes.update(self.class::TABLE_ATTRIBUTES) end |
#to_html(context) ⇒ Object
37 38 39 40 41 |
# File 'lib/htmlgrid/centeredcomposite.rb', line 37 def to_html(context) context.div(self.class::DIV_ATTRIBUTES) { super } end |