WebGUI 3.1.0 release

This commit is contained in:
JT Smith 2002-02-01 06:57:00 +00:00
parent d1c1445ea1
commit 71cd27d3bc
56 changed files with 2025 additions and 238 deletions

View file

@ -12,11 +12,12 @@ package WebGUI::Shortcut;
use Exporter;
use strict;
use WebGUI::Attachment;
use WebGUI::International;
use WebGUI::Session;
our @ISA = qw(Exporter);
our @EXPORT = qw(&formHeader &formSave &tableFormRow &helpLink);
our @EXPORT = qw(&attachmentBox &formHeader &formSave &tableFormRow &helpLink);
# The subroutines found herein do nothing other than creating a
# short way of doing much longer repetitive tasks. They simply
@ -24,6 +25,22 @@ our @EXPORT = qw(&formHeader &formSave &tableFormRow &helpLink);
# less cluttered code.
#-------------------------------------------------------------------
sub attachmentBox {
my ($output, %fileType, $fileUrl);
$fileUrl = $session{setting}{attachmentDirectoryWeb}.'/'.$_[1].'/';
if ($_[2] ne "") {
$fileUrl .= $_[2].'/';
}
$fileUrl .= $_[0];
%fileType = WebGUI::Attachment::getType($_[0]);
$output = '<p><table cellpadding=3 cellspacing=0 border=1><tr><td class="tableHeader">'.
'<a href="'.$fileUrl.'"><img src="'.$session{setting}{lib}.'/attachment.gif" border=0 alt="'.
$_[0].'"></a></td><td><a href="'.$fileUrl.'"><img src="'.$fileType{icon}.
'" align="middle" width="16" height="16" border="0" alt="'.$_[0].'">'.$_[0].'</a></td></tr></table>';
return $output;
}
#-------------------------------------------------------------------
sub formHeader {
my ($output);
@ -42,7 +59,8 @@ sub formSave {
sub helpLink {
my ($output, $namespace);
$namespace = $_[1] || "WebGUI";
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid='.$_[0].'&namespace='.$namespace.'"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
$output = '<a href="'.$session{page}{url}.'?op=viewHelp&hid='.$_[0].'&namespace='.$namespace.
'" target="_blank"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
return $output;
}