ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

Documentation out of date: IE6 alpha fix

gekkio
17 Mar 2010 07:25:31 GMT
17 Mar 2010 07:25:31 GMT

Hello!

ZK 5 documentation regarding IE6 alpha fix seems to be out of date.
The wiki page Trouble_Shooting suggests the following:

<?script content="zDom.IE6_ALPHAFIX='.png';"?>

This didn't work for me so I looked at ZK 5.0 source code for guidance.
A ZUL-file in zkdemo (test/zk5-alphafix.zul) suggested the following:

<?script content="jq.IE6_ALPHAFIX='.png';"?>

That didn't work either. I think the reason is that in my project the alpha fix code is in an included ZUL file, not in the "main" ZUL file.
For example: a.zul includes b.zul, b.zul contains the code for the fix.

However, I managed to get it working with this in my ZUL file (script is a valid ZUL tag too!):

<script type="text/javascript">jq.IE6_ALPHAFIX='.png';</script>

The documentation should be updated to reflect the correct way to apply the alpha fix. I'd do it myself but I don't have write access to the wiki... or maybe I just couldn't find the edit button :)

PeterKuo
18 Mar 2010 02:45:47 GMT
18 Mar 2010 02:45:47 GMT

every registered user has right to edit, (though the registration is a separate system than forum)
unless some spam user is blocked.

You may change your preference to prefered skin.
@gekkio, come on, it would be ur first contribution in our doc.

gekkio
18 Mar 2010 06:21:58 GMT
18 Mar 2010 06:21:58 GMT

Finally found the edit link!
It was "View source" while I was searching for "Edit" :)

However, it seems that the specific page (Trouble_Shooting) I'd like to edit is locked:
'This page has been locked to prevent editing.'

terrytornadoTop Contributor
18 Mar 2010 08:18:24 GMT
18 Mar 2010 08:18:24 GMT

My edit is locked too ??

PeterKuo
18 Mar 2010 19:57:36 GMT
18 Mar 2010 19:57:36 GMT

@gekkio
protected pages are listed in
http://docs.zkoss.org/index.php?title=Special:ProtectedPages&limit=500
I'll discuss with others to see if it is necessary to protect certain page.

@terrytornado
By my edit, you mean which page? Or your wiki account? (not possible, I checked.)
We only blocked some spamming accounts.

PeterKuo
18 Mar 2010 22:02:12 GMT
18 Mar 2010 22:02:12 GMT

@gekkio
unprotected such page. You may edit now.

gekkio
19 Mar 2010 01:15:07 GMT
19 Mar 2010 01:15:07 GMT

Cool, thanks. I updated the documentation.

PeterKuo
21 Mar 2010 20:19:33 GMT
21 Mar 2010 20:19:33 GMT

@terrytornado
By "my edit" ?? Do you mean "my watchlist" or "my contribution" ?
They are not locked.
They are in the top of page.

terrytornadoTop Contributor
22 Mar 2010 05:05:22 GMT
22 Mar 2010 05:05:22 GMT

Hi Peter, Now i can edit again.

best
Stephan

PS: Sometimes i found typos i correct them.

PeterKuo
22 Mar 2010 21:08:05 GMT
22 Mar 2010 21:08:05 GMT

@terrytornado
Inspired by you, I tried a way to check the spelling of wiki page

Download google toolbar for firefox.
It has spelling check tool inside it.
But it can only check content inside an input form.
Goto each wiki page, and edit the whole page. Then the content will be inside a form.

For example, I just modified
http://docs.zkoss.org/wiki/ZKCDI_Quick_Start_Guide

FujitsuConsulting
14 Sep 2010 19:36:17 GMT
14 Sep 2010 19:36:17 GMT

Hi,

I have tried the following alphafix commands, but when the page is first loaded (nothing in cache/no cookies) the alpha fix does not work - when I refresh the page it works then. Does any one of a fix for this? (We are using ZK 5.0.4)

In ZUL:

<?script content="zDom.IE6_ALPHAFIX='.png';"?>

<?script content="jq.IE6_ALPHAFIX='.png';"?>

<script type="text/javascript">jq.IE6_ALPHAFIX='.png';</script>

<?script content="jq.IE6_ALPHAFIX='pn.png'"?>

<zk:image mold="alphafix" src="/img/pn.png"  />

In Java:

    Script alphafix = new Script();
    alphafix.setContent("jq.IE6_ALPHAFIX='.png';");
    appendChild(alphafix);

Heres a simple ZUL file which shows the issue:

<?xml version="1.0" encoding="UTF-8" ?>
<?script content="jq.IE6_ALPHAFIX='.png';"?>
<zk xmlns:zk="http://www.zkoss.org/2005/zul">
  <zk:window title="My First window" border="normal" width="400px" height="400px" sizable="true" style="background-color:#414b68"  >
    <zk:image src="/img/pn.png"  />  
  </zk:window>
</zk>

The first time the page is loaded if I right click>properties on the image it displays:

http://127.0.0.1:8081/ZKApp/img/pn.png;jsessionid=32E318861C6823CBD4288197801B37CF

After a refresh it displays:

http://127.0.0.1:8081/ZKApp/zkau/web/img/spacer.gif

Thanks

iantsai
20 Sep 2010 04:41:05 GMT
20 Sep 2010 04:41:05 GMT

I think there must be some special logic behind your code, how could ZK know to replace your /img/pn.png to /ZKApp/zkau/web/img/spacer.gif?

FujitsuConsulting
20 Sep 2010 18:31:56 GMT
20 Sep 2010 18:31:56 GMT

The spacer.gif is used in the alpha fix...

My current work around is this:
1. Login page includes the alpha fix, but no pngs
2. Login forwards to the main app with alpha pngs

This works because the app has loaded before the images are displayed, the issue seems to be if you need an alpha png displayed on the first page of your app.