[wpkg-users] wpkgCreateReport

Pendl Stefan stefan.pendl at haidlmair.at
Fri Sep 4 18:15:10 CEST 2009


> >
> > @Stefan:
> >
> > It was also my plan to include a hiding functionality for certain rows
> > in HTML via javascript but I did not find
> > the time so far. So if you are doing any similar please post back the
> > result so we maybe can intergate it into the
> > codebase.
> >
> Grubi,
>        I will see what I can do, implementing supression by state is no problem, but for the other columns, the JS script would have to fill an array with the available values to be able to filter by available items.
> I will report back, when I have something.
>
> ---
> Stefan
>
I have added a basic show/hide feature to the HTML template:

Place at the end of the head:

<script type="text/javascript" language="JavaScript">
<!--
    function HideState(StateClass) {
        var TRarray = document.getElementsByTagName('tr');

        for ( var i = 0; i < TRarray.length; i++ ) {
            if ( TRarray.item(i).className.match(StateClass) ) {
                if ( TRarray.item(i).style.display == "none" ) {
                    TRarray.item(i).style.display = "block";
                } else {
                    TRarray.item(i).style.display = "none";
                }
            }
        }
    }
// -->
</script>
Place at the beginning of the body:

<br/>
<table>
<tr>
<td>
<input type="button" value="Show/Hide State OK" onclick="HideState('pkgStateOk')"/>
</td>
<td>
<input type="button" value="Show/Hide State Install" onclick="HideState('pkgStateInstall')"/>
</td>
<td>
<input type="button" value="Show/Hide State Upgrade" onclick="HideState('pkgStateUpgrade')"/>
</td>
<td>
<input type="button" value="Show/Hide State Downgrade" onclick="HideState('pkgStateDowngrade')"/>
</td>
<td>
<input type="button" value="Show/Hide State Remove" onclick="HideState('pkgStateRemove')"/>
</td>
</tr>
</table>
<br/>
The problem is that all the information gets paced inside the first column after a row is hidden and shown again, so I will have to investigate in the correct usage of the display property or if I need to use a different one.

---
Stefan




More information about the wpkg-users mailing list