]> source.dussan.org Git - nextcloud-server.git/commitdiff
new javascript notification functions used within users.js
authorThomas Mueller <thomas.mueller@tmit.eu>
Fri, 4 Jan 2013 22:37:21 +0000 (23:37 +0100)
committerThomas Mueller <thomas.mueller@tmit.eu>
Fri, 4 Jan 2013 22:37:21 +0000 (23:37 +0100)
settings/js/users.js

index b0e30feb80c623d7c853e39e8f72770025e4e213..a01b4cab952923dcf1d6803b968b854305d61747 100644 (file)
@@ -26,9 +26,8 @@ var UserList = {
         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>');
     },
 
     /**
@@ -53,7 +52,7 @@ var UserList = {
                 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) {
@@ -401,13 +400,13 @@ $(document).ready(function () {
         );
     });
     // 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 () {