Ignore:
Timestamp:
Dec 27, 2009, 8:13:29 PM (15 years ago)
Author:
quentin
Message:

Don't use JavaScript? to stripe rows

Location:
trunk/packages/invirt-web/code
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-web/code/templates/list.mako

    r2794 r2796  
    8181</%def>
    8282
    83 <%def name="machineRow(machine)">
    84       <tr>
     83<%def name="machineRow(machine, dark)">
     84      <tr\
     85% if dark:
     86 class="stripedrow" \
     87% endif
     88>
    8589        <td rowspan="2">
    8690        % if machine.uptime and installing[machine]:
     
    140144        <th>VNC</th>
    141145      </tr>
    142 % for machine in machines:
    143         ${machineRow(machine)}
     146% for n, machine in enumerate(machines):
     147        ${machineRow(machine, (n%2)==0)}
    144148% endfor
    145149    </table>
    146     <script type="text/javascript" src="/static/stripe.js"></script>
    147     <script type="text/javascript">
    148         document.observe("dom:loaded", function() {
    149             stripe($('machinelist').getElementsByTagName('table')[0],
    150                    'stripedrow');
    151         });
    152     </script>
    153150</%def>
    154151
Note: See TracChangeset for help on using the changeset viewer.