summaryrefslogtreecommitdiff
path: root/dash/js/dash.js
diff options
context:
space:
mode:
Diffstat (limited to 'dash/js/dash.js')
-rw-r--r--dash/js/dash.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/dash/js/dash.js b/dash/js/dash.js
index 7fbceac..9d44802 100644
--- a/dash/js/dash.js
+++ b/dash/js/dash.js
@@ -25,7 +25,6 @@ function acbtn (e) {
$(this).parents().filter('.job').hide(250);
$.get('headless.php?hire='+$(this).attr('data-rid'), function (data) {
if (data == 'OK') {
- window.alert('This application has been approved for hire. You can rate your experience with this candidate under the \'Rate\' tab.');
window.location.href = '/dash/rate.php';
} else {
window.alert('We\'ve experienced an error trying to approve this application. Please try again another time.');
@@ -34,6 +33,15 @@ function acbtn (e) {
});
}
}
+function trashbtn (e) {
+ e.preventDefault();
+ if (window.confirm('Permanently delete this ad?')) {
+ $.get('headless.php?rmad='+$(this).attr('data-adid'), function (data) {
+ if (data == 'OK') window.location.href = '/dash/';
+ else window.alert('An error was encountered while attempting to delete this ad.');
+ });
+ }
+}
function serveratings ($spaces) {
$.each($spaces, function (idx, me) {
var $me = $(me);
@@ -55,5 +63,6 @@ $(function() {
$('.jobxbtn').click(jxbtn);
$('.appxbtn').click(axbtn);
$('.appcbtn').click(acbtn);
+ $('.adtrash').click(trashbtn);
serveratings($('.ratingdata'));
});