fixed #11929: In/Out board breaks in Chrome sometimes
This commit is contained in:
parent
8b25005515
commit
e67ad18517
3 changed files with 32 additions and 12 deletions
|
|
@ -1,4 +1,5 @@
|
|||
7.10.4
|
||||
- fixed #11929: In/Out board breaks in Chrome sometimes
|
||||
- fixed #11928: Story Archive breaks if url has extension
|
||||
- fixed #11920: Defaul DataForm emails missing entries.
|
||||
- fixed #11921: DataForm emails contain 1 table per field
|
||||
|
|
|
|||
|
|
@ -115,6 +115,24 @@ sub definition {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getStatusList
|
||||
|
||||
Returns the statusList property as an array
|
||||
|
||||
=cut
|
||||
|
||||
sub getStatusList {
|
||||
my $self = shift;
|
||||
my $text = $self->get('statusList');
|
||||
|
||||
return
|
||||
grep { $_ } # no empty lines
|
||||
map { s/^\s+//; s/\s+$//; $_ } # trim
|
||||
split(/\r\n|\r|\n/, $text); # seperated by any kind of newline
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 prepareView ( )
|
||||
|
||||
See WebGUI::Asset::prepareView() for details.
|
||||
|
|
@ -180,16 +198,9 @@ sub view {
|
|||
}
|
||||
|
||||
my $statusUserId = $self->session->scratch->get("userId") || $self->session->user->userId;
|
||||
my $statusListString = $self->getValue("statusList");
|
||||
my @statusListArray = split("\n",$statusListString);
|
||||
my $statusListHashRef;
|
||||
tie %$statusListHashRef, 'Tie::IxHash';
|
||||
|
||||
foreach my $status (@statusListArray) {
|
||||
chomp($status);
|
||||
next if $status eq "";
|
||||
$statusListHashRef->{$status} = $status;
|
||||
}
|
||||
tie my %statusOptions, 'Tie::IxHash', (
|
||||
map { $_ => $_ } $self->getStatusList
|
||||
);
|
||||
|
||||
#$self->session->log->warn("VIEW: userId: ".$statusUserId."\n" );
|
||||
my ($status) = $session->db->quickArray(
|
||||
|
|
@ -223,7 +234,7 @@ sub view {
|
|||
$f->radioList(
|
||||
-name=>"status",
|
||||
-value=>$status,
|
||||
-options=>$statusListHashRef,
|
||||
-options=>\%statusOptions,
|
||||
-label=>$i18n->get(5),
|
||||
-hoverHelp=>$i18n->get('5 description'),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ use Test::MockObject::Extends;
|
|||
|
||||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
use Test::More tests => 8; # increment this value for each test you create
|
||||
use Test::More tests => 9; # increment this value for each test you create
|
||||
use Test::Deep;
|
||||
use Data::Dumper;
|
||||
|
||||
|
|
@ -129,6 +129,14 @@ cmp_deeply(
|
|||
$session->request->setup_body({ });
|
||||
$session->scratch->delete('userId');
|
||||
|
||||
################################################################
|
||||
#
|
||||
# getStatusList
|
||||
#
|
||||
################################################################
|
||||
$board->update({statusList => "In\r\nOut\rHome\nLunch"});
|
||||
is_deeply [$board->getStatusList], [qw(In Out Home Lunch)], 'getStatusList';
|
||||
|
||||
################################################################
|
||||
#
|
||||
# view
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue