similar to: Problems using Sortable with an onUpdate callback

Displaying 20 results from an estimated 300 matches similar to: "Problems using Sortable with an onUpdate callback"

2007 Jul 19
1
Storing order of sortable objects in RoR
I have two sortable lists that you can drag and drop to and from. Each object in the lists have a position field in the object''s table. I want to be able to update the position in the database automagically once a user has sorted the list. I can drag and drop just fine but I am not able to store the new positions in the database. I am trying to use Ajax.request in the onUpdate callback
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
2006 Jun 13
1
Element.remove parent div
Hi all, Currently I am using Element.remove like so: <div class="blurb" id="drag_1"> <a onclick="Element.remove(''drag_1'');" class="remove"></a> </div> However I would like to just create a function since I''ll be removing multiple DIVs and updating the sortable order. I just can''t get some version
2007 Nov 02
3
script.aculo.us: onUpdate in Sortable.create
Can''t seem to get the onUpdate to work in for a sortable list. I am following the documentation and the included functional tests but nothing is firing for me. Any idea why? Sortable.create(''list1'', { tree:true , onUpdate:function(sortable){ alert(''onUpdate'') } , handle: ''handle'' , scroll:window ,
2006 Jul 20
1
Scriptaculous + Sortable: onUpdate Not Firing
Hello all, I''m using Scriptaculous 1.6.1 on a project I''m developing. My generated HTML (generated by PHP) looks something like this: <ul id="admin-list"> <li id="li-13">Singletary, Bob (President/CEO)</li> <li id="li-12">Chatman, Jim (Vice President of Finance/CFO)</li> ... </ul> <script
2005 Aug 02
3
Scriptaculous: Sortable (dragdrop.js) onUpdate
Hi all, In the following code, it doesn''t look like the onUpdate() event is firing. Am I doing something wrong? <ul id="testSort"> <li id="item1">item 1</li> <li id="item2">item 2</li> <li id="item3">item 3</li> <li id="item4">item 4</li> <li id="item5">item
2006 Jan 05
1
sortable_element not recognizing newly added <li> elements
I have a user defined list of items. Using the sortable_element function, I can manipulate the ordering of this list fine by dragging each component around. When I dynamically add another <li> item to this list, the newly added item is _not_ "draggable" like its other siblings. Using the sortable_element function, how do I make it aware of newly added list items? Here is my
2006 Feb 01
1
Sortable onUpdate problem
Hi, I have two sortables with different options (but same tags. just ''li''). When I drag an item from sortable1 to sortable2 I want it to gain the options that the sortable2 items have. I''ve tried all day to understand how Draggables and their observers are destroyed but I keep gettting buggy behavior. Part of the problem is the draggable and the draggableObserver are
2008 Mar 20
2
onUpdate problem with div
I hav the following code: <div id="puzzle"> <div id="divImage" style="float:left; cursor: move;>test 1</ div> <div id="divImage" style="float:left; cursor: move;>test 2</ div> <div id="divImage" style="float:left; cursor: move;>test 3</ div> <div
2006 Mar 20
5
Sortabls onUpdate function
I have this code. <script type="text/javascript"> Sortable.create(''orderable'', {onUpdate: doAlert}); function doAlert() { alert("Hello"); } </script> But when I move an item it doesn''t fire the doAlert command, am I missing something?
2005 Aug 18
5
Sortable > how to know wich elementID was dropped ?
Maybe a newb question, maybe not. It''s not well documented, and I want to know how to know the id of my newly dropped item. The usage, would be to attach the newly dropped id to its *new* parent in a DB. Thanks. ???????????????????????? http://www.samueldr.com http://www.hostingquebec.ca
2007 Aug 29
0
sortable_element :onUpdate
First time poster - hope I''ve done sufficient homework to get more than an rtfm: In my view, I have a <ul> list wherein each list element is identified with an id, thusly: <ul id="todoHandle"> <% for task in @tasks %> <li id="task_<%=task.id%>"> <%= task.Description %> </li> <% end %>
2006 Jun 14
5
Sortable Tree - Stoping Event dispatch ?
Hi, I''m trying to play with sortable tree and have two issues: I have an AJAX Tree looking like: <ul class=''TreeCat'' id=''work''> <li class=''open''> <img src=''s.gif'' class=''node'' onclick="Ajax.Tree.toggle(event,this);"/> <a
2006 May 24
2
newbie oo question
Hey everyone, I''m trying to create an object that will have some properties predefined, but will allow me to pass in properties to override those standard props if needed. I''m trying something like: var myObject = Class.create(); myObject.prototype = { initialize: function(element, options) { this.element = $(element); this.name = this.element.id; this.options =
2005 Dec 20
0
swap css class
I was in need of a function to change (swap) css classes - this is what I came up with - maybe some of the prototype gurus could have a look at the function - I''m sure it needs some improvements, but basically it is working: // usage: toggle (boolean), elementId, old class, new class, tag(s) //
2006 Jun 21
0
MochiKit breaks Prototype/Scriptaculous on IE 6
Hello folks, I have a situation where I''m using both MochiKit and Prototype/Scriptaculous on the same page. Everything works well in Firefox however MochiKit appears to be breaking my Scriptaculous autocomplete in IE 6. I''m currently loading the JavaScript libraries in the following order: prototype.js scriptaculous.js"> <script
2006 Jun 27
5
Ajax - Inserting selected elements from request.responseText
After retrieving a URL using an Ajax.Request... function onComplete (request, json) { // request.responseText holds the entire page Only the content contained in elementID = ''source'' is intended for display At this time, the following code works, but it disturbingly copies the entire page from the source URL into the target DIV $(''target'').innerHTML =
2006 Apr 10
1
RE: Prototype Ajax - How to pass my own params toonComplete ?
You need a closure. onComplete: function (response) { NamedActionResponseHandler(theElement, response); } Is that what you mean? Greg > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Erin Brewer > Sent: Monday, April 10, 2006
2010 Jan 20
0
putting labels back on a matrix.
I did not post this question to the ecology list, even though it is about an analysis using Vegan, since my question is based more on basic data manipulation in R. I think this is a fairly simple question but for the life of me I cannot find a reference for in the archives. I have an analysis using a matrix in which I needed to strip the ID variable off the input data to run the analysis. Now I
2006 Jan 24
8
scriptaculous sortable
Hi, maybe I am using this the wrong way but I have a list as follows <ul id="secondlist"> <li>bla bla</li> <li> bla bla </li> </ul> and then I add dynamically further <li> elements and create a Sortable but the onUpdate only fires for <li> items that have not been created via Javascript. Any clues? <script