Class: UiHelpers::DialogOver

Inherits:
Element
  • Object
show all
Defined in:
lib/ui_helpers/elements/dialog_cover.rb

Instance Attribute Summary collapse

Attributes inherited from Element

#html_options

Instance Method Summary collapse

Methods inherited from Element

#capture, #classes, #classes=, #initialize, #style=, #tag, #with_html_options

Constructor Details

This class inherits a constructor from UiHelpers::Element

Instance Attribute Details

#baseObject

Returns the value of attribute base.



4
5
6
# File 'lib/ui_helpers/elements/dialog_cover.rb', line 4

def base
  @base
end

#heightObject

Returns the value of attribute height.



4
5
6
# File 'lib/ui_helpers/elements/dialog_cover.rb', line 4

def height
  @height
end

#leftObject

Returns the value of attribute left.



4
5
6
# File 'lib/ui_helpers/elements/dialog_cover.rb', line 4

def left
  @left
end

#textObject

Returns the value of attribute text.



4
5
6
# File 'lib/ui_helpers/elements/dialog_cover.rb', line 4

def text
  @text
end

#topObject

Returns the value of attribute top.



4
5
6
# File 'lib/ui_helpers/elements/dialog_cover.rb', line 4

def top
  @top
end

#widthObject

Returns the value of attribute width.



4
5
6
# File 'lib/ui_helpers/elements/dialog_cover.rb', line 4

def width
  @width
end

Instance Method Details

#html(tag_name, &block) ⇒ Object



23
24
25
26
27
28
29
30
31
32
# File 'lib/ui_helpers/elements/dialog_cover.rb', line 23

def html(tag_name, &block)
  tag(tag_name) do |buffer|
    buffer << base
    buffer << Overlay.new(@template).tag(:div)
    buffer << Shadow.new(@template, shadow_options).tag(:div)
    buffer << WidgetContent.new(@template, widget_content_options).tag(:div) do |widget_content|
      widget_content << DialogContent.new(@template).tag(:div, text)
    end
  end
end

#shadow_optionsObject



15
16
17
# File 'lib/ui_helpers/elements/dialog_cover.rb', line 15

def shadow_options
  {:state => false, :width => width+22, :height => height+22, :top => top, :left => left}
end

#widget_content_optionsObject



19
20
21
# File 'lib/ui_helpers/elements/dialog_cover.rb', line 19

def widget_content_options
  {:state => false, :width => width, :height => height, :top => top, :left => left}
end