webif/var/mongoose/lib/altrow
hummypkg ceccfd9c1d update to Jim 0.75
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1811 2a923420-c742-0410-a762-8d5b09965624
2014-03-02 18:44:41 +00:00

21 lines
387 B
Plaintext

if {![exists -proc altrow]} {
proc altrow {{attrs ""}} {{i 0}} {
if {$attrs eq "reset"} {
set i 0
return
}
puts -nonewline "<tr"
if {[string first "class=" $attrs] == -1} {
switch $i {
0 { puts -nonewline " class=odd" }
1 { puts -nonewline " class=even" }
}
set i [expr ! $i]
}
if {$attrs ne ""} { puts -nonewline " $attrs" }
puts ">";
}
}