Class: Lapillus::Droppable
- Inherits:
-
UniqueIdentifier
- Object
- RenderableComponent
- Component
- Behaviour
- AttributeModifier
- UniqueIdentifier
- Lapillus::Droppable
- Defined in:
- lib/lapillus/behaviours.rb
Instance Attribute Summary
Attributes inherited from Component
#behaviours, #identifier, #model, #property, #visible
Instance Method Summary collapse
Methods inherited from UniqueIdentifier
Methods inherited from Behaviour
Methods inherited from Component
#add_behaviour, #behaviour, #has_behaviour?, #has_model?, #has_parent?, #initialize, #parent, #path, #response_page=, #session, #value, #webpage
Methods inherited from RenderableComponent
#initialize, #on_render, #render_behaviours, #render_children, #render_component, #render_container, #visible?
Constructor Details
This class inherits a constructor from Lapillus::UniqueIdentifier
Instance Method Details
#render_to_element(element) ⇒ Object
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/lapillus/behaviours.rb', line 205 def render_to_element(element) javascript = " Droppables.add('\#{parent.path}', {\n onDrop: function(element) { \n new Ajax.Updater('\#{parent.path}', '', { \n method:'get', parameters: { \n listener:'\#{parent.path}',\n component:element.id\n }\n }); return false;\n }\n });\n" super element.add_javascript(javascript) end |