many bug fixes
This commit is contained in:
parent
c3273e1d53
commit
b84ae38958
15 changed files with 88 additions and 97 deletions
|
|
@ -755,31 +755,6 @@ sub recalculateRating {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setLastPost ( lastPostDate, lastPostId )
|
||||
|
||||
Sets the pertinent details for the last post. Can also be done directly using the set method.
|
||||
|
||||
=head3 lastPostDate
|
||||
|
||||
The epoch date of the post.
|
||||
|
||||
=head3 lastPostId
|
||||
|
||||
The asset id of the post.
|
||||
|
||||
=cut
|
||||
|
||||
sub setLastPost {
|
||||
my ($self, $postDate, $postId) = @_;
|
||||
$self->update({
|
||||
lastPostId=>$postId,
|
||||
lastPostDate=>$postDate
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 subscribe ( )
|
||||
|
|
|
|||
|
|
@ -165,6 +165,8 @@ sub view {
|
|||
type=>$child->getName,
|
||||
url=>$child->getUrl,
|
||||
isImage=>$isImage,
|
||||
canEdit=>$child->canEdit,
|
||||
controls=>$child->getToolbar,
|
||||
isFile=>$isFile,
|
||||
"thumbnail.url"=>$thumbnail,
|
||||
"file.url"=>$file
|
||||
|
|
|
|||
|
|
@ -81,6 +81,10 @@ sub getEditForm {
|
|||
-value=>$self->getValue('templateId'),
|
||||
-namespace=>"Navigation"
|
||||
);
|
||||
$tabform->hidden({
|
||||
name=>"returnUrl",
|
||||
value=>$session{form}{returnUrl}
|
||||
});
|
||||
my ($descendantsChecked, $selfChecked, $pedigreeChecked, $siblingsChecked);
|
||||
my @assetsToInclude = split("\n",$self->getValue("assetsToInclude"));
|
||||
my $afterScript;
|
||||
|
|
@ -239,7 +243,11 @@ Returns a toolbar with a set of icons that hyperlink to functions that delete, e
|
|||
sub getToolbar {
|
||||
my $self = shift;
|
||||
if ($self->getToolbarState) {
|
||||
my $toolbar = editIcon('func=edit',$self->get("url"));
|
||||
my $returnUrl;
|
||||
if (exists $session{asset}) {
|
||||
$returnUrl = "&proceed=goBackToPage&returnUrl=".WebGUI::URL::escape($session{asset}->getUrl);
|
||||
}
|
||||
my $toolbar = editIcon('func=edit'.$returnUrl,$self->get("url"));
|
||||
return '<img src="'.$self->getIcon(1).'" border="0" title="'.$self->getName.'" alt="'.$self->getName.'" align="absmiddle">'.$toolbar;
|
||||
}
|
||||
return $self->SUPER::getToolbar();
|
||||
|
|
@ -388,6 +396,14 @@ sub www_edit {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_goBackToPage {
|
||||
my $self = shift;
|
||||
WebGUI::HTTP::setRedirect($session{form}{returnUrl}) if ($session{form}{returnUrl});
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# we eventually should reaadd this
|
||||
sub www_preview {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue