search for: updateord

Displaying 5 results from an estimated 5 matches for "updateord".

Did you mean: updated
2006 Apr 14
1
Problems using Sortable with an onUpdate callback
...I''m using sortable (very cool stuff!) on a series of divs with an onUpdate callback. Everything appears to work alright until I try to pass a parameter to my callback function like this: Sortable.create( ''page_33'', { tag: ''div'', onUpdate: updateOrder(''page_33'') } ); When I pass that parameter to the updateOrder function (as opposed to just using the updateOrder function without a call back) I get the following error in my JavaScript console: "Options has no properties (dragdrop.js line 870)" My call back func...
2006 Jun 28
1
sortable lists, database update
Hi, I have some images and I want to be able to drag them into the order I want and have the database updated accordingly. I have an unordered list elsewhere in the application that works well, but for the images I cant get it working. In my controller I have: def updateorder params[:images].each_with_index { |id,idx| ProductImage.update(id, :display_order => idx) } render :text => ''Updated sort order'' end Then my view has: <div id="images" style="border: solid black 1px; width: 672px;"> <% @images.each...
2007 Jul 19
1
Storing order of sortable objects in RoR
...39;s action can update the position. Below is the related code. <script type="text/javascript" language="javascript"> // <![CDATA[ Sortable.create("left", {dropOnEmpty:true,containment:["left","right"],constraint:false, onUpdate:updateOrder}); Sortable.create("right", {dropOnEmpty:true,containment:["left","right"],constraint:false, onUpdate:updateOrder}); function updateOrder(){ var url = ''order'' //the action var left_list = escape(Sortable.sequence(''left&...
2006 Jun 13
1
Element.remove parent div
...multiple DIVs and updating the sortable order. I just can''t get some version of Element.remove to target the parent DIV. I''ve tried several versions of this but no luck. function removeParent() { var parentBlurb = document.getElementById().parentNode; Element.remove(parentBlurb); updateOrder(); } then... <div class="blurb" id="drag_1"> <a onclick="removeParent();" class="remove"></a> </div> I just can''t get this to work out. Any suggestions would be very helpful. Thanks! ____________________________________...
2006 Jan 05
1
sortable_element not recognizing newly added <li> elements
...how do I make it aware of newly added list items? Here is my current sortable_element definition. <%= sortable_element dow + ''orderList'', :complete => visual_effect(:highlight, "status", :duration => 0.5 ), :url => { :action => ''updateOrder'', :dow => dow } %> TIA. Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060105/f848a881/attachment.html