zentaopms/extension/biz/attend/js/browsereview.js
2023-05-16 10:50:42 +08:00

57 lines
1.6 KiB
JavaScript

$(document).ready(function()
{
$(document).on('click', '.pass', function()
{
if(confirm(confirmReview.pass))
{
var selecter = $(this);
$.getJSON(selecter.attr('href'), function(data)
{
if(data.result == 'success')
{
if(selecter.parents('#ajaxModal').size()) return $.reloadAjaxModal(1200);
if(data.locate) return location.href = data.locate;
return location.reload();
}
else
{
alert(data.message);
return location.reload();
}
});
}
return false;
});
$(document).on('click', '.reject', function()
{
if(confirm(confirmReview.reject))
{
var selecter = $(this);
$.getJSON(selecter.attr('href'), function(data)
{
if(data.result == 'success')
{
if(selecter.parents('#ajaxModal').size()) return $.reloadAjaxModal(1200);
if(data.locate) return location.href = data.locate;
return location.reload();
}
else
{
alert(data.message);
return location.reload();
}
});
}
return false;
});
$('.batchPass').on('click', function()
{
$.setAjaxForm('#batchReviewForm');
$('#batchReviewForm').submit();
});
});