Class: HtmlGrid::PopupLink
- Inherits:
-
Link
- Object
- Component
- NamedComponent
- Link
- HtmlGrid::PopupLink
- Defined in:
- lib/htmlgrid/popuplink.rb
Constant Summary collapse
- @@name_ptrn =
/[^a-z]+/i
Constants inherited from Component
Component::CSS_CLASS, Component::CSS_ID, Component::HTML_ATTRIBUTES, Component::HTTP_HEADERS, Component::LABEL
Instance Attribute Summary collapse
-
#height ⇒ Object
writeonly
Sets the attribute height.
-
#locationbar ⇒ Object
writeonly
Sets the attribute locationbar.
-
#menubar ⇒ Object
writeonly
Sets the attribute menubar.
-
#resizable ⇒ Object
writeonly
Sets the attribute resizable.
-
#scrollbars ⇒ Object
writeonly
Sets the attribute scrollbars.
-
#toolbar ⇒ Object
writeonly
Sets the attribute toolbar.
-
#width ⇒ Object
writeonly
Sets the attribute width.
Attributes inherited from NamedComponent
Attributes inherited from Component
#attributes, #dojo_tooltip, #model, #value
Instance Method Summary collapse
Methods inherited from Link
Methods inherited from NamedComponent
#data_origin, #error?, #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=
Constructor Details
This class inherits a constructor from HtmlGrid::NamedComponent
Instance Attribute Details
#height=(value) ⇒ Object (writeonly)
Sets the attribute height
31 32 33 |
# File 'lib/htmlgrid/popuplink.rb', line 31 def height=(value) @height = value end |
#locationbar=(value) ⇒ Object (writeonly)
Sets the attribute locationbar
32 33 34 |
# File 'lib/htmlgrid/popuplink.rb', line 32 def (value) @locationbar = value end |
#menubar=(value) ⇒ Object (writeonly)
Sets the attribute menubar
32 33 34 |
# File 'lib/htmlgrid/popuplink.rb', line 32 def (value) @menubar = value end |
#resizable=(value) ⇒ Object (writeonly)
Sets the attribute resizable
32 33 34 |
# File 'lib/htmlgrid/popuplink.rb', line 32 def resizable=(value) @resizable = value end |
#scrollbars=(value) ⇒ Object (writeonly)
Sets the attribute scrollbars
32 33 34 |
# File 'lib/htmlgrid/popuplink.rb', line 32 def (value) @scrollbars = value end |
#toolbar=(value) ⇒ Object (writeonly)
Sets the attribute toolbar
32 33 34 |
# File 'lib/htmlgrid/popuplink.rb', line 32 def (value) @toolbar = value end |
#width=(value) ⇒ Object (writeonly)
Sets the attribute width
31 32 33 |
# File 'lib/htmlgrid/popuplink.rb', line 31 def width=(value) @width = value end |
Instance Method Details
#init ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/htmlgrid/popuplink.rb', line 33 def init super @scrollbars = true @resizable = true @toolbar = true @menubar = false @locationbar = false @width = 750 @height = 460 end |
#to_html(context) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/htmlgrid/popuplink.rb', line 44 def to_html(context) props = { 'scrollbars' => yesorno(@scrollbars), 'resizable' => yesorno(@resizable), 'toolbar' => yesorno(@toolbar), 'menubar' => yesorno(@menubar), 'locationbar' => yesorno(@locationbar), 'width' => @width, 'height' => @height, }.collect { |key, val| [key,val].join('=') }.join(',') name = @lookandfeel.lookup(@name).to_s.gsub(@@name_ptrn, '') script = "window.open('#{href}', '#{name}', '#{props}').focus(); return false" @attributes.store('onClick', script) super end |