[interchange-cvs] interchange - heins modified 2 files
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Thu Jan 31 09:59:01 2002
User: heins
Date: 2002-01-31 14:58:41 GMT
Modified: lib/Vend Interpolate.pm
Added: lib/Vend Form.pm
Log:
* Add new Vend::Form module which will get rid of the tag_accessories
gunk and replace UI::Primitive::meta_display eventually. Emulates
current widget set (mostly).
* To test it out, define
Variable MV_DANGEROUS_NEW_FORM 1
in either catalog.cfg or interchange.cfg.
* Todo:
- add imagehelper/datetime/image
- verify with [item-options ...] and [item-accessories ...]
- add better lookup
- Implement custom widgets with "CodeDef mywidget Widget"
Revision Changes Path
2.45 +7 -3 interchange/lib/Vend/Interpolate.pm
rev 2.45, prev_rev 2.44
Index: Interpolate.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.44
retrieving revision 2.45
diff -u -r2.44 -r2.45
--- Interpolate.pm 29 Jan 2002 05:52:43 -0000 2.44
+++ Interpolate.pm 31 Jan 2002 14:58:41 -0000 2.45
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.44 2002/01/29 05:52:43 mheins Exp $
+# $Id: Interpolate.pm,v 2.45 2002/01/31 14:58:41 mheins Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.44 $, 10);
+$VERSION = substr(q$Revision: 2.45 $, 10);
@EXPORT = qw (
@@ -91,6 +91,7 @@
use strict;
use Vend::Util;
use Vend::Data;
+use Vend::Form;
require Vend::Cart;
@@ -2208,6 +2209,9 @@
($attribute, $type, $field, $db, $name, $outboard, $passed) =
@{$opt}{qw/attribute type column table name outboard passed/};
+ return Vend::Form::display($opt, $item)
+ if $::Variable->{MV_DANGEROUS_NEW_FORM}
+ or $Global::Variable->{MV_DANGEROUS_NEW_FORM};
my $p = $opt->{prepend} || '';
my $a = $opt->{append} || '';
my $delimiter = $opt->{delimiter} || ',';
@@ -3394,7 +3398,7 @@
@args = grep $_, @args;
for(@args) {
s!/!__SLASH__!g unless defined $not_scan;
- s!\0!__NULL__!g;
+ s!\0!-_NULL_-!g;
s!(\w\w=)(.*)!$1 . esc($2)!eg
or (undef $_, next);
s!__SLASH__!::!g unless defined $not_scan;
2.1 interchange/lib/Vend/Form.pm
rev 2.1, prev_rev 2.0