[interchange-cvs] interchange - heins modified 6 files

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Sun Oct 27 01:10:01 2002


User:      heins
Date:      2002-10-27 05:09:39 GMT
Modified:  dist/lib/UI/pages/admin db_metaconfig.html flex_editor.html
Modified:           meta_editor.html
Modified:  dist/lib/UI/vars UI_STD_HEAD
Modified:  lib/Vend/Table Editor.pm
Modified:  share/interchange ic.css
Log:
Fairly major changes which do two types of things.

* Enhance "views".

	-- Allow selection of view based on a field (like prod_group),
	   allows different editor displays for different product types
	   and many other possiblities.

	-- Allow expansion of values in include_forms, or complete ITL.

	-- Allow linking of field-specific meta from within the
	   db_metaconfig editor (convenience). Not enabled by default.

* Change display in UI.

  -- You can [set display_class]cssclass[/set] and change the default
     display (padding, etc.) in the main content cell.

  -- Default changed to 1 padding and left-justify always.

  -- Widths changed in select and table-editor.

Revision  Changes    Path
2.9       +31 -5     interchange/dist/lib/UI/pages/admin/db_metaconfig.html


rev 2.9, prev_rev 2.8
Index: db_metaconfig.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/db_metaconfig.html,v
retrieving revision 2.8
retrieving revision 2.9
diff -u -r2.8 -r2.9
--- db_metaconfig.html	17 Oct 2002 04:46:23 -0000	2.8
+++ db_metaconfig.html	27 Oct 2002 05:09:39 -0000	2.9
@@ -41,11 +41,12 @@
 
 [table-editor
 	table=mv_metadata
+	display-only=fieldmeta
 	view=dbconfig
 	no-table-meta=1
 	tabbed=1
 	table_width=900
-	tab_width=150
+	tab_width=120
 	break_row_class=rmarq
 	panel_width=900
 	panel_height=700
@@ -76,12 +77,17 @@
 		extended.ui_sort_combined
 		extended.ui_show_fields
 		extended.ui_special_add
+		fieldmeta
 
-		=Edit page display
+		=Edit page
 
 		extended.ui_data_fields
 		extended.bottom_buttons
 		extended.top_buttons
+		extended.view_from
+
+		=Form Linking
+
 		extended.link_table
 		extended.link_before
 		extended.link_key
@@ -92,8 +98,10 @@
 		extended.link_extra
 		extended.include_before
 		extended.include_form
+		extended.include_form_expand
+		extended.include_form_interpolate
 
-		=Tabbed display
+		=Tabbed Display
 
 		extended.tab_width
 		extended.tab_height
@@ -102,7 +110,7 @@
 		extended.tab_horiz_offset
 		extended.tab_vert_offset
 
-		=HTML formatting of edit page
+		=Edit Page HTML
 
 		extended.table_width
 		extended.left_width
@@ -115,7 +123,7 @@
 		extended.widget_cell_class
 		extended.help_cell_class
 
-		=Spreadsheet page display
+		=Spreadsheet page
 
 		extended.spread_fields
 		extended.spread_height
@@ -150,6 +158,7 @@
 		'extended.table_width' => 'Width specification for editor table',
 		'extended.ui_data_fields'		=> 'Fields to edit',
 		'extended.ui_display_only'		=> 'Fields for display only',
+		'extended.view_from'			=> 'Custom view from field',
 		'extended.ui_show_fields'		=> 'Show on select page',
 		'extended.ui_sort_field'		=> 'Sort by on select page',
 		'extended.ui_sort_option'		=> 'Sort modifier for select page',
@@ -159,6 +168,8 @@
 		'extended.link_before'			=> 'Column to appear before',
 		'extended.include_before'		=> 'Column for include to appear before',
 		'extended.include_form'			=> 'Custom form widget for inclusion',
+		'extended.include_form_expand'	=> 'Expand values of include',
+		'extended.include_form_interpolate'	=> 'Full interpolate of include',
 		'extended.link_key'				=> 'Foreign Key',
 		'extended.link_label'			=> 'Label for linked table',
 		'extended.link_sort'			=> 'Sort linked records by',
@@ -175,6 +186,7 @@
 		'extended.help_cell_class'		=> 'Help cell class (standard row)',
 		'extended.bottom_buttons'		=> 'Buttons only on bottom',
 		'extended.top_buttons'			=> 'Buttons only on top',
+		'fieldmeta'						=> 'Individual field meta (view only)',
 
 	}`
 
@@ -216,6 +228,7 @@
 		'extended.table_width'		    => 'text_8',
 		'extended.ui_data_fields'		=> 'move_combo_8',
 		'extended.ui_display_only'		=> 'text_40',
+		'extended.view_from'			=> 'select',
 		'extended.ui_show_fields'		=> 'move_combo_8',
 		'extended.ui_sort_field'		=> 'select',
 		'extended.ui_sort_option'		=> 'multiple',
@@ -224,10 +237,13 @@
 		'extended.link_table'			=> 'select',
 		'extended.link_before'			=> 'text_12',
 		'extended.include_form'			=> 'textarea_10_80',
+		'extended.include_form_expand'	=> 'yesno',
+		'extended.include_form_interpolate'	=> 'yesno',
 		'extended.link_label'			=> 'text_50',
 		'extended.link_fields'			=> 'text_70',
 		'extended.link_key'			=> 'text_20',
 		'extended.top_buttons'		=> 'yesno',
+		'fieldmeta'					=> 'links',
 	}`
 
 	filter=`{
@@ -241,6 +257,7 @@
 		'extended.ui_sort_field'		=> $CGI->{ui_table},
 		'extended.ui_show_fields'		=> $CGI->{ui_table},
 		'extended.ui_data_fields'		=> $CGI->{ui_table},
+		'extended.view_from'			=> $CGI->{ui_table},
 		'extended.spread_fields'		=> $CGI->{ui_table},
 		'extended.spread_meta'			=> $CGI->{ui_table},
 		'extended.spread_textarea'		=> $CGI->{ui_table},
@@ -258,10 +275,19 @@
 		'extended.ui_show_fields'		=> 30,
 	}`
 
