Robin Thoni пре 9 година
родитељ
комит
b752249349

+ 60
- 10
luticate/controllers/test.controller.js Прегледај датотеку

@@ -52,14 +52,12 @@ angular.module('luticate')
52 52
                     console.log(item, checked);
53 53
                 },
54 54
 
55
-                getLoadPagePromise: function (page, perPage, promise) {
55
+                getLoadPagePromise: function (page, perPage, promise)
56
+                {
56 57
                     return luticateAuthUsers.getAll({page: page, perPage: perPage}, promise);
57
-                },
58
-
59
-                luBusy: "luBasicTable"
58
+                }
60 59
             };
61 60
 
62
-
63 61
             $scope.luEditTable = {
64 62
                 columns: [
65 63
                     {
@@ -92,21 +90,18 @@ angular.module('luticate')
92 90
                 onItemClicked: function(item)
93 91
                 {
94 92
                     console.log("edit clicked", item);
95
-                    return false;
96 93
                 },
97 94
 
98 95
                 onItemChecked: function(item, checked)
99 96
                 {
100 97
                     console.log("edit checked", item, checked);
101
-                    return false;
102 98
                 },
103 99
 
104
-                getLoadPagePromise: function (page, perPage, promise) {
100
+                getLoadPagePromise: function (page, perPage, promise)
101
+                {
105 102
                     return luticateAuthUsers.getAll({page: page, perPage: perPage}, promise);
106 103
                 },
107 104
 
108
-                luBusy: "luEditTable",
109
-
110 105
 
111 106
 
112 107
                 getDelPromise: function (id, promise) {
@@ -144,4 +139,59 @@ angular.module('luticate')
144 139
                     return true;
145 140
                 }
146 141
             };
142
+
143
+            $scope.luUserPicker = {
144
+                columns: [
145
+                    {
146
+                        name: "Username",
147
+                        width: 3,
148
+                        getValue: function (item) {
149
+                            return item.Username;
150
+                        }
151
+                    }, {
152
+                        name: "Email",
153
+                        width: 3,
154
+                        getValue: function (item) {
155
+                            return item.Email;
156
+                        }
157
+                    }, {
158
+                        name: "Firstname",
159
+                        width: 3,
160
+                        getValue: function (item) {
161
+                            return item.Firstname;
162
+                        }
163
+                    }, {
164
+                        name: "Lastname",
165
+                        width: 3,
166
+                        getValue: function (item) {
167
+                            return item.Lastname;
168
+                        }
169
+                    }
170
+                ],
171
+
172
+                onItemClicked: function(item)
173
+                {
174
+                    console.log("user clicked", item);
175
+                },
176
+
177
+                onItemChecked: function(item, checked)
178
+                {
179
+                    console.log("user checked", item, checked);
180
+                },
181
+
182
+                getLoadPagePromise: function(page, perPage, promise)
183
+                {
184
+                    return luticateAuthUsers.getAll({page: page, perPage: perPage}, promise);
185
+                },
186
+
187
+                onPageChanged: function()
188
+                {
189
+                    console.log("user page", $scope.luUserPicker.page);
190
+                },
191
+
192
+                getItemText: function(item)
193
+                {
194
+                    return item.Username;
195
+                }
196
+            };
147 197
     }]);

+ 1
- 1
luticate/index.html Прегледај датотеку

@@ -29,7 +29,7 @@
29 29
     <script src="../bower_components/luticate-utils/src/lubusy.js"></script>
30 30
     <script src="../bower_components/luticate-utils/src/lubasictable.js"></script>
31 31
     <script src="../bower_components/luticate-utils/src/luedittable.js"></script>
32
-    <script src="../bower_components/luticate-utils/src/luitempicker.js"></script>
32
+    <script src="../bower_components/luticate-utils/src/lupickertable.js"></script>
33 33
     <script src="../bower_components/luticate-utils/src/lupermissionsedit.js"></script>
34 34
     <script src="../bower_components/luticate-utils/src/luhaspermission.js"></script>
35 35
     <script src="../bower_components/luticate-utils/src/modals/dialogerror.js"></script>

+ 0
- 1
luticate/views/itempicker.html Прегледај датотеку

@@ -1 +0,0 @@
1
-<lu-basic-table options="pickerOptions"></lu-basic-table>

+ 6
- 0
luticate/views/lupickertable.html Прегледај датотеку

@@ -0,0 +1,6 @@
1
+<div class="col-sm-3">
2
+    <div ng-repeat="item in pickerOptions.pickedItems">
3
+        {{ pickerOptions.getItemText(item) }}
4
+    </div>
5
+</div>
6
+<lu-basic-table options="pickerOptions" class="col-sm-9"></lu-basic-table>

+ 1
- 1
luticate/views/modals/userpicker.html Прегледај датотеку

@@ -1,3 +1,3 @@
1 1
 <dialog-close title="Select users">
2
-    <lu-item-picker options="userPicker" lu-model="selectedUsers"></lu-item-picker>
2
+    <lu-picker-table options="userPicker" ></lu-picker-table>
3 3
 </dialog-close>

+ 3
- 2
luticate/views/test.html Прегледај датотеку

@@ -1,4 +1,5 @@
1 1
 <div class="container">
2
-    <!--<lu-basic-table options="luBasicTable" class="row col-sm-8 col-sm-offset-2" ></lu-basic-table>-->
3
-    <lu-edit-table options="luEditTable" class="row col-sm-8 col-sm-offset-2" ></lu-edit-table>
2
+    <!--<lu-basic-table options="luBasicTable" class="row col-sm-8 col-sm-offset-2" ></lu-basic-table>
3
+    <lu-edit-table options="luEditTable" class="row col-sm-8 col-sm-offset-2" ></lu-edit-table>-->
4
+    <lu-picker-table options="luUserPicker" class="row col-sm-8 col-sm-offset-2"></lu-picker-table>
4 5
 </div>

+ 1
- 1
luticate/views/users.html Прегледај датотеку

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

Loading…
Откажи
Сачувај