Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/09/11 22:13:01 (13 years ago)
Author:
mjesner
Message:

#1499 design, cleanup, remove button

File:
1 edited

Legend:

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

    r6163 r6170  
    33<%@ Import Namespace="HLWebOKBQueryPlugin.OKBQueryService" %>
    44<!-- Put all into a form that calls the "AddFilter" Action-->
     5<div><table>
     6<tr><td>A<br />N<br />D</td><td>
    57<p>
    68    <%
     
    1113    <%
    1214 
    13         string comboboxName = "filtersCombobox." + currentFilter.Id;
    14         string hiddenName = "parentId." + currentFilter.Id;
     15        string comboboxName = FilterModel.ComboboxName + "." + currentFilter.Id;
     16        string hiddenName = FilterModel.ParentIdName + "." + currentFilter.Id;
    1517    %>
    1618 
    17     Select Filter:
    1819    <%: Html.Hidden(hiddenName,currentFilter.Id.ToString()) %>
    19     <%: Html.DropDownList(comboboxName, new SelectList(((FilterModel)Model).Filters, "FilterTypeName", "Label"))%>
     20    <%: Html.DropDownList(comboboxName, new SelectList(((FilterModel)Model).AvailableFilterForCombobox, "FilterTypeName", "Label"))%>
    2021    <input type="submit" value="+" />
    2122</p>
     
    3031           if (f != null)
    3132           {  %>
    32 <div>
     33
     34           <table border="0"><tr><td>
    3335    <%
    3436           
     
    3739{  %>
    3840    <% StringComparisonFilter filter = ((StringComparisonFilter)f); %>
    39 
    4041    <%: Html.Label(filter.Label)%>
    41     <%: Html.Label("=") %>
    42     <%: Html.TextBox(f.Id + ".valueTextbox", (filter.Value))%>
    43     <%: Html.ActionLink("-","DeleteFilter",  f.Id )%>
     42    <%: Html.Label("=")%>
     43    <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, (filter.Value))%>
    4444    <% }
    4545else if ("NameStringComparisonFilter".Equals(f.GetType().Name))
     
    4747    <% NameStringComparisonFilter filter = ((NameStringComparisonFilter)f); %>
    4848    <%: Html.Label(filter.Label)%>
    49     <%: Html.Label("= xxx" + f.Id)%>
    50     <%: Html.TextBox(f.Id + ".valueTextbox" + f.Id,  filter.Value )%>
    51     <%: Html.ActionLink("-", "DeleteFilter", new { f.Id })%>
     49    <%: Html.Label("=" + f.Id)%>
     50    <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
    5251    <% }
    5352else if ("StringComparisonAvailableValuesFilter".Equals(f.GetType().Name))
     
    5554    <% StringComparisonAvailableValuesFilter filter = ((StringComparisonAvailableValuesFilter)f); %>
    5655    <%: Html.Label(filter.Label)%>
    57     <%: Html.Label("=")%>
    58     <%: Html.DropDownList(f.Id + ".valueDropDownList", new SelectList(filter.AvailableValues,filter.Value))%>
    59     <%: Html.ActionLink("-","DeleteFilter",  f.Id )%>
    60 <% }
     56    <%: Html.Label("=")%>
     57    <%: Html.DropDownList(f.Id + "." + FilterModel.ValueTextbox, new SelectList(filter.AvailableValues, filter.Value))%>
     58    <% }
    6159else if ("NameEqualityComparisonByteArrayFilter".Equals(f.GetType().Name))
    6260{ %>
    6361    <% NameEqualityComparisonByteArrayFilter filter = ((NameEqualityComparisonByteArrayFilter)f); %>
    64     <%: Html.Label(filter.Label)%>   
    65     <%: Html.ActionLink("-","DeleteFilter",  f.Id )%>
    66 <% } 
     62    <%: Html.Label(filter.Label)%>
     63    <% }
    6764else if ("NameEqualityComparisonBoolFilter".Equals(f.GetType().Name))
    6865{ %>
     
    7067    %>
    7168    <%: Html.Label(filter.Label)%>
    72     <%: Html.Label("is")%>
    73     <%: Html.DropDownList(f.Id + ".valueDropDownList", new SelectList(((FilterModel)Model).GetBoolStates(),filter.Value)) %>
    74     <%: Html.ActionLink("-","DeleteFilter",  f.Id )%>
    75 <% }
     69    <%: Html.Label("is")%>
     70    <%: Html.DropDownList(f.Id + "." + FilterModel.ValueDropDownList, new SelectList(((FilterModel)Model).BoolStates, filter.Value))%>
     71    <% }
    7672else if ("NameOrdinalComparisonIntFilter".Equals(f.GetType().Name))
    7773{ %>
    7874    <% NameOrdinalComparisonIntFilter filter = ((NameOrdinalComparisonIntFilter)f);   %>
    7975    <%: Html.Label(filter.Label)%>
    80     <%: Html.Label("is")%>   
    81 
    82     <%: Html.ActionLink("-","DeleteFilter",  f.Id )%>
    83 <% }
     76    <%: Html.Label("is")%>
     77    <% }
    8478else if ("NameStringComparisonAvailableValuesFilter".Equals(f.GetType().Name))
    8579{ %>
    8680    <% NameStringComparisonAvailableValuesFilter filter = ((NameStringComparisonAvailableValuesFilter)f);   %>
    8781    <%: Html.Label(filter.Label)%>
    88     <%: Html.Label("=")%>
    89     <%: Html.DropDownList(f.Id + ".valueDropDownList", new SelectList(filter.AvailableValues,filter.Value))%>   
    90     <%: Html.ActionLink("-","DeleteFilter",  f.Id )%>
    91 <% }
     82    <%: Html.Label("=")%>
     83    <%: Html.DropDownList(f.Id + "." + FilterModel.ValueDropDownList, new SelectList(filter.AvailableValues, filter.Value))%>
     84    <% }
    9285else if ("NameOrdinalComparisonDoubleFilter".Equals(f.GetType().Name))
    9386{ %>
    9487    <% NameOrdinalComparisonDoubleFilter filter = ((NameOrdinalComparisonDoubleFilter)f);   %>
    9588    <%: Html.Label(filter.Label)%>
    96     <%: Html.Label("=")%>
    97     <%: Html.TextBox(f.Id + ".valueTextbox" + f.Id,  filter.Value )%>   
    98     <%: Html.ActionLink("-","DeleteFilter",  f.Id )%>
    99 <% }
     89    <%: Html.Label("=")%>
     90    <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     91    <% }
    10092else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name))
    10193{ %>
    10294    <% NameOrdinalComparisonFloatFilter filter = ((NameOrdinalComparisonFloatFilter)f);   %>
    10395    <%: Html.Label(filter.Label)%>
    104     <%: Html.Label("=")%>
    105     <%: Html.TextBox(f.Id + ".valueTextbox" + f.Id,  filter.Value )%>   
    106     <%: Html.ActionLink("-","DeleteFilter",  f.Id )%>
    107 <% } 
    108     else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name))
     96    <%: Html.Label("=")%>
     97    <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     98    <% }
     99else if ("NameOrdinalComparisonFloatFilter".Equals(f.GetType().Name))
    109100{ %>
    110101    <% NameOrdinalComparisonLongFilter filter = ((NameOrdinalComparisonLongFilter)f);   %>
    111102    <%: Html.Label(filter.Label)%>
    112     <%: Html.Label("=")%>
    113     <%: Html.TextBox(f.Id + ".valueTextbox" + f.Id,  filter.Value )%>
    114     <%: Html.ActionLink("-","DeleteFilter",  f.Id )%> 
    115 <% }                 
     103    <%: Html.Label("=")%>
     104    <%: Html.TextBox(f.Id + "." + FilterModel.ValueTextbox, filter.Value)%>
     105    <% }                 
    116106                 
    117        
    118    
    119    
    120      
    121    
    122    
    123    
    124    
    125 else
    126 { %>
    127     <!-- other types ... must be implemented -->
    128     <%: Html.Label(f.GetType().Name)%>
    129     <% }
    130107    %>
    131 </div>
     108    <%: Html.ActionLink("remove", "DeleteFilter", new { f.Id })%>
     109
     110<% }%>
     111    </td></tr></table>
     112    <% } %>
     113 <%  }%>
    132114<% }
    133        }
    134    }%>
    135 <% }
    136        
    137 %>
     115     
     116%> </td></tr>
     117</table></div>
Note: See TracChangeset for help on using the changeset viewer.