fix merge problems

This commit is contained in:
Doug Bell 2010-07-12 15:52:38 -05:00
parent babfa74209
commit 29b1f794cd
14 changed files with 174 additions and 357 deletions

View file

@ -103,6 +103,11 @@ property storageIdExample => (
hoverHelp => ['field storageIdExample description', 'Asset_Template'],
);
property attachmentsJson => (
fieldType => 'image',
label => [ "attachments display label", "Asset_Template" ],
);
use WebGUI::International;
use WebGUI::Asset::Template::HTMLTemplate;
use WebGUI::Utility;
@ -134,81 +139,6 @@ These methods are available from this class:
#-------------------------------------------------------------------
=head2 definition ( session, definition )
Defines the properties of this asset.
=head3 session
A reference to an existing session.
=head3 definition
A hash reference passed in from a subclass definition.
=cut
sub definition {
my $class = shift;
my $session = shift;
my $definition = shift;
my $i18n = WebGUI::International->new($session,"Asset_Template");
push @{$definition}, {
assetName => $i18n->get('assetName'),
icon => 'template.gif',
tableName => 'template',
className => 'WebGUI::Asset::Template',
properties => {
template => {
fieldType => 'codearea',
syntax => "html",
defaultValue => undef,
filter => 'packTemplate',
},
isEditable => {
noFormPost => 1,
fieldType => 'hidden',
defaultValue => 1,
},
isDefault => {
fieldType => 'hidden',
defaultValue => 0,
},
showInForms => {
fieldType => 'yesNo',
defaultValue => 1,
},
parser => {
noFormPost => 1,
fieldType => 'selectBox',
defaultValue => [$session->config->get("defaultTemplateParser")],
},
namespace => {
fieldType => 'combo',
defaultValue => undef,
},
templatePacked => {
fieldType => 'hidden',
defaultValue => undef,
noFormPost => 1,
},
usePacked => {
fieldType => 'yesNo',
defaultValue => 0,
},
storageIdExample => {
fieldType => 'image',
},
attachmentsJson => {
fieldType => 'JsonTable',
},
},
};
return $class->SUPER::definition($session,$definition);
}
#-------------------------------------------------------------------
=head2 addRevision ( )
Override the master addRevision to copy attachments
@ -727,29 +657,6 @@ sub processRaw {
#-------------------------------------------------------------------
=head2 update
Override update from Asset.pm to handle backwards compatibility with the old
packages that contain headBlocks. This will be removed in the future. Don't plan
on this being here.
=cut
sub update {
my $self = shift;
my $requestedProperties = shift;
my $properties = clone($requestedProperties);
if (exists $properties->{headBlock}) {
$properties->{extraHeadTags} .= $properties->{headBlock};
delete $properties->{headBlock};
}
$self->SUPER::update($properties);
}
#-------------------------------------------------------------------
=head2 www_edit
Hand draw this form so that a warning can be displayed to the user when editing a