|
reverteffect - how to deal with this?: msg#00141lang.ruby.rails.spinoffs
Hi, I'm not sure I quite understood your problem. It sounds like you want override the default functionality of revert. You can accomplish this by setting the :reverteffect option. The value associated with it is the javascript you want executed on revert. I suppose you could just try setting it to "return false;". I wanted to avoid the draggable flying back to its original position so I used the same MoveBy function in the original but set the duration to 0 so the user doesn't see that. <%= draggable_element(tag.name, :ghosting => true, :revert => true, :change => "function() { setClass('review_tag_names', 'dropzone');}", :reverteffect => "function(element, top_offset, left_offset) { new Effect.MoveBy(element, -top_offset, -left_offset, {duration:0}); // set bgcolor back to white--originally set on start drag setClass('review_tag_names', 'dropzone_inactive'); } ") %> Hope this helps... Linda :) |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Rich Text Editor: 00141, Jon Tirsen |
|---|---|
| Next by Date: | Ajax and Rails to manage long running server process (and file download)?: 00141, Stuart Hungerford |
| Previous by Thread: | reverteffect - how to deal with this?i: 00141, Grzesiek Slusarek |
| Next by Thread: | Browser inconsistencies when using Effect.MoveBy(): 00141, Cam McVey |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |