|
|
@@ -2,28 +2,33 @@ angular.module('luticate')
|
|
2
|
2
|
.controller('GroupsController', ['$scope', 'luticateAuthGroups',
|
|
3
|
3
|
function($scope, luticateAuthGroups) {
|
|
4
|
4
|
|
|
5
|
|
- $scope.columns = [
|
|
6
|
|
- {
|
|
7
|
|
- name: "Name",
|
|
8
|
|
- width: 11,
|
|
9
|
|
- getValue: function(item) {
|
|
10
|
|
- return item.Name;
|
|
|
5
|
+ $scope.luTable = {
|
|
|
6
|
+ columns: [
|
|
|
7
|
+ {
|
|
|
8
|
+ name: "Name",
|
|
|
9
|
+ width: 11,
|
|
|
10
|
+ getValue: function (item) {
|
|
|
11
|
+ return item.Name;
|
|
|
12
|
+ }
|
|
11
|
13
|
}
|
|
12
|
|
- }
|
|
13
|
|
- ];
|
|
|
14
|
+ ],
|
|
14
|
15
|
|
|
15
|
|
- $scope.getLoadPagePromise = function(page, perPage, promise)
|
|
16
|
|
- {
|
|
17
|
|
- return luticateAuthGroups.getAll({page: page, perPage: perPage}, promise);
|
|
18
|
|
- };
|
|
|
16
|
+ permissions: {
|
|
|
17
|
+ add: 'LU_GROUP_ADD',
|
|
|
18
|
+ del: 'LU_GROUP_DEL',
|
|
|
19
|
+ edit: 'LU_GROUP_EDIT'
|
|
|
20
|
+ },
|
|
19
|
21
|
|
|
20
|
|
- $scope.getDelPromise = function(id, promise)
|
|
21
|
|
- {
|
|
22
|
|
- return luticateAuthGroups.del({group_id: id}, promise);
|
|
23
|
|
- };
|
|
|
22
|
+ getLoadPagePromise: function (page, perPage, promise) {
|
|
|
23
|
+ return luticateAuthGroups.getAll({page: page, perPage: perPage}, promise);
|
|
|
24
|
+ },
|
|
24
|
25
|
|
|
25
|
|
- $scope.getEditController = function()
|
|
26
|
|
- {
|
|
27
|
|
- return "GroupEdit";
|
|
|
26
|
+ getDelPromise: function (id, promise) {
|
|
|
27
|
+ return luticateAuthGroups.del({group_id: id}, promise);
|
|
|
28
|
+ },
|
|
|
29
|
+
|
|
|
30
|
+ getEditController: function () {
|
|
|
31
|
+ return "GroupEdit";
|
|
|
32
|
+ }
|
|
28
|
33
|
};
|
|
29
|
34
|
}]);
|