diff options
author | Chaoyi Zha <summermontreal@gmail.com> | 2018-03-29 20:05:32 +0300 |
---|---|---|
committer | Chaoyi Zha <summermontreal@gmail.com> | 2018-03-29 20:05:32 +0300 |
commit | b29c5d51a92d44a712f300dd9c3e13e0a0945628 (patch) | |
tree | fa0453f694f5a659d1d12d74954b3a671f69b9da | |
parent | f3b9f09460fec1223bdf1de922218d6e274cd08a (diff) |
Fix style and grammar issues
-rw-r--r-- | public/js/AdminCtrl.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/public/js/AdminCtrl.js b/public/js/AdminCtrl.js index 4f0b90c..0114501 100644 --- a/public/js/AdminCtrl.js +++ b/public/js/AdminCtrl.js @@ -267,9 +267,9 @@ polr.controller('AdminCtrl', function($scope, $compile, $timeout) { // Delete user $scope.deleteUser = function($event, user_id) { - if(confirm("Are you sure to delete this user?")){ - var el = $($event.target); - + var delete_user_confirm = window.confirm('Are you sure you would like to delete this user?'); + + if (delete_user_confirm) { apiCall('admin/delete_user', { 'user_id': user_id, }, function(new_status) { @@ -310,9 +310,9 @@ polr.controller('AdminCtrl', function($scope, $compile, $timeout) { // Delete link $scope.deleteLink = function($event, link_ending) { - if(confirm("Are you sure to delete this link?")){ - var el = $($event.target); + var delete_link_confirm = window.confirm('Are you sure you would like to delete this link?'); + if (delete_link_confirm) { apiCall('admin/delete_link', { 'link_ending': link_ending, }, function(new_status) { |