Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

groupedit.controller.js 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * Created by robin on 11/4/15.
  3. */
  4. angular.module('luticate')
  5. .controller('GroupEditController', ['$scope', 'luticateAuthGroups', 'data', 'dialogs',
  6. function($scope, luticateAuthGroups, data, dialogs) {
  7. if (data != null) {
  8. $scope.group = data;
  9. $scope.permission = "LU_GROUP_EDIT";
  10. }
  11. else {
  12. $scope.group = {
  13. Name: ""
  14. };
  15. $scope.permission = "LU_GROUP_ADD";
  16. }
  17. $scope.submitForm = function()
  18. {
  19. if ($scope.group.Id != null) {
  20. return luticateAuthGroups.edit({
  21. group_id: $scope.group.Id,
  22. group_name: $scope.group.Name
  23. });
  24. }
  25. else {
  26. return luticateAuthGroups.add({
  27. group_name: $scope.group.Name
  28. });
  29. }
  30. };
  31. $scope.editPermissions = function(group)
  32. {
  33. dialogs.create('views/modals/grouppermissions.html', 'GroupPermissionsController', group);
  34. };
  35. $scope.editUsers = function(group)
  36. {
  37. dialogs.create('views/modals/groupusers.html', 'GroupUsersController', group);
  38. };
  39. }]);