Explorar el Código

users pagination fix; table on click

develop
Robin Thoni hace 9 años
padre
commit
014bd9c21b
Se han modificado 2 ficheros con 8 adiciones y 3 borrados
  1. 6
    1
      luticate/controllers/users.controller.js
  2. 2
    2
      luticate/views/users.html

+ 6
- 1
luticate/controllers/users.controller.js Ver fichero

@@ -13,7 +13,7 @@ angular.module('luticate')
13 13
 
14 14
             $scope.loadPage = function(page)
15 15
             {
16
-                luticateAuthUsers.getAll({page: $scope.page, perPage: $scope.perPage}, promiseUsers)
16
+                luticateAuthUsers.getAll({page: page, perPage: $scope.perPage}, promiseUsers)
17 17
                     .then(function(users)
18 18
                     {
19 19
                         $scope.page = page;
@@ -29,5 +29,10 @@ angular.module('luticate')
29 29
                     });
30 30
             };
31 31
 
32
+            $scope.displayUser = function(user)
33
+            {
34
+                console.log(user);
35
+            };
36
+
32 37
             $scope.loadPage($scope.page);
33 38
     }]);

+ 2
- 2
luticate/views/users.html Ver fichero

@@ -3,7 +3,7 @@
3 3
 
4 4
     <div class="row col-sm-8 col-sm-offset-2">
5 5
 
6
-        <table class="col-sm-12 table" lu-busy="userList">
6
+        <table class="col-sm-12 table table-hover" lu-busy="userList">
7 7
             <thead>
8 8
                 <tr>
9 9
                     <th class="col-sm-2">Id</th>
@@ -13,7 +13,7 @@
13 13
                 </tr>
14 14
             </thead>
15 15
             <tbody>
16
-                <tr ng-repeat="user in users.Data">
16
+                <tr ng-repeat="user in users.Data" style="cursor: pointer" ng-click="displayUser(user)">
17 17
                     <td>{{ user.Id }}</td>
18 18
                     <td>{{ user.Username }}</td>
19 19
                     <td>{{ user.Email }}</td>

Loading…
Cancelar
Guardar