You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Programozás <pr...@hotmail.com> on 2004/01/29 17:35:53 UTC

Re: DatePicker

I think that this patch should be integrated into Tapestry!
Thank you very much!
Norbi

----- Original Message ----- 
From: <ny...@shaw.ca>
To: "Programozas" <pr...@hotmail.com>
Cc: <ta...@jakarta.apache.org>
Sent: Thursday, January 29, 2004 5:29 PM
Subject: RE: DatePicker


> Hi,
>
> I, too, just ran into the positioning issue in Mozilla and discovered its
a bug in the DatePicker javascript (org.apache.tapestry.form.DatePicker.js).
I solved it by copying out DatePicker.* from the source into my own project
and fixing the javascript.
>
> In DatePicker.js in the method
> Calendar.prototype.show(), lines 550 & 551:
> the script sets the position of the component by setting
> <snippet>
> this._calDiv.style.top = p.y + element.offsetHeight + 1;
> this._calDiv.style.left = p.x;
> </snippet>
>
> 2 problems with the above lines: First, Mozilla expects them to be String
types whereas the above are integer types. Second, these CSS properties need
units associated with them such as "px", "pt", "in", "mm", etc. which the
above lines do not include.
>
> TO FIX IT: Add units to the strings:
> <snippet>
> this._calDiv.style.top = (p.y + element.offsetHeight + 1) + "px";
> this._calDiv.style.left = p.x + "px";
> </snippet>
>
> The above fix worked for me and it continues to work in IE as well.
>
> Adam.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: DatePicker

Posted by Glen Stampoultzis <gs...@iinet.net.au>.
I suggest using diff -u to create a patch file and posting to the dev 
group.  Better yet put the patch file in bugzilla and it shouldn't get lost.

Regards,

Glen

At 03:35 AM 30/01/2004, you wrote:
>I think that this patch should be integrated into Tapestry!
>Thank you very much!
>Norbi
>
>----- Original Message -----
>From: <ny...@shaw.ca>
>To: "Programozas" <pr...@hotmail.com>
>Cc: <ta...@jakarta.apache.org>
>Sent: Thursday, January 29, 2004 5:29 PM
>Subject: RE: DatePicker
>
>
> > Hi,
> >
> > I, too, just ran into the positioning issue in Mozilla and discovered its
>a bug in the DatePicker javascript (org.apache.tapestry.form.DatePicker.js).
>I solved it by copying out DatePicker.* from the source into my own project
>and fixing the javascript.
> >
> > In DatePicker.js in the method
> > Calendar.prototype.show(), lines 550 & 551:
> > the script sets the position of the component by setting
> > <snippet>
> > this._calDiv.style.top = p.y + element.offsetHeight + 1;
> > this._calDiv.style.left = p.x;
> > </snippet>
> >
> > 2 problems with the above lines: First, Mozilla expects them to be String
>types whereas the above are integer types. Second, these CSS properties need
>units associated with them such as "px", "pt", "in", "mm", etc. which the
>above lines do not include.
> >
> > TO FIX IT: Add units to the strings:
> > <snippet>
> > this._calDiv.style.top = (p.y + element.offsetHeight + 1) + "px";
> > this._calDiv.style.left = p.x + "px";
> > </snippet>
> >
> > The above fix worked for me and it continues to work in IE as well.
> >
> > Adam.
> >
> >
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/