12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- /**
- * Created by robin on 11/2/15.
- */
-
- angular.module('luticate')
- .controller('GroupUsersController', ['$scope', 'luticateAuthGroups', 'data',
- function($scope, luticateAuthGroups, data) {
-
- $scope.group = data;
-
- $scope.luTable = {
- 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_GROUP_USER_ADD',
- del: 'LU_GROUP_USER_DEL'
- },
-
- getLoadPagePromise: function (page, perPage, promise) {
- return luticateAuthGroups.usersGetAll({
- group_id: $scope.group.Id,
- page: page,
- perPage: perPage
- }, promise);
- },
-
- getDelPromise: function (id, promise) {
- return luticateAuthGroups.usersDel({
- group_id: $scope.group.Id,
- user_id: id
- }, promise);
- },
-
- getEditController: function () {
- return null;
- },
-
- displayItem: function(item, scope)
- {
- scope.toggleSelectedItem(item);
- }
- };
-
- }]);
|