Make the display of a textarea instead of an HTMLarea independent of whether mobile styles are configured for the site. Refixes #11902.
This commit is contained in:
parent
dcae5190da
commit
6fced77b37
3 changed files with 23 additions and 6 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
- fixed #11923: Collaboration System Mail Cron Errors
|
- fixed #11923: Collaboration System Mail Cron Errors
|
||||||
- fixed #11925: Some problems in Thingy export (metaData values in CSV export)
|
- fixed #11925: Some problems in Thingy export (metaData values in CSV export)
|
||||||
- fixed #11925: Some problems in Thingy export (export times out on Things with many rows)
|
- fixed #11925: Some problems in Thingy export (export times out on Things with many rows)
|
||||||
|
- refixed #11902: forums bug (works without mobile style being set)
|
||||||
|
|
||||||
7.10.3
|
7.10.3
|
||||||
- fixed #11903: Unnecessary debug in Thingy
|
- fixed #11903: Unnecessary debug in Thingy
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ Renders an HTML area field.
|
||||||
sub toHtml {
|
sub toHtml {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
##Do not display a rich editor on any mobile browser.
|
##Do not display a rich editor on any mobile browser.
|
||||||
if ($self->session->style->useMobileStyle) {
|
if ($self->session->style->mobileBrowser) {
|
||||||
return $self->SUPER::toHtml;
|
return $self->SUPER::toHtml;
|
||||||
}
|
}
|
||||||
my $i18n = WebGUI::International->new($self->session);
|
my $i18n = WebGUI::International->new($self->session);
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,25 @@ sub makePrintable {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 mobileBrowser ( )
|
||||||
|
|
||||||
|
Returns true if the user's browser matches any of the mobile browsers set in the config file.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub mobileBrowser {
|
||||||
|
my $self = shift;
|
||||||
|
my $session = $self->session;
|
||||||
|
my $ua = $session->env->get('HTTP_USER_AGENT');
|
||||||
|
for my $mobileUA (@{ $session->config->get('mobileUserAgents') }) {
|
||||||
|
if ($ua =~ m/$mobileUA/) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 useMobileStyle
|
=head2 useMobileStyle
|
||||||
|
|
||||||
Returns a true value if we are on a mobile display.
|
Returns a true value if we are on a mobile display.
|
||||||
|
|
@ -143,11 +162,8 @@ sub useMobileStyle {
|
||||||
if (! $session->setting->get('useMobileStyle')) {
|
if (! $session->setting->get('useMobileStyle')) {
|
||||||
return $self->{_useMobileStyle} = 0;
|
return $self->{_useMobileStyle} = 0;
|
||||||
}
|
}
|
||||||
my $ua = $session->env->get('HTTP_USER_AGENT');
|
if ($self->mobileBrowser) {
|
||||||
for my $mobileUA (@{ $self->session->config->get('mobileUserAgents') }) {
|
return $self->{_useMobileStyle} = 1;
|
||||||
if ($ua =~ m/$mobileUA/) {
|
|
||||||
return $self->{_useMobileStyle} = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return $self->{_useMobileStyle} = 0;
|
return $self->{_useMobileStyle} = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue