Class: HtmlGrid::HttpLink
- Defined in:
- lib/htmlgrid/urllink.rb
Constant Summary collapse
- LABEL =
true
- @@http_ptrn =
/^http:/
Constants inherited from Component
Component::CSS_CLASS, Component::CSS_ID, Component::HTML_ATTRIBUTES, Component::HTTP_HEADERS
Instance Attribute Summary
Attributes inherited from NamedComponent
Attributes inherited from Component
#attributes, #dojo_tooltip, #model, #value
Instance Method Summary collapse
Methods inherited from UrlLink
Methods inherited from Link
#href, #href=, #init, #target=, #to_html
Methods inherited from NamedComponent
#data_origin, #error?, #init, #initialize
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=, #to_html
Constructor Details
This class inherits a constructor from HtmlGrid::NamedComponent
Instance Method Details
#compose_link ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/htmlgrid/urllink.rb', line 42 def compose_link unless @value.nil? if @@http_ptrn.match(@value) self.href = @value else self.href = "http://" + @value end set_attribute('target', '_blank') end end |