search for: drop_receiving_element

Displaying 19 results from an estimated 19 matches for "drop_receiving_element".

2006 Mar 29
2
Multiple calls from drop_receiving_element :complete
Hi, Firstly I am very new to Ruby on Rails but think its fantastic! :o) I am trying to figure out how I can call multiple functions from the drop_receiving_element :complete. I have the following code in my index.rhtml and it works fine. It calls the javascript function "additem" that is on the page. <%= drop_receiving_element "dcwindow", :update => "items", :url => { :action => "add" }, :ac...
2006 Apr 27
0
Trigger ajax form submission with drop_receiving_element
Hello everyone! I have a little problem with ruby on rails and ajax. I have 2 sort of droppable items, 2 drop_receiving_element areas working fine; but instead of updating a div, I would like to have a form submitted with an ajax call. got it? (not so easy to explain) My solution was to add a complete action submitting the form like this: <%= drop_receiving_element "list", :url => { :action => &...
2005 Dec 30
4
AJAX Drag and Drop Detecting Drop Coordinates
...t it seemed to be calling it multiple times, even when not triggered. It also didn''t give me any information on the draggable element. I even tried it with :snap which should pass in x and y, but no luck I took another approach and created a droppable area. Doing something like: <%= drop_receiving_element "my_page", :url => { :action => "drag_end" } %> Well that works in giving me the id of the draggable element, but I still can''t figure out how to get the x and y coordinates of the item at its drop location. The information is in there, and using...
2006 Jan 20
1
[protoype] Problem with Effects on draggable element if revert is true
...ot;item_#{product}_#{i}", :revert => true %> When this element is dragged outside the cart into the "main_div", I want to show a puff effect and remove the element. When it is dragged within the cart, it should revert. So i wrote this code for drop_receiving _element <%= drop_receiving_element "cart", :update => "items", :url => nil, :accept => "cart-items" %> <%= drop_receiving_element "main_div", :update => "items", :url => { :action => "remove" }, :accept =&...
2006 Jul 10
1
:revert => false for Droppables
...e.remove and page.insert for some complex nested moves in RJS. I have my draggables set to revert, but they also revert when they hit a droppable. Meaning, the draggable will start reverting for part of a second before the page.remove kicks in. Is there a way to specify :revert => false for the drop_receiving_element, or something else to that affect? -- Respectfully: Larry Diehl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060710/71513531/attachment.html
2006 Apr 15
0
drag&drop strangeness
...ch"> <ul style="list-style: none;"> <div id="searchfields"> <%= render "contacts/search_fields" %> </div> <div id="trash"> trash me </div> </ul> <%= drop_receiving_element "search", :update => "searchfields", :url => { :action => "add_search_field" } %> <%= drop_receiving_element "trash", :update => "searchfields", :url => { :action => "remove_search_fie...
2010 May 03
0
Scriptaculous, snap draggable to droppable or revert
Hello community, I am a fairly new RoR programmer and I need some help with Scriptaculous Drag and Drop: So I have <%= draggable_element(@div_id, :revert => "failure", :snap => 5) -%> and a droppable: <%= drop_receiving_element(@team_div_id, :with => "''player='' + (element.id)+ ''&position='' + #{draft_position}" ,:complete => visual_effect(:highlight), :update=>"status" , :url => { :action => "receive_drop"}, :hoverclass => ''ho...
2006 Jan 09
2
turning revert off after being dropped
I have a container ''A'' which contains Draggables and a Droppable ''Trash''. These Draggables are set with ''revert:true''. Now, if a Draggable from ''A'' is dropped in the Trash, I don''t want it to revert, I want it to just disappear. I''ve tried using draggable.destroy() but this just prevents it from being
2006 Mar 30
1
Passing values to a Partial
...first the page is drawn it works, but when i call setobject it says that @objectname is null in my partial and it throws an error. Code follows. In my index.rhtml I have the following: <%= render :partial => "properties" %> with some other code later on in the file <%= drop_receiving_element "dcwindow", :update => "items", :url => { :action => "setobject" }, :accept => "products", :hoverclass => "cart-active", :loading => "Element.show(''indicator'')", :complete...
2007 Nov 16
1
drag & drop list needs refreshing
...''items'' end [/code] The other code is below [code] #view <div id="itemList"><%= render :partial => "item_list"%></div> <div id="selectedItems"><%= render :partial => "items" %></div> <%= drop_receiving_element "selectedItem", :update => "items", :url => { :action => "add_item_to_selected" }, :accept => "my_item", :loading => "Element.show(''indicator'')", :complete => "Element.hide(''indicator'')&quot...
2010 Sep 23
1
undefined method `protect_against_forgery?' for #<ActionView
...ogged in. (The posting by rake to the web site is done with juggernaut,but that''s not the issue, the failure happens when trying to build the partial) The building of the partial is achieved by instantiating Actionview in the rake task, and it all worked fine until I introduced ''drop_receiving_element'' into the partial that gets generated. The latter seems to want to use protect_against_forgery? - which is not available from the lib task. I am feeling a bit out of my depth here. Is it just a simple question of somehow including or requiring the module that contains the protection stuf...
2006 Jun 09
0
Not droppable after first drop in FF
...e DB (items dropped on one have to be removed from the other with an attribute changed). When an item is dropped, a controller function is called. The function updates the database, refreshes the collections the lists are made of, and renders a partial that displays the lists. I have the ''drop_receiving_element'' calls at the end of that partial. On Firefox (1.5.0.4 on WinXP, 1.5.0.4 on OSX and 1.0.8 on SuSe Linux), I can drop any item on the other list and it works the first time. After that, I can grab any of the draggables (i.e.: they''re still draggable) but when I drop them, nothing...
2006 Dec 12
1
Drag and Drop in IE7 vs FF
...;%= form.text_field ''ship_terms'' %></td> </tr> <tr> <td colspan="4"> <%= form.text_area ''special_delivery_instructions'', "cols" => 50, "rows" => 4 %> <%= drop_receiving_element("purchase_order_special_delivery_instructions", :url => { :controller => "purchase_order", :action => "add_special_delivery_instructions", :purchase_order_id => @purchase_...
2007 Dec 05
0
difficulty with onDrop in the ruby helper method
I need to return both the draggable element id and the dropped on element id to a ruby method. I''m using the helper method drop_receiving_element, and it''s all good and well until the onDrop part. I really want to pass both id''s to the ruby method that I''m calling. Really. However, it seems like onDrop only accepts a javascript function. :url => {:action =>foowhatever} only passes the draggable id. :with rep...
2007 Jul 26
1
Scroll Page While Dragging 'draggable_element'
...om the first column onto any item in the second column, even when the lists are long and both elements are not visible on the screen at once, so I need the page to scroll when I drag an asset to the edge of the browser screen. I currently use the draggable_element helper on each of the assets, and drop_receiving_element on each of the stories. What can I do so that when I want to drag an asset to a story that is off-screen, the page will scroll until that story comes into view? Many thanks, Brandon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the...
2005 Aug 09
1
Droppable refuse to react
Im having problems with Droppables, and read that there are some attributes on the element that must be inline. What are those? I''ve tried to copy some of the code from the shop-demo, and my code seems to have the exact same attributes and more. The problem is that the droppable refuse to react whenever I attempt to drop a draggable on it, the onDrop does''nt seem to trigger.
2005 Jul 26
1
unmovable items on sortables...
...een, even when one is emptied. Possible solutions? 1) create a <li> that is styled as a header, and is unmovable 2) modify the <ul>''s CSS so that even when it is empty, it still can be dropped upon. 3) don''t use the Sortable.create, instead create using primitives: drop_receiving_element, draggable_element. Any recommendations? Jesse
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
2005 Nov 29
6
draggable revert problem
Hello, I have tried implementing the shopping cart ajax example and have run into some problems. The only differences with the shopping cart is My list of products are generated from a partial view The images of the products come from an http link. However, Iam seeing a strange behavior when I drag and drop the elements to my cart. On the first drag and drop the image successfully reverts to