[interchange-cvs] interchange - heins modified 11 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Tue Apr 12 11:14:41 EDT 2005
User: heins
Date: 2005-04-12 15:14:40 GMT
Modified: lib/Vend Config.pm Dispatch.pm Form.pm Interpolate.pm
Modified: Menu.pm Options.pm
Modified: lib/Vend/Options Matrix.pm Old48.pm Simple.pm
Modified: lib/Vend/Table Editor.pm
Added: code/SystemTag br.coretag
Log:
* Make the start of XHTML support for Interchange.
* Add global XHTML and catalog XHTML options. Global is false/off by
default, and catalog option is defaulted from global option.
* The only effect is that Dispatch.pm sets $Vend::Xtrailer to the
appropriate value of '/' or ''.
* Use $Vend::Xtrailer to set any <br/> or <br> we use.
* Change some generated HTML to:
-- lowercase tags
-- quote parms
-- use $Vend::Xtrailer
* Supply [br] tag which returns the proper <br/> or <br>.
Revision Changes Path
1.1 interchange/code/SystemTag/br.coretag
rev 1.1, prev_rev 1.0
Index: br.coretag
===================================================================
UserTag br PosNumber 0
UserTag br Description Return <br> or <br/> based on XHTML setting
UserTag br Routine sub { return "<br$Vend::Xtrailer>" }
2.161 +5 -3 interchange/lib/Vend/Config.pm
rev 2.161, prev_rev 2.160
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.160
retrieving revision 2.161
diff -u -r2.160 -r2.161
--- Config.pm 11 Apr 2005 23:35:26 -0000 2.160
+++ Config.pm 12 Apr 2005 15:14:39 -0000 2.161
@@ -1,6 +1,6 @@
# Vend::Config - Configure Interchange
#
-# $Id: Config.pm,v 2.160 2005/04/11 23:35:26 mheins Exp $
+# $Id: Config.pm,v 2.161 2005/04/12 15:14:39 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -49,7 +49,7 @@
use Vend::File;
use Vend::Data;
-$VERSION = substr(q$Revision: 2.160 $, 10);
+$VERSION = substr(q$Revision: 2.161 $, 10);
my %CDname;
my %CPname;
@@ -361,6 +361,7 @@
['Catalog', 'catalog', ''],
['SubCatalog', 'catalog', ''],
['AutoVariable', 'autovar', 'UrlJoiner'],
+ ['XHTML', 'yesno', 'No'],
];
return $directives;
@@ -561,7 +562,8 @@
['Levies', 'array', ''],
['Levy', 'locale', ''],
['AutoVariable', 'autovar', ''],
- ['ErrorDestination', 'hash', '']
+ ['ErrorDestination', 'hash', ''],
+ ['XHTML', 'yesno', $Global::XHTML],
];
1.49 +11 -2 interchange/lib/Vend/Dispatch.pm
rev 1.49, prev_rev 1.48
Index: Dispatch.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Dispatch.pm,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- Dispatch.pm 29 Jan 2005 18:30:01 -0000 1.48
+++ Dispatch.pm 12 Apr 2005 15:14:39 -0000 1.49
@@ -1,6 +1,6 @@
# Vend::Dispatch - Handle Interchange page requests
#
-# $Id: Dispatch.pm,v 1.48 2005/01/29 18:30:01 mheins Exp $
+# $Id: Dispatch.pm,v 1.49 2005/04/12 15:14:39 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 2002 Mike Heins <mike at perusion.net>
@@ -26,7 +26,7 @@
package Vend::Dispatch;
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 1.48 $, 10);
+$VERSION = substr(q$Revision: 1.49 $, 10);
use POSIX qw(strftime);
use Vend::Util;
@@ -1056,6 +1056,15 @@
$Vend::Cfg->{SetGroup}, $msg
);
}
+ }
+
+ if($Vend::Cfg->{XHTML}) {
+ $Vend::Xtrailer = '/';
+ $Vend::Xquote = '"';
+ }
+ else {
+ $Vend::Xtrailer = '';
+ $Vend::Xquote = '';
}
chdir $Vend::Cfg->{VendRoot}
2.51 +25 -19 interchange/lib/Vend/Form.pm
rev 2.51, prev_rev 2.50
Index: Form.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Form.pm,v
retrieving revision 2.50
retrieving revision 2.51
diff -u -r2.50 -r2.51
--- Form.pm 11 Apr 2005 23:35:27 -0000 2.50
+++ Form.pm 12 Apr 2005 15:14:39 -0000 2.51
@@ -1,6 +1,6 @@
# Vend::Form - Generate Form widgets
#
-# $Id: Form.pm,v 2.50 2005/04/11 23:35:27 mheins Exp $
+# $Id: Form.pm,v 2.51 2005/04/12 15:14:39 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -38,7 +38,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.50 $, 10);
+$VERSION = substr(q$Revision: 2.51 $, 10);
@EXPORT = qw (
display
@@ -133,7 +133,7 @@
.
qq({EXTRA?} {EXTRA}{/EXTRA?})
.
- qq(><br><textarea cols="{WIDTH}" rows="{HEIGHT}" NAME="{NAME}">{ENCODED}</textarea>{APPEND})
+ qq(><br$Vend::Xtrailer><textarea cols="{WIDTH}" rows="{HEIGHT}" NAME="{NAME}">{ENCODED}</textarea>{APPEND})
,
text =>
qq({PREPEND}<input type="text" name="{NAME}" value="{ENCODED}")
@@ -288,7 +288,7 @@
my($opt, $opts) = @_;
#warn "called links opts=$opts\n";
- $opt->{joiner} = Vend::Interpolate::get_joiner($opt->{joiner}, "<BR>");
+ $opt->{joiner} = Vend::Interpolate::get_joiner($opt->{joiner}, "<br$Vend::Xtrailer>");
my $name = $opt->{name};
my $default = defined $opt->{value} ? $opt->{value} : $opt->{default};
@@ -591,7 +591,7 @@
$val =~ s/"/"/g;
$lab =~ s/"/"/g;
$width = 10 if ! $width;
- return qq{<TR><TD><SMALL><INPUT TYPE=text NAME="$name" VALUE="$val" SIZE=$half></SMALL></TD><TD><SMALL><INPUT TYPE=text NAME="$name" VALUE="$lab" SIZE=$width></SMALL></TD><TD><SMALL><SMALL><SELECT NAME="$name"><OPTION value="0">no<OPTION value="1"$sel>default*</SELECT></SMALL></SMALL></TD></TR>};
+ return qq{<tr><td><small><input type="text" name="$name" value="$val" size="$half"></small></td><td><small><input type="text" name="$name" value="$lab" size=$width></small></td><td><small><small><select name="$name"><option value="0">no<option value="1"$sel>default*</select></small></small></td></tr>};
}
sub option_widget {
@@ -603,7 +603,13 @@
unless length($opt->{filter});
$val = Vend::Interpolate::filter_value($opt->{filter}, $val);
my @opts = split /\s*,\s*/, $val;
- my $out = "<TABLE CELLPADDING=0 CELLSPACING=0><TR><TH><SMALL>Value</SMALL></TH><TH ALIGN=LEFT COLSPAN=2><SMALL>Label</SMALL></TH></TR>";
+
+ my $out = qq{<table cellpadding="0" cellspacing="0"><tr><th><small>};
+ $out .= errmsg('Value');
+ $out .= qq{</small></th><th align="left" colspan="2"><small>};
+ $out .= errmsg('Label');
+ $out .= qq{</small></th></tr>};
+
my $done;
my $height = $opt->{height} || 5;
$height -= 2;
@@ -621,7 +627,7 @@
}
$out .= option_widget_box($name, '', '', '', $width);
$out .= option_widget_box($name, '', '', '', $width);
- $out .= "</TABLE>";
+ $out .= "</table>";
}
@@ -658,7 +664,7 @@
if($opt->{textarea}) {
my $template = $opt->{o_template};
if(! $template) {
- $template = '<br>';
+ $template = "<br$Vend::Xtrailer>";
if(! $opt->{rows} or $opt->{rows} > 1) {
$template .= q(<textarea rows="{ROWS|2}" wrap="{WRAP|virtual}");
$template .= q( cols="{COLS|60}" name="{NAME}">);
@@ -877,27 +883,27 @@
$template = $Template{boxnbsp};
}
elsif ($opt->{left}) {
- $header = '<TABLE>';
- $footer = '</TABLE>';
- $template = '<TR>' unless $inc;
+ $header = '<table>';
+ $footer = '</table>';
+ $template = '<tr>' unless $inc;
$template .= $Template{boxvalue};
$template .= $Template{boxlabel};
- $template .= '</TR>' unless $inc;
+ $template .= '</tr>' unless $inc;
$o_template = $Template{boxgroup};
}
elsif ($opt->{right}) {
- $header = '<TABLE>';
- $footer = '</TABLE>';
- $template = '<TR>' unless $inc;
+ $header = '<table>';
+ $footer = '</table>';
+ $template = '<tr>' unless $inc;
$template .= $Template{boxlabel};
$template .= $Template{boxvalue};
- $template .= '</TR>' unless $inc;
+ $template .= '</tr>' unless $inc;
$o_template = $Template{boxgroup};
}
else {
$template = $Template{boxstd};
}
- $o_template ||= '<BR><b>{TVALUE}</b><BR>';
+ $o_template ||= "<br$Vend::Xtrailer><b>{TVALUE}</b><br$Vend::Xtrailer>";
my $run = $header;
@@ -922,7 +928,7 @@
$value = '' if ! length($value);
$label = $value if ! length($label);
- $run .= '<TR>' if $inc && ! ($i % $inc);
+ $run .= '<tr>' if $inc && ! ($i % $inc);
$i++;
undef $opt->{selected};
@@ -964,7 +970,7 @@
}
$run .= attr_list($template, $opt);
- $run .= '</TR>' if $inc && ! ($i % $inc);
+ $run .= '</tr>' if $inc && ! ($i % $inc);
}
$run .= $footer;
}
2.238 +3 -3 interchange/lib/Vend/Interpolate.pm
rev 2.238, prev_rev 2.237
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.237
retrieving revision 2.238
diff -u -r2.237 -r2.238
--- Interpolate.pm 7 Apr 2005 22:51:33 -0000 2.237
+++ Interpolate.pm 12 Apr 2005 15:14:39 -0000 2.238
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.237 2005/04/07 22:51:33 jon Exp $
+# $Id: Interpolate.pm,v 2.238 2005/04/12 15:14:39 mheins Exp $
#
# Copyright (C) 2002-2005 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -28,7 +28,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.237 $, 10);
+$VERSION = substr(q$Revision: 2.238 $, 10);
@EXPORT = qw (
@@ -3691,7 +3691,7 @@
$opt->{address_book} = join ",", @nick
unless $opt->{address_book};
- my $joiner = get_joiner($opt->{joiner}, '<BR>');
+ my $joiner = get_joiner($opt->{joiner}, "<br$Vend::Xtrailer>");
if(! $opt->{no_address}) {
my @vals = map { $addr->{$_} }
grep /^address_?\d*$/ && length($addr->{$_}), keys %$addr;
2.42 +10 -10 interchange/lib/Vend/Menu.pm
rev 2.42, prev_rev 2.41
Index: Menu.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Menu.pm,v
retrieving revision 2.41
retrieving revision 2.42
diff -u -r2.41 -r2.42
--- Menu.pm 14 Feb 2005 13:06:28 -0000 2.41
+++ Menu.pm 12 Apr 2005 15:14:39 -0000 2.42
@@ -1,6 +1,6 @@
# Vend::Menu - Interchange menu processing routines
#
-# $Id: Menu.pm,v 2.41 2005/02/14 13:06:28 racke Exp $
+# $Id: Menu.pm,v 2.42 2005/04/12 15:14:39 mheins Exp $
#
# Copyright (C) 2002 Mike Heins, <mike at perusion.net>
#
@@ -21,7 +21,7 @@
package Vend::Menu;
-$VERSION = substr(q$Revision: 2.41 $, 10);
+$VERSION = substr(q$Revision: 2.42 $, 10);
use Vend::Util;
use strict;
@@ -401,7 +401,7 @@
$opt->{header_template} ||= <<EOF;
<P>
-<a href="{EXPLODE_URL}" {LINK_STYLE?} style="{LINK_STYLE}"{/LINK_STYLE?} {LINK_CLASS?} class="{LINK_CLASS}"{/LINK_CLASS?}>$explode_label</A><br>
+<a href="{EXPLODE_URL}" {LINK_STYLE?} style="{LINK_STYLE}"{/LINK_STYLE?} {LINK_CLASS?} class="{LINK_CLASS}"{/LINK_CLASS?}>$explode_label</A><br$Vend::Xtrailer>
<a href="{COLLAPSE_URL}" {LINK_STYLE?} style="{LINK_STYLE}"{/LINK_STYLE?} {LINK_CLASS?} class="{LINK_CLASS}"{/LINK_CLASS?}>$collapse_label</A>
</P>
EOF
@@ -919,7 +919,7 @@
my $collapse_label = errmsg($opt->{collapse_label} || 'Collapse tree');
$opt->{header_template} ||= <<EOF;
<P>
-<a href="{EXPLODE_URL}" {LINK_STYLE?} style="{LINK_STYLE}"{/LINK_STYLE?} {LINK_CLASS?} class="{LINK_CLASS}"{/LINK_CLASS?}>$explode_label</A><br>
+<a href="{EXPLODE_URL}" {LINK_STYLE?} style="{LINK_STYLE}"{/LINK_STYLE?} {LINK_CLASS?} class="{LINK_CLASS}"{/LINK_CLASS?}>$explode_label</A><br$Vend::Xtrailer>
<a href="{COLLAPSE_URL}" {LINK_STYLE?} style="{LINK_STYLE}"{/LINK_STYLE?} {LINK_CLASS?} class="{LINK_CLASS}"{/LINK_CLASS?}>$collapse_label</A>
</P>
EOF
@@ -1341,7 +1341,7 @@
out += '</div>';
}
else {
- out += '<br>';
+ out += "<br$Vend::Xtrailer>";
}
return out;
@@ -1439,7 +1439,7 @@
my $collapse_label = errmsg($opt->{collapse_label} || 'Collapse tree');
$opt->{header_template} ||= <<EOF;
<P>
-<a href="{EXPLODE_URL}" {LINK_STYLE?} style="{LINK_STYLE}"{/LINK_STYLE?} {LINK_CLASS?} class="{LINK_CLASS}"{/LINK_CLASS?}>$explode_label</A><br>
+<a href="{EXPLODE_URL}" {LINK_STYLE?} style="{LINK_STYLE}"{/LINK_STYLE?} {LINK_CLASS?} class="{LINK_CLASS}"{/LINK_CLASS?}>$explode_label</A><br$Vend::Xtrailer>
<a href="{COLLAPSE_URL}" {LINK_STYLE?} style="{LINK_STYLE}"{/LINK_STYLE?} {LINK_CLASS?} class="{LINK_CLASS}"{/LINK_CLASS?}>$collapse_label</A>
</P>
EOF
@@ -1704,7 +1704,7 @@
out = out + l[${vpf}NAME];
}
}
- out = out + '<br>';
+ out = out + "<br$Vend::Xtrailer>";
return out;
}
@@ -1813,7 +1813,7 @@
}
$template ||= qq[
-{MV_SPACER}{MV_CHILDREN?}<A href="{TOGGLE_URL}" class="{TOGGLE_CLASS}" style="{TOGGLE_STYLE}">{TOGGLE_ANCHOR}</A>{PAGE?}<A href="{HREF}" class="{TOGGLE_CLASS}" style="{TOGGLE_STYLE}">{/PAGE?}{NAME}{PAGE?}</a>{/PAGE?}{/MV_CHILDREN?}{MV_CHILDREN:}{TOGGLE_ANCHOR}{PAGE?}<A href="{HREF}" class="{LINK_CLASS}" style="{LINK_STYLE}">{/PAGE?}{NAME}{PAGE?}</a>{/PAGE?}{/MV_CHILDREN:}<br>
+{MV_SPACER}{MV_CHILDREN?}<A href="{TOGGLE_URL}" class="{TOGGLE_CLASS}" style="{TOGGLE_STYLE}">{TOGGLE_ANCHOR}</A>{PAGE?}<A href="{HREF}" class="{TOGGLE_CLASS}" style="{TOGGLE_STYLE}">{/PAGE?}{NAME}{PAGE?}</a>{/PAGE?}{/MV_CHILDREN?}{MV_CHILDREN:}{TOGGLE_ANCHOR}{PAGE?}<A href="{HREF}" class="{LINK_CLASS}" style="{LINK_STYLE}">{/PAGE?}{NAME}{PAGE?}</a>{/PAGE?}{/MV_CHILDREN:}<br$Vend::Xtrailer>
];
if(! $row->{page}) {
@@ -1984,12 +1984,12 @@
$template ||= <<EOF unless $template =~ /\S/;
{PAGE:}
<b>{NAME}:</b>
- <br>
+ <br$Vend::Xtrailer>
{/PAGE:}
{PAGE?}
-<a href="{HREF}"{DESCRIPTION?} title="{DESCRIPTION}"{/DESCRIPTION?}>{NAME}</a><br>
+<a href="{HREF}"{DESCRIPTION?} title="{DESCRIPTION}"{/DESCRIPTION?}>{NAME}</a><br$Vend::Xtrailer>
{/PAGE?}
EOF
2.4 +3 -3 interchange/lib/Vend/Options.pm
rev 2.4, prev_rev 2.3
Index: Options.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Options.pm,v
retrieving revision 2.3
retrieving revision 2.4
diff -u -r2.3 -r2.4
--- Options.pm 18 Jun 2003 17:34:44 -0000 2.3
+++ Options.pm 12 Apr 2005 15:14:39 -0000 2.4
@@ -1,6 +1,6 @@
# Vend::Options - Interchange item options base module
#
-# $Id: Options.pm,v 2.3 2003/06/18 17:34:44 jon Exp $
+# $Id: Options.pm,v 2.4 2005/04/12 15:14:39 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -23,7 +23,7 @@
package Vend::Options;
require Exporter;
-$VERSION = substr(q$Revision: 2.3 $, 10);
+$VERSION = substr(q$Revision: 2.4 $, 10);
@ISA = qw(Exporter);
@@ -153,7 +153,7 @@
$opt->{type} ||= 'display';
}
else {
- $opt->{joiner} ||= '<BR>';
+ $opt->{joiner} ||= "<br$Vend::Xtrailer>";
}
return;
}
1.9 +3 -3 interchange/lib/Vend/Options/Matrix.pm
rev 1.9, prev_rev 1.8
Index: Matrix.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Options/Matrix.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Matrix.pm 19 Jul 2004 22:24:17 -0000 1.8
+++ Matrix.pm 12 Apr 2005 15:14:39 -0000 1.9
@@ -1,6 +1,6 @@
# Vend::Options::Matrix - Interchange Matrix product options
#
-# $Id: Matrix.pm,v 1.8 2004/07/19 22:24:17 jon Exp $
+# $Id: Matrix.pm,v 1.9 2005/04/12 15:14:39 mheins Exp $
#
# Copyright (C) 2002-2003 Mike Heins <mikeh at perusion.net>
# Copyright (C) 2002-2003 Interchange Development Group <interchange at icdevgroup.org>
@@ -23,7 +23,7 @@
package Vend::Options::Matrix;
-$VERSION = substr(q$Revision: 1.8 $, 10);
+$VERSION = substr(q$Revision: 1.9 $, 10);
=head1 NAME
@@ -250,7 +250,7 @@
}
}
else {
- $opt->{joiner} = '<BR>' if ! $opt->{joiner};
+ $opt->{joiner} = "<br$Vend::Xtrailer>" if ! $opt->{joiner};
$out .= $begin;
$out .= join $opt->{joiner}, @out;
}
1.9 +4 -4 interchange/lib/Vend/Options/Old48.pm
rev 1.9, prev_rev 1.8
Index: Old48.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Options/Old48.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Old48.pm 15 Dec 2004 21:26:26 -0000 1.8
+++ Old48.pm 12 Apr 2005 15:14:39 -0000 1.9
@@ -1,6 +1,6 @@
# Vend::Options::Old48 - Interchange 4.8 compatible product options
#
-# $Id: Old48.pm,v 1.8 2004/12/15 21:26:26 mheins Exp $
+# $Id: Old48.pm,v 1.9 2005/04/12 15:14:39 mheins Exp $
#
# Copyright (C) 2002-2003 Mike Heins <mikeh at perusion.net>
# Copyright (C) 2002-2003 Interchange Development Group <interchange at icdevgroup.org>
@@ -23,7 +23,7 @@
package Vend::Options::Old48;
-$VERSION = substr(q$Revision: 1.8 $, 10);
+$VERSION = substr(q$Revision: 1.9 $, 10);
=head1 NAME
@@ -232,7 +232,7 @@
}
}
else {
- $opt->{joiner} = '<BR>' if ! $opt->{joiner};
+ $opt->{joiner} = "<br$Vend::Xtrailer>" if ! $opt->{joiner};
$out .= $begin;
$out .= join $opt->{joiner}, @out;
}
@@ -431,7 +431,7 @@
}
}
else {
- $opt->{joiner} = '<BR>' if ! $opt->{joiner};
+ $opt->{joiner} = "<br$Vend::Xtrailer>" if ! $opt->{joiner};
$out .= join $opt->{joiner}, @out;
}
return $out;
1.5 +3 -3 interchange/lib/Vend/Options/Simple.pm
rev 1.5, prev_rev 1.4
Index: Simple.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Options/Simple.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Simple.pm 8 Jan 2004 22:36:31 -0000 1.4
+++ Simple.pm 12 Apr 2005 15:14:39 -0000 1.5
@@ -1,6 +1,6 @@
# Vend::Options::Simple - Interchange Simple product options
#
-# $Id: Simple.pm,v 1.4 2004/01/08 22:36:31 mheins Exp $
+# $Id: Simple.pm,v 1.5 2005/04/12 15:14:39 mheins Exp $
#
# Copyright (C) 2002-2003 Mike Heins <mikeh at perusion.net>
# Copyright (C) 2002-2003 Interchange Development Group <interchange at icdevgroup.org>
@@ -23,7 +23,7 @@
package Vend::Options::Simple;
-$VERSION = substr(q$Revision: 1.4 $, 10);
+$VERSION = substr(q$Revision: 1.5 $, 10);
=head1 NAME
@@ -245,7 +245,7 @@
}
}
else {
- $opt->{joiner} = '<BR>' if ! $opt->{joiner};
+ $opt->{joiner} = "<br$Vend::Xtrailer>" if ! $opt->{joiner};
$out .= join $opt->{joiner}, @out;
}
#::logDebug("display_options out size=" . length($out));
1.67 +27 -18 interchange/lib/Vend/Table/Editor.pm
rev 1.67, prev_rev 1.66
Index: Editor.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/Editor.pm,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- Editor.pm 12 Apr 2005 03:23:21 -0000 1.66
+++ Editor.pm 12 Apr 2005 15:14:39 -0000 1.67
@@ -1,6 +1,6 @@
# Vend::Table::Editor - Swiss-army-knife table editor for Interchange
#
-# $Id: Editor.pm,v 1.66 2005/04/12 03:23:21 mheins Exp $
+# $Id: Editor.pm,v 1.67 2005/04/12 15:14:39 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 2002 Mike Heins <mike at perusion.net>
@@ -26,7 +26,7 @@
package Vend::Table::Editor;
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 1.66 $, 10);
+$VERSION = substr(q$Revision: 1.67 $, 10);
use Vend::Util;
use Vend::Interpolate;
@@ -762,15 +762,15 @@
return $w unless $template || $opt->{return_hash} || $array_return;
if($template and $template !~ /\s/) {
- $template = <<'EOF';
-<TR>
-<TD>
- <B>$LABEL$</B>
-</TD>
-<TD VALIGN=TOP>
- <TABLE CELLSPACING=0 CELLMARGIN=0><TR><TD>$WIDGET$</TD><TD>$HELP${HELP_URL}<BR><A HREF="$HELP_URL$">help</A>{/HELP_URL}</TD></TR></TABLE>
-</TD>
-</TR>
+ $template = <<EOF;
+<tr>
+<td>
+ <b>\$LABEL\$</b>
+</td>
+<td valign="top">
+ <table cellspacing="0" cellmargin="0"><tr><td>\$WIDGET\$</td><td>\$HELP\${HELP_URL}<br$Vend::Xtrailer><a href="\$HELP_URL\$">help</A>{/HELP_URL}</td></tr></table>
+</td>
+</tr>
EOF
}
@@ -2266,15 +2266,24 @@
all => 1,
show_var => $error_show_var,
show_error => 1,
- joiner => '<BR>',
+ joiner => "<br$Vend::Xtrailer>",
keep => 1}
);
- if($opt->{all_errors}) {
- if($have_errors) {
- $mlabel .= '<P>Errors:';
- $mlabel .= qq{<FONT COLOR="$opt->{color_fail}">};
- $mlabel .= "<BLOCKQUOTE>$have_errors</BLOCKQUOTE></FONT>";
- }
+ if($opt->{all_errors} and $have_errors) {
+ my $title = $opt->{all_errors_title} || errmsg('Errors');
+ my $style = $opt->{all_errors_style} || "color: $opt->{color_fail}";
+ my %hash = (
+ title => $opt->{all_errors_title} || errmsg('Errors'),
+ style => $opt->{all_errors_style} || "color: $opt->{color_fail}",
+ errors => $have_errors,
+ );
+ my $tpl = $opt->{all_errors_template} || <<EOF;
+<p>{TITLE}:
+<blockquote style="{STYLE}">{ERRORS}</blockquote>
+</p>
+EOF
+ $mlabel .= tag_attr_list($tpl, \%hash, 'uc');
+
}
}
### end build of error checking
More information about the interchange-cvs
mailing list