similar to: Writing specs for scriptaculous helper

Displaying 20 results from an estimated 2000 matches similar to: "Writing specs for scriptaculous helper"

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 Jul 17
1
sortable_element - Altering defaults set by rails
Hi there, I''ve got the following code to generate two sortable elements but whenever someone drags and drops an item, i only want it to return a serialised list of the items in categoryartworks, the unlinkedartworks can be in any order and I don''t care. I can then delete those artworks that were in category artworks but aren''t in the serialised list, plus reorder
2006 May 30
1
sortable_element does not initiate AJAX calls
Having an odd problem with sortable_element. The :url option doesn;t seem to actually work. No AJAX calls are being generated. I can tell because Firebug extension does not show any AJAX requests, and the development.log file does not do anything when droppping the items in new positions. Here is the code I am using for sortable generation: <%= sortable_element
2007 Sep 08
3
template.expects_render?
Hi All, I''m trying to make use of template.expects_render, is outlined in David''s post(http://blog.davidchelimsky.net/articles/2007/06/28/ template-expects_render). I get an undefined method error on expects_render. I made sure I had the 1.0.8 gem as well as reinstalling the plugin and redoing the bootstrap. Still no luck. So I created a clean project, installed the
2006 Apr 05
0
Submitting sortable_element as part of form
Good evening all... I''ve been marveling over how easy it is to make amazing drag-sort interfaces using sortable_element. My users are really blown away by how intuitive and simple these controls are. However, in my current project I''m trying to use it in a particular way which has me stumped. Normally the sortable_element makes an AJAX request whenever it is changed.
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"
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"
2005 Jul 20
0
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"
2005 Dec 11
1
redering CDATA wierdness
I am attempting to do the sortable_element tutorial from scriptaculous. (http://demo.script.aculo.us/ajax/sortable_elements) Upon viewing the script.aculo.us source, I see this line is generated... <script type="text/javascript">Sortable.create(''list'', {onUpdate:function(){new Ajax.Updater(''list-info'', ''/ajax/order'',
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
2007 Nov 09
9
fixture_file_upload and edge rspec?
Hi all, I had some specs that were using fixture_file_upload that were passing just fine. Then I froze edge rails to get some 2.0 functionality, then a I upgraded to trunk rspec to deal with uninitialized constant ActionView::Helpers::JavaScriptMacrosHelper After a couple other of tribulations, I have now gotten down to just a couple of not passing specs, all using the fixture_file_upload.
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 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 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 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 Mar 03
8
How to use the sortable_element tagname option?
I''m having some difficulty adding drag-and-drop sorting to my application. I''m hoping that someone can help me figure out what I''m doing wrong: #view <table> ... <tbody id="item-list-body"> <tr id="view-item-<%= item.id %>"....</tr> </tbody> ... <%= sortable_element(''item-list-body'',
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 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 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 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|