Add a method that returns either the standard style template or the mobile style template based on the Session.
This commit is contained in:
parent
aabb4648d6
commit
4ac894d981
2 changed files with 31 additions and 4 deletions
|
|
@ -226,6 +226,20 @@ sub getCollateral {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getStyleTemplateId
|
||||
|
||||
This returns the correct style to use, either a regular style or a mobile style,
|
||||
based on $session->style->useMobileStyle.
|
||||
|
||||
=cut
|
||||
|
||||
sub getStyleTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->style->useMobileStyle ? $self->mobileStyleTemplateId : $self->styleTemplateId;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 moveCollateralDown ( tableName, keyName, keyValue [ , setName, setValue ] )
|
||||
|
|
@ -345,10 +359,7 @@ override processStyle => sub {
|
|||
my ($self, $output, $options) = @_;
|
||||
$output = super();
|
||||
my $style = $self->session->style;
|
||||
if ($style->useMobileStyle) {
|
||||
return $style->process($output,$self->get("mobileStyleTemplateId"));
|
||||
}
|
||||
return $style->process($output,$self->get("styleTemplateId"));
|
||||
return $style->process($output,$self->getStyleTemplateId);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue