Manik Juneja
2006-Jan-20 09:13 UTC
[protoype] Problem with Effects on draggable element if revert is true
hi, I have a draggable element (cart-item) in a shopping cart <%= draggable_element "item_#{product}_#{i}", :revert => true %> When this element is dragged outside the cart into the "main_div", I want to show a puff effect and remove the element. When it is dragged within the cart, it should revert. So i wrote this code for drop_receiving _element <%= drop_receiving_element "cart", :update => "items", :url => nil, :accept => "cart-items" %> <%= drop_receiving_element "main_div", :update => "items", :url => { :action => "remove" }, :accept => "cart-items", :before => visual_effect(:Puff ), :loading => "Element.show(''indicator'')", :complete => "Element.hide(''indicator'')" %> If I drop the cart-item within the cart, it works ok. But if I drop the item outside the cart, it starts reverting first and does a puff later [ the puff is almost un-noticable]. What would i need to change to have a propert puff effect. Thanks, Manik. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Manik Juneja
2006-Jan-21 07:52 UTC
[protoype] Problem with Effects on draggable element if revert is true
hi, I have a draggable element (cart-item) in a shopping cart <%= draggable_element "item_#{product}_#{i}", :revert => true %> When this element is dragged outside the cart into the "main_div", I want to show a puff effect and remove the element. When it is dragged within the cart, it should revert. So i wrote this code for drop_receiving _element <%= drop_receiving_element "cart", :update => "items", :url => nil, :accept => "cart-items" %> <%= drop_receiving_element "main_div", :update => "items", :url => { :action => "remove" }, :accept => "cart-items", :before => visual_effect(:Puff ), :loading => "Element.show(''indicator'')", :complete => "Element.hide(''indicator'')" %> If I drop the cart-item within the cart, it works ok. But if I drop the item outside the cart, it starts reverting first and does a puff later [ the puff is almost un-noticable]. What would i need to change to have a propert puff effect. TIA, Manik _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org lists.rubyonrails.org/mailman/listinfo/rails-spinoffs