+	form=`{
+			fieldmeta => '',
+	}`
+
+	wid_href=`{
+			fieldmeta => 'meta_editor',
+	}`
+
 	options=`{
 		'extended.ui_sort_field'		=> 'columns',
 		'extended.ui_show_fields'		=> 'columns',
 		'extended.ui_data_fields'		=> 'columns',
+		'extended.view_from'			=> 'columns',
 		'extended.spread_fields'		=> 'columns',
 		'extended.spread_meta'			=> 'columns',
 		'extended.spread_textarea'		=> 'columns',
@@ -279,4 +305,4 @@
 
 ]
 @_UI_STD_FOOTER_@
-<!-- page: @@MV_PAGE@@ version: $Id: db_metaconfig.html,v 2.8 2002/10/17 04:46:23 mheins Exp $ -->
+<!-- page: @@MV_PAGE@@ version: $Id: db_metaconfig.html,v 2.9 2002/10/27 05:09:39 mheins Exp $ -->



2.7       +2 -2      interchange/dist/lib/UI/pages/admin/flex_editor.html


rev 2.7, prev_rev 2.6
Index: flex_editor.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/flex_editor.html,v
retrieving revision 2.6
retrieving revision 2.7
diff -u -r2.6 -r2.7
--- flex_editor.html	24 Sep 2002 01:37:29 -0000	2.6
+++ flex_editor.html	27 Oct 2002 05:09:39 -0000	2.7
@@ -74,7 +74,7 @@
 
 [/strip]@_UI_STD_HEAD_@
 
-[table-editor cgi=1]
+[table-editor cgi=1 image_meta="__UI_IMAGE_META__"]
 
 <A HREF="[area href=admin/flex_editor
 				form='
@@ -91,4 +91,4 @@
 
 @_UI_STD_FOOTER_@
 
-<!-- page: @@MV_PAGE@@ -->
+<!-- page: @@MV_PAGE@@ version: $Id: flex_editor.html,v 2.7 2002/10/27 05:09:39 mheins Exp $ -->



2.3       +4 -1      interchange/dist/lib/UI/pages/admin/meta_editor.html


rev 2.3, prev_rev 2.2
Index: meta_editor.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/meta_editor.html,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -r2.2 -r2.3
--- meta_editor.html	24 Sep 2002 01:37:29 -0000	2.2
+++ meta_editor.html	27 Oct 2002 05:09:39 -0000	2.3
@@ -1,3 +1,6 @@
+[if cgi fieldmeta]
+	[cgi name=item_id set="[cgi fieldmeta]"]
+[/if]
 [if !cgi item_id]
 	[bounce page="__UI_BASE__/gentable"]
 [/if]
@@ -113,4 +116,4 @@
 	][/table-editor]
 
 @_UI_STD_FOOTER_@
-<!-- page: @@MV_PAGE@@ -->
+<!-- page: @@MV_PAGE@@ version: $Id: meta_editor.html,v 2.3 2002/10/27 05:09:39 mheins Exp $ -->



2.33      +2 -2      interchange/dist/lib/UI/vars/UI_STD_HEAD


rev 2.33, prev_rev 2.32
Index: UI_STD_HEAD
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/vars/UI_STD_HEAD,v
retrieving revision 2.32
retrieving revision 2.33
diff -u -r2.32 -r2.33
--- UI_STD_HEAD	14 Oct 2002 12:53:48 -0000	2.32
+++ UI_STD_HEAD	27 Oct 2002 05:09:39 -0000	2.33
@@ -465,9 +465,9 @@
 				<!-- row 10: main content -->
 				<tr>
 					<td align=left valign=top>
-						<table width="100%" border=0 cellspacing=0 cellpadding=10>
+						<table width="100%" border=0 cellspacing=0 cellpadding=0>
 							<tr>
-								<td class=maincontent valign=top>[if scratch ui_checklist]
+								<td class="[either][scratch display_class][or]maincontent[/either]" valign=top>[if scratch ui_checklist]
 <table>
 	<tr>
 		<td width="20%">



1.16      +209 -87   interchange/lib/Vend/Table/Editor.pm


rev 1.16, prev_rev 1.15
Index: Editor.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/Editor.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Editor.pm	18 Oct 2002 07:12:37 -0000	1.15
+++ Editor.pm	27 Oct 2002 05:09:39 -0000	1.16
@@ -1,6 +1,6 @@
 # Vend::Table::Editor - Swiss-army-knife table editor for Interchange
 #
-# $Id: Editor.pm,v 1.15 2002/10/18 07:12:37 mheins Exp $
+# $Id: Editor.pm,v 1.16 2002/10/27 05:09:39 mheins Exp $
 #
 # Copyright (C) 2002 ICDEVGROUP <interchange@icdevgroup.org>
 # Copyright (C) 2002 Mike Heins <mike@perusion.net>
@@ -26,11 +26,13 @@
 package Vend::Table::Editor;
 
 use vars qw($VERSION);
-$VERSION = substr(q$Revision: 1.15 $, 10);
+$VERSION = substr(q$Revision: 1.16 $, 10);
 
 use Vend::Util;
 use Vend::Interpolate;
 use Vend::Data;
+use Exporter;
+@EXPORT_OK = qw/meta_record expand_values tabbed_display display/;
 use strict;
 
 =head1 NAME
@@ -898,7 +900,16 @@
 }
 
 my %o_default_length = (
-	
+	border_cell_class	=> 'cborder',
+	widget_cell_class	=> 'cwidget',
+	label_cell_class	=> 'clabel',
+	data_cell_class	=> 'cdata',
+	help_cell_class	=> 'chelp',
+	break_cell_class	=> 'cbreak',
+	spacer_row_class => 'rspacer',
+	break_row_class => 'rbreak',
+	title_row_class => 'rmarq',
+	data_row_class => 'rnorm',
 );
 
 my %o_default_var = (qw/
@@ -909,15 +920,6 @@
 my %o_default_defined = (
 	mv_update_empty		=> 1,
 	restrict_allow		=> 'page area',
-	widget_cell_class	=> 'cwidget',
-	label_cell_class	=> 'clabel',
-	data_cell_class	=> 'cdata',
-	help_cell_class	=> 'chelp',
-	break_cell_class	=> 'cbreak',
-	spacer_row_class => 'rspacer',
-	break_row_class => 'rbreak',
-	title_row_class => 'rmarq',
-	data_row_class => 'rnorm',
 );
 
 my %o_default = (
@@ -928,8 +930,11 @@
 	across				=> 1,
 	color_success		=> '#00FF00',
 	color_fail			=> '#FF0000',
-	table_width			=> '60%',
-	left_width			=> '30%',
+	spacer_height		=> 1,
+	border_height		=> 1,
+	clear_image			=> 'bg.gif',
+	table_width			=> '100%',
+	table_height		=> '100%',
 );
 
 # Build maps for ui_te_* option pass
@@ -966,7 +971,7 @@
 }
 
 sub resolve_options {
-	my ($opt, $CGI) = @_;
+	my ($opt, $CGI, $data) = @_;
 
 	# This may be passed by the caller, but is normally from the form
 	# or URL
@@ -1019,6 +1024,17 @@
 		$tmeta = meta_record($table, $opt->{ui_meta_view}) || {};
 	}
 
+	$opt->{view_from} ||= $tmeta->{view_from};
+
+	if( !   $opt->{ui_meta_view}
+		and $opt->{view_from}
+		and $data
+		and $opt->{ui_meta_view} = $data->{$opt->{view_from}}
+		)
+	{
+		$tmeta = meta_record($table, $opt->{ui_meta_view}) || {};
+	}
+
 	# This section checks the passed options and converts them from
 	# strings to refs if necessary
 	FORMATS: {
@@ -1067,10 +1083,15 @@
 
 	my @mapdirect = qw/
 		bottom_buttons
+		border_cell_class
+		border_height
+		break_cell_style
+		border_height
 		break_cell_class
 		break_cell_style
 		break_row_class
 		break_row_style
+		clear_image
 		data_cell_class
 		data_cell_style
 		data_row_class
@@ -1081,6 +1102,8 @@
 		help_anchor
 		include_before
 		include_form
+		include_form_expand
+		include_form_interpolate
 		label_cell_class
 		label_cell_style
 		left_width
@@ -1107,6 +1130,7 @@
 		panel_width
 		spacer_row_class
 		spacer_row_style
+		spacer_height
 		start_at
 		tab_bgcolor_template
 		tab_cellpadding
@@ -1116,6 +1140,7 @@
 		tab_vert_offset
 		tab_width
 		tabbed
+		table_height
 		table_width
 		title_row_class
 		title_row_style
@@ -1133,6 +1158,7 @@
 		ui_new_item
 		ui_nextpage
 		ui_no_meta_display
+		view_from
 		widget_cell_class
 		widget_cell_style
 	/;
@@ -1182,18 +1208,6 @@
 		$opt->{$_} = errmsg($opt->{$_});
 	}
 
-	if (! $opt->{inner_table_width}) {
-		if($opt->{table_width} =~ /%/) {
-			$opt->{inner_table_width} = '100%';
-		}
-		elsif ($opt->{table_width} =~ /^\d+$/) {
-			$opt->{inner_table_width} = $opt->{table_width} - 2;
-		}
-		else {
-			$opt->{inner_table_width} = $opt->{table_width};
-		}
-	}
-
 	if($opt->{wizard} || $opt->{notable} and ! $opt->{table}) {
 		$opt->{table} = 'mv_null';
 		$Vend::Database{mv_null} = 
@@ -1225,6 +1239,39 @@
 		$opt->{$k} ||= $v;
 	}
 
+	if (! $opt->{inner_table_width}) {
+		if ($opt->{table_width} =~ /^\d+$/) {
+			$opt->{inner_table_width} = $opt->{table_width} - 2;
+		}
+		elsif($opt->{table_width} =~ /\%/) {
+			$opt->{inner_table_width} = '100%';
+		}
+		else {
+			$opt->{inner_table_width} = $opt->{table_width};
+		}
+	}
+
+	if (! $opt->{inner_table_height}) {
+		if ($opt->{table_height} =~ /^\d+$/) {
+			$opt->{inner_table_height} = $opt->{table_height} - 2;
+		}
+		elsif($opt->{table_height} =~ /\%/) {
+			$opt->{inner_table_height} = '100%';
+		}
+		else {
+			$opt->{inner_table_height} = $opt->{table_height};
+		}
+	}
+
+	if(! $opt->{left_width}) {
+		if($opt->{table_width} eq '100%') {
+			$opt->{left_width} = 150;
+		}
+		else {
+			$opt->{left_width} = '30%';
+		}
+	}
+
 	# init the row styles
 	foreach my $rtype (qw/data break combo spacer/) {
 		my $mainp = $rtype . '_row_extra';
@@ -1262,6 +1309,19 @@
 		$opt->{$mainp} = $thing;
 	}
 
+	#### This code is also in main editor routine, change there too!
+	my $rowdiv         = $opt->{across}    || 1;
+	my $cells_per_span = $opt->{cell_span} || 2;
+	my $rowcount = 0;
+	my $span = $rowdiv * $cells_per_span;
+	#### 
+
+	# Make standard fixed rows
+	$opt->{spacer_row} = <<EOF;
+<tr class=$opt->{spacer_row_class}>
+<td colspan=$span class=$opt->{spacer_row_class}><img src="$opt->{clear_image}" width=1 height="$opt->{spacer_height}" alt=x></td>
+</tr>
+EOF
 
 	###############################################################
 	# Get the field display information including breaks and labels
@@ -1341,7 +1401,31 @@
 	$opt->{table}		  = $opt->{mv_data_table};
 	$opt->{ui_meta_view}  ||= $CGI->{ui_meta_view} if $opt->{cgi};
 
-	resolve_options($opt);
+	my $data;
+	my $exists;
+	my $db;
+
+	## Try and sneak a peek at the data so we can determine views and
+	## maybe some other stuff -- we definitely need table/key or a 
+	## clone id
+	unless($opt->{notable}) {
+		# From Vend::Data
+		my $tab = $table || $opt->{mv_data_table} || $CGI->{mv_data_table};
+		my $key = $key || $opt->{item_id} || $CGI->{item_id};
+		$db = database_exists_ref($tab);
+
+		if($db) {
+			if($opt->{ui_clone_id} and $db->record_exists($opt->{ui_clone_id})) {
+				$data = $db->row_hash($opt->{ui_clone_id});
+			}
+			elsif ($key and $db->record_exists($key)) {
+				$data = $db->row_hash($key);
+				$exists = 1;
+			}
+		}
+	}
+
+	resolve_options($opt, undef, $data);
 	$table = $opt->{table};
 	$key = $opt->{item_id};
 	if($opt->{save_meta}) {
@@ -1349,10 +1433,13 @@
 	}
 #::logDebug("key after resolve_options: $key");
 
+	#### This code is also in resolve_options routine, change there too!
 	my $rowdiv         = $opt->{across}    || 1;
 	my $cells_per_span = $opt->{cell_span} || 2;
 	my $rowcount = 0;
 	my $span = $rowdiv * $cells_per_span;
+	#### 
+
 	my $oddspan = $span - 1;
 	my $def = $opt->{default_ref} || $::Values;
 
@@ -1557,8 +1644,6 @@
 	}
 	### end build of error checking
 
-	$opt->{clear_image} = "bg.gif" if ! $opt->{clear_image};
-
 	my $die = sub {
 		::logError(@_);
 		$::Scratch->{ui_error} .= "<BR>\n" if $::Scratch->{ui_error};
@@ -1566,7 +1651,6 @@
 		return undef;
 	};
 
-	my $db;
 	unless($opt->{notable}) {
 		# From Vend::Data
 		$db = database_exists_ref($table)
@@ -1625,9 +1709,6 @@
 		}
 	}
 
-	my $data;
-	my $exists;
-
 	if($opt->{notable}) {
 		$data = {};
 	}
@@ -1792,18 +1873,18 @@
 			}
 
 			$blob_widget = <<EOF unless $opt->{ui_blob_hidden};
-<TR class=rnorm>
-	 <td class=clabel width="$opt->{left_width}">
+<TR class=$opt->{data_row_class}>
+	 <td class=$opt->{label_cell_class} width="$opt->{left_width}">
 	   <SMALL>$opt->{mv_blob_title}<BR>
 		$loaded_from
 	 </td>
-	 <td class=cwidget>
+	 <td class=$opt->{widget_cell_class}>
 	 	$blob_widget&nbsp;
 	 </td>
 </TR>
 
-<tr class=rtitle>
-<td colspan=$span><img src="$opt->{clear_image}" width=1 height=3 alt=x></td>
+<tr>
+<td colspan=$span class=$opt->{border_cell_class}><img src="$opt->{clear_image}" width=1 height="$opt->{border_height}" alt=x></td>
 </tr>
 EOF
 
@@ -1948,15 +2029,15 @@
 	}
 
 	chunk ttag(), <<EOF; # unless $wo;
-<table class=touter border="0" cellspacing="0" cellpadding="0" width="$opt->{table_width}">
+<table class=touter border="0" cellspacing="0" cellpadding="0" width="$opt->{table_width}" height="$opt->{table_height}">
 <tr>
   <td>
 
-<table class=tinner  width="$opt->{inner_table_width}" cellspacing=0 cellmargin=0 width="100%" cellpadding="2" align="center" border="0">
+<table class=tinner width="$opt->{inner_table_width}" height="$opt->{inner_table_height}" cellspacing=0 cellmargin=0 cellpadding="2" align="center" border="0">
 EOF
 	chunk ttag(), 'NO_TOP', <<EOF; # unless $opt->{no_top} or $wo;
-<tr class=rtitle> 
-<td align=right colspan=$span><img src="$opt->{clear_image}" width=1 height=3 alt=x></td>
+<tr> 
+<td colspan=$span class=$opt->{border_cell_class}><img src="$opt->{clear_image}" width=1 height="$opt->{border_height}" alt=x></td>
 </tr>
 EOF
 
@@ -1968,9 +2049,9 @@
 	if ($extra_ok and ! $opt->{no_top} and ! $opt->{nosave}) {
 	  	if($opt->{back_text}) {
 		  chunk ttag(), '', <<EOF; # unless $wo;
-<TR class=rnorm>
+<TR class=$opt->{data_row_class}>
 <td>&nbsp;</td>
-<td align=left colspan=$oddspan class=cdata>
+<td align=left colspan=$oddspan class=$opt->{data_cell_class}>
 EOF
 			chunk 'COMBINED_BUTTONS_TOP', 'BOTTOM_BUTTONS', <<EOF; # if ! $opt->{bottom_buttons};
 <INPUT TYPE=submit NAME=mv_click VALUE="$opt->{back_text}">&nbsp;<INPUT TYPE=submit NAME=mv_click VALUE="$opt->{cancel_text}">&nbsp;<B><INPUT TYPE=submit NAME=mv_click VALUE="$opt->{next_text}"></B>
@@ -1978,19 +2059,16 @@
 EOF
 			chunk 'MLABEL', '', 'MESSAGES', $mlabel;
 			chunk ttag(), <<EOF;
-</TD>
-</TR>
-
-<tr class=rspacer>
-<td colspan=$span><img src="$opt->{clear_image}" width=1 height=3 alt=x></td>
+	</td>
 </tr>
+$opt->{spacer_row}
 EOF
 		}
 		elsif ($opt->{wizard}) {
 		  chunk ttag(), 'NO_TOP', <<EOF;
-<TR class=rnorm>
+<TR class=$opt->{data_row_class}>
 <td>&nbsp;</td>
-<td align=left colspan=$oddspan class=cdata>
+<td align=left colspan=$oddspan class=$opt->{data_cell_class}>
 EOF
 			chunk 'WIZARD_BUTTONS_TOP', 'BOTTOM_BUTTONS NO_TOP', <<EOF; # if ! $opt->{bottom_buttons};
 <INPUT TYPE=submit NAME=mv_click VALUE="$opt->{cancel_text}">&nbsp;<B><INPUT TYPE=submit NAME=mv_click VALUE="$opt->{next_text}"></B>
@@ -1998,19 +2076,16 @@
 EOF
 			chunk 'MLABEL', 'BOTTOM_BUTTONS', 'MESSAGES', $mlabel;
 			chunk ttag(), <<EOF;
-</TD>
-</TR>
-
-<tr class=rspacer>
-<td colspan=$span><img src="$opt->{clear_image}" width=1 height=3 alt=x></td>
+	</td>
 </tr>
+$opt->{spacer_row}
 EOF
 		}
 		else {
 		  chunk ttag(), 'BOTTOM_BUTTONS NO_TOP', <<EOF;
-<TR class=rnorm>
+<TR class=$opt->{data_row_class}>
 <td>&nbsp;</td>
-<td align=left colspan=$oddspan class=cdata>
+<td align=left colspan=$oddspan class=$opt->{data_cell_class}>
 EOF
 
 		  $opt->{ok_button_style} = 'font-weight: bold; width: 40px; text-align: center'
@@ -2031,12 +2106,9 @@
 
 			chunk 'MLABEL', 'BOTTOM_BUTTONS', $mlabel;
 			chunk ttag(), 'BOTTOM_BUTTONS NO_TOP', <<EOF;
-</TD>
-</TR>
-
-<tr class=rspacer>
-<td colspan=$span><img src="$opt->{clear_image}" width=1 height=3 alt=x></td>
+	</td>
 </tr>
+$opt->{spacer_row}
 EOF
 		}
 	}
@@ -2145,8 +2217,8 @@
 		$set =~ s/_TABLES_/$tabs/g;
 		$::Scratch->{clone_tables} = $set;
 		chunk ttag(), <<EOF; # unless $wo;
-<tr class=rtitle>
-<td colspan=$span>
+<tr>
+<td colspan=$span class=$opt->{border_cell_class}>
 EOF
 		chunk 'CLONE_TABLES', <<EOF;
 $tabform<INPUT TYPE=hidden NAME=mv_check VALUE="clone_tables">
@@ -2291,6 +2363,12 @@
 			$opt->{meta_prepend} ||= '';
 			$opt->{meta_append} ||= '';
 		}
+		$opt->{meta_title} ||= errmsg('Edit field meta display info, table %s, column %s');
+		$opt->{meta_title_specific} ||= errmsg('Item-specific meta edit, table %s, column %s, key %s');
+		$opt->{meta_image_specific} ||= errmsg('specmeta.png');
+		$opt->{meta_image} ||= errmsg('meta.png');
+		$opt->{meta_image_extra} ||= 'border=0';
+		$opt->{meta_anchor_specific} ||= errmsg('item-specific meta');
 		$opt->{meta_anchor} ||= errmsg('meta');
 		$opt->{meta_anchor_specific} ||= errmsg('item-specific meta');
 		$opt->{meta_extra} = " $opt->{meta_extra}"
@@ -2314,6 +2392,24 @@
    </td>
 EOF
 		}
+		elsif($opt->{image_meta}) {
+			$row_template = <<EOF;
+   <td$opt->{label_cell_extra}> 
+     {BLABEL}{LABEL}{ELABEL}
+   </td>
+   <td$opt->{data_cell_extra}>
+     <table cellspacing=0 cellmargin=0 width="100%">
+       <tr> 
+         <td$opt->{widget_cell_extra}>
+           {WIDGET}
+         </td>
+         <td$opt->{help_cell_extra}>{TKEY}{HELP?}<i>{HELP}</i>{/HELP?}{HELP_URL?}<BR><A HREF="{HELP_URL}">$opt->{help_anchor}</A>{/HELP_URL?}</td>
+         <td align=right>{META_STRING}</td>
+       </tr>
+     </table>
+   </td>
+EOF
+		}
 		else {
 			$row_template = <<EOF;
    <td$opt->{label_cell_extra}> 
@@ -2761,10 +2857,25 @@
 								
 			$opt->{meta_append} = '</FONT>'
 				unless defined $opt->{meta_append};
-			$meta_string = <<EOF;
+			if($opt->{image_meta}) {
+#::logDebug("meta-title=$opt->{meta_title}");
+				my $title = errmsg($opt->{meta_title}, $t, $c);
+				$meta_string = <<EOF;
+<a href="$meta_url"$opt->{meta_extra}><img src="$opt->{meta_image}" title="$title" $opt->{meta_image_extra}></A></A>
+EOF
+				if($meta_specific) {
+					$title = errmsg($opt->{meta_title_specific}, $t, $c, $key);
+					$meta_string .= <<EOF;
+<a href="$meta_url_specific"$opt->{meta_extra}><img src="$opt->{meta_image_specific}" title="$title" $opt->{meta_image_extra}></A>
+EOF
+				}
+			}
+			else {
+				$meta_string = <<EOF;
 $opt->{meta_prepend}<a href="$meta_url"$opt->{meta_extra}>$opt->{meta_anchor}</A>
 $meta_specific$opt->{meta_append}
 EOF
+			}
 		}
 
 #::logDebug("col=$c currval=$currval widget=$widget->{$c} label=$label->{$c} (type=$type)");
@@ -2840,7 +2951,15 @@
 		}
 		if($opt->{include_before} and $opt->{include_before}{$col}) {
 #::logDebug("include_before: $col $opt->{include_before}{$col}");
-			my $h = { ROW => delete $opt->{include_before}{$col} };
+			my $chunk = delete $opt->{include_before}{$col};
+			if($opt->{include_form_interpolate}) {
+				$chunk = interpolate_html($chunk);
+			}
+			elsif($opt->{include_form_expand}) {
+				$chunk = expand_values($chunk);
+#::logDebug("include_before: expanded values on $col $chunk");
+			}
+			my $h = { ROW => $chunk };
 			$h->{TEMPLATE} = $opt->{whole_template} || '<tr>{ROW}</tr>';
 			col_chunk "_INCLUDE_$col", $h;
 		}
@@ -2902,9 +3021,16 @@
 	### Here the user can include some extra stuff in the form....
 	###
 	if($opt->{include_form}) {
+		my $chunk = delete $opt->{include_form};
+		if($opt->{include_form_interpolate}) {
+			$chunk = interpolate_html($chunk);
+		}
+		elsif($opt->{include_form_expand}) {
+			$chunk = expand_values($chunk);
+		}
 		col_chunk '_INCLUDE_FORM',
 					{
-						ROW => $opt->{include_form},
+						ROW => $chunk,
 						TEMPLATE => $opt->{whole_template} || '<tr>{ROW}</tr>',
 					};
 	}
@@ -2915,26 +3041,19 @@
 	}
 	$passed_fields = join " ", @cols;
 
-
-	chunk ttag(), <<EOF;
-<tr class=rspacer>
-<td colspan=$span>
-EOF
-	chunk 'HIDDEN_EXTRA', <<EOF; # unless $wo;
-<INPUT TYPE=hidden NAME=mv_data_fields VALUE="$passed_fields">@extra_hidden
-EOF
-	chunk ttag(), <<EOF;
-<img src="$opt->{clear_image}" height=3 alt=x></td>
-</tr>
-EOF
+	my ($beghid, $endhid) = split m{</td>}i, $opt->{spacer_row}, 2;
+	$endhid = "</td>$endhid" if $endhid;
+	chunk ttag(), $beghid;
+	chunk 'HIDDEN_EXTRA', qq{<INPUT TYPE=hidden NAME=mv_data_fields VALUE="$passed_fields">@extra_hidden};
+	chunk ttag(), $endhid;
 
   SAVEWIDGETS: {
   	last SAVEWIDGETS if $wo || $opt->{nosave}; 
 #::logDebug("in SAVEWIDGETS");
 		chunk ttag(), <<EOF;
-<TR class=rnorm>
+<TR class=$opt->{data_row_class}>
 <td>&nbsp;</td>
-<td align=left colspan=$oddspan class=cdata>
+<td align=left colspan=$oddspan class=$opt->{data_cell_class}>
 EOF
 
 
@@ -2946,9 +3065,9 @@
 		}
 		elsif($opt->{wizard}) {
 			chunk 'WIZARD_BUTTONS_BOTTOM', <<EOF;
-<TR class=rnorm>
+<TR class=$opt->{data_row_class}>
 <td>&nbsp;</td>
-<td align=left colspan=$oddspan class=cdata>
+<td align=left colspan=$oddspan class=$opt->{data_cell_class}>
 <INPUT TYPE=submit NAME=mv_click VALUE="$opt->{cancel_text}">&nbsp;<B><INPUT TYPE=submit NAME=mv_click VALUE="$opt->{next_text}"></B>
 EOF
 		}
@@ -3047,8 +3166,8 @@
 	$Tag->error( { all => 1 } );
 
 	chunk ttag(), 'NO_BOTTOM _MESSAGE', <<EOF;
-<tr class=rtitle>
-	<td colspan=$span>
+<tr>
+	<td colspan=$span class=$opt->{border_cell_class}>
 EOF
 
 	chunk 'MESSAGE_TEXT', 'NO_BOTTOM', $message; # unless $wo or ($opt->{no_bottom} and ! $message);
@@ -3060,6 +3179,9 @@
 
 #::logDebug("tcount=$tcount_all, prior to closing table");
 	chunk ttag(), <<EOF; # unless $wo;
+<tr> 
+<td colspan=$span class=$opt->{border_cell_class}><img src="$opt->{clear_image}" width=1 height="$opt->{border_height}" alt=x></td>
+</tr>
 </table>
 </td></tr></table>
 EOF



1.2       +6 -1      interchange/share/interchange/ic.css


rev 1.2, prev_rev 1.1
Index: ic.css
===================================================================
RCS file: /var/cvs/interchange/share/interchange/ic.css,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ic.css	18 Aug 2002 08:17:48 -0000	1.1
+++ ic.css	27 Oct 2002 05:09:39 -0000	1.2
@@ -209,6 +209,7 @@
   text-align: left; 
   font-weight: bold; 
   font-size: 11px;
+  padding-left: 5px;
 }
 
 .cwidget { 
@@ -245,7 +246,11 @@
 .rspacer { 
   background-color: #999999; 
   margin: 0;
-  padding: 1;
+  padding: 0;
+}
+.cborder { 
+  background-color: #999999; 
+  padding: 0;
 }
 .rtitle { 
   background-color: #999999;