similar to: patch review for the sortable_element helper

Displaying 20 results from an estimated 13000 matches similar to: "patch review for the sortable_element helper"

2009 Mar 01
1
sortable_element helper query
Is it possible to call helper method instead of controller action while using sortable_element helper method? Ref: http://api.rubyonrails.org/classes/ActionView/Helpers/ScriptaculousHelper.html The url field in the example is like controller/action type. Can we call ControllerHelper method instead? Because we need to save the sorted element in the database, so my guess was to call a method in a
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 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 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
2005 Jul 11
0
Using sortable_element properly with DIV tag
Hello, I''m trying to use sortable_element to allow users to AJAXishly reorder a page of images. These are arranged in a grid format, not a vertical list, so I''m using Rails code like this to make it happen: <%= sortable_element ''thumbholder'', :tag => ''div'', :complete => visual_effect(:highlight,
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 Apr 18
0
sortable_element not updateing more than once in a page load
I''m using a sortable_element in my app. I drag an element to re-position it and it works only one time. When i try to do it more than once it will not work. I have to refresh the page to be able to do it again. Any help is greatly appreciated. Bryan -- Posted via http://www.ruby-forum.com/.
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 %>
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
2007 Jun 14
3
serialize with sortable_element (rails)
creating multiple lists with sortable_element and would like to serialize them and save back to the db. i have the sorting between multiple lists working properly. can anyone point me in the right direction for serializing and saving? thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
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'',
2013 Aug 14
1
local variable assignment: first copies from higher frame?
hi all -- this might not be the correct list for this question/discussion, though R-help didn't seem like the correct venue, either, so... i'm looking for just some extra clarification of how local variables are defined/bound, beyond the simple cases given in the Language document. the particular instance is when there is variable assignment inside a function. normally, this creates a
2011 Sep 27
2
Matrix and list indices
Hi guys, I am trying to replace all elements of earth that are equal to zero with their corresponding elements in mars. I can do the replace with a bunch of for-loops, but I don't think this is the R way of doing things. my_list <- list( earth=array(c(0,0,45,0,0,45,0,45),dim=c(2,2,2)), mars=array(c(8:1),dim=c(2,2,2))) my_list for (i in c(1:2)) { for (j in c(1:2)) {
2013 Feb 14
3
list of matrices --> array
i'm somehow embarrassed to even ask this, but is there any built-in method for doing this: my_list <- list() my_list[[1]] <- matrix(1:20, ncol = 5) my_list[[2]] <- matrix(20:1, ncol = 5) now, knowing that these matrices are identical in dimension, i'd like to unfold the list to a 2x4x5 (or some other permutation of the dim sizes) array. i know i can initialize the array, then
2008 Jan 08
1
storing matrices in a list or vector and preserve dimensions
Hi all, As an R newbie, I wonder how I can store multiple matrices in a list() or vector() object without losing their structure. I should be able to retrieve the matrix from the list later on. If I just append() the matrices to a list() object, they automatically lose their dimensions, whereas I would like to preserve the dimensions of the matrices. Is there any function in R which allows
2012 Feb 29
2
Using a FOR LOOP to name objects
Hello, I am trying to use a for loop to name objects in each iteraction. As in the following example (which doesn't work quite well) my_list<-c("A","B","C","D","E","F") for(i in c(1:length(my_list))){ url<- "http://finance.yahoo.com" doc = htmlTreeParse(url, useInternalNodes = T) tab_nodes = xpathApply(doc,
2006 Mar 20
0
sortable_element behavior change from 0.13
Originally when I implemented my app, I had a series of sortable elements that could be dragged around to be reordered. To drag around, I would click and hold down the mouse button and move the element to the desired position. After updating the dragdrop.js library, now I just click on the element (which selects it) move my mouse pointer to the desired position (without having to hold the
2013 Nov 26
1
dynamic lists at C level
Dear R-devel, I am trying to do something similar to dynamic length lists in R, but at C level. In R, that would be rather trivial: - determine the length of the list - create the list object - store the values for each component - access value components by using "[[" At C level, for a single component where I need to store a vector of length 5, I do: int *p_result; SEXP my_list =
2007 Sep 08
0
Writing specs for scriptaculous helper
I''m trying to get full specing of my views, which involve calling some Scriptaculous helpers in the views themselves. For instance, I have a div containing a bunch of thumbnails which I''m going to make sortable with sortable_element. I''m trying to figure out a good way to write a spec for this type of call. so far the closest I have gotten is to write something
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