[IMP]Improve code for publish and removed div.
bzr revid: bth@tinyerp.com-20130920103846-dx3hlg9clu95u2mh
This commit is contained in:
parent
6a4d0f0270
commit
83dee1fd78
|
@ -1,26 +1,8 @@
|
|||
$(function () {
|
||||
$(document).on('click', '.js_publish', function (e) {
|
||||
var id = $(this).data('id');
|
||||
var row = $(this).parents().find('tr#'+id);
|
||||
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');
|
||||
counting.removeClass('hidden');
|
||||
counting.find('span#counting_num').html(result['count']);
|
||||
div.addClass('hidden');
|
||||
} else {
|
||||
msg.removeClass('hidden');
|
||||
counting.addClass('hidden');
|
||||
div.removeClass('hidden');
|
||||
}
|
||||
});
|
||||
return openerp.jsonRpc('/recruitment/published', 'call', {'id': id});
|
||||
}
|
||||
var i = 0;
|
||||
$(this).ajaxComplete(function(el, xhr, settings) {
|
||||
|
@ -31,4 +13,4 @@ $(function () {
|
|||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -72,11 +72,6 @@
|
|||
<t t-raw="head or ''"/>
|
||||
</t>
|
||||
<t t-set="title">Job Detail</t>
|
||||
<div class="col-md-4 pull-right">
|
||||
<ul class="pager">
|
||||
<li><a t-att-href="'/jobs'">All Jobs</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="wrap">
|
||||
<div class="oe_structure">
|
||||
<h1 class="text-center" t-field="job.name"></h1>
|
||||
|
@ -107,7 +102,6 @@
|
|||
<t t-set="title">Apply Job</t>
|
||||
<section id="forms">
|
||||
<h1>Apply</h1>
|
||||
<div class="row">
|
||||
<form class="form-horizontal mt32" action="/job/success" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" t-att-value="job.department_id.id" name="department_id"/>
|
||||
<input type="hidden" t-att-value="job.id" name="job_id"/>
|
||||
|
@ -142,7 +136,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
<template id="thankyou">
|
||||
|
|
Loading…
Reference in New Issue