diff --git a/public/src/forum/admin/users.js b/public/src/forum/admin/users.js index 289adafa3c..eb06cfc50a 100644 --- a/public/src/forum/admin/users.js +++ b/public/src/forum/admin/users.js @@ -18,29 +18,6 @@ } function updateUserButtons() { - - jQuery('.admin-btn').each(function(index, element) { - var adminBtn = $(element); - var uid = getUID(adminBtn); - - if (isUserAdmin(adminBtn)) - adminBtn.addClass('btn-success'); - else - adminBtn.removeClass('btn-success'); - - if (uid === yourid) - adminBtn.addClass('disabled'); - }); - - jQuery('.delete-btn').each(function(index, element) { - var deleteBtn = $(element); - - if (isUserAdmin(deleteBtn)) - deleteBtn.addClass('disabled'); - else - deleteBtn.show(); - }); - jQuery('.ban-btn').each(function(index, element) { var banBtn = $(element); @@ -58,31 +35,6 @@ updateUserButtons(); - $('#users-container').on('click', '.admin-btn', function() { - var adminBtn = $(this); - var isAdmin = isUserAdmin(adminBtn); - var parent = adminBtn.parents('.users-box'); - var uid = getUID(adminBtn); - - if (isAdmin && uid != yourid) { - socket.emit('api:admin.user.removeAdmin', uid); - adminBtn.removeClass('btn-success'); - parent.find('.delete-btn').removeClass('disabled'); - parent.attr('data-admin', 0); - } else if (uid != yourid) { - bootbox.confirm('Do you really want to make "' + parent.attr('data-username') + '" an admin?', function(confirm) { - if (confirm) { - socket.emit('api:admin.user.makeAdmin', uid); - adminBtn.addClass('btn-success'); - parent.find('.delete-btn').addClass('disabled'); - parent.attr('data-admin', 1); - } - }); - } - - return false; - }); - $('#users-container').on('click', '.ban-btn', function() { var banBtn = $(this); var isAdmin = isUserAdmin(banBtn); diff --git a/public/templates/admin/users.tpl b/public/templates/admin/users.tpl index a5fa6d3f11..6534705653 100644 --- a/public/templates/admin/users.tpl +++ b/public/templates/admin/users.tpl @@ -31,12 +31,6 @@ {users.postcount} -
- Admin -
-
- Delete -
Ban