[Rails-spinoffs] Bug in Effect.Highlight ?

2005-12-08 Thread Nicolas Terray
Hi All,

I've just discover scriptaculous and it is a really good library. Even
if I have some difficulties with short syntax in javascript code :/

I have a strange behaviour with Effect.Highlight, and as it's said on
bug report page :
"It's also a good idea to discuss this on the Mailing List beforehand,
maybe it's already known and in the works, or it isn't a bug ("it's a
feature!")."

Well. With this code :
---8<--












---8<--
If I 'mouseover' the first select box, the second will be highlighted. Great.
If I 'mouseover' and rapidly 'mouseout-mouseover' the first select box
whereas the effect is not finished, the second select box will be
freezed, i.e. the select box remains yellow and will not anymore
return to initial state.

It is a bug ? a feature ?
Is there a workaround ?

I'm working on Firefox 1.0.7/Fedora Core 3 and it seems to be the same
on IE6/Win2003

Thanks,
Nicolas Terray
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


[Rails-spinoffs] What does mean $(element) ?

2005-12-08 Thread Nicolas Terray
Hi All,

In scriptaculous scripts, I don't understand this syntaxe : $(element)

--8<-
Effect.Highlight = Class.create();
Object.extend(Object.extend(Effect.Highlight.prototype,
Effect.Base.prototype), {
  initialize: function(element) {
this.element = $(element);
...
--8<-

I had never seen this syntaxe, I doesn't know where I have to search
and google doesn't like $ in request :/

Thanks in advance for any explanations or urls,
Nicolas Terray
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


RE: [Rails-spinoffs] What does mean $(element) ?

2005-12-08 Thread Daniel Elmore
Hi Nicolas,

$(element) is part of the prototype framework. It's a shortcut for:
document.getElementById()

http://www.sergiopereira.com/articles/prototype.js.html


-Daniel Elmore


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Nicolas Terray
Sent: Thursday, December 08, 2005 4:06 AM
To: rails-spinoffs@lists.rubyonrails.org
Subject: [Rails-spinoffs] What does mean $(element) ?

Hi All,

In scriptaculous scripts, I don't understand this syntaxe : $(element)

--8<-
Effect.Highlight = Class.create();
Object.extend(Object.extend(Effect.Highlight.prototype,
Effect.Base.prototype), {
  initialize: function(element) {
this.element = $(element);
...
--8<-

I had never seen this syntaxe, I doesn't know where I have to search
and google doesn't like $ in request :/

Thanks in advance for any explanations or urls,
Nicolas Terray
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] What does mean $(element) ?

2005-12-08 Thread Nicolas Terray
On 12/8/05, Daniel Elmore <[EMAIL PROTECTED]> wrote:
> Hi Nicolas,
>
> $(element) is part of the prototype framework. It's a shortcut for:
> document.getElementById()
>
> http://www.sergiopereira.com/articles/prototype.js.html
>

Thanks a lot for your answer. I thought that it was a syntax for
references (like & in php) or some javascript-specific stuff...

:)
Nicolas Terray
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] What does mean $(element) ?

2005-12-08 Thread Nicolas Terray
> > http://www.sergiopereira.com/articles/prototype.js.html

Do you have other great urls like that about prototype in your bookmarks ?

Nicolas Terray
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


RE: [Rails-spinoffs] What does mean $(element) ?

2005-12-08 Thread Maninder, Singh
For Beginners this one should be fine:
http://particletree.com/features/quick-guide-to-prototype/

This won't probably help you too much, but you can take a look:
http://blogs.ebusiness-apps.com/jordan/pages/Prototype%20Library%20Info.htm

Hope this helps!

Thank you,
Mandy.
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] What does mean $(element) ?

2005-12-08 Thread Cam McVey
Not to mention the Script.aculo.us docs which improve all the time:

http://wiki.script.aculo.us/scriptaculous/show/Prototype

On 12/8/05, Maninder, Singh <[EMAIL PROTECTED]> wrote:
> For Beginners this one should be fine:
> http://particletree.com/features/quick-guide-to-prototype/
>
> This won't probably help you too much, but you can take a look:
> http://blogs.ebusiness-apps.com/jordan/pages/Prototype%20Library%20Info.htm
>
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] What does mean $(element) ?

2005-12-08 Thread Janko Mivšek

Hi Nicolas,

I found mos usefull explanation of prototype.js here: 
http://www.sergiopereira.com/articles/prototype.js.html.


Explanation of  $() function is just at the top!

Regards
Janko

Nicolas Terray wrote:

http://www.sergiopereira.com/articles/prototype.js.html



Do you have other great urls like that about prototype in your bookmarks ?

Nicolas Terray


___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] Choppiness in FF v1.5

2005-12-08 Thread victor jalencas
I only see chopiness on the first slide after dragging elements (only
the first show or hide) on FF 1.5 for OSX

Victor

On 12/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Interesting.  I did see some menu expand choppiness
> after the first drag (wasn't smooth, but wasn't too
> bad), but if I drag again it goes away.  (FF1.5 on
> WinXP).
>
> --- Jerod Venema <[EMAIL PROTECTED]> wrote:
>
> > Hey all,
> >
> > I've got an interesting one for anyone who's up for
> > a challenge.
> > Essentially, I have a very choppy effect, that
> > almost looks like
> > timeouts are overloaded or interfering or something,
> > that only occurs
> > when sortables are on the same page as "standard"
> > effects. Here's what
> > I'm doing:
> >
> > I have a menu that slides in and out on the right
> > side of the page. I
> > also have a series of sortable divs that get
> > somewhat compressed as the
> > menu slides in, and nicely resize to normal when the
> > menu slides out.
> > When I load the page, and ONLY show/hide the menu,
> > the menu works
> > great...very smooth. As soon as I have dragged some
> > items in the
> > sortable list, however, I get very "choppy"
> > behaviour in the
> > menu...check out the following URL using FF (I'm
> > using 1.5).
> >
> > http://jerod.ontasksoftware.com/demo/index.php
> >
> > To reproduce:
> > 1) Click Add Content (view the smooth slide in)
> > 2) Click Close (view the smooth slide out)
> > 3) Drag one of the items in the sortable list
> > 4) Click Add Content again. The sliding is now very
> > choppy.
> >
> > Any thoughts? I don't remember seeing this in
> > 1.07...anyone running that
> > version able to confirm?
> >
> > -Jerod
> >
> > ___
> > Rails-spinoffs mailing list
> > Rails-spinoffs@lists.rubyonrails.org
> >
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> >
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> ___
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>


