SUPER handling for most of Wobject/*.pm. There's a problem with Calendar, though.
This commit is contained in:
parent
fd736e7f67
commit
f56bac9948
18 changed files with 95 additions and 123 deletions
|
|
@ -94,9 +94,9 @@ Manually build the edit form due to javascript elements.
|
|||
|
||||
=cut
|
||||
|
||||
sub getEditForm {
|
||||
override getEditForm => sub {
|
||||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm;
|
||||
my $tabform = super();
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset_Navigation");
|
||||
$tabform->getTab("display")->template(
|
||||
-value=>$self->templateId,
|
||||
|
|
@ -293,7 +293,7 @@ sub getEditForm {
|
|||
" />';
|
||||
$tabform->{_submit} = $previewButton." ".$saveButton;
|
||||
return $tabform;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ Returns a toolbar with a set of icons that hyperlink to functions that delete, e
|
|||
|
||||
=cut
|
||||
|
||||
sub getToolbar {
|
||||
override getToolbar => sub {
|
||||
my $self = shift;
|
||||
return undef
|
||||
unless $self->canEdit && $self->session->var->isAdminOn;
|
||||
|
|
@ -341,8 +341,8 @@ sub getToolbar {
|
|||
. $self->getUrl . '">' . $i18n->get("view") . '</a></li>'
|
||||
. "</ul></div></div>$toolbar</div>";
|
||||
}
|
||||
return $self->SUPER::getToolbar;
|
||||
}
|
||||
return super();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
@ -558,18 +558,18 @@ other types aside from text/html.
|
|||
|
||||
=cut
|
||||
|
||||
sub www_view {
|
||||
override www_view => sub {
|
||||
my $self = shift;
|
||||
my $mimeType = $self->mimeType || 'text/html';
|
||||
if ($mimeType eq 'text/html') {
|
||||
return $self->SUPER::www_view();
|
||||
return super();
|
||||
}
|
||||
else {
|
||||
$self->prepareView();
|
||||
$self->session->http->setMimeType($mimeType || 'text/html');
|
||||
$self->session->http->setMimeType($mimeType);
|
||||
return $self->view();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue