search for: item_s

Displaying 16 results from an estimated 16 matches for "item_s".

Did you mean: items
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 Feb 18
3
Easy Newb Question
OK, so I have a link_to_remote. I am too dumb to figure out where I can set a css class or id attribute. <%= link_to_remote("X", :url => { :action => :destroy, :id => message }, :confirm => "Delete ''" + message.title + "''?", :complete => "item_removed(''item_" + message.id.to_s + "'')") %>
2006 Jan 24
2
webrick and in_place_editor_field
I''m having a strange problem with webrick spinning forever. I have a view ''list'' that renders a collection: <%= render :partial => ''item'', :collection => @items %> The item partial looks like so: <div id="item_<%= item.id %>"> ... <div id="price"> <%= in_place_editor_field :item, :price
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 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 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
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 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
2006 Apr 07
1
changing visual_effect defaults
what is the correct syntax for changing an effect like :highlight? i tried looking through the api, and found it, but i can''t seem to get it right. i want to change the start color of visual_effect(:highlight, ''user-list''). i tried visual_effect(:highlight, ''user-list'', :startcolor = ''#990000'') and several other variations of
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 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 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|
2005 Dec 17
17
problems with quotes and escaping
First of all I''d like to say thanks for all the great work everyone has put into scriptaculous, I''m having a lot of fun playing with the framework, and easily moving into Web 2.0 territory. I''ve just hit a snag on my project though. So here''s my code: ... var newEvent= "<div
2005 Nov 07
2
IE vs. Firefox - little programming help needed
Hello, I was wondering whether somebody can give me a little hand on this: I have the following code: "var img = this.el.previousSibling.getElementsByTagName(''IMG'')[0];" While IE correctly returns the image object, Firefox returns an error. What I discovered so far is that this.el.previousSibling returns the DIV tag an IE which is correct - however, Firefox
2006 Feb 25
31
Ajax Scaffold Generator for Rails Released
I just released a whole new version of the Ajax Scaffold Generator (for Ruby on Rails). The generator creates a scaffold page like the typical rails one, except adding, editing and deleting are all done inline. The generated scaffold is valid XHTML strict and fully styled right out of the box. Check out the demo: http://ajaxscaffold.height1percent.com/ And the how-to: