Class: JSComponents::JSMenu

Inherits:
SWS::Component show all
Defined in:
lib/sws/JSComponents/components/JSMenu/JSMenu.rb

Instance Attribute Summary collapse

Attributes inherited from SWS::Component

#action_components, #definition_component, #encoding, #html_attrs, #method_to_call, #name, #parameters, #parent, #request, #request_number, #slots, #subcomponents, #tokens

Instance Method Summary collapse

Methods inherited from SWS::Component

#api_filename, #app, #append_to_response, #awake, #container?, #content?, create, #create_component_tree, #definition_filename, #initialize, #page, #perform_action, #process_bindings, #process_parameters, #process_request, #remove_subcomponents, #session, #set_request_subcomponents, #sleep, #slot_bound?, #subcomponent_for_name, synchronize_slot, #synchronize_slot?, #synchronize_slots, #template_filename, #tokenize_binding, #update_binding, #url_string

Constructor Details

This class inherits a constructor from SWS::Component

Instance Attribute Details

#action_cursorObject

Returns the value of attribute action_cursor.



10
11
12
# File 'lib/sws/JSComponents/components/JSMenu/JSMenu.rb', line 10

def action_cursor
  @action_cursor
end

#actionsObject (readonly)

Returns the value of attribute actions.



8
9
10
# File 'lib/sws/JSComponents/components/JSMenu/JSMenu.rb', line 8

def actions
  @actions
end

Returns the value of attribute menu_class.



8
9
10
# File 'lib/sws/JSComponents/components/JSMenu/JSMenu.rb', line 8

def menu_class
  @menu_class
end

Instance Method Details

#action_for_cursorObject



12
13
14
# File 'lib/sws/JSComponents/components/JSMenu/JSMenu.rb', line 12

def action_for_cursor
  return action_cursor["action"].call()
end


28
29
30
# File 'lib/sws/JSComponents/components/JSMenu/JSMenu.rb', line 28

def menu_div_id
  return "menu#{menu_id()}"
end


24
25
26
# File 'lib/sws/JSComponents/components/JSMenu/JSMenu.rb', line 24

def menu_id
  return self.object_id.abs     
end


20
21
22
# File 'lib/sws/JSComponents/components/JSMenu/JSMenu.rb', line 20

def menu_link_js_events
  return "onMouseDown=\"doPopupMenu#{menu_id()}(event);\" onMouseUp=\"toggleCloseMenu#{menu_id()}();\""
end

#name_for_cursorObject



16
17
18
# File 'lib/sws/JSComponents/components/JSMenu/JSMenu.rb', line 16

def name_for_cursor
  return action_cursor["name"]
end