[ADD]Added file recruitment.js
bzr revid: bth@tinyerp.com-20130821064937-60f9997w8t6yo0yl
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
$(function () {
|
||||
$(document).on('click', '.js_published, .js_unpublished', function (e) {
|
||||
e.preventDefault();
|
||||
var $link = $(this).parent();
|
||||
$link.find('.js_published, .js_unpublished').addClass("hidden");
|
||||
var $unp = $link.find(".js_unpublished");
|
||||
var $p = $link.find(".js_published");
|
||||
$.post('/recruitment/published', {'id': $link.data('id'), 'object': $link.data('object')}, function (result) {
|
||||
if (+result) {
|
||||
$p.addClass("hidden");
|
||||
$unp.removeClass("hidden");
|
||||
} else {
|
||||
$p.removeClass("hidden");
|
||||
$unp.addClass("hidden");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user