updateJobSecteur(i, 'job_' + i, 'jobs[' + i + ']',
document.forms.prof_annu["jobs[" + i + "][ss_secteur]"].value);
}
+ registerEnterpriseAutocomplete(-1);
break;
}
}
return function(data)
{
$('#add_job').before(data);
+ registerEnterpriseAutocomplete(id);
updateSecteur('job_' + id, 'jobs[' + id + ']', '');
};
}
updateSSecteur();
}
+function registerEnterpriseAutocomplete(id)
+{
+ $(".enterprise_name").each(
+ function() {
+ if (id == -1 || this.name == "jobs[" + id + "][name]") {
+ $(this).autocomplete(platal_baseurl + "search/autocomplete/entreprise",
+ {
+ selectOnly:1,
+ field:this.name,
+ matchSubset:0,
+ width:$(this).width()
+ });
+ }
+ }
+ );
+}
+
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: