Revert "Mobile template is not being inherited (#12246)"
... per perlDreamer's additional argument for his original design for this
This reverts commit 2628263384.
This commit is contained in:
parent
0871ceb56a
commit
b05c7ea810
4 changed files with 1 additions and 62 deletions
|
|
@ -2927,7 +2927,6 @@ sub www_add {
|
|||
url=>scalar($self->session->form->param("url")),
|
||||
);
|
||||
$properties{isHidden} = 1 unless $self->session->config->get("assets/".$class."/isContainer");
|
||||
$class->extra_www_add_properties($self->session, $self, \%properties );
|
||||
my $newAsset = WebGUI::Asset->newByPropertyHashRef($self->session,\%properties);
|
||||
$newAsset->{_parent} = $self;
|
||||
return $newAsset->www_edit();
|
||||
|
|
@ -2935,24 +2934,6 @@ sub www_add {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 extra_www_add_properties ( $session, $parentAsset, \%properties )
|
||||
|
||||
Called from C<www_add> by the parent asset on the class of the new asset being constructed.
|
||||
The asset class has the chance to modify or augment C<$properties> before the new asset
|
||||
is presented for edit.
|
||||
This base version does nothing. It should be overridden as needed.
|
||||
|
||||
=cut
|
||||
|
||||
sub extra_www_add_properties {
|
||||
my $self = shift;
|
||||
my $session = shift;
|
||||
my $parentAsset = shift;
|
||||
my $properties = shift;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_ajaxInlineView ( )
|
||||
|
||||
Returns the view() method of the asset object if the requestor canView.
|
||||
|
|
|
|||
|
|
@ -514,24 +514,5 @@ sub www_view {
|
|||
return $self->SUPER::www_view;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 extra_www_add_properties ()
|
||||
|
||||
Inherit C<mobileStyleTemplateId> and C<mobileTemplateId> from the parent asset if it is an instance of
|
||||
L<WebGUI::Asset::Wobject::Layout>.
|
||||
|
||||
=cut
|
||||
|
||||
sub extra_www_add_properties {
|
||||
my $self = shift;
|
||||
my $session = shift;
|
||||
my $parentAsset = shift;
|
||||
my $properties = shift;
|
||||
return unless $parentAsset->isa('WebGUI::Asset::Wobject::Layout');
|
||||
$properties->{ mobileStyleTemplateId } = $parentAsset->get("mobileStyleTemplateId");
|
||||
$properties->{ mobileTemplateId } = $parentAsset->get("mobileTemplateId");
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue