diff gnv/src/main/webapp/WEB-INF/jsp/includes/display_histogram_options_inc.jsp @ 575:a634d5ee961d

Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts. gnv/trunk@707 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 24 Feb 2010 14:38:36 +0000
parents bd67164cf28b
children 2f3d885fed09
line wrap: on
line diff
--- a/gnv/src/main/webapp/WEB-INF/jsp/includes/display_histogram_options_inc.jsp	Wed Feb 24 08:35:26 2010 +0000
+++ b/gnv/src/main/webapp/WEB-INF/jsp/includes/display_histogram_options_inc.jsp	Wed Feb 24 14:38:36 2010 +0000
@@ -59,9 +59,35 @@
            <%if (outputMode != null && outputMode.getOutputParameters() != null && !outputMode.getOutputParameters().isEmpty()){
                Iterator<OutputParameter> it = outputMode.getOutputParameters().iterator();
                while (it.hasNext()){
-                   OutputParameter om = it.next(); %>
+                   OutputParameter om = it.next();
+                   String diaOpts = null;
+                   if (diagrammOptions != null) {
+                       diaOpts = request.getParameter("bintype");
+                   }%>
                <tr>
                   <td>
+                        <%if (om.getName().equals("bincount")) {
+                            String check = "";
+                            if (diaOpts != null && diaOpts.equalsIgnoreCase("binwidth")) {
+                                check = "";
+                            }
+                            else {
+                                check = "checked=\"checked\"";
+                            }%>
+                            <input type="checkbox" <%= check %> name="bintype" value="bincount" id="checkCount" onClick="toggleBinType('checkWidth')">&nbsp;</input>
+                        <%}%>
+                        <%if (om.getName().equals("binwidth")) {
+                            String check = "";
+                            if (diaOpts != null && diaOpts.equalsIgnoreCase("binwidth")) {
+                                check = "checked=\"checked\"";
+                            }
+                            else if (diaOpts == null) {
+                                check = "";
+                            }%>
+                            <input type="checkbox" <%= check %> name="bintype" value="binwidth" id="checkWidth" onClick="toggleBinType('checkCount')">&nbsp;</input>
+                        <%}%>
+                  </td>
+                  <td>
                       <bean-el:message key="<%=om.getName()%>"/>
                   </td>
                   <td>

http://dive4elements.wald.intevation.org