*** lib/TWiki/Plugins/EditTablePlugin.pm.orig Tue Apr 8 16:34:04 2003 --- lib/TWiki/Plugins/EditTablePlugin.pm Tue Apr 8 16:31:14 2003 *************** *** 47,53 **** use vars qw( $web $topic $user $installWeb $VERSION $debug $query $renderingWeb ! $preSp $header $footer @format $changeRows $helpTopic $nrCols $encodeStart $encodeEnd $table ); --- 47,54 ---- use vars qw( $web $topic $user $installWeb $VERSION $debug $query $renderingWeb ! $preSp $header $footer @format @formatExpansed ! $changeRows $helpTopic $nrCols $encodeStart $encodeEnd $table ); *************** *** 360,365 **** --- 361,371 ---- $format[0] = "text,16" unless @format; $nrCols = @format; + # expansed form to be able to use %-vars in format + $tFormat =~ s///gos; + $tFormat = &TWiki::Func::expandCommonVariables( $tFormat, $theTopic, $theWeb ); + @formatExpansed = split( /\s*\|\s*/, $tFormat ); + $formatExpansed[0] = "text,16" unless @formatExpansed; # FIXME: No handling yet of footer return "$preSp"; *************** *** 429,439 **** --- 435,447 ---- my $i = @format - 1; $i = $theCol if( $theCol < $i ); my @bits = split( /,\s*/, $format[$i] ); + my @bitsExpansed = split( /,\s*/, $formatExpansed[$i] ); my $type = "text"; $type = $bits[0] if @bits > 0; my $size = 0; $size = $bits[1] if @bits > 1; my $val = ""; + my $valExpansed = ""; my $sel = ""; if( $type eq "select" ) { $size = 1 if $size < 1; *************** *** 441,447 **** $i = 2; while( $i < @bits ) { $val = $bits[$i] || ""; ! if( $val eq $theValue ) { $text .= " "; } else { $text .= " "; --- 449,456 ---- $i = 2; while( $i < @bits ) { $val = $bits[$i] || ""; ! $valExpansed = $bitsExpansed[$i] || ""; ! if( $valExpansed eq $theValue ) { $text .= " "; } else { $text .= " ";