IE 5.5 and 6 png "fix"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

IE 5.5 and 6 png "fix"

Sebastian Sastre-2
Hi there,
 
    the IE's fact of the day bring us today the feature of being unable to properly render translucent PNGs. So.. what should I use to "fix" this?
 
 
    and there one see that one can include that .js file and load it only for IE. That is made by making the include of that script commented like: 
 
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->
 
    how is the most unelegant way to introduce that in the head? I imagine to put that in the updateRoot: with a manual made tag open and close. Any better way?
 
    cheers,
 

Sebastian Sastre

PS: I think it's another candidate for Jetsam

 

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: IE 5.5 and 6 png "fix"

Philippe Marschall
2007/9/19, Sebastian Sastre <[hidden email]>:

>
>
> Hi there,
>
>     the IE's fact of the day bring us today the feature of being unable to
> properly render translucent PNGs. So.. what should I use to "fix" this?
>
>     I'm tempted by:
> http://homepage.ntlworld.com/bobosola/pnghowto.htm
>
>     and there one see that one can include that .js file and load it only
> for IE. That is made by making the include of that script commented like:
>
> <!--[if lt IE 7.]>
> <script defer type="text/javascript" src="pngfix.js"></script>
> <![endif]-->
>
>     how is the most unelegant way to introduce that in the head? I imagine
> to put that in the updateRoot: with a manual made tag open and close. Any
> better way?

aRoot if lessThan; ie7; do: [
   aRoot javascripts
       url: 'pngfix.js' ]

This doesn't do the deferer but could be added if you need it.

Cheers
Philippe

>     cheers,
>
>
>
> Sebastian Sastre
>
> PS: I think it's another candidate for Jetsam

I don't think so ;)

> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: IE 5.5 and 6 png "fix"

Sebastian Sastre-2
That’s one of the most elegat hacks I've seen for html so far.
Question: by #javascripts you actually mean to say #addScript: ? (I see no
implementors of javascripts in my Seaside 2.8a1 image jmt.480)
Question: defer could be added.. But where do you mean?

Sebastian



Sebastian Sastre

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Philippe Marschall
> Enviado el: Miércoles, 19 de Septiembre de 2007 13:03
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] IE 5.5 and 6 png "fix"
>
> 2007/9/19, Sebastian Sastre <[hidden email]>:
> >
> >
> > Hi there,
> >
> >     the IE's fact of the day bring us today the feature of being
> > unable to properly render translucent PNGs. So.. what
> should I use to "fix" this?
> >
> >     I'm tempted by:
> > http://homepage.ntlworld.com/bobosola/pnghowto.htm
> >
> >     and there one see that one can include that .js file
> and load it
> > only for IE. That is made by making the include of that
> script commented like:
> >
> > <!--[if lt IE 7.]>
> > <script defer type="text/javascript" src="pngfix.js"></script>
> > <![endif]-->
> >
> >     how is the most unelegant way to introduce that in the head? I
> > imagine to put that in the updateRoot: with a manual made
> tag open and
> > close. Any better way?
>
> aRoot if lessThan; ie7; do: [
>    aRoot javascripts
>        url: 'pngfix.js' ]
>
> This doesn't do the deferer but could be added if you need it.
>
> Cheers
> Philippe
>
> >     cheers,
> >
> >
> >
> > Sebastian Sastre
> >
> > PS: I think it's another candidate for Jetsam
>
> I don't think so ;)
>
> > _______________________________________________
> > Seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> >
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: IE 5.5 and 6 png "fix"

Lukas Renggli
> That's one of the most elegat hacks I've seen for html so far.
> Question: by #javascripts you actually mean to say #addScript: ? (I see no
> implementors of javascripts in my Seaside 2.8a1 image jmt.480)
> Question: defer could be added.. But where do you mean?

#javascripts allButLast --> #javascript

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: IE 5.5 and 6 png "fix"

