similar to: Sortable Element with Partials?

Displaying 20 results from an estimated 700 matches similar to: "Sortable Element with Partials?"

2006 Jan 07
1
Sortable Element with Partials??
Hi Everyone, 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" %><span id="title_<%= item.id %>" class="title"> <%= item.value %></span> <span
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 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 Apr 28
7
acts as drop down
Hi Im using the acts as drop down plugin and have this code below acts_as_dropdown :text => "forename", :order => "forename" It currently makes use of the forename in the option tag, how can I get it to use the surname as well ie somthing like ''forename'' . ''surname'' in php Thanks -- Posted via http://www.ruby-forum.com/.
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 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 Feb 24
3
New to Ajax
Hello, I''m very new to ajax and was looking for advice on scriptaculous at their website and they suggested i join your mailing list, I hope that was the right thing to do, I haven''t installed ROR yet but i have downloaded the needed one-click installer which i will setup sometime soon, until such time i would like to work with scriptaculous in its native form in php files, the
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 Feb 14
2
Inline list editing with RJS: best practices
I wanted to get the community opinion on the best way to use partials and inline list (<li>) editing. I have a very common scenario where a list is rendered: --- index.rhtml --- <ul> <%= render :partial => ''item'', @collection => @items %> </ul> --- _item.rhtml (simplified) --- <li id="item_<%= item.id %>"> <div
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/.
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 Jan 25
1
xx-0.1.0 : xhtml and xml make it twice as dirty
NAME xx - twice as dirty SYNOPSIS ~ > gem install "double x" require "xx" include XX::XHTML doc = xhtml_{ html_{ head_{ title_{ " go xx! " } } body_{ " one more and it would be illegal " } } } URI http://rubyforge.org/frs/?group_id=1024 DESCRIPTION xx is a library designed to extend ruby objects
2006 Jun 15
2
Drag and Drop Sortable Tree
I''ve gone through Chad Fowler''s recipe for creating a drag and drop sortable list, and have been trying to extend this to a sortable tree. Has anyone come up with or seen code which allows drag and drop sorting (altering the position and parent_id variables of the relevant objects) but for data in a nested tree rather than a list form? - Justin
2006 Feb 27
4
Getting nuts with sortables...
Folks, It has been a whole day spent on this but I still can''t get my mind around the most probably very stupid/basic mistake here... First, the code I use: <h3>List A</h3> <ul id="lista" > <li id="item1"> Item 1</li> <li id="item2"> Item 2</li> <li id="item3"> Item 3</li> </ul>
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 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 May 22
2
good practice or waste of time?
I have what I hope is a simple question regarding a security practice I''ve been using in my first Rails app. I want to know if it''s worthwhile or if the extra typing isn''t worth it. I have 3 models that are related to each other. class User < AR:Base has_one :library end class Library < AR:Base belongs_to :user has_many :items end class Item < AR:Base
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 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