UserList.deleteCanceled = false;
// Provide user with option to undo
- $('#notification').html(t('users', 'deleted') + ' ' + uid + '<span class="undo">' + t('users', 'undo') + '</span>');
$('#notification').data('deleteuser', true);
- $('#notification').fadeIn();
+ OC.Notification.showHtml(t('users', 'deleted') + ' ' + uid + '<span class="undo">' + t('users', 'undo') + '</span>');
},
/**
success:function (result) {
if (result.status == 'success') {
// Remove undo option, & remove user from table
- $('#notification').fadeOut();
+ OC.Notification.hide();
$('tr').filterAttr('data-uid', UserList.deleteUid).remove();
UserList.deleteCanceled = true;
if (ready) {
);
});
// Handle undo notifications
- $('#notification').hide();
+ OC.Notification.hide();
$('#notification .undo').live('click', function () {
if ($('#notification').data('deleteuser')) {
$('tbody tr').filterAttr('data-uid', UserList.deleteUid).show();
UserList.deleteCanceled = true;
}
- $('#notification').fadeOut();
+ OC.Notification.hide();
});
UserList.useUndo = ('onbeforeunload' in window)
$(window).bind('beforeunload', function () {