Add $js->drop()
Reported by Sean Templeton | January 30th, 2010 @ 12:05 AM | in DojoCake 1.3.2
drop($options = array())
Make an element accept draggable elements and act as a dropzone for
dragged elements.
Options
•accept - Selector for elements this droppable will
accept.
•hoverclass - Class to add to droppable when a draggable is
over.
Event Options
•drop - Event fired when an element is dropped into the drop
zone.
•hover - Event fired when a drag enters a drop zone.
•leave - Event fired when a drag is removed from a drop zone
without being dropped.
Example use
$js->get('#element'); $js->drop(array(
'accept' => '.items',
'hover' => 'onHover',
'leave' => 'onExit',
'drop' => 'onDrop',
'wrapCallbacks' => false
)); If you were using the jQuery engine the following code would be added to the buffer:
$("#element").droppable({accept:".items", drop:onDrop, out:onExit, over:onHover}); ''Note'' about MootoolsEngine::drop Droppables in Mootools function differently from other libraries. Droppables are implemented as an extension of Drag. So in addtion to making a get() selection for the droppable element. You must also provide a selector rule to the draggable element. Furthermore, Mootools droppables inherit all options from Drag.
No comments found
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Dojo Cake is a library of CakePHP helpers and controllers to make the process of adding Dojo to CakePHP more easy. The library includes helpers for widgets and XHR connections.
Dojo Cake was developed to make the process of making ajax applications in CakePHP as easy as making the application itself, making Web 2.0 applications in CakePHP a piece of cake (pun intended). With a growing number of widgets, and support for basic ajax and xhr connections, Dojo Cake aims to be a powerful link between clientside programming and server-side programming.
The project is hosted on google code at http://dojocake.googlecode.com