Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

groupusers.controller.js 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /**
  2. * Created by robin on 11/2/15.
  3. */
  4. angular.module('luticate')
  5. .controller('GroupUsersController', ['$scope', 'luticateAuthGroups', 'data',
  6. function($scope, luticateAuthGroups, data) {
  7. $scope.group = data;
  8. $scope.itemPicker = {
  9. columns: [
  10. {
  11. name: "Username",
  12. width: 3,
  13. getValue: function (item) {
  14. return item.Username;
  15. }
  16. }, {
  17. name: "Email",
  18. width: 3,
  19. getValue: function (item) {
  20. return item.Email;
  21. }
  22. }, {
  23. name: "Firstname",
  24. width: 3,
  25. getValue: function (item) {
  26. return item.Firstname;
  27. }
  28. }, {
  29. name: "Lastname",
  30. width: 3,
  31. getValue: function (item) {
  32. return item.Lastname;
  33. }
  34. }
  35. ],
  36. permissions: {
  37. add: 'LU_GROUP_USER_ADD',
  38. del: 'LU_GROUP_USER_DEL'
  39. },
  40. getLoadPagePromise: function (page, perPage, promise) {
  41. return luticateAuthGroups.usersGetAll({
  42. group_id: $scope.group.Id,
  43. page: page,
  44. perPage: perPage
  45. }, promise);
  46. },
  47. getDelPromise: function (id, promise) {
  48. return luticateAuthGroups.usersDel({
  49. group_id: $scope.group.Id,
  50. user_id: id
  51. }, promise);
  52. },
  53. getEditController: function () {
  54. return "UserPicker";
  55. },
  56. onEdited: function(item) {
  57. },
  58. onItemSelectionChanged: function(item, selected) {
  59. },
  60. displayItem: function(item, scope)
  61. {
  62. scope.toggleSelectedItem(item);
  63. }
  64. };
  65. }]);