|
Re: draggable revert problem: msg#00155lang.ruby.rails.spinoffs
Thanks, The bug was informative, but my application pretty much replicates what the cart example does except for adding images instead of products. so Iam not adding it to any html list. Here is my code. Like I said before, the revert works fine when I dont add the object to the cart. The revert also works fine when the same object is added twice to the cart. The third time its added to the cart, it reverts a few pixels off and from then on, it goes all over the page. <h1>New entry</h1> <%= _javascript__include_tag "prototype" %> <%= define_javascript_functions %> <%= link_to 'Back', :action ="" 'list' %> <h3>Add to list using Ajax</h3> <%= form_remote_tag(:update => "pictures", :loading => "Element.show('indicator')", :complete =>"Element.hide('indicator')", :url ="" { :action ="" :add_item }, :position => "top" ) %> New item text: <%= text_field_tag :newitem %> <%= text_field_tag :flickrid %> <%= submit_tag "Add item with Ajax" %> <div style="height:40px;padding-top:10px;"> <p id="indicator" style="display:none;margin-top:0px;"> <%= image_tag "indicator.gif" %> Updating pics... </p> </div> <div id="pictures" style="clear:right;z-index:1;height:132px;margin-top:10px;"> <div style="clear:both;"></div> </div> <%= end_form_tag %> <div id="cart" class="cart" style="clear:right;z-index:1;height:132px;margin-top:10px;"> <div id="items"> <%= render :partial => "cart" %> </div> <div style="clear:both;"></div> </div> <%= drop_receiving_element "cart", :update => "items", :url ="" { :action ="" "add" }, :accept => "photo_list", :hoverclass => "cart-active", :loading => "Element.show('indicator')", :complete => "Element.hide('indicator')" %> ************************* Partial View - Photo <% if (session[:flickrid] != '' && @photos != nil) %> <%= image_tag " #{photo.source('Square')}", :tag => 'pictures', :id => "#{photo.source('Small')}", :alt => photo.source('Square'), :class => "photo_list", :style => "clear:both;" %> <%= draggable_element "#{photo.source('Small')}", :revert => true %> <% end %> ************************* partial View Cart <% session[:cart].photos.each do |photo| %> <%= image_tag "#{photo}", :id => "#{photo}", :style => "position:relative;" %> <%= draggable_element "#{photo}", :revert => true %> <% end %> <%= "Here's your photo cart." if session[:cart].photos.empty? %> Thanks for the help. Sunder On 11/30/05, Grzesiek Slusarek <gregtech@xxxxx> wrote: >Hi maybe this is the answer.. -- <a href="" href="http://www.sunderiyer.com"">http://www.sunderiyer.com"><img src="" href="http://feeds.feedburner.com/SunderIyer.gif">http://feeds.feedburner.com/SunderIyer.gif" height="67" width="200" style="border:0" alt="Sunder Iyer"/></a> _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@xxxxxxxxxxxxxxxx http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | SlideUp/SlideDown errors in FF 1.5?: 00155, Duane Johnson |
|---|---|
| Next by Date: | Re: draggable revert problem: 00155, Martin Scheffler |
| Previous by Thread: | Odp: draggable revert problemi: 00155, Grzesiek Slusarek |
| Next by Thread: | Re: draggable revert problem: 00155, Martin Scheffler |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |