rt 4.2.16
[freeside.git] / rt / share / html / Dashboards / Queries.html
index c005031..8ac1475 100644 (file)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
@@ -48,8 +48,6 @@
 <& /Elements/Header, Title => $title &>
 <& /Elements/Tabs &>
 
-<& /Widgets/SelectionBox:header, nojs => 1 &>
-
 <& /Elements/ListActions, actions => \@results &>
 
 <& Elements/Deleted, searches => \@deleted, Dashboard => $Dashboard &>
@@ -65,7 +63,7 @@
 
 <&| /Widgets/TitleBox, title => $pane->{DisplayName} &>
 % my ( $pane_name ) = $pane->{Name} =~ /Searches-(.+)/;
-    <& /Widgets/SelectionBox:show, self => $pane, nojs => 1, grep( {
+    <& /Widgets/SelectionBox:show, self => $pane, grep( {
             $_->{pane} eq $pane_name} @deleted ) ? ( ShowUpdate => 1 ) : () &>
 </&>
 </form>
@@ -93,8 +91,8 @@ my @components = @{ RT->Config->Get('HomepageComponents') };
 
 for my $desc (@components) {
     my $name = "component-$desc";
-    push @items, [$name, $desc];
-    $desc_of{$name} = $desc;
+    push @items, [$name, loc($desc)];
+    $desc_of{$name} = loc($desc);
     $still_exists{$name} = 1;
 }
 
@@ -106,7 +104,8 @@ for my $dashboard (@dashboards) {
     next if $dashboard->Id == $Dashboard->Id;
 
     my $name = 'dashboard-' . $dashboard->Id . '-' . $dashboard->Privacy;
-    my $desc = "Dashboard: " . $dashboard->Name;
+    my $type = loc('Dashboard'); # loc
+    my $desc = "$type: " . $dashboard->Name;
     push @items, [$name, $desc];
     $desc_of{$name} = $desc;
     $still_exists{$name} = 1;
@@ -121,10 +120,12 @@ push @objs, RT::SavedSearch->new( $session{CurrentUser} )->ObjectsForLoading
 
 for my $object (@objs) {
     for ($m->comp("/Search/Elements/SearchesForObject", Object => $object)) {
-        my ($desc, $search) = @$_;
+        my ($desc, $loc_desc, $search) = @$_;
         my $SearchType = $search->Content->{'SearchType'} || 'Ticket';
-        my $type = ($SearchType eq 'Ticket') ? 'Saved Search' : $SearchType; # loc
-        $desc = "$type: $desc";
+        my $type = ( $SearchType eq 'Ticket' )
+          ? 'Saved Search'    # loc
+          : $SearchType;
+        $desc = loc($type) . ": $loc_desc";
         my $privacy = $Dashboard->_build_privacy($object);
         my $name = 'search-' . $search->Id . '-' . $privacy;
         push @items, [$name, $desc];
@@ -187,7 +188,7 @@ $m->callback(
 );
 
 my @panes;
-for my $pane (keys %pane_name) {
+for my $pane (sort keys %pane_name) {
     my $sel = $m->comp(
         '/Widgets/SelectionBox:new',
         Action      => 'Queries.html',
@@ -265,7 +266,7 @@ for my $pane (keys %pane_name) {
     push @panes, $sel;
 }
 
-$m->comp('/Widgets/SelectionBox:process', %ARGS, self => $_, nojs => 1)
+$m->comp('/Widgets/SelectionBox:process', %ARGS, self => $_ )
     for @panes;
 
 my @hidden_searches = $Dashboard->PossibleHiddenSearches;