summaryrefslogtreecommitdiff
path: root/dash/js/dash.js
diff options
context:
space:
mode:
authorCarson Fleming <cflems@cflems.net>2017-03-11 01:29:13 -0800
committerCarson Fleming <cflems@cflems.net>2017-03-11 01:29:13 -0800
commit3d0d3a86106ece4ea298ab2f262b3af5ff8a7728 (patch)
treeb75b297d980f5b061595cea8b29fe42503907684 /dash/js/dash.js
parenta44a0e047a7582fe7e31743e1b03a17cf2987f73 (diff)
downloadbulletin-3d0d3a86106ece4ea298ab2f262b3af5ff8a7728.tar.gz
Almost there...
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'));
});