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
|
|
@ -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