Преглед на файлове

[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 преди 13 години
родител
ревизия
d2948cb49f
променени са 2 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 1 1
      apps/useradmin/src/useradmin/templates/list_groups.mako
  2. 3 3
      apps/useradmin/src/useradmin/templates/list_users.mako

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

@@ -114,7 +114,7 @@ ${layout.menubar(section='groups')}
 
 		    $("#clearFilterBtn").click(function(){
 		        $("#filterInput").val("");
-		        $.each($(".file-row"), function(index, value) {
+		        $.each($(".groupRow"), function(index, value) {
 		            $(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">
 	<h1>Hue Users</h1>
 	<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">
 				<a href="${ url('useradmin.views.edit_user') }" class="btn">Add user</a>
 			</p>
@@ -42,7 +42,7 @@ ${layout.menubar(section='users')}
             <th>${_('Last Login')}</th>
 			<th>&nbsp;</th>
           </tr>
-        </head>
+        </thead>
         <tbody>
         % for user in users:
           <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(){
 		        $("#filterInput").val("");
-		        $.each($(".file-row"), function(index, value) {
+		        $.each($(".userRow"), function(index, value) {
 		            $(value).show(250);
 		        });
 		    });