##// END OF EJS Templates
frontend: fixes
ergo -
Show More
@@ -7564,6 +7564,7 b' function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR'
7564
7564
7565 vm.createGroup = function () {
7565 vm.createGroup = function () {
7566 vm.loading.group = true;
7566 vm.loading.group = true;
7567 var groupId = $state.params.groupId;
7567 if (groupId) {
7568 if (groupId) {
7568 groupsResource.update({groupId: vm.group.id}, vm.group, function (data) {
7569 groupsResource.update({groupId: vm.group.id}, vm.group, function (data) {
7569 setServerValidation(vm.groupForm);
7570 setServerValidation(vm.groupForm);
@@ -7577,6 +7578,7 b' function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR'
7577 };
7578 };
7578
7579
7579 vm.removeUser = function (user) {
7580 vm.removeUser = function (user) {
7581 var groupId = $state.params.groupId;
7580 groupsPropertyResource.delete(
7582 groupsPropertyResource.delete(
7581 {groupId: groupId, key: 'users', user_name: user.user_name},
7583 {groupId: groupId, key: 'users', user_name: user.user_name},
7582 function (data) {
7584 function (data) {
@@ -7590,6 +7592,7 b' function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR'
7590 };
7592 };
7591
7593
7592 vm.addUser = function () {
7594 vm.addUser = function () {
7595 var groupId = $state.params.groupId;
7593 groupsPropertyResource.save(
7596 groupsPropertyResource.save(
7594 {groupId: groupId, key: 'users'},
7597 {groupId: groupId, key: 'users'},
7595 {user_name: vm.form.autocompleteUser},
7598 {user_name: vm.form.autocompleteUser},
@@ -7929,6 +7932,7 b' function AdminUsersCreateViewController($state, usersResource, usersPropertyReso'
7929 vm.createUser = function () {
7932 vm.createUser = function () {
7930 vm.loading.user = true;
7933 vm.loading.user = true;
7931
7934
7935 var userId = $state.params.userId;
7932 if (userId) {
7936 if (userId) {
7933 usersResource.update({userId: vm.user.id}, vm.user, function (data) {
7937 usersResource.update({userId: vm.user.id}, vm.user, function (data) {
7934 setServerValidation(vm.profileForm);
7938 setServerValidation(vm.profileForm);
@@ -90,6 +90,7 b' function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR'
90
90
91 vm.createGroup = function () {
91 vm.createGroup = function () {
92 vm.loading.group = true;
92 vm.loading.group = true;
93 var groupId = $state.params.groupId;
93 if (groupId) {
94 if (groupId) {
94 groupsResource.update({groupId: vm.group.id}, vm.group, function (data) {
95 groupsResource.update({groupId: vm.group.id}, vm.group, function (data) {
95 setServerValidation(vm.groupForm);
96 setServerValidation(vm.groupForm);
@@ -103,6 +104,7 b' function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR'
103 };
104 };
104
105
105 vm.removeUser = function (user) {
106 vm.removeUser = function (user) {
107 var groupId = $state.params.groupId;
106 groupsPropertyResource.delete(
108 groupsPropertyResource.delete(
107 {groupId: groupId, key: 'users', user_name: user.user_name},
109 {groupId: groupId, key: 'users', user_name: user.user_name},
108 function (data) {
110 function (data) {
@@ -116,6 +118,7 b' function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR'
116 };
118 };
117
119
118 vm.addUser = function () {
120 vm.addUser = function () {
121 var groupId = $state.params.groupId;
119 groupsPropertyResource.save(
122 groupsPropertyResource.save(
120 {groupId: groupId, key: 'users'},
123 {groupId: groupId, key: 'users'},
121 {user_name: vm.form.autocompleteUser},
124 {user_name: vm.form.autocompleteUser},
@@ -86,6 +86,7 b' function AdminUsersCreateViewController($state, usersResource, usersPropertyReso'
86 vm.createUser = function () {
86 vm.createUser = function () {
87 vm.loading.user = true;
87 vm.loading.user = true;
88 console.log('updateProfile');
88 console.log('updateProfile');
89 var userId = $state.params.userId;
89 if (userId) {
90 if (userId) {
90 usersResource.update({userId: vm.user.id}, vm.user, function (data) {
91 usersResource.update({userId: vm.user.id}, vm.user, function (data) {
91 setServerValidation(vm.profileForm);
92 setServerValidation(vm.profileForm);
General Comments 0
You need to be logged in to leave comments. Login now