1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- /**
- * Created by robin on 11/6/15.
- */
-
- angular.module('luticate')
- .controller('UserPickerController', ['$scope', 'luticateAuthUsers', 'data', '$q', 'dialogs', 'luticateAuthCache',
- function($scope, luticateAuthUsers, data, $q, dialogs, luticateAuthCache) {
- $scope.selectedUsers = [];
- $scope.userPicker = {
- columns: [
- {
- name: "Username",
- width: 3,
- getValue: function (item) {
- return item.Username;
- }
- }, {
- name: "Email",
- width: 3,
- getValue: function (item) {
- return item.Email;
- }
- }, {
- name: "Firstname",
- width: 3,
- getValue: function (item) {
- return item.Firstname;
- }
- }, {
- name: "Lastname",
- width: 3,
- getValue: function (item) {
- return item.Lastname;
- }
- }
- ],
-
- permissions: {
- add: 'LU_USER_ADD',
- del: 'LU_USER_DEL',
- edit: 'LU_USER_EDIT'
- },
-
- getLoadPagePromise: function (page, perPage, promise) {
- return luticateAuthUsers.getAll({page: page, perPage: perPage}, promise);
- },
-
- getDelPromise: function (id, promise) {
- return luticateAuthUsers.del({user_id: id}, promise);
- },
-
- getEditController: function () {
- return "UserEdit";
- }
- };
- }]);
|