Class: HtmlGrid::JavaScript
- Defined in:
- lib/htmlgrid/javascript.rb
Constant Summary
Constants inherited from Component
Component::CSS_CLASS, Component::CSS_ID, Component::HTML_ATTRIBUTES, Component::HTTP_HEADERS, Component::LABEL
Instance Attribute Summary
Attributes inherited from Component
#attributes, #dojo_tooltip, #model, #value
Instance Method Summary collapse
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=, #label?, #onclick=, #onload=, #onsubmit=, #set_attribute, #tabindex=
Constructor Details
This class inherits a constructor from HtmlGrid::Component
Instance Method Details
#init ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/htmlgrid/javascript.rb', line 9 def init super @attributes = { 'type' => 'text/javascript', 'language'=> 'JavaScript', } end |
#to_html(context) ⇒ Object
16 17 18 19 20 |
# File 'lib/htmlgrid/javascript.rb', line 16 def to_html(context) context.script(@attributes) { @value.to_s } end |