X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=htdocs%2Fjavascript%2Fprofile.js;h=f0ca309b4487c23c9c9bbdabb4f389b93e3fe95e;hb=63c891790bd2fe0fd5319908cbeafee7e06a5a3b;hp=527f8068af9a47b7fe1b46340c75176b0415fc5a;hpb=f8a1899eceabb9648adb85071fab66d49d549337;p=platal.git diff --git a/htdocs/javascript/profile.js b/htdocs/javascript/profile.js index 527f806..f0ca309 100644 --- a/htdocs/javascript/profile.js +++ b/htdocs/javascript/profile.js @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2003-2010 Polytechnique.org * + * Copyright (C) 2003-2011 Polytechnique.org * * http://opensource.polytechnique.org/ * * * * This program is free software; you can redistribute it and/or modify * @@ -211,7 +211,7 @@ function addEdu() i++; $('#edu_add').addClass(prefix + i); i--; - $.get(platal_baseurl + 'profile/ajax/edu/' + i + '/' + class_parity, + $.xget('profile/ajax/edu/' + i + '/' + class_parity, function(data) { $('#edu_add').before(data); prepareType(i); @@ -489,7 +489,7 @@ function makeAddProcess(id) function addMedal() { var id = $('#medals').find('[name=medal_sel]').val(); - $.get(platal_baseurl + 'profile/ajax/medal/' + id, makeAddProcess(id)); + $.xget('profile/ajax/medal/' + id, makeAddProcess(id)); } function removeMedal(id) @@ -532,7 +532,7 @@ function addJob() while ($('#jobs_' + i).length != 0) { ++i; } - $.get(platal_baseurl + 'profile/ajax/job/' + i, makeAddJob(i)); + $.xget('profile/ajax/job/' + i, makeAddJob(i)); } function addEntreprise(id) @@ -638,6 +638,8 @@ function selectJobTerm(li) */ function toggleJobTermsTree(jobid, textfilter) { + $('#term_tree_comment').toggle(); + var treepath; if (jobid < 0) { treepath = ''; @@ -671,7 +673,7 @@ function addSkill(cat) { var val = $('#' + cat + '_table').find('[name=' + cat + '_sel]').val(); var text = $('#' + cat + '_table').find('[name=' + cat + '_sel] :selected').text(); - $.get(platal_baseurl + 'profile/ajax/skill/' + cat + '/' + val, + $.xget('profile/ajax/skill/' + cat + '/' + val, function(data) { $('#' + cat).append(data); $('#' + cat + '_' + val + '_title').text(text); @@ -701,7 +703,7 @@ function registerEnterpriseAutocomplete(id) $(".enterpriseName").each( function() { if (id == -1 || this.name == "jobs[" + id + "][name]") { - $(this).autocomplete(platal_baseurl + "search/autocomplete/entreprise", + $(this).autocomplete($.plURL("search/autocomplete/entreprise"), { selectOnly:1, field:this.name, @@ -714,7 +716,7 @@ function registerEnterpriseAutocomplete(id) $(".sectorName").each( function() { if (id == -1 || this.name == "jobs[" + id + "][subSubSectorName]") { - $(this).autocomplete(platal_baseurl + "search/autocomplete/subSubSector", + $(this).autocomplete($.plURL("search/autocomplete/subSubSector"), { selectOnly:1, field:this.name,