Fix undo delete user
This commit is contained in:
parent
140263003a
commit
b455149bae
|
@ -47,25 +47,24 @@ UserList={
|
||||||
if( !UserList.deleteCanceled && UserList.deleteUid ){
|
if( !UserList.deleteCanceled && UserList.deleteUid ){
|
||||||
|
|
||||||
// Delete user via ajax
|
// Delete user via ajax
|
||||||
$.post(
|
$.ajax({
|
||||||
OC.filePath('settings','ajax','removeuser.php'),
|
type: 'POST',
|
||||||
{username:UserList.deleteUid},
|
url: OC.filePath('settings', 'ajax', 'removeuser.php'),
|
||||||
function(result){
|
async: false,
|
||||||
|
data: { username: UserList.deleteUid },
|
||||||
|
success: function(result) {
|
||||||
|
if (result.status == 'success') {
|
||||||
// Remove undo option, & remove user from table
|
// Remove undo option, & remove user from table
|
||||||
boolOperationFinished(
|
|
||||||
data, function(){
|
|
||||||
$('#notification').fadeOut();
|
$('#notification').fadeOut();
|
||||||
$('tr').filterAttr( 'data-uid', username ).remove();
|
$('tr').filterAttr('data-uid', UserList.deleteUid).remove();
|
||||||
UserList.deleteCanceled = true;
|
UserList.deleteCanceled = true;
|
||||||
UserList.deleteFiles = null;
|
UserList.deleteFiles = null;
|
||||||
if (ready) {
|
if (ready) {
|
||||||
ready();
|
ready();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue