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)
+{
+ alert("coucou");
+ $(".enterprise_name").each(
+ function() {
+ alert(this.name);
+ 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:
// Build the page
$page->addJsLink('ajax.js');
- $page->addJsLink('profile.js');
$page->addJsLink('applis.js');
$page->addJsLink('grades.js');
+ $page->addJsLink('profile.js');
$wiz = new PlWizard('Profil', 'core/plwizard.tpl', true, true);
require_once dirname(__FILE__) . '/profile/page.inc.php';
$wiz->addPage('ProfileGeneral', 'Général', 'general');
{* *}
{**************************************************************************}
{javascript name="jquery"}
+{javascript name="jquery.autocomplete"}
+
<script type="text/javascript">//<![CDATA[
{if ($stateless || $id gt $current) && $wiz_ajax}
{literal}
{include file="include/flags.radio.tpl" name="`$jobpref`[pub]" val=$job.pub}
</div>
Entreprise n°{$i+1} :
- <input type="text" {if $job.name_error}class="error"{/if} size="35" maxlength="100"
+ <input type="text" class="enterprise_name {if $job.name_error}error{/if}" size="35" maxlength="100"
name="{$jobpref}[name]" value="{$job.name}" />
<a href="javascript:removeJob('{$jobid}', '{$jobpref}')">
{icon name=cross title="Supprimer cet emploi"}