Displaying 20 results from an estimated 1000 matches similar to: "Sortable Element with Partials??"
2006 Jan 21
1
Sortable Element with Partials?
Hi Everyone,
I posted this last month and unfortunately, I didn''t recieve any
replies. Maybe this time I''ll have better luck. I originally had my
sortable element list working properly like so:
<ul id="sortable_list">
<% @items.each do |item| %>
<li id="item_<%= item.id %>"><%= image_tag "dragme.gif"
2006 Feb 10
2
Sortable + Draggable : doesn''t follow the mouse horizontally
When a ''draggable'' element is made ''sortable'', it no longer follows the
mouse horizontally when you drag it.
Is there a solution/workaround?
TIA
Alain
2006 Nov 04
1
Dynamically updating a sortable list using RJS
I''ve got the following sortable list in one of my views:
<ul id="sortable_list" class="sortable_list">
<%= render(:partial => ''section'', :collection => @sections) %>
</ul>
<div class="new_section" id="new_section">
<%= form_remote_tag(:url => {:action =>
2006 Feb 19
2
Sortable list (scriptalicious) and updating database
I have made a sortable list which is sortable by dragging & dropping the
list elements. It works, but the order of the elements will not be
updated in the database. Hopefully someone could help me, or tell me
what I''m doing wrong.
Thnx!
Rgds,
Eric
Controller: album_controller.rb
class AlbumController < ApplicationController
def show_sort_album
@photos =
2006 Jan 26
2
question about sortable demo
Hi,
I''m new to the script.aculo.us library and AJAX. Of course, I already
want to use a sortable list for something more complicated than the
sortable list demo. In the example below, what is the structure of
params[:list]? I don''t know what I can do with it once I have it in my
controller method.
Thanks,
Peter
# view
<ul id="list">
<% 6.times do |i|
2006 Jun 22
0
sortable list doesn''t work on production server
I have a sortable list in one of my views, using the sortable example
from the recipes book. The sorting works great on my mac. When I throw
it on the server for testing it doesn''t save the display order.
I cracked open the log file and see that it''s not even returning the
id''s like it should:
Parameters: {"action"=>"sort",
2006 Apr 06
3
sortable list not saving to database
i am trying to use a sortable list on my app. i used the chapter in
Rails recipes as a reference on how to do it. i have the following code
in my controllerr:
def sort
@user_list = User.find(params[:id])
@user_list.tasks.each do |task|
task.position = params[''user-list''].index(task.id) + 1
task.save
end
render :nothing => true
end
and in my
2007 May 29
0
Ajax sortable_element refresh
Hi,
I have the following ajax example, with a list of counters, and two
buttons for adding/removing elements. The list is sortable.
There are two things that I don''t know how to do:
. remove an elemet
. when I add a new element to the list, that element doesn''t become
sortable with the rest of the list
Thanks,
hugo
#### View
<html>
<head>
<title>Ajax
2006 Apr 10
1
Error When Sorting
Got a bug I cannot eliminate. My ajax style sorting looks cool but the
position change is never updated. The error (at bottom points to line
52 in my controller and I have indicated that line).
#view
<!-- Question Data -->
<h2>Test Questions</h2>
<div id="list_questions">
<%= render(:partial => "list_questions") %>
</div>
2006 Feb 23
5
sortable_list added to by AJAX question
I have a working sortable_list that is added to by AJAX. The problem is
that when a new item is added, it''s not sortable. I found a post on
scriptaculous using behaviour.js to refresh the DOM when an item is
added, but I can''t figure out how to do it with Rails.
To test the behaviour method, I used this:
var myrules={
''div#steps ul'' :
2006 Jun 26
3
Scriptaculous Sortable Element Issue
I have a <ul> that contains a number of list items, and I''m using the
sortable_element helper to reorder then via drag-and-drop. This works
great, however, when I insert a new <li> into the <ul> with Ajax, the
sortable_element doesn''t know about it. Is there a way to refresh this
collection?
Thanks for any help.
--
Posted via http://www.ruby-forum.com/.
2007 Apr 18
0
Ajax Drog and Drop Sorting Frequency
Hi Friends,
I am new to ROR.I have implemented sorting by Ajax drag and drop and
interaction with database.
Working fine but if i sort records rapidly, getting nil point exception.
I am pasting the sortable list code.
<%= sortable_element(''sortable_charts'',
:update => ''assigned_chart_files'',
:url =>
2006 Apr 22
3
Ajax call not being made on a Sortable list
Hi,
I am creating a sortable list using this code:
<%= sortable_element("fields_list",
:url => { :action => "order", :id => @fields_list })
%>
it creates a sortable and I can move elements up and down, but it is not
making any call to the "order" method.
I do not see any log activity in the development log nor do I see any
errors there. The
2006 May 24
1
Sortable: Ajax not firing?
Using Rails to generate a sortable list, I get the draggable/sortable page
elements, but Ajax never fires back the post-sorted list. (I''ve checked with
IE & Firefox, the "save this order to the DB" controller hasn''t been
called.)
The View:
<p>Drag to sort.<span id="sort_info"></span></p>
<ul id="sort1">
2006 Jan 10
1
Can <dl> be made sortable?
I was experimenting with using some interesting CSS styles with <dl>
<dt> and <dd> elements. But then I needed to be able to make this
list a sortable_element in Rails, and it did not work. I had to
convert it all to <ul> and <li>.
Is there a reason why sorting can''t work within definition lists? I
searched the list archive and found the
2006 Apr 05
1
Nuby Sortable Question? How do you pass multiple lists back to the server
I have multiple drag and drop lists. If you sort within one list, you can
pass the list back to the server using:
<%= sortable_element ''task-list'' << person.id.to_s ,
:url => { :action => "noop", :id => @user },
...
%>
Which causes this to be included in the javascript:
onUpdate:function(){new
2006 Feb 17
2
Sortable list: how to create a triggering "handle"/deactivate part of the <li> element?
Hi all,
When using sortable lists, a click anywhere in a <li> element will
trigger the "sort_by_dragging" mode, and have the clicked element follow
the mouse. The active area is the entire <li> element.
Is there a way to either :
- limit the active/triggering "area" to a part of the <li> element
(like a luggage handle)
or
- prevent a part of the
2006 Jun 16
1
sortable acts_as_tree with heirarchy
I''ve been stumbling on the tut at oriontransfer
(http://wiki.oriontransfer.co.nz/main/show/SortableTree)
I''ve got it working in a one dimensional list and I''ve got the drag and
drop working on children, but as can''t get it to save the tree.
Here''s my view:
<h2>Menu Prototype 2</h2>
<%= flash[:notice] %>
<ul
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
2005 Jul 20
0
Re: Using sortable.
Thomas,
I am trying to use the Sortable functionality through
a rails implementation.
My sortable container looks like this:
<div class="thumbnails">
<div class="minus_navigation">
<a href="javascript:Photos.selectPrevious()">
<img alt="Move to previous photo"
class="navigation"