Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/22/11 21:01:58 (14 years ago)
Author:
dhohl
Message:

#1499 The filter form does not lost any inputs after reloading the page; date filter is possible

Location:
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Filters.ascx

    r6245 r6247  
    99<p>
    1010    <%
    11         CombinedFilter currentFilter = ((FilterModel)Model).Content;
     11        CombinedFilter topFilter = ((FilterModel)Model).Content;
    1212    %>
    13     <% using (Html.BeginForm("AddFilterAnd", "Filter", FormMethod.Post, new { id = currentFilter.Id, name = currentFilter.Id })) %>
    14     <% {     %>
    15     <%
    16  
    17         string comboboxName = FilterModel.ComboboxName + "." + currentFilter.Id;
    18         string hiddenName = FilterModel.ParentIdName + "." + currentFilter.Id;
     13    <% using (Html.BeginForm("AddFilterAnd", "Filter", FormMethod.Post, new { id = topFilter.Id, name = topFilter.Id })) %>
     14    <% {   
     15           
     16            foreach (Filter fNode in topFilter.Filters)
     17            {
     18
     19                CombinedFilter currentFilter = (CombinedFilter)fNode;
     20                string comboboxName = FilterModel.ComboboxName + "." + currentFilter.Id;
     21                string hiddenName = FilterModel.ParentIdName + "." + currentFilter.Id;
    1922    %>
    20  
    2123    <%: Html.Hidden(hiddenName,currentFilter.Id.ToString()) %>
    2224    <%: Html.DropDownList( comboboxName, new SelectList(((FilterModel)Model).AvailableFilterForCombobox, "FilterTypeName", "Label"))%>
    23     <input type="submit" value="+" />
     25    <input type="submit" name="submitButton" value="+.<%:currentFilter.Id%>" />
    2426</p>
    2527<!-- Build the selected filters. The filtesr will be stored in the session and the
     
    106108    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.OrdinalComparisons, "Value", "Text", (int)filter.Comparison))%>
    107109    <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     110    <% }
     111else if ("OrdinalComparisonDateTimeFilter".Equals(f.GetType().Name))
     112{ %>
     113    <% OrdinalComparisonDateTimeFilter filter = ((OrdinalComparisonDateTimeFilter)f);   %>
     114    <%: Html.Label(filter.Label)%>
     115    <%: Html.DropDownList(f.Id + "." + FilterModel.ComparisonDropDownList, new SelectList(FilterModel.OrdinalComparisons, "Value", "Text", (int)filter.Comparison))%>
     116    <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
    108117    <% }                 
    109118                 
    110119    %>
    111     <%: Html.ActionLink("remove", "DeleteFilter", new { f.Id })%>
    112120
     121    <input type="submit" name="submitButton" value="-.<%:f.Id%>"    />
     122   
    113123<% }%>
    114124    </td></tr></table>
    115125    <% } %>
    116126 <%  }%>
     127   <% }%>
     128 <input type="submit" name="submitButton"  value="or" />
     129 </br>
     130 <input type="submit" name="submitButton" value="runs" />
     131
     132 
     133
    117134<% }
    118135     
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Views/Filter/Index.aspx

    r6170 r6247  
    2626        if (model != null && model.Content != null)
    2727        {
    28             foreach (Filter f in model.Content.Filters)
    29             {
     28           
     29                FilterModel fm = new FilterModel((CombinedFilter)model.Content);
    3030    %>
    31  
    32     <% FilterModel fm = new FilterModel((CombinedFilter)f);
    33              
     31                 <% Html.RenderPartial("Filters", fm); %>
     32    <%    
     33        }
    3434    %>
    35     <% Html.RenderPartial("Filters", fm); %>
    36     <%}
    37          }%>
    3835
    3936         
    4037     
    41   <% using (Html.BeginForm("AddFilterOr", "Filter")) %>
    42   <% {     %>
    43  Or filter <input type="submit" value="+" />
    44   <% }     %>
     38
    4539
    4640
    4741 
    48   <% using (Html.BeginForm("GetRuns", "Filter")) %>
    49   <% {     %>
    50  <input type="submit" value="get runs" />
    51   <% }     %>
     42
    5243
    5344</asp:Content>
Note: See TracChangeset for help on using the changeset viewer.