Merging changes from 6.6.4
Added new definition features to wobjects and assets.
This commit is contained in:
parent
3805ebed23
commit
c4b3e4092d
43 changed files with 457 additions and 717 deletions
|
|
@ -38,12 +38,13 @@ use WebGUI::Asset::Wobject::EventsCalendar;
|
|||
our @ISA = qw(WebGUI::Asset);
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(511,"Asset_Event"),
|
||||
icon=>'calendar.gif',
|
||||
tableName=>'EventsCalendar_event',
|
||||
className=>'WebGUI::Asset::Event',
|
||||
properties=>{
|
||||
|
|
@ -325,20 +326,6 @@ sub getEditForm {
|
|||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/calendar.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/calendar.gif';
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(511,"Asset_Event");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub processPropertiesFromFormPost {
|
||||
|
|
@ -381,6 +368,25 @@ sub processPropertiesFromFormPost {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head setParent ( newParent )
|
||||
|
||||
We're overloading the setParent in Asset because we don't want events to be able to be posted to anything other than the events calendar.
|
||||
|
||||
=head3 newParent
|
||||
|
||||
An asset object to make the parent of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub setParent {
|
||||
my $self = shift;
|
||||
my $newParent = shift;
|
||||
return 0 unless ($newParent->get("className") eq "WebGUI::Asset::Wobject::EventsCalendar");
|
||||
return $self->SUPER::setParent($newParent);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub view {
|
||||
my $self = shift;
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get('file',"Asset_File"),
|
||||
tableName=>'FileAsset',
|
||||
className=>'WebGUI::Asset::File',
|
||||
properties=>{
|
||||
|
|
@ -163,19 +164,6 @@ sub getIcon {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getName
|
||||
|
||||
Returns the displayable name of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub getName {
|
||||
return WebGUI::International::get('file',"Asset_File");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getStorageLocation {
|
||||
my $self = shift;
|
||||
|
|
@ -212,7 +200,6 @@ sub processPropertiesFromFormPost {
|
|||
$data{url} = $self->getParent->get('url').'/'.$filename unless ($session{form}{url});
|
||||
$self->update(\%data);
|
||||
$self->setSize($storage->getFileSize($filename));
|
||||
$storage->setPrivileges($self->get("ownerUserId"), $self->get("groupIdView"), $self->get("groupIdEdit"));
|
||||
$self->{_storageLocation} = $storage;
|
||||
} else {
|
||||
$storage->delete;
|
||||
|
|
@ -239,6 +226,27 @@ sub purge {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 update
|
||||
|
||||
We overload the update method from WebGUI::Asset in order to handle file system privileges.
|
||||
|
||||
=cut
|
||||
|
||||
sub update {
|
||||
my $self = shift;
|
||||
my %before = (
|
||||
owner => $self->get("ownerUserId"),
|
||||
view => $self->get("groupIdView"),
|
||||
edit => $self->get("groupIdEdit")
|
||||
);
|
||||
$self->SUPER::update(@_);
|
||||
if ($self->get("ownerUserId") ne $before{owner} || $self->get("groupIdEdit") ne $before{edit} || $self->get("groupIdView") ne $before{view}) {
|
||||
$self->getStorageLocation->setPrivileges($self->get("ownerUserId"),$self->get("groupIdView"),$self->get("groupIdEdit"));
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub view {
|
||||
my $self = shift;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get('image',"Asset_Image"),
|
||||
tableName=>'ImageAsset',
|
||||
className=>'WebGUI::Asset::File::Image',
|
||||
properties=>{
|
||||
|
|
@ -152,19 +153,6 @@ sub getIcon {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getName
|
||||
|
||||
Returns the displayable name of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub getName {
|
||||
return WebGUI::International::get('image',"Asset_Image");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getStorageLocation {
|
||||
my $self = shift;
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get('post',"Asset_Post")
|
||||
icon=>'post.gif',
|
||||
tableName=>'Post',
|
||||
className=>'WebGUI::Asset::Post',
|
||||
properties=>{
|
||||
|
|
@ -256,13 +258,6 @@ sub getEditUrl {
|
|||
return $self->getUrl("func=edit");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/post.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/post.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getImageUrl {
|
||||
|
|
@ -279,10 +274,6 @@ sub getImageUrl {
|
|||
return $url;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get('post',"Asset_Post");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
@ -670,7 +661,6 @@ sub processPropertiesFromFormPost {
|
|||
$filename = $storage->addFileFromFormPost("file", $attachmentLimit) if $attachmentLimit;
|
||||
if (defined $filename) {
|
||||
$self->setSize($storage->getFileSize($filename));
|
||||
$storage->setPrivileges($self->get("ownerUserId"), $self->get("groupIdView"), $self->get("groupIdEdit"));
|
||||
foreach my $file (@{$storage->getFiles}) {
|
||||
if ($storage->isImage($file)) {
|
||||
$storage->generateThumbnail($file,$session{setting}{maxImageSize});
|
||||
|
|
@ -740,6 +730,25 @@ sub setLastPost {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head setParent ( newParent )
|
||||
|
||||
We're overloading the setParent in Asset because we don't want posts to be able to be posted to anything other than other posts or threads.
|
||||
|
||||
=head3 newParent
|
||||
|
||||
An asset object to make the parent of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub setParent {
|
||||
my $self = shift;
|
||||
my $newParent = shift;
|
||||
return 0 unless ($newParent->get("className") eq "WebGUI::Asset::Post" || $newParent->get("className") eq "WebGUI::Asset::Post::Thread");
|
||||
return $self->SUPER::setParent($newParent);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setStatusApproved ( )
|
||||
|
|
@ -841,6 +850,27 @@ sub unmarkRead {
|
|||
WebGUI::SQL->write("delete from forumRead where userId=".quote($session{user}{userId})." and postId=".quote($self->getId));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 update
|
||||
|
||||
We overload the update method from WebGUI::Asset in order to handle file system privileges.
|
||||
|
||||
=cut
|
||||
|
||||
sub update {
|
||||
my $self = shift;
|
||||
my %before = (
|
||||
owner => $self->get("ownerUserId"),
|
||||
view => $self->get("groupIdView"),
|
||||
edit => $self->get("groupIdEdit")
|
||||
);
|
||||
$self->SUPER::update(@_);
|
||||
if ($self->get("ownerUserId") ne $before{owner} || $self->get("groupIdEdit") ne $before{edit} || $self->get("groupIdView") ne $before{view}) {
|
||||
$self->getStorageLocation->setPrivileges($self->get("ownerUserId"),$self->get("groupIdView"),$self->get("groupIdEdit"));
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub view {
|
||||
my $self = shift;
|
||||
|
|
@ -1021,7 +1051,7 @@ sub www_edit {
|
|||
richEditId=>$self->getThread->getParent->get("richEditor")
|
||||
});
|
||||
$var{'form.submit'} = WebGUI::Form::submit({
|
||||
extras=>"onclick=\"this.value='".WebGUI::International::get(452)."'; this.form.func.value='editSave'; this.form.submit();\""
|
||||
extras=>"onclick=\"this.value='".WebGUI::International::get(452)."'; this.form.func.value='editSave'; this.form.submit();return false;\""
|
||||
});
|
||||
$var{'form.preview'} = WebGUI::Form::submit({
|
||||
value=>WebGUI::International::get("preview","Asset_Collaboration")
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get('thread',"Asset_Thread"),
|
||||
icon=>'thread.gif',
|
||||
tableName=>'Thread',
|
||||
className=>'WebGUI::Asset::Post::Thread',
|
||||
properties=>{
|
||||
|
|
@ -119,14 +121,6 @@ sub DESTROY {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/thread.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/thread.gif';
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getLastPost {
|
||||
|
|
@ -172,10 +166,6 @@ sub getLockUrl {
|
|||
$self->getUrl("func=lock");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get('thread',"Asset_Thread");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
@ -470,6 +460,25 @@ sub rate {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head setParent ( newParent )
|
||||
|
||||
We're overloading the setParent in Asset because we don't want threads to be able to be posted to anything other than other collaboration systems.
|
||||
|
||||
=head3 newParent
|
||||
|
||||
An asset object to make the parent of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub setParent {
|
||||
my $self = shift;
|
||||
my $newParent = shift;
|
||||
return 0 unless ($newParent->get("className") eq "WebGUI::Asset::Wobject::Collaboration");
|
||||
# specify the Asset package here directly because we don't want to use the ruls in WebGUI::Asset::Post, as they don't fit for Threads.
|
||||
return $self->WebGUI::Asset::setParent($newParent);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get('redirect',"Asset_Redirect"),
|
||||
icon=>'redirect.gif',
|
||||
tableName=>'redirect',
|
||||
className=>'WebGUI::Asset::Redirect',
|
||||
properties=>{
|
||||
|
|
@ -95,13 +97,6 @@ sub getEditForm {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/redirect.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/redirect.gif';
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -116,18 +111,6 @@ sub getUiLevel {
|
|||
return 9;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getName
|
||||
|
||||
Returns the displayable name of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub getName {
|
||||
return WebGUI::International::get('redirect',"Asset_Redirect");
|
||||
}
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>'Rich Editor',
|
||||
icon=>'richEdit.gif',
|
||||
tableName=>'RichEdit',
|
||||
className=>'WebGUI::Asset::RichEdit',
|
||||
properties=>{
|
||||
|
|
@ -363,14 +365,6 @@ sub getEditForm {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/adminConsole/small/richEdit.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/adminConsole/richEdit.gif';
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
@ -399,18 +393,6 @@ sub getUiLevel {
|
|||
return 5;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getName
|
||||
|
||||
Returns the displayable name of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub getName {
|
||||
return "Rich Editor";
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getRichEditor {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(3,"Asset_Shortcut"),
|
||||
icon=>'shortcut.gif',
|
||||
tableName=>'Shortcut',
|
||||
className=>'WebGUI::Asset::Shortcut',
|
||||
properties=>{
|
||||
|
|
@ -186,19 +188,6 @@ sub getEditForm {
|
|||
return $tabform;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/shortcut.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/shortcut.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(3,"Asset_Shortcut");
|
||||
}
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get('snippet',"Asset_Snippet"),
|
||||
icon=>'snippet.gif',
|
||||
tableName=>'snippet',
|
||||
className=>'WebGUI::Asset::Snippet',
|
||||
properties=>{
|
||||
|
|
@ -123,14 +125,6 @@ sub getEditForm {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/snippet.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/snippet.gif';
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
@ -159,17 +153,6 @@ sub getUiLevel {
|
|||
return 5;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getName
|
||||
|
||||
Returns the displayable name of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub getName {
|
||||
return WebGUI::International::get('snippet',"Asset_Snippet");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -99,6 +99,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get('template',"Asset_Template"),
|
||||
icon=>'template.gif',
|
||||
tableName=>'template',
|
||||
className=>'WebGUI::Asset::Template',
|
||||
properties=>{
|
||||
|
|
@ -179,13 +181,6 @@ sub getEditForm {
|
|||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/template.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/template.gif';
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -209,18 +204,6 @@ sub getList {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getName
|
||||
|
||||
Returns the displayable name of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub getName {
|
||||
return WebGUI::International::get('template',"Asset_Template");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -72,27 +72,52 @@ sub definition {
|
|||
properties=>{
|
||||
description=>{
|
||||
fieldType=>'HTMLArea',
|
||||
defaultValue=>undef
|
||||
defaultValue=>undef,
|
||||
tab=>"properties",
|
||||
label=>WebGUI::International::get(85,'Wobject'),
|
||||
hoverHelp=>WebGUI::International::get('85 description','Wobject')
|
||||
},
|
||||
displayTitle=>{
|
||||
fieldType=>'yesNo',
|
||||
defaultValue=>1
|
||||
defaultValue=>1,
|
||||
tab=>"display",
|
||||
label=>WebGUI::International::get(174,'Wobject'),
|
||||
hoverHelp=>WebGUI::International::get('174 description','Wobject'),
|
||||
uiLevel=>5
|
||||
},
|
||||
cacheTimeout=>{
|
||||
fieldType=>'interval',
|
||||
defaultValue=>60
|
||||
defaultValue=>60,
|
||||
tab=>"display",
|
||||
label=>WebGUI::International::get(895,'Wobject'),
|
||||
hoverHelp=>WebGUI::International::get('895 description','Wobject'),
|
||||
uiLevel=>8
|
||||
},
|
||||
cacheTimeoutVisitor=>{
|
||||
fieldType=>'interval',
|
||||
defaultValue=>600
|
||||
tab=>"display",
|
||||
label=>WebGUI::International::get(896,'Wobject'),
|
||||
hoverHelp=>WebGUI::International::get('896 description','Wobject'),
|
||||
uiLevel=>8
|
||||
},
|
||||
styleTemplateId=>{
|
||||
fieldType=>'template',
|
||||
defaultValue=>undef
|
||||
defaultValue=>undef,
|
||||
tab=>"display",
|
||||
label=>WebGUI::International::get(1073,'Wobject'),
|
||||
hoverHelp=>WebGUI::International::get('1073 description','Wobject'),
|
||||
namespace=>'style',
|
||||
afterEdit=>'op=editPage&npp='.$session{form}{npp}
|
||||
},
|
||||
printableStyleTemplateId=>{
|
||||
fieldType=>'template',
|
||||
defaultValue=>undef
|
||||
defaultValue=>undef,
|
||||
tab=>"display",
|
||||
label=>WebGUI::International::get(1079,'Wobject'),
|
||||
hoverHelp=>WebGUI::International::get('1079 description','Wobject'),
|
||||
namespace=>'style',
|
||||
afterEdit=>'op=editPage&npp='.$session{form}{npp}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -223,49 +248,18 @@ Returns the TabForm object that will be used in generating the edit page for thi
|
|||
sub getEditForm {
|
||||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm();
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"displayTitle",
|
||||
-label=>WebGUI::International::get(174,'Wobject'),
|
||||
-hoverHelp=>WebGUI::International::get('174 description','Wobject'),
|
||||
-value=>$self->getValue("displayTitle"),
|
||||
-uiLevel=>5
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-name=>"styleTemplateId",
|
||||
-label=>WebGUI::International::get(1073,'Wobject'),
|
||||
-hoverHelp=>WebGUI::International::get('1073 description','Wobject'),
|
||||
-value=>$self->getValue("styleTemplateId"),
|
||||
-namespace=>'style',
|
||||
-afterEdit=>'op=editPage&npp='.$session{form}{npp}
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
-name=>"printableStyleTemplateId",
|
||||
-label=>WebGUI::International::get(1079,'Wobject'),
|
||||
-hoverHelp=>WebGUI::International::get('1079 description','Wobject'),
|
||||
-value=>$self->getValue("printableStyleTemplateId"),
|
||||
-namespace=>'style',
|
||||
-afterEdit=>'op=editPage&npp='.$session{form}{npp}
|
||||
);
|
||||
$tabform->getTab("properties")->HTMLArea(
|
||||
-name=>"description",
|
||||
-label=>WebGUI::International::get(85,'Wobject'),
|
||||
-hoverHelp=>WebGUI::International::get('85 description','Wobject'),
|
||||
-value=>$self->getValue("description")
|
||||
);
|
||||
$tabform->getTab("display")->interval(
|
||||
-name=>"cacheTimeout",
|
||||
-label=>WebGUI::International::get(895,'Wobject'),
|
||||
-hoverHelp=>WebGUI::International::get('895 description','Wobject'),
|
||||
-value=>$self->getValue("cacheTimeout"),
|
||||
-uiLevel=>8
|
||||
);
|
||||
$tabform->getTab("display")->interval(
|
||||
-name=>"cacheTimeoutVisitor",
|
||||
-label=>WebGUI::International::get(896,'Wobject'),
|
||||
-hoverHelp=>WebGUI::International::get('896 description','Wobject'),
|
||||
-value=>$self->getValue("cacheTimeoutVisitor"),
|
||||
-uiLevel=>8
|
||||
);
|
||||
my $definition = $self->definition;
|
||||
my $properties = $definition->[0]{properties};
|
||||
foreach my $fieldname (keys %{$properties}) {
|
||||
my %params;
|
||||
foreach my $key (keys %{$properties->{$fieldname}}) {
|
||||
next if ($key eq "tab" || $key eq "fieldType");
|
||||
$params{"-".$key} = $properties->{$fieldname}{$key}
|
||||
}
|
||||
$params{"-value"} = $self->getValue($fieldname);
|
||||
$params{"-name"} = $fieldname;
|
||||
$tabform->getTab($properties->{$fieldname}{tab})->dynamicField($properties->{$fieldname}{fieldType},%params);
|
||||
}
|
||||
return $tabform;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,24 +26,39 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(1,"Asset_Article"),
|
||||
icon=>'article.gif',
|
||||
tableName=>'Article',
|
||||
className=>'WebGUI::Asset::Wobject::Article',
|
||||
properties=>{
|
||||
templateId =>{
|
||||
fieldType=>"template",
|
||||
defaultValue=>'PBtmpl0000000000000002'
|
||||
defaultValue=>'PBtmpl0000000000000002',
|
||||
namespace=>"Article",
|
||||
hoverHelp=>WebGUI::International::get('article template description','Asset_Article'),
|
||||
label=>WebGUI::International::get(72,"Asset_Article")
|
||||
},
|
||||
linkURL=>{
|
||||
fieldType=>'url',
|
||||
defaultValue=>undef
|
||||
defaultValue=>undef,
|
||||
label=>WebGUI::International::get(8,"Asset_Article"),
|
||||
hoverHelp=>WebGUI::International::get('link url description','Asset_Article'),
|
||||
uiLevel=>3
|
||||
},
|
||||
linkTitle=>{
|
||||
fieldType=>'text',
|
||||
defaultValue=>undef
|
||||
defaultValue=>undef,
|
||||
label=>WebGUI::International::get(7,"Asset_Article"),
|
||||
hoverHelp=>WebGUI::International::get('link title description','Asset_Article'),
|
||||
uiLevel=>3
|
||||
},
|
||||
convertCarriageReturns=>{
|
||||
fieldType=>'yesNo',
|
||||
defaultValue=>0
|
||||
defaultValue=>0,
|
||||
label=>WebGUI::International::get(10,"Asset_Article"),
|
||||
subtext=>' <span style="font-size: 8pt;">'.WebGUI::International::get(11,"Asset_Article").'</span>',
|
||||
hoverHelp=>WebGUI::International::get('carriage return description','Asset_Article'),
|
||||
uiLevel=>5
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -52,51 +67,6 @@ sub definition {
|
|||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getEditForm {
|
||||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm();
|
||||
$tabform->getTab("display")->template(
|
||||
-value=>$self->getValue('templateId'),
|
||||
-namespace=>"Article",
|
||||
-hoverHelp=>WebGUI::International::get('article template description','Asset_Article'),
|
||||
-label=>WebGUI::International::get(72,"Asset_Article"),
|
||||
);
|
||||
$tabform->getTab("properties")->text(
|
||||
-name=>"linkTitle",
|
||||
-label=>WebGUI::International::get(7,"Asset_Article"),
|
||||
-value=>$self->getValue("linkTitle"),
|
||||
-hoverHelp=>WebGUI::International::get('link title description','Asset_Article'),
|
||||
-uiLevel=>3
|
||||
);
|
||||
$tabform->getTab("properties")->url(
|
||||
-name=>"linkURL",
|
||||
-label=>WebGUI::International::get(8,"Asset_Article"),
|
||||
-value=>$self->getValue("linkURL"),
|
||||
-hoverHelp=>WebGUI::International::get('link url description','Asset_Article'),
|
||||
-uiLevel=>3
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"convertCarriageReturns",
|
||||
-label=>WebGUI::International::get(10,"Asset_Article"),
|
||||
-value=>$self->getValue("convertCarriageReturns"),
|
||||
-subtext=>' <span style="font-size: 8pt;">'.WebGUI::International::get(11,"Asset_Article").'</span>',
|
||||
-hoverHelp=>WebGUI::International::get('carriage return description','Asset_Article'),
|
||||
-uiLevel=>5,
|
||||
-defaultValue=>0
|
||||
);
|
||||
return $tabform;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/article.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/article.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIndexerParams {
|
||||
my $self = shift;
|
||||
|
|
@ -130,10 +100,6 @@ sub getIndexerParams {
|
|||
};
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,"Asset_Article");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -259,6 +259,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get('collaboration system',"Asset_collaboration"),
|
||||
icon=>'collaboration.gif',
|
||||
tableName=>'Collaboration',
|
||||
className=>'WebGUI::Asset::Wobject::Collaboration',
|
||||
properties=>{
|
||||
|
|
@ -605,20 +607,6 @@ sub getEditForm {
|
|||
return $tabform;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/collaboration.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/collaboration.gif';
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get('collaboration system',"Asset_collaboration");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
@ -775,10 +763,21 @@ sub isSubscribed {
|
|||
#-------------------------------------------------------------------
|
||||
sub processPropertiesFromFormPost {
|
||||
my $self = shift;
|
||||
my $updatePrivs = ($session{form}{groupIdView} ne $self->get("groupIdView") || $session{form}{moderateGroupId} ne $self->get("moderateGroupId"));
|
||||
$self->SUPER::processPropertiesFromFormPost;
|
||||
if ($self->get("subscriptionGroupId") eq "") {
|
||||
$self->createSubscriptionGroup;
|
||||
}
|
||||
if ($updatePrivs) {
|
||||
foreach my $descendant (@{$self->getLineage(["descendants"],{returnObjects=>1})}) {
|
||||
$descendant->update({
|
||||
groupIdView=>$self->get("groupIdView"),
|
||||
groupIdEdit=>$self->get("moderateGroupId")
|
||||
});
|
||||
}
|
||||
}
|
||||
WebGUI::Session::deleteScratch($self->getId."_sortBy");
|
||||
WebGUI::Session::deleteScratch($self->getId."_sortDir");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -869,9 +868,9 @@ sub view {
|
|||
my $scratchSortOrder = $self->getId."_sortDir";
|
||||
my $sortBy = $session{form}{sortBy} || $session{scratch}{$scratchSortBy} || $self->get("sortBy");
|
||||
my $sortOrder = $session{scratch}{$scratchSortOrder} || $self->get("sortOrder");
|
||||
if ($sortBy ne $session{scratch}{$scratchSortBy}) {
|
||||
if ($sortBy ne $session{scratch}{$scratchSortBy} && $session{form}{func} ne "editSave") {
|
||||
WebGUI::Session::setScratch($scratchSortBy,$session{form}{sortBy});
|
||||
} elsif ($session{form}{sortBy}) {
|
||||
} elsif ($session{form}{sortBy} && $session{form}{func} ne "editSave") {
|
||||
if ($sortOrder eq "asc") {
|
||||
$sortOrder = "desc";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -135,7 +135,9 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(1,"Asset_DataForm"),
|
||||
tableName=>'DataForm',
|
||||
icon=>'dataForm.gif',
|
||||
className=>'WebGUI::Asset::Wobject::DataForm',
|
||||
properties=>{
|
||||
templateId =>{
|
||||
|
|
@ -270,13 +272,6 @@ sub getEditForm {
|
|||
return $tabform;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/dataForm.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/dataForm.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIndexerParams {
|
||||
|
|
@ -542,10 +537,6 @@ sub getRecordTemplateVars {
|
|||
return $var;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,"Asset_DataForm");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getUiLevel {
|
||||
|
|
|
|||
|
|
@ -38,11 +38,14 @@ our @ISA = qw(WebGUI::Asset::Wobject);
|
|||
# return WebGUI::Grouping::isInGroup($self->getValue("groupIdManage"),$userId);
|
||||
#}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(2,"Asset_EventsCalendar"),
|
||||
icon=>'calendar.gif',
|
||||
tableName=>'EventsCalendar',
|
||||
className=>'WebGUI::Asset::Wobject::EventsCalendar',
|
||||
properties=>{
|
||||
|
|
@ -180,19 +183,6 @@ sub getEditForm {
|
|||
return $tabform;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/calendar.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/calendar.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(2,"Asset_EventsCalendar");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getUiLevel {
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get("folder","Asset_Folder"),
|
||||
icon=>'folder.gif',
|
||||
tableName=>'Folder',
|
||||
className=>'WebGUI::Asset::Wobject::Folder',
|
||||
properties=>{
|
||||
|
|
@ -103,27 +105,6 @@ sub getEditForm {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/folder.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/folder.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getName ()
|
||||
|
||||
Returns the displayable name of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub getName {
|
||||
return WebGUI::International::get("folder","Asset_Folder");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getUiLevel ()
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(3,"Asset_HttpProxy"),
|
||||
icon=>'httpProxy.gif',
|
||||
tableName=>'HttpProxy',
|
||||
className=>'WebGUI::Asset::Wobject::HttpProxy',
|
||||
properties=>{
|
||||
|
|
@ -164,19 +166,6 @@ sub getEditForm {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/httpProxy.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/httpProxy.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(3,"Asset_HttpProxy");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getUiLevel {
|
||||
return 5;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get("layout","Asset_Layout"),
|
||||
icon=>'layout.gif',
|
||||
tableName=>'Layout',
|
||||
className=>'WebGUI::Asset::Wobject::Layout',
|
||||
properties=>{
|
||||
|
|
@ -128,25 +130,6 @@ sub getEditForm {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/layout.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/layout.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getName ()
|
||||
|
||||
Returns the displayable name of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub getName {
|
||||
return WebGUI::International::get("layout","Asset_Layout");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -26,45 +26,23 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(2,"Asset_MessageBoard"),
|
||||
icon=>'messageBoard.gif',
|
||||
tableName=>'MessageBoard',
|
||||
className=>'WebGUI::Asset::Wobject::MessageBoard',
|
||||
properties=>{
|
||||
templateId =>{
|
||||
fieldType=>"template",
|
||||
defaultValue=>'PBtmpl0000000000000047'
|
||||
defaultValue=>'PBtmpl0000000000000047',
|
||||
namespace=>"MessageBoard",
|
||||
label=>WebGUI::International::get(73,"Asset_MessageBoard"),
|
||||
hoverHelp=>WebGUI::International::get('73 description',"Asset_MessageBoard")
|
||||
},
|
||||
}
|
||||
});
|
||||
return $class->SUPER::definition($definition);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getEditForm {
|
||||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm();
|
||||
$tabform->getTab("display")->template(
|
||||
-value=>$self->getValue('templateId'),
|
||||
-namespace=>"MessageBoard",
|
||||
-label=>WebGUI::International::get(73,"Asset_MessageBoard")
|
||||
-hoverHelp=>WebGUI::International::get('73 description',"Asset_MessageBoard")
|
||||
);
|
||||
return $tabform;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/messageBoard.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/messageBoard.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(2,"Asset_MessageBoard");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub view {
|
||||
|
|
|
|||
|
|
@ -27,12 +27,13 @@ use WebGUI::Utility;
|
|||
our @ISA = qw(WebGUI::Asset::Wobject);
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get("navigation","Asset_Navigation"),
|
||||
icon=>'navigation.gif',
|
||||
tableName=>'Navigation',
|
||||
className=>'WebGUI::Asset::Wobject::Navigation',
|
||||
properties=>{
|
||||
|
|
@ -257,18 +258,6 @@ sub getEditForm {
|
|||
return $tabform;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/navigation.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/navigation.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get("navigation","Asset_Navigation");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(1,"Asset_Poll"),
|
||||
tableName=>'Poll',
|
||||
icon=>'poll.gif',
|
||||
className=>'WebGUI::Asset::Wobject::Poll',
|
||||
properties=>{
|
||||
templateId =>{
|
||||
|
|
@ -240,14 +242,6 @@ sub getEditForm {
|
|||
return $tabform;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/poll.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/poll.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIndexerParams {
|
||||
my $self = shift;
|
||||
|
|
@ -279,11 +273,6 @@ sub getIndexerParams {
|
|||
};
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,"Asset_Poll");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub processPropertiesFromFormPost {
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(1,"Asset_Product"),
|
||||
icon=>'product.gif',
|
||||
tableName=>'Product',
|
||||
className=>'WebGUI::Asset::Wobject::Product',
|
||||
properties=>{
|
||||
|
|
@ -299,10 +301,6 @@ sub getIndexerParams {
|
|||
};
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,"Asset_Product");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getThumbnailFilename {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(1,"Asset_SQLReport"),
|
||||
icon=>'sqlReport.gif',
|
||||
tableName=>'SQLReport',
|
||||
className=>'WebGUI::Asset::Wobject::SQLReport',
|
||||
properties=>{
|
||||
|
|
@ -231,19 +233,6 @@ sub getEditForm {
|
|||
return $tabform;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/sqlReport.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/sqlReport.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,"Asset_SQLReport");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getUiLevel {
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(1,'Asset_Survey'),
|
||||
icon=>'survey.gif',
|
||||
tableName => 'Survey',
|
||||
className => 'WebGUI::Asset::Wobject::Survey',
|
||||
properties => {
|
||||
|
|
@ -286,13 +288,6 @@ sub getEditForm {
|
|||
return $tabform;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/survey.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/survey.gif';
|
||||
}
|
||||
|
||||
#
|
||||
# WID FIXEN!
|
||||
|
|
@ -520,10 +515,6 @@ sub getUserId {
|
|||
return $userId;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1,'Asset_Survey');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub purge {
|
||||
|
|
|
|||
|
|
@ -73,60 +73,56 @@ sub definition {
|
|||
my $class = shift;
|
||||
my $definition = shift;
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(2,'Asset_SyndicatedContent'),
|
||||
icon=>'syndicatedContent.gif',
|
||||
tableName=>'SyndicatedContent',
|
||||
className=>'WebGUI::Asset::Wobject::SyndicatedContent',
|
||||
properties=>{
|
||||
templateId =>{
|
||||
fieldType=>'template',
|
||||
defaultValue=>'PBtmpl0000000000000065'
|
||||
defaultValue=>'PBtmpl0000000000000065',
|
||||
namespace=>'SyndicatedContent',
|
||||
label=>WebGUI::International::get(72,'Asset_SyndicatedContent'),
|
||||
hoverHelp=>WebGUI::International::get('72 description','Asset_SyndicatedContent')
|
||||
},
|
||||
rssUrl=>{
|
||||
defaultValue=>undef,
|
||||
fieldType=>'textarea'
|
||||
fieldType=>'textarea',
|
||||
label=>WebGUI::International::get(1,'Asset_SyndicatedContent'),
|
||||
hoverHelp=>WebGUI::International::get('1 description','Asset_SyndicatedContent')
|
||||
},
|
||||
maxHeadlines=>{
|
||||
fieldType=>'integer',
|
||||
defaultValue=>10
|
||||
defaultValue=>10,
|
||||
label=>WebGUI::International::get(3,'Asset_SyndicatedContent'),
|
||||
hoverHelp=>WebGUI::International::get('3 description','Asset_SyndicatedContent')
|
||||
},
|
||||
displayMode=>{
|
||||
fieldType=>'text',
|
||||
defaultValue=>'interleaved'
|
||||
},
|
||||
fieldType=>'selectList',
|
||||
defaultValue=>'interleaved',
|
||||
options=>{
|
||||
'interleaved'=>WebGUI::International::get('interleaved','Asset_SyndicatedContent'),
|
||||
'grouped'=>WebGUI::International::get('grouped','Asset_SyndicatedContent'),
|
||||
},
|
||||
sortByValue=>1,
|
||||
label=>WebGUI::International::get('displayModeLabel','Asset_SyndicatedContent'),
|
||||
hoverHelp=>WebGUI::International::get('displayModeLabel description','Asset_SyndicatedContent'),
|
||||
subtext=>WebGUI::International::get('displayModeSubtext','Asset_SyndicatedContent')
|
||||
},
|
||||
hasTerms=>{
|
||||
fieldType=>'text',
|
||||
defaultValue=>''
|
||||
}
|
||||
fieldType=>'text',
|
||||
defaultValue=>'',
|
||||
label=>WebGUI::International::get('hasTermsLabel','Asset_SyndicatedContent'),
|
||||
hoverHelp=>WebGUI::International::get('hasTermsLabel description','Asset_SyndicatedContent'),
|
||||
maxlength=>255
|
||||
}
|
||||
}
|
||||
});
|
||||
return $class->SUPER::definition($definition);
|
||||
}
|
||||
|
||||
|
||||
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
=head2 getName ()
|
||||
|
||||
Returns the icons associated with this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/syndicatedContent.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/syndicatedContent.gif';
|
||||
}
|
||||
|
||||
|
||||
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
=head2 getName ()
|
||||
|
||||
Returns the displayable name of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub getName {
|
||||
return WebGUI::International::get(2,'Asset_SyndicatedContent');
|
||||
}
|
||||
|
||||
|
||||
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
|
@ -141,59 +137,6 @@ sub getUiLevel {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 getEditForm ()
|
||||
|
||||
Returns the TabForm object that will be used in generating the edit page for this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub getEditForm {
|
||||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm();
|
||||
$tabform->getTab('display')->template(
|
||||
-value=>$self->getValue('templateId'),
|
||||
-namespace=>'SyndicatedContent',
|
||||
-label=>WebGUI::International::get(72,'Asset_SyndicatedContent'),
|
||||
-hoverHelp=>WebGUI::International::get('72 description','Asset_SyndicatedContent'),
|
||||
);
|
||||
$tabform->getTab('display')->selectList(
|
||||
-name=>'displayMode',
|
||||
-options=>{
|
||||
'interleaved'=>WebGUI::International::get('interleaved','Asset_SyndicatedContent'),
|
||||
'grouped'=>WebGUI::International::get('grouped','Asset_SyndicatedContent'),
|
||||
},
|
||||
-sortByValue=>1,
|
||||
-label=>WebGUI::International::get('displayModeLabel','Asset_SyndicatedContent'),
|
||||
-hoverHelp=>WebGUI::International::get('displayModeLabel description','Asset_SyndicatedContent'),
|
||||
-value=>[$self->getValue('displayMode')],
|
||||
-subtext=>WebGUI::International::get('displayModeSubtext','Asset_SyndicatedContent'),
|
||||
);
|
||||
$tabform->getTab('display')->text(
|
||||
-name=>'hasTerms',
|
||||
-label=>WebGUI::International::get('hasTermsLabel','Asset_SyndicatedContent'),
|
||||
-hoverHelp=>WebGUI::International::get('hasTermsLabel description','Asset_SyndicatedContent'),
|
||||
-maxlength=>255,
|
||||
-value=>$self->getValue('hasTerms'),
|
||||
);
|
||||
$tabform->getTab('properties')->textarea(
|
||||
-name=>'rssUrl',
|
||||
-label=>WebGUI::International::get(1,'Asset_SyndicatedContent'),
|
||||
-hoverHelp=>WebGUI::International::get('1 description','Asset_SyndicatedContent'),
|
||||
-value=>$self->getValue('rssUrl')
|
||||
);
|
||||
|
||||
$tabform->getTab('display')->integer(
|
||||
-name=>'maxHeadlines',
|
||||
-label=>WebGUI::International::get(3,'Asset_SyndicatedContent'),
|
||||
-hoverHelp=>WebGUI::International::get('3 description','Asset_SyndicatedContent'),
|
||||
-value=>$self->getValue('maxHeadlines')
|
||||
);
|
||||
#$tabform->addTab('rss',WebGUI::International::get('rssTabName','Asset_SyndicatedContent'));
|
||||
|
||||
return $tabform;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# strip all html tags from the given data structure. This is important to
|
||||
# prevent cross site scripting attacks
|
||||
|
|
|
|||
|
|
@ -55,17 +55,18 @@ sub _create_cache_key {
|
|||
return $cache_key;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $definition = shift;
|
||||
my $httpHeaderFieldType;
|
||||
if ($session{'config'}{'soapHttpHeaderOverride'}) {
|
||||
$httpHeaderFieldType = 'text';
|
||||
} else {
|
||||
$httpHeaderFieldType = 'hidden';
|
||||
}
|
||||
push(@{$definition}, {
|
||||
assetName=>WebGUI::International::get(1, "Asset_WSClient"),
|
||||
icon=>'web_services.gif',
|
||||
tableName=>'WSClient',
|
||||
className=>'WebGUI::Asset::Wobject::WSClient',
|
||||
properties=>{
|
||||
|
|
@ -130,19 +131,6 @@ sub definition {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
return $session{config}{extrasURL}.'/assets/small/web_services.gif' if ($small);
|
||||
return $session{config}{extrasURL}.'/assets/web_services.gif';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getName {
|
||||
return WebGUI::International::get(1, "Asset_WSClient");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getUiLevel {
|
||||
return 9;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue