[Rt-commit] r9715 - in rt/branches/3.6-RELEASE/html: Admin/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Tue Nov 20 20:27:25 EST 2007
Author: ruz
Date: Tue Nov 20 20:27:25 2007
New Revision: 9715
Modified:
rt/branches/3.6-RELEASE/html/Admin/Elements/ConfigureMyRT
rt/branches/3.6-RELEASE/html/Widgets/SelectionBox
Log:
* revert rev9654 as it breaks charts on home page
Modified: rt/branches/3.6-RELEASE/html/Admin/Elements/ConfigureMyRT
==============================================================================
--- rt/branches/3.6-RELEASE/html/Admin/Elements/ConfigureMyRT (original)
+++ rt/branches/3.6-RELEASE/html/Admin/Elements/ConfigureMyRT Tue Nov 20 20:27:25 2007
@@ -64,35 +64,15 @@
AutoSave => 1,
OnSubmit => sub {
my $sel = shift;
-
- my @res;
- foreach my $e ( @{ $sel->{Current} } ) {
- my %row;
- @row{qw(type name id)} = split /-/, $e, 3;
- my $old = ( grep {
- ($_->{'type'}||'') eq ($row{'type'}||'')
- && ($_->{'name'}||'') eq ($row{'name'}||'')
- && ($_->{'id'}||'') eq ($row{'id'}||'')
- } @{ $portlets->{$pane} || [] } )[0];
- %row = %$old if $old;
- push @res, \%row;
- }
-
- $portlets->{$pane} = \@res;
+ $portlets->{$pane} = [
+ map { m/(\w+)-(.*)$}/;
+ { type => $1,
+ name => $2 } } @{ $sel->{Current} }
+ ];
$OnSave->( $portlets, $pane );
},
- Selected => [
- map {
- join( '-', grep $_, @{$_}{qw/type name id/} )
- } @{ $portlets->{$pane} }
- ],
- Label => {
- map {
- join( '-', grep $_, @{$_}{qw/type name id/} ),
- $_->{'label'}
- }
- grep $_->{'label'}, @{ $portlets->{$pane} }
- },
+ Selected => [ map { join( '-', @{$_}{qw/type name/} ) }
+ @{ $portlets->{$pane} } ]
);
}
Modified: rt/branches/3.6-RELEASE/html/Widgets/SelectionBox
==============================================================================
--- rt/branches/3.6-RELEASE/html/Widgets/SelectionBox (original)
+++ rt/branches/3.6-RELEASE/html/Widgets/SelectionBox Tue Nov 20 20:27:25 2007
@@ -84,9 +84,7 @@
<%method new>
<%init>
-$ARGS{_item_map} = { map { $_->[0] => $_->[1] } @{ $ARGS{Available} } };
-$ARGS{_item_map} = { %{ $ARGS{_item_map} }, %{ $ARGS{'Label'} } }
- if $ARGS{'Label'};
+$ARGS{_item_map} = {map {$_->[0] => $_->[1]} @{$ARGS{Available}}};
return \%ARGS;
</%init>
</%method>
@@ -200,7 +198,7 @@
% if (exists $selected{$_}) {
selected="selected"
% }
-><% $self->{_item_map}{$_} || $_ %></option>
+><% $self->{_item_map}{$_} %></option>
% }
</select>
<input name="moveup" type="submit" class="button" value=" ↑ " />
More information about the Rt-commit
mailing list