summaryrefslogtreecommitdiffstats
path: root/public_html
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-02-21 19:37:11 +0100
committerAleksander Machniak <alec@alec.pl>2012-02-21 19:37:11 +0100
commit53bcfa4b7d47d67d5ed260703fbd115340a83b92 (patch)
tree19d6131b686cd473eeee7f09614e7c7f39b78f52 /public_html
parent894e231599cc80a38f767ed24e31d09dbdef3782 (diff)
downloadwebadmin-53bcfa4b7d47d67d5ed260703fbd115340a83b92.tar.gz
Implemented user.delete action, some improvements in user.add
Diffstat (limited to 'public_html')
-rw-r--r--public_html/js/kolab_admin.js20
1 files changed, 18 insertions, 2 deletions
diff --git a/public_html/js/kolab_admin.js b/public_html/js/kolab_admin.js
index 761fdab..24009b5 100644
--- a/public_html/js/kolab_admin.js
+++ b/public_html/js/kolab_admin.js
@@ -486,9 +486,20 @@ function kolab_admin()
this.http_post('user.list', props);
};
- this.user_delete = function(props)
+ this.user_delete = function(userid)
{
-
+ this.set_busy(true, 'deleting');
+ this.api_post('user.delete', {user: userid}, 'user_delete_response');
+ };
+
+ this.user_delete_response = function(response)
+ {
+ if (!this.api_response(response))
+ return;
+
+ this.display_message('user.delete.success');
+ this.set_watermark('taskcontent');
+ // @TODO: refresh the list
};
this.user_save = function()
@@ -504,6 +515,7 @@ function kolab_admin()
return;
}
+ this.set_busy(true, 'saving');
this.api_post('user.add', data, 'user_save_response');
};
@@ -511,6 +523,10 @@ function kolab_admin()
{
if (!this.api_response(response))
return;
+
+ this.display_message('user.add.success');
+ this.set_watermark('taskcontent');
+ // @TODO: refresh the list
};
};