Module: ControllerActionHUD::Widget

Defined in:
lib/controller_action_hud/widget.rb

Defined Under Namespace

Modules: Helper

Class Method Summary collapse

Class Method Details

.cssObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/controller_action_hud/widget.rb', line 5

def css
  "  <style type=\"text/css\">\n    div#controller_action_hud {\n      position: fixed;\n      bottom: 0;\n      right: 0;\n      background-color: black;\n      color: white;\n      z-index: 999;\n      padding: 4px 6px;\n      font: normal bold 12px/12px Arial, sans-serif;\n      cursor: pointer;\n    }\n  </style>\n  EOF\nend\n"

.html(controller_name, action_name) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/controller_action_hud/widget.rb', line 23

def html(controller_name, action_name)
  "  <div id=\"controller_action_hud\" onclick=\"this.parentNode.removeChild(this);\">\n    \#{controller_name}#\#{action_name}\n  </div>\n  EOF\nend\n"