Browse Source

fixed lu edit tables

develop
Robin Thoni 9 years ago
parent
commit
c3b9563023

+ 5
- 5
luticate/controllers/groups.controller.js View File

13
                     }
13
                     }
14
                 ],
14
                 ],
15
 
15
 
16
-                permissions: {
17
-                    add: 'LU_GROUP_ADD',
18
-                    del: 'LU_GROUP_DEL',
19
-                    edit: 'LU_GROUP_EDIT'
20
-                },
16
+                canAdd: 'LU_GROUP_ADD',
17
+
18
+                canDel: 'LU_GROUP_DEL',
19
+
20
+                canEdit: 'LU_GROUP_EDIT',
21
 
21
 
22
                 getLoadPagePromise: function (page, perPage, promise) {
22
                 getLoadPagePromise: function (page, perPage, promise) {
23
                     return luticateAuthGroups.getAll({page: page, perPage: perPage}, promise);
23
                     return luticateAuthGroups.getAll({page: page, perPage: perPage}, promise);

+ 5
- 5
luticate/controllers/permissions.controller.js View File

19
                     }
19
                     }
20
                 ],
20
                 ],
21
 
21
 
22
-                permissions: {
23
-                    add: 'LU_PERM_ADD',
24
-                    del: 'LU_PERM_DEL',
25
-                    edit: 'LU_PERM_EDIT'
26
-                },
22
+                canAdd: 'LU_PERM_ADD',
23
+
24
+                canDel: 'LU_PERM_DEL',
25
+
26
+                canEdit: 'LU_PERM_EDIT',
27
 
27
 
28
                 getLoadPagePromise: function (page, perPage, promise) {
28
                 getLoadPagePromise: function (page, perPage, promise) {
29
                     return luticateAuthPermissions.getAll({page: page, perPage: perPage}, promise);
29
                     return luticateAuthPermissions.getAll({page: page, perPage: perPage}, promise);

+ 8
- 14
luticate/controllers/test.controller.js View File

41
                     return false;
41
                     return false;
42
                 },
42
                 },
43
 
43
 
44
-                onItemClicked: function(item, scope)
44
+                onItemClicked: function(item)
45
                 {
45
                 {
46
                     console.log(item);
46
                     console.log(item);
47
                     scope.toggleCheckedItem(item);
47
                     scope.toggleCheckedItem(item);
48
-                    return false;
49
                 },
48
                 },
50
 
49
 
51
-                onItemChecked: function(item, checked, scope)
50
+                onItemChecked: function(item, checked)
52
                 {
51
                 {
53
                     console.log(item, checked);
52
                     console.log(item, checked);
54
-                    return false;
55
                 },
53
                 },
56
 
54
 
57
                 getLoadPagePromise: function (page, perPage, promise) {
55
                 getLoadPagePromise: function (page, perPage, promise) {
91
                     }
89
                     }
92
                 ],
90
                 ],
93
 
91
 
94
-                onItemClicked: function(item, scope)
92
+                onItemClicked: function(item)
95
                 {
93
                 {
96
                     console.log("edit clicked", item);
94
                     console.log("edit clicked", item);
97
                     return false;
95
                     return false;
98
                 },
96
                 },
99
 
97
 
100
-                onItemChecked: function(item, checked, scope)
98
+                onItemChecked: function(item, checked)
101
                 {
99
                 {
102
                     console.log("edit checked", item, checked);
100
                     console.log("edit checked", item, checked);
103
                     return false;
101
                     return false;
112
 
110
 
113
 
111
 
114
                 getDelPromise: function (id, promise) {
112
                 getDelPromise: function (id, promise) {
115
-                    console.log(promise);
116
                     return luticateAuthUsers.del({user_id: id}, promise);
113
                     return luticateAuthUsers.del({user_id: id}, promise);
117
                 },
114
                 },
118
 
115
 
120
                     return "UserEdit";
117
                     return "UserEdit";
121
                 },
118
                 },
122
 
119
 
123
-                onItemDeleted: function(item, scope)
120
+                onItemDeleted: function(item)
124
                 {
121
                 {
125
                     console.log("edit removed", item);
122
                     console.log("edit removed", item);
126
                 },
123
                 },
127
 
124
 
128
-                onItemEdited: function(item, scope)
125
+                onItemEdited: function(item)
129
                 {
126
                 {
130
                     console.log("edit edited", item);
127
                     console.log("edit edited", item);
131
                 },
128
                 },
132
 
129
 
133
-                onItemAdded: function(item, scope)
130
+                onItemAdded: function(item)
134
                 {
131
                 {
135
                     console.log("edit added", item);
132
                     console.log("edit added", item);
136
                 },
133
                 },
137
 
134
 
138
-                canDelete: function()
139
-                {
140
-                    return true;
141
-                },
135
+                canDelete: 'LU_USER_DEL',
142
 
136
 
143
                 canEdit: function()
137
                 canEdit: function()
144
                 {
138
                 {

+ 5
- 5
luticate/controllers/users.controller.js View File

31
                     }
31
                     }
32
                 ],
32
                 ],
33
 
33
 
34
-                permissions: {
35
-                    add: 'LU_USER_ADD',
36
-                    del: 'LU_USER_DEL',
37
-                    edit: 'LU_USER_EDIT'
38
-                },
34
+                canAdd: 'LU_USER_ADD',
35
+
36
+                canDel: 'LU_USER_DEL',
37
+
38
+                canEdit: 'LU_USER_EDIT',
39
 
39
 
40
                 getLoadPagePromise: function (page, perPage, promise) {
40
                 getLoadPagePromise: function (page, perPage, promise) {
41
                     return luticateAuthUsers.getAll({page: page, perPage: perPage}, promise);
41
                     return luticateAuthUsers.getAll({page: page, perPage: perPage}, promise);

+ 1
- 1
luticate/views/groups.html View File

1
 <!-- Page Content -->
1
 <!-- Page Content -->
2
 <div class="container">
2
 <div class="container">
3
-    <lu-table options="luTable" class="row col-sm-8 col-sm-offset-2" ></lu-table>
3
+    <lu-edit-table options="luTable" class="row col-sm-8 col-sm-offset-2" ></lu-edit-table>
4
 </div>
4
 </div>
5
 
5
 

+ 1
- 1
luticate/views/permissions.html View File

1
 <!-- Page Content -->
1
 <!-- Page Content -->
2
 <div class="container">
2
 <div class="container">
3
-    <lu-table options="luTable" class="row col-sm-8 col-sm-offset-2" ></lu-table>
3
+    <lu-edit-table options="luTable" class="row col-sm-8 col-sm-offset-2" ></lu-edit-table>
4
 </div>
4
 </div>

+ 1
- 1
luticate/views/users.html View File

1
 <!-- Page Content -->
1
 <!-- Page Content -->
2
 <div class="container">
2
 <div class="container">
3
-    <lu-table options="luTable" class="row col-sm-8 col-sm-offset-2" ></lu-table>
3
+    <lu-edit-table options="luTable" class="row col-sm-8 col-sm-offset-2" ></lu-edit-table>
4
 </div>
4
 </div>

Loading…
Cancel
Save