[Rt-commit] rt branch, 4.2/chart-ui-gc-settings, created. rt-4.2.3rc1-2-gdb63a53

Wallace Reis wreis at bestpractical.com
Tue Feb 18 20:02:58 EST 2014


The branch, 4.2/chart-ui-gc-settings has been created
        at  db63a5316a83d0ca087cc6051f2f0e4909c7be76 (commit)

- Log -----------------------------------------------------------------
commit db63a5316a83d0ca087cc6051f2f0e4909c7be76
Author: Wallace Reis <wreis at bestpractical.com>
Date:   Tue Feb 18 21:19:47 2014 -0300

    Issues#29015 - Saved chart should load settings
    
    Use the %ARGS which gets updated with data from $saved_search
    and still honor the request payload in case the user wants to
    update the chart.

diff --git a/share/html/Search/Chart.html b/share/html/Search/Chart.html
index 32fb651..4305756 100644
--- a/share/html/Search/Chart.html
+++ b/share/html/Search/Chart.html
@@ -102,6 +102,14 @@ my %query;
 }
 
 $m->callback( ARGSRef => \%ARGS, QueryArgsRef => \%query );
+
+ at GroupBy = ref $ARGS{'GroupBy'} ?
+    @{ $ARGS{'GroupBy'} }
+    : $ARGS{'GroupBy'};
+
+ at ChartFunction = ref $ARGS{'ChartFunction'} ?
+    @{ $ARGS{'ChartFunction'} }
+    : $ARGS{'ChartFunction'};
 </%init>
 <& /Elements/Header, Title => $title &>
 <& /Elements/Tabs, QueryArgs => \%query &>
@@ -161,11 +169,11 @@ $m->callback( ARGSRef => \%ARGS, QueryArgsRef => \%query );
 </&>
 
 <&| /Widgets/TitleBox, title => loc('Picture'), class => "chart-picture" &>
-<label><% loc('Style') %>: <& Elements/SelectChartType, Default => $ChartStyle, Name => 'ChartStyle' &></label>
-<label><% loc("Width") %>: <input type="text" name="Width" value="<% $Width || "" %>"> <% loc("px") %></label>
+<label><% loc('Style') %>: <& Elements/SelectChartType, Default => $ARGS{ChartStyle}, Name => 'ChartStyle' &></label>
+<label><% loc("Width") %>: <input type="text" name="Width" value="<% $ARGS{Width} || "" %>"> <% loc("px") %></label>
 <span class="height">
   &#x00d7;
-  <label><% loc("Height") %>: <input type="text" name="Height" value="<% $Height || "" %>"> <% loc("px") %></label>
+  <label><% loc("Height") %>: <input type="text" name="Height" value="<% $ARGS{Height} || "" %>"> <% loc("px") %></label>
 </span>
 </&>
 <script type="text/javascript">

-----------------------------------------------------------------------


More information about the rt-commit mailing list