Просмотр исходного кода

[useradmin] Fix bug in filter clearing

The clearing of the filter applies to the wrong td class.
Renamed the filter widget because it doesn't just apply to the name.
bc Wong 14 лет назад
Родитель
Сommit
d2948cb49f

+ 1 - 1
apps/useradmin/src/useradmin/templates/list_groups.mako

@@ -114,7 +114,7 @@ ${layout.menubar(section='groups')}
 
 
 		    $("#clearFilterBtn").click(function(){
 		    $("#clearFilterBtn").click(function(){
 		        $("#filterInput").val("");
 		        $("#filterInput").val("");
-		        $.each($(".file-row"), function(index, value) {
+		        $.each($(".groupRow"), function(index, value) {
 		            $(value).show(250);
 		            $(value).show(250);
 		        });
 		        });
 		    });
 		    });

+ 3 - 3
apps/useradmin/src/useradmin/templates/list_users.mako

@@ -27,7 +27,7 @@ ${layout.menubar(section='users')}
 <div class="container-fluid">
 <div class="container-fluid">
 	<h1>Hue Users</h1>
 	<h1>Hue Users</h1>
 	<div class="well">
 	<div class="well">
-			Filter by name: <input id="filterInput"/> <a href="#" id="clearFilterBtn" class="btn">Clear</a>
+			Filter: <input id="filterInput"/> <a href="#" id="clearFilterBtn" class="btn">Clear</a>
 			<p class="pull-right">
 			<p class="pull-right">
 				<a href="${ url('useradmin.views.edit_user') }" class="btn">Add user</a>
 				<a href="${ url('useradmin.views.edit_user') }" class="btn">Add user</a>
 			</p>
 			</p>
@@ -42,7 +42,7 @@ ${layout.menubar(section='users')}
             <th>${_('Last Login')}</th>
             <th>${_('Last Login')}</th>
 			<th>&nbsp;</th>
 			<th>&nbsp;</th>
           </tr>
           </tr>
-        </head>
+        </thead>
         <tbody>
         <tbody>
         % for user in users:
         % for user in users:
           <tr class="userRow" data-search="${user.username}${user.first_name}${user.last_name}${user.email}">
           <tr class="userRow" data-search="${user.username}${user.first_name}${user.last_name}${user.email}">
@@ -119,7 +119,7 @@ ${layout.menubar(section='users')}
 
 
 		    $("#clearFilterBtn").click(function(){
 		    $("#clearFilterBtn").click(function(){
 		        $("#filterInput").val("");
 		        $("#filterInput").val("");
-		        $.each($(".file-row"), function(index, value) {
+		        $.each($(".userRow"), function(index, value) {
 		            $(value).show(250);
 		            $(value).show(250);
 		        });
 		        });
 		    });
 		    });