--
Victor Jalencas <[EMAIL PROTECTED]>
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


RE: [Rails-spinoffs] Prototype.js Hash Methods

2005-12-08 Thread Maninder, Singh
Anyone?



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Maninder, Singh
Sent: Thursday, December 08, 2005 12:49 PM
To: rails-spinoffs@lists.rubyonrails.org
Subject: [Rails-spinoffs] Prototype.js Hash Methods


Hi,

Has anyone seen any documentation on the Hash Object defined in the prototype 
library?

To be precise the following methods -

1. keys
2. values
3. toQueryString
4. inspect
5. Merge

I am trying to play around with them and have come up with the following 
examples -

var h= $H({name: "john doe", email: "[EMAIL PROTECTED]", msg: "say hello to 
me"});
var h_in = h.inspect();
alert(h_in); 
//returns #

var qs = h.toQueryString();
alert(qs);
//returns john%20doe&email=john%40doe.com&msg=say%20hello%20to%20me

var mer = h.merge(h);
alert(mer.name);
//returns john doe

alert(mer.email);
//returns [EMAIL PROTECTED]

alert(mer.msg);
//returns say hello to me

var a_keys = h.keys();
alert(a_keys);
//returns name, email, msg

var a_values = h.values();
alert(a_values);
//returns john doe,[EMAIL PROTECTED],say hello to me

I want to know if this is the correct usage and how the merge function really 
works.

Any help would be appreciated.

Thanks in advance,
Mandy.

___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


[Rails-spinoffs] Uncomplete hiding on Firefox 1.5

2005-12-08 Thread victor jalencas
Hi all,

 I have observed the following on Firefox 1.5 (both on XP and OSX):

 My page has some div containers that hold sortable ul. The div's also
contain links for showing/hiding the contained ul's. No matter which
effect I use to do the hiding and showing (Fade/Appear, SlideUp/Down,
BlindUp/Down) the hidden ul's don't hide completely, leaving a blank
'trace' behind. When showing them again, the ul appears below this
blank space, pushing the bottom border of the container down. Hiding
them again makes the blank space grow, making the container grow at
the same time when the ul's are shown again.

 You can see an example of what I'm talking about at
http://www.booktraq.com/example.html

 Anyone has an idea of what I am doing wrong? This doesn't happen with Safari

TIA

Victor
--
Victor Jalencas <[EMAIL PROTECTED]>
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] Prototype.js Hash Methods

2005-12-08 Thread Andrew Kaspick
Not sure if there are docs anywhere, but all those exxcept inspect
make sense to me...

1. keys of the hash
2. values of the hash
3. converts your hash to a query string (just like it says) for use in urls
4. not sure exactly what it's doing without looking at the code
5. should work like the Merge method in Ruby for a Hash object.
Try merging with another hash object that has a name key and a
different value than the origianl and also add some new key/values
pairs in the new hash, then you should see some more interesting
results.

On 12/8/05, Maninder, Singh <[EMAIL PROTECTED]> wrote:
> Anyone?
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Maninder, Singh
> Sent: Thursday, December 08, 2005 12:49 PM
> To: rails-spinoffs@lists.rubyonrails.org
> Subject: [Rails-spinoffs] Prototype.js Hash Methods
>
>
> Hi,
>
> Has anyone seen any documentation on the Hash Object defined in the prototype 
> library?
>
> To be precise the following methods -
>
> 1. keys
> 2. values
> 3. toQueryString
> 4. inspect
> 5. Merge
>
> I am trying to play around with them and have come up with the following 
> examples -
>
> var h= $H({name: "john doe", email: "[EMAIL PROTECTED]", msg: "say hello 
> to me"});
> var h_in = h.inspect();
> alert(h_in);
> //returns # 'say hello to me'}>
>
> var qs = h.toQueryString();
> alert(qs);
> //returns john%20doe&email=john%40doe.com&msg=say%20hello%20to%20me
>
> var mer = h.merge(h);
> alert(mer.name);
> //returns john doe
>
> alert(mer.email);
> //returns [EMAIL PROTECTED]
>
> alert(mer.msg);
> //returns say hello to me
>
> var a_keys = h.keys();
> alert(a_keys);
> //returns name, email, msg
>
> var a_values = h.values();
> alert(a_values);
> //returns john doe,[EMAIL PROTECTED],say hello to me
>
> I want to know if this is the correct usage and how the merge function really 
> works.
>
> Any help would be appreciated.
>
> Thanks in advance,
> Mandy.
>
> ___
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> ___
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


[Rails-spinoffs] Slider problems in IE6

2005-12-08 Thread Brendan . McKenna
Hi,

Sorry to report a bug here, but since the web site (well, just the 
Wiki part of it) seems to spend more time being unavailable than not, I 
don't have much choice.

I'm using IE version 6.0.2900.2180.xpsp_sp2_gdr.050301-1519.  I've 
developed a small page that uses the sliders -- specifically, a single 
slider with two handles), which works fine in all versions of Firefox that 
I've tested it with.  However, in the above version of IE, it doesn't work 
at all.  I've managed to trace it to the fact that the 
Control.Slider.trackWidth attribute is not being set in IE, but it is 
being set in Firefox.  The track, which I've defined as follows:



Comes up with a value for offsetWidth (or 
Control.Slider.track.offsetWidth) of 0 in IE, and 350 in Firefox.

I can work around this by 'manually' setting the trackWidth 
attribute to the appropriate size.



Brendan
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] InPlaceEditor update of page contents ?

2005-12-08 Thread Francois Beausoleil
Hello John,

2005/12/8, John Butler <[EMAIL PROTECTED]>:
> Or you can accomplish the one call my stuffing in extra information
> into the response header. This information will be ignored by the
> autocomplete and everything else in Prototype and Scriptaculous
> (leaving it wide open to play with).

Thanks for the tip, but that doesn't work for me, it seems.  The value
length is upwards of 1 Kb, and contains new lines and such.  I'm on
Rails, and rendering a partial that I used originally to render the
table.

I guess I'll just have to bite the bullet and do a second Ajax query.

Thanks for the info.

Bye !
--
François Beausoleil
http://blog.teksol.info/
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


[Rails-spinoffs] Re: Bug in Effect.Highlight ?

2005-12-08 Thread Nicolas Terray
On 12/8/05, Nicolas Terray <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I've just discover scriptaculous and it is a really good library. Even
> if I have some difficulties with short syntax in javascript code :/
>
> I have a strange behaviour with Effect.Highlight, and as it's said on
> bug report page :
> "It's also a good idea to discuss this on the Mailing List beforehand,
> maybe it's already known and in the works, or it isn't a bug ("it's a
> feature!")."
>
> Well. With this code :
> ---8<--
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---8<--
> If I 'mouseover' the first select box, the second will be highlighted. Great.
> If I 'mouseover' and rapidly 'mouseout-mouseover' the first select box
> whereas the effect is not finished, the second select box will be
> freezed, i.e. the select box remains yellow and will not anymore
> return to initial state.
>
> It is a bug ? a feature ?
> Is there a workaround ?
>
> I'm working on Firefox 1.0.7/Fedora Core 3 and it seems to be the same
> on IE6/Win2003
>
> Thanks,
> Nicolas Terray
>

To reproduce the bug.

If you go to :
http://wiki.script.aculo.us/scriptaculous/show/CombinationEffectsDemo

and double-clic where it is said "Click for Effect.Highlight demo"
then the effect will be frozen :(

It seems to be a "real" bug, no ?

Nicolas Terray
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] Re: Bug in Effect.Highlight ?

2005-12-08 Thread Cam McVey
Looks like the Effect is grabing the color of the element at the
moment of the second click. In other words, while the effect is
running, the current color of the element is not the 'normal' color
nor the 'highlight' color, but whatever it currently is during the
first run of the effect.

Is that right?

Regards,
Cam

On 12/8/05, Nicolas Terray <[EMAIL PROTECTED]> wrote:
> To reproduce the bug.
>
> If you go to :
> http://wiki.script.aculo.us/scriptaculous/show/CombinationEffectsDemo
>
> and double-clic where it is said "Click for Effect.Highlight demo"
> then the effect will be frozen :(
>
> It seems to be a "real" bug, no ?
>
> Nicolas Terray
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] Addressing a class, rather than an id?

2005-12-08 Thread victor jalencas
Raymond,

 check out the Behaviour library (http://bennolan.com/behaviour/). It
proved very useful to me.

Cheers,
Victor

On 12/7/05, Raymond Brigleb <[EMAIL PROTECTED]> wrote:
> Good day,
>
> I'm trying to use the slider control to resize a pile of images on a
> web page. Clever, huh. Bet cha didn't think of that one!!! :)
>
> But seriously. It seems I want to address a class, rather than the
> individual id's of the images. At this point, I'm getting some
> results with something like this:
> onSlide:function(v){$('item_428').style.width = (v*100)+"px"}
>
> But that just addresses a single image (and doesn't address the
> height, but that's another matter...). My first thought was to use
> Prototype's getElementsByClassName() to address all images of a given
> class, but it seems you can't just set them that way, only get an
> array of them.
>
> So my question is: am I barking up the wrong tree? Is there an easy
> way to address CSS properties of a class of objects on a page, or do
> I need to loop through them individually somehow? Has anyone tackled
> this one?
>
> Thanks,
> Raymond
> --
>
> Raymond Brigleb, Needmore Designs
> http://needmoredesigns.com/
>
>
>
> ___
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>


--
Victor Jalencas <[EMAIL PROTECTED]>
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


[Rails-spinoffs] Element.setOpacity issue in script.aculo.us effects

2005-12-08 Thread Tom Fakes








In the
Element.setOpacity method definition in effects.js, there is a line that sets
the opacity to 0.99 if the requested opacity is 1.  This is clearly there
for a reason, but having a very slight transparency actually makes my pages
look bad – images are the worst, but I can see the backgrounds through my
supposedly opaque elements.

 

Why is 1
bad for this value? 

 

Here’s
the code in question:

 

Element.setOpacity = function(element, value){  

  element= $(element);  

  var els = element.style;  

  if (value == 1){  

    els.opacity = '0.99';  

        ….






___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs