Displaying 20 results from an estimated 1000 matches similar to: "changing visual_effect defaults"
2010 May 24
2
Two RJS visual effects will happen at the same time?
I was going to change the background of a div from white to red and then
from red back to white, so this is used in an RJS file:
page[:vote_score].visual_effect :highlight, :startcolor => ''#ffffff'',
:endcolor => ''#ffcccc''
page[:vote_score].visual_effect :highlight, :startcolor => ''#ffcccc'',
:endcolor =>
2006 Jan 10
5
using dynamic element ids with visual_effect
Mike and I demo an Ajaxified version of the Depot application in the
Rails Studio. Part of the demo is a cart in the sidebar which updates
when you add a product to it. As well as updating the div, it also
highlights the most recently added link item. Right now, we do it with:
<script language="JavaScript">
function flash_cart(request) {
var id =
2006 Apr 28
1
startcolor and endcolor not working
In my RJS template this works:
page.visual_effect :highlight, "test#{@test.id}", {:duration => 5}
but not this:
page.visual_effect :highlight, "test#{@test.id}", {:duration => 5,
:startcolor => "#FFFFFF"}
Am I misunderstanding how to pass in additional parameters?
_______________________________________________
Rails-spinoffs mailing list
2006 Oct 09
2
page.visual_effect :highlight
I have some code that will do the highlight, fade effect on a block of
text. It seems to work just fine until it is fired multiple times very
rapidly.
The end color matches a grey background and the start color is a yellow.
Say its run 4 times a second for 3-5 seconds. When the flashing catches
up the text will fade for the last time to the end color, then the
background will switch to a
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 14
2
rjs woes
i''ve just installed the RJS plugin per cody''s instructiuons and read through
tutorials. I''ve made the necessary changes to my existing code and
everything appears to be working, except that the returned javascript is not
being evaluated...
here''s my setup:
i have a checkbox with an onclick event pointing to a javascript function.
this javascript function does
2006 Jul 31
4
RJS to find an element
I''m trying to implement a remove from cart method based on the
examples in the second edition Agile book. I have everything working
except for the RJS that removes items from the cart. Ideally what
I''d like to do is highlight an element that I am deleting only if
there is more than one of that particular item in the cart. If the
item deleted is the only of
2006 Jul 26
1
how do I change color to an highlight effect ?
This is my code:
<%= form_remote_tag :url => { :action => "forgot_account" }, :update
=> "result",
:complete => visual_effect(:highlight, "result", :duration =>
2, :startcolor => "#c8e673", :endcolor => "#9db55d") %>
If I remove colors to the effect everything works, but with this code
it renders on another
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
2008 Jan 23
11
Rails 2.0.2 + RJS
Hi
I had ajax commenting on my app, which worked perfectly on Rails
v1.2.6, but does not work the same in Rails 2.02. Basically the
comment gets added, but the visual effects do not work (ie lines 2 + 3
of create.rjs)
create.js
page.insert_html :bottom, ''comments'', :partial => ''comment''
page.visual_effect :appear, "comment_#{@comment.id}"
2006 Apr 27
7
RJS & Ajax question...
Hi,
I''m trying to convert an older Rails application to use Ajax. I''ve
already moved my edit and show actions so that, instead of displaying as
separate pages, they appear in a <div> on my list view.
However, I have two problems:
1) When the user saves the changes, I want to put all the ajax changes
in an RJS template. However, form_remote_tag :url =>{:action =>
2007 Nov 30
0
visual_effect not taking parameters in RC2
Hi all,
I just upgraded a half baked app to RC2 and found a problem with
passing parameters to the visual_effect method,
particularly :enddcolor and :startcolor. Firebug does not report any
error but the method just fails silently. If i remove the parameters,
the method works just fine albeit with the default colors.
Has anyone else found this problem?
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
2008 Sep 03
2
Highlighint rjs problem on a new product
Hi,
Problem Summary:
I have been trying to add the highlight effect to my table but
everytime a new record is added the highlighting gives an rjs error.
However when i click the add to cart button on a product that already
exists inside the table, the highlight effect works. Is this because
the partial must only have only one <tr></tr> in it and the <table>
must be on the other
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 Jun 26
1
RJS visual_effect toggle?
Is there a way to toggle an effect in an RJS? If not, anyone have
recommendations for how to manually make it toggle? I guess I would
assume some boolean that the rjs checks everytime it''s called and
depending on whether it''s true or false it will do page.visual_effect
:appear or page.visual_effect :hide
-Ben Lisbakken
--
Posted via http://www.ruby-forum.com/.
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 Apr 03
4
page.visual_effect :highlight not working
I just upgraded Ruby to 1.8.4 and Rails to 1.1 and I''m in the middle of
changing my Javascript code over to the Scriptaculous helper functions.
page.visual_effect :highlight, "some_div" seems to be broken. Instead
of fading, the background color of the element stays highlighted.
page.visual_effect works for other effects, though. Any ideas?
Thanks.
--
Posted via
2006 May 09
4
changing the color of :highlight
Is there an easy way to change to color of the :highlight effect?
:complete => visual_effect(:highlight, "targetid", :duration => 1)
thanks
--
Posted via http://www.ruby-forum.com/.
2007 May 15
5
Problem with RJS and/or Prototype.js =>ResponseText is blank
Hi, I''ve got a real head-scratcher. I''ve got a standard Ajax form using
form_remote_tag, which calls a controller action which adds a comment
and then sends back some JS via RJS which updates a few items on the
page.
It did work fine but (and I''ve no idea what has happened) now it
doesn''t. It calls the controller action but gets an empty response back
and