webif/var/mongoose/lib/altrow

17 lines
333 B
Plaintext
Raw Normal View History

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