[interchange-cvs] interchange - jon modified 2 files

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Mon Jun 24 15:16:01 2002


User:      jon
Date:      2002-06-24 19:15:10 GMT
Modified:  code/UI_Tag display.coretag table_editor.coretag
Log:
Don't display table label or anything else when mv_metadata type of
'hidden' is chosen. As it currently stands, it's not possible to have
automatically-generated tables with completely hidden values. This patch
makes that possible from display and table-editor.

Note that the normal 'hidden' choice in the UI is actually hidden_text,
which isn't affected by this patch and will still show up.

Revision  Changes    Path
1.7       +3 -0      interchange/code/UI_Tag/display.coretag


rev 1.7, prev_rev 1.6
Index: display.coretag
===================================================================
RCS file: /var/cvs/interchange/code/UI_Tag/display.coretag,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -u -r1.6 -r1.7
--- display.coretag	9 Jun 2002 04:04:28 -0000	1.6
+++ display.coretag	24 Jun 2002 19:15:10 -0000	1.7
@@ -227,6 +227,9 @@
 	}
 
 #::logDebug("widget=$w");
+	# don't output label if widget is hidden form variable only
+	return $w if $w =~ /^\s*<input\s[^>]*type\s*=\W*hidden\b[^>]*>\s*$/i;
+
 	if(! defined $w) {
 		my $text = $opt->{value};
 		my $iname = $opt->{name} || $column;



1.8       +9 -2      interchange/code/UI_Tag/table_editor.coretag


rev 1.8, prev_rev 1.7
Index: table_editor.coretag
===================================================================
RCS file: /var/cvs/interchange/code/UI_Tag/table_editor.coretag,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -u -r1.7 -r1.8
--- table_editor.coretag	20 May 2002 15:15:38 -0000	1.7
+++ table_editor.coretag	24 Jun 2002 19:15:10 -0000	1.8
@@ -917,7 +917,7 @@
 	}
 
 	push @out, <<EOF unless $wo;
-<table class=touter border="" cellspacing="0" cellpadding="0" width="$opt->{table_width}">
+<table class=touter border="0" cellspacing="0" cellpadding="0" width="$opt->{table_width}">
 <tr>
   <td>
 
@@ -1426,6 +1426,13 @@
 										template => $template,
 									});
 #::logDebug("finished display of col=$c");
+
+		# don't use template if we have only a hidden HTML form variable
+		if ($display =~ /^\s*<input\s[^>]*type\s*=\W*hidden\b[^>]*>\s*$/i) {
+			push @controls, $display . "\n";
+			next;
+		}
+
 		if($super and ! $opt->{no_meta} and ($Variable->{UI_META_LINK} || $def->{ui_meta_force}) ) {
 			$meta .= '<BR><FONT SIZE=1>';
 			# Get global variables
@@ -1478,7 +1485,7 @@
 EOF
 			$rowcount = 0;
 		}
-		$w .= "<tr class=rnorm>" unless $rowcount++ % $rowdiv;
+		$w .= "<tr class=rnorm>\n" unless $rowcount++ % $rowdiv;
 		$w .= $display;
 		$w .= "</TR>\n" unless $rowcount % $rowdiv;
 		push @controls, $w;