[IMP] Make the job position clickable and non clickable on publish and unpublish.

bzr revid: psa@tinyerp.com-20130913103545-9mh7bb4xmjai6u3c
This commit is contained in:
Paramjit Singh Sahota 2013-09-13 16:05:45 +05:30
parent 20323e3eac
commit 9b956fcb3a
2 changed files with 15 additions and 2 deletions

View File

@ -13,7 +13,8 @@ $(function () {
parent.find('div:gt(0)').removeClass('hidden');
}
});
$(this).siblings('div').find('input[name=email]').attr("value", "");
// $(this).siblings('div').find('input[name=email]').attr("value", "");
});
$(document).on('click', 'button[name=unsubscribe]', function (e) {
var div = $(this).parent();
@ -34,17 +35,23 @@ $(function () {
var counting = row.find('td:first').find('span#counting');
var msg = row.find('td:first').find('span#norecruit');
var div = row.find('td:first').find('div#'+id+' div:first');
var job_post = row.find('td:first').find('span#job_post');
var no_job_post = row.find('td:first').find('span#no_job_post');
var loadpublish = function () {
return openerp.jsonRpc('/recruitment/published', 'call', {'id': id}).then(function (result) {
if (result['published']) {
msg.addClass('hidden');
no_job_post.addClass('hidden');
counting.removeClass('hidden');
job_post.removeClass('hidden');
counting.find('span#counting_num').html(result['count']);
div.addClass('hidden');
} else {
msg.removeClass('hidden');
no_job_post.removeClass('hidden');
counting.addClass('hidden');
job_post.addClass('hidden');
div.removeClass('hidden');
}
});

View File

@ -28,13 +28,19 @@
<thead>
<tr>
<th><h4>Post Name</h4></th>
<th/>
</tr>
</thead>
<tbody>
<t t-foreach="res_job" t-as="job">
<tr t-if="job.company_id.id==company.id" t-att-id="job.id">
<td>
<a t-att-href="'/job/detail/%%s' %% job.id"><span class="lead" t-field="job.name"/></a><br/>
<span id="job_post" t-att-class="job.no_of_recruitment &gt; 0 and 'show' or 'hidden'">
<a t-att-href="'/job/detail/%%s' %% job.id"><span class="lead" t-field="job.name"/></a><br/>
</span>
<span id="no_job_post" t-att-class="job.no_of_recruitment &lt; 1 and 'show' or 'hidden'">
<div t-att-href="'/job/detail/%%s' %% job.id"><span class="lead" t-field="job.name"/></div>
</span>
<t t-if="job.department_id">
<span t-field="job.department_id.name"></span>
</t><br/>