admin.js socket fixes

This commit is contained in:
Baris Soner Usakli
2014-01-17 12:42:19 -05:00
parent 13ae2e9401
commit a802dc4b68
8 changed files with 140 additions and 63 deletions

View File

@@ -64,7 +64,12 @@ define(function() {
bootbox.confirm('Are you sure you wish to delete this group?', function(confirm) {
if (confirm) {
socket.emit('admin.groups.delete', gid, function(err, data) {
if (data === 'OK') ajaxify.go('admin/groups');
console.log(err, data);
if(err) {
return app.alertError(err.message);
}
ajaxify.go('admin/groups');
});
}
});