Przeglądaj źródła

fixed lu edit tables

develop
Robin Thoni 9 lat temu
rodzic
commit
c3b9563023

+ 5
- 5
luticate/controllers/groups.controller.js Wyświetl plik

@@ -13,11 +13,11 @@ angular.module('luticate')
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 22
                 getLoadPagePromise: function (page, perPage, promise) {
23 23
                     return luticateAuthGroups.getAll({page: page, perPage: perPage}, promise);

+ 5
- 5
luticate/controllers/permissions.controller.js Wyświetl plik

@@ -19,11 +19,11 @@ angular.module('luticate')
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 28
                 getLoadPagePromise: function (page, perPage, promise) {
29 29
                     return luticateAuthPermissions.getAll({page: page, perPage: perPage}, promise);

+ 8
- 14
luticate/controllers/test.controller.js Wyświetl plik

@@ -41,17 +41,15 @@ angular.module('luticate')
41 41
                     return false;
42 42
                 },
43 43
 
44
-                onItemClicked: function(item, scope)
44
+                onItemClicked: function(item)
45 45
                 {
46 46
                     console.log(item);
47 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 52
                     console.log(item, checked);
54
-                    return false;
55 53
                 },
56 54
 
57 55
                 getLoadPagePromise: function (page, perPage, promise) {
@@ -91,13 +89,13 @@ angular.module('luticate')
91 89
                     }
92 90
                 ],
93 91
 
94
-                onItemClicked: function(item, scope)
92
+                onItemClicked: function(item)
95 93
                 {
96 94
                     console.log("edit clicked", item);
97 95
                     return false;
98 96
                 },
99 97
 
100
-                onItemChecked: function(item, checked, scope)
98
+                onItemChecked: function(item, checked)
101 99
                 {
102 100
                     console.log("edit checked", item, checked);
103 101
                     return false;
@@ -112,7 +110,6 @@ angular.module('luticate')
112 110
 
113 111
 
114 112
                 getDelPromise: function (id, promise) {
115
-                    console.log(promise);
116 113
                     return luticateAuthUsers.del({user_id: id}, promise);
117 114
                 },
118 115
 
@@ -120,25 +117,22 @@ angular.module('luticate')
120 117
                     return "UserEdit";
121 118
                 },
122 119
 
123
-                onItemDeleted: function(item, scope)
120
+                onItemDeleted: function(item)
124 121
                 {
125 122
                     console.log("edit removed", item);
126 123
                 },
127 124
 
128
-                onItemEdited: function(item, scope)
125
+                onItemEdited: function(item)
129 126
                 {
130 127
                     console.log("edit edited", item);
131 128
                 },
132 129
 
133
-                onItemAdded: function(item, scope)
130
+                onItemAdded: function(item)
134 131
                 {
135 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 137
                 canEdit: function()
144 138
                 {

+ 5
- 5
luticate/controllers/users.controller.js Wyświetl plik

@@ -31,11 +31,11 @@ angular.module('luticate')
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 40
                 getLoadPagePromise: function (page, perPage, promise) {
41 41
                     return luticateAuthUsers.getAll({page: page, perPage: perPage}, promise);

+ 1
- 1
luticate/views/groups.html Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 <!-- Page Content -->
2 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 4
 </div>
5 5
 

+ 1
- 1
luticate/views/permissions.html Wyświetl plik

@@ -1,4 +1,4 @@
1 1
 <!-- Page Content -->
2 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 4
 </div>

+ 1
- 1
luticate/views/users.html Wyświetl plik

@@ -1,4 +1,4 @@
1 1
 <!-- Page Content -->
2 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 4
 </div>

Ładowanie…
Anuluj
Zapisz