Conrad Taylor
In reply to this post by Sebastian Sastre-2
Hi, are there any project initiatives for adding the following blessed components to Seaside and/or creating a recognized list from existing components:

o  authentication
o  search (i.e. lucene)
o  web services
o  and so on

Furthermore, I would like to update the FAQ with this information in a way that's clear to the person wanting the information.  For example, "How does one create a form and perform validation in Seaside?".  From my readings, Magritte does this and a whole lot more.  I'll spend some time creating a better FAQ categories and adding some unanswered questions later this week and next week.   Lastly, my ideal goal would be to do the following:

a)  post the question
b)  review the question
c)  if question is publishable (d) otherwise (f)
d)  publish the question with possible answer
e)  add comments to the published answer
f)   done

In short, this would be similar to a moderated blog with the following format:

Answer has one primary answer and an answer has 0 or more comments associated to it.

-Conrad

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: IE 5.5 and 6 png "fix"

Udo Schneider
In reply to this post by Philippe Marschall
Philippe Marschall wrote:
> aRoot if lessThan; ie7; do: [
>    aRoot javascripts
>        url: 'pngfix.js' ]
>
I use something like this:

anHtmlRoot if lessThan ie7 do:
   [(anHtmlRoot linkToScript: (WATCFileLibrary urlOf: #pngfixJs))
     attributeAt: 'defer'
     put: 'defer']

To use the defer piece in this was I had to patch
WHHtmlRoot>>#linkToScript: to return the script though:

linkToScript: url
        "only link to script if it's not already been linked too, necessary
when lists of child components try to link to dependant scripts, a
google map for example"

        | fullUrl |
        fullUrl := self absoluteUrlForResource: url asString.
        ^headElements
                detect: [ :each | each name = 'script' and: [ each url = fullUrl ] ]
                ifNone: [ self scriptElementWithSrc: fullUrl ]

CU,

Udo

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: IE 5.5 and 6 png "fix"

Philippe Marschall
2007/9/21, Udo Schneider <[hidden email]>:

> Philippe Marschall wrote:
> > aRoot if lessThan; ie7; do: [
> >    aRoot javascripts
> >        url: 'pngfix.js' ]
> >
> I use something like this:
>
> anHtmlRoot if lessThan ie7 do:
>    [(anHtmlRoot linkToScript: (WATCFileLibrary urlOf: #pngfixJs))
>      attributeAt: 'defer'
>      put: 'defer']
>
> To use the defer piece in this was I had to patch
> WHHtmlRoot>>#linkToScript: to return the script though:
>
> linkToScript: url
>         "only link to script if it's not already been linked too, necessary
> when lists of child components try to link to dependant scripts, a
> google map for example"
>
>         | fullUrl |
>         fullUrl := self absoluteUrlForResource: url asString.
>         ^headElements
>                 detect: [ :each | each name = 'script' and: [ each url = fullUrl ] ]
>                 ifNone: [ self scriptElementWithSrc: fullUrl ]

There are two "problems" with your code. #linkToScript: was deprecated
in 2.7 and removed in 2.8 because if its non-canvas-ishness. This
makes it hard to configure and shows in exactly such cases. Second
"the correct way" (tm) to deal with attributes that have no value in
HTML is to put true as a value. So ideally your code would read:

aRoot if lessThan; ie7; do: [
   aRoot javascript
       attributeAt: 'defer' put: true;
       url: (WATCFileLibrary urlOf: #pngfixJs) ]

Seaside2.8a1-pmm.487 adds #defer to WAScriptElement and WAScriptTag.
Although we are officially in code freeze I think this goes ok. If
somebody has a problem with this I can remove it and start 2.9 today.
As usual the code is copy pasted because we don't need no stinkin'
traits.

Now you can do:

aRoot if lessThan; ie7; do: [
   aRoot javascript
       defer;
       url: 'pngfix.js' ]

Cheers
Philippe

> CU,
>
> Udo
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside