[interchange-cvs] interchange - heins modified 3 files

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Mon Jun 24 23:27:01 2002


User:      heins
Date:      2002-06-25 03:26:26 GMT
Modified:  lib/Vend Interpolate.pm
Modified:  dist/foundation/products mv_metadata.asc
Modified:  dist/lib/UI/pages/include item_option_simple
Log:
	* Allow widget edit for simple options.

	* Add width and height settings from option database to [item-options ...],
	  also allow explicit setting with width=N height=N.

Revision  Changes    Path
2.71      +5 -3      interchange/lib/Vend/Interpolate.pm


rev 2.71, prev_rev 2.70
Index: Interpolate.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.70
retrieving revision 2.71
diff -u -r2.70 -r2.71
--- Interpolate.pm	23 Jun 2002 01:20:10 -0000	2.70
+++ Interpolate.pm	25 Jun 2002 03:26:26 -0000	2.71
@@ -1,6 +1,6 @@
 # Vend::Interpolate - Interpret Interchange tags
 # 
-# $Id: Interpolate.pm,v 2.70 2002/06/23 01:20:10 jon Exp $
+# $Id: Interpolate.pm,v 2.71 2002/06/25 03:26:26 mheins Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -27,7 +27,7 @@
 require Exporter;
 @ISA = qw(Exporter);
 
-$VERSION = substr(q$Revision: 2.70 $, 10);
+$VERSION = substr(q$Revision: 2.71 $, 10);
 
 @EXPORT = qw (
 
@@ -1823,7 +1823,7 @@
 	}
 	else {
 #::logDebug("simple options");
-		for(qw/code o_enable o_group o_value o_label o_widget price/) {
+		for(qw/code o_enable o_group o_value o_label o_widget price o_height o_width/) {
 			push @rf, ($map{$_} || $_);
 		}
 		my $fsel = $map{sku} || 'sku';
@@ -1854,6 +1854,8 @@
 								passed => $ref->[3],
 								price => $opt->{price},
 								price_data => $ref->[6],
+								height => $opt->{height} || $ref->[7],
+								width  => $opt->{width} || $ref->[8],
 								type => $opt->{type} || $ref->[5] || 'select',
 							},
 							$item || undef,



2.8       +2 -2      interchange/dist/foundation/products/mv_metadata.asc


rev 2.8, prev_rev 2.7
Index: mv_metadata.asc
===================================================================
RCS file: /anon_cvs/repository/interchange/dist/foundation/products/mv_metadata.asc,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -r2.7 -r2.8
--- mv_metadata.asc	16 Feb 2002 19:13:41 -0000	2.7
+++ mv_metadata.asc	25 Jun 2002 03:26:26 -0000	2.8
@@ -133,14 +133,14 @@
 options::description	textarea	50	5							Description	For description in display	
 options::o_exclude	textarea	35	5							Exclude	Only for modular options. Lists the option groups to exclude
once the include has been done. Takes the form of a number of wildcard atoms.	
 options::o_group	text	20								Option name	Name of option variable, i.e. "size__MVC_FIELDMUNGE__"	
-options::o_height	text	4	
+options::o_height	text	4								Height											
 options::o_include	textarea	35	5							Include	Only for modular options. Lists the option groups to include
with your item. Takes the form of a number of wildcard atoms.	
 options::o_label	text	40								Label	Short name for option display	
 options::o_matrix	select							=Non-matrix,!=Matrix options		Matrix options	Matrix options allow you to maintain multiple option sets with
inventory on each combination.	
 options::o_modular	select							=Not modular,Modular options		Modular options	Modular options allow you to attach multiple SKUs to the same item,
possibly with attached options of their own. Very complex but you can do
most anything.	
 options::o_value	option_format	20	5							Possible Values	In Interchange option format:&lt;PRE>
  VALUE1=Label 1,
  VALUE2=Label 2*
&lt;/PRE>(* = default selection)		option_format	
 options::o_widget	select							textarea=Textarea,

text=Text entry*,
select=Select box,
yesno=Yes/No (Yes=1),
noyes=No/Yes (No=1),
yesno radio=Yes/No (radio),
noyes radio=No/Yes (radio),
multiple=Multiple Select,
combo=Combo Select,
reverse_combo=Reverse Combo,
move_combo=Combo move,
display=Text of option,
hidden_text=Hidden (show text),
radio=Radio box, 
radio_nbsp=Radio (nbsp),
checkbox=Checkbox,
check_nbsp=Checkbox (nbsp),
imagedir=Image listing,
imagehelper=Image upload,
date=Date selector,
value=Value,
option_format=Option formatter,
show=Show all options		Widget type	Select the basic display type for the field.	
-options::o_width	text	4	
+options::o_width	text	4								Width											
 options::price	text	12								Price	Price data, either option=N.NN or
a number, depending on matrix settings.	
 options::sku	text	20								Associated item	
 options::volume	text	10								Volume	(if different, mostly for matrix/modular)	



2.2       +10 -3     interchange/dist/lib/UI/pages/include/item_option_simple


rev 2.2, prev_rev 2.1
Index: item_option_simple
===================================================================
RCS file: /anon_cvs/repository/interchange/dist/lib/UI/pages/include/item_option_simple,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -r2.1 -r2.2
--- item_option_simple	9 Dec 2001 21:43:31 -0000	2.1
+++ item_option_simple	25 Jun 2002 03:26:26 -0000	2.2
@@ -100,8 +100,7 @@
 [list]
 [if-sql-data options o_group]
 [calc] $Scratch->{mod_code} = q{[sql-code]}; $Scratch->{mod_code} =~ s/-/_/g; return;[/calc]
-[if scratch count][tmp count]0[/tmp][else][tmp count]1[/tmp][/else][/if]
-<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=3 BGCOLOR="[if scratch count]__UI_T_ROW_EVEN__[else]__UI_T_ROW_ODD__[/else][/if]">
+<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=3 BGCOLOR="[sql-alternate 2]__UI_T_ROW_EVEN__[else]__UI_T_ROW_ODD__[/else][/sql-alternate]">
 <TR><TD VALIGN=CENTER>Name: <INPUT TYPE=text SIZE=20 NAME="opt_group_[scratch mod_code]" VALUE="[filter entities][sql-param o_group][/filter]">
 
 <A HREF="[area href='@@MV_PAGE@@'
@@ -130,7 +129,15 @@
 [/perl][/tmp]
 
 <TR><TD>
-<TEXTAREA ROWS=5 COLS=30 NAME="opt_value_[scratch mod_code]">[scratch o_value]</TEXTAREA>
+<TEXTAREA ROWS=5 COLS=30 NAME="opt_value_[scratch mod_code]">[scratch o_value]</TEXTAREA><br>
+[page href="admin/flex_editor"
+		form="
+			mv_data_table=options
+			item_id=[sql-code]
+			ui_return_to=admin/item_option
+			ui_return_to=item_id=[cgi item_id]
+			ui_data_fields=code o_widget o_width o_height
+		"]Widget type edit</A>
 </TD></TR>
 </TABLE>
 [/if-sql-data]