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

Wallace Reis wreis at bestpractical.com
Thu Feb 20 15:57:37 EST 2014


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

- Log -----------------------------------------------------------------
commit cf0587ce287961071e89bf76eefa206e47c6592d
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..3e54c6a 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} || $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