* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-// Page initialization
+// Page initialization {{{1
function wizPage_onLoad(id)
{
var educationDegree;
var educationDegreeAll;
var educationDegreeName;
-
-// General
-
var subgrades;
var names;
+
+// Education {{{1
+
function fillType(selectCtrl, edu, fill)
{
var i;
selectType(document.forms.prof_annu["edus[" + i + "][degreeid]"], document.forms.prof_annu["edu_" + i + "_tmp"].value);
}
+function addEdu()
+{
+ var i = 0;
+ var j = 0;
+ var prefix = 'edu_';
+ var class_parity;
+
+ while (!$('#edu_add').hasClass(prefix + i)) {
+ if ($('.' + prefix + i).length != 0) {
+ j++;
+ }
+ i++;
+ }
+ if (j % 2) {
+ class_parity = 'pair';
+ } else {
+ class_parity = 'impair';
+ }
+ $('#edu_add').removeClass(prefix + i);
+ i++;
+ $('#edu_add').addClass(prefix + i);
+ i--;
+ $.get(platal_baseurl + 'profile/ajax/edu/' + i + '/' + class_parity,
+ function(data) {
+ $('#edu_add').before(data);
+ prepareType(i);
+ });
+}
+
+function removeEdu(i)
+{
+ var prefix = 'edu_';
+ $('.' + prefix + i).remove();
+ while (!$('#edu_add').hasClass(prefix + i)) {
+ $('.' + prefix + i).toggleClass('pair');
+ $('.' + prefix + i).toggleClass('impair');
+ i++;
+ }
+}
+
+// Names {{{1
+
function toggleNamesAdvanced()
{
$('.names_advanced').toggle();
});
}
+// Nationalities {{{1
+
function delNationality(i)
{
$('#nationalite' + i).hide().find('select').val('');
}
}
+// Networking {{{1
+
function addNetworking()
{
var i = 0;
}
-// Addresses
+// Addresses {{{1
function removeObject(id, pref)
{
Ajax.update_html('addresses_' + i + '_cont', 'profile/ajax/address/' + i, checkCurrentAddress);
}
-function addEdu()
+function validGeoloc(id, pref)
{
- var i = 0;
- var j = 0;
- var prefix = 'edu_';
- var class_parity;
-
- while (!$('#edu_add').hasClass(prefix + i)) {
- if ($('.' + prefix + i).length != 0) {
- j++;
- }
- i++;
- }
- if (j % 2) {
- class_parity = 'pair';
- } else {
- class_parity = 'impair';
- }
- $('#edu_add').removeClass(prefix + i);
- i++;
- $('#edu_add').addClass(prefix + i);
- i--;
- $.get(platal_baseurl + 'profile/ajax/edu/' + i + '/' + class_parity,
- function(data) {
- $('#edu_add').before(data);
- prepareType(i);
- });
+ document.getElementById(id + '_geoloc').style.display = 'none';
+ document.getElementById(id + '_geoloc_error').style.display = 'none';
+ document.getElementById(id + '_geoloc_valid').style.display = 'none';
+ document.forms.prof_annu[pref + "[parsevalid]"].value = "1";
+ document.forms.prof_annu[pref + "[text]"].value = document.forms.prof_annu[pref + "[geoloc]"].value;
+ document.forms.prof_annu[pref + "[cityid]"].value = document.forms.prof_annu[pref + "[geoloc_cityid]"].value;
+ $(document.forms.prof_annu[pref + "[text]"]).click(function() { document.forms.prof_annu[pref + "[text]"].blur(); });
+ document.forms.prof_annu[pref + "[text]"].className = '';
}
-function removeEdu(i)
+function validAddress(id, pref)
{
- var prefix = 'edu_';
- $('.' + prefix + i).remove();
- while (!$('#edu_add').hasClass(prefix + i)) {
- $('.' + prefix + i).toggleClass('pair');
- $('.' + prefix + i).toggleClass('impair');
- i++;
- }
+ document.getElementById(id + '_geoloc').style.display = 'none';
+ document.getElementById(id + '_geoloc_error').style.display = 'none';
+ document.getElementById(id + '_geoloc_valid').style.display = 'none';
+ document.forms.prof_annu[pref + "[parsevalid]"].value = "1";
+ $(document.forms.prof_annu[pref + "[text]"]).click(function() { document.forms.prof_annu[pref + "[text]"].blur(); });
+ document.forms.prof_annu[pref + "[text]"].className = '';
}
+// }}}
+// {{{1 Phones
+
function addTel(prefid, prefname)
{
var i = 0;
document.getElementById(id+'_addComment').style.display = '';
}
-// Geoloc
-
-function validGeoloc(id, pref)
-{
- document.getElementById(id + '_geoloc').style.display = 'none';
- document.getElementById(id + '_geoloc_error').style.display = 'none';
- document.getElementById(id + '_geoloc_valid').style.display = 'none';
- document.forms.prof_annu[pref + "[parsevalid]"].value = "1";
- document.forms.prof_annu[pref + "[text]"].value = document.forms.prof_annu[pref + "[geoloc]"].value;
- document.forms.prof_annu[pref + "[cityid]"].value = document.forms.prof_annu[pref + "[geoloc_cityid]"].value;
- $(document.forms.prof_annu[pref + "[text]"]).click(function() { document.forms.prof_annu[pref + "[text]"].blur(); });
- document.forms.prof_annu[pref + "[text]"].className = '';
-}
-
-function validAddress(id, pref)
-{
- document.getElementById(id + '_geoloc').style.display = 'none';
- document.getElementById(id + '_geoloc_error').style.display = 'none';
- document.getElementById(id + '_geoloc_valid').style.display = 'none';
- document.forms.prof_annu[pref + "[parsevalid]"].value = "1";
- $(document.forms.prof_annu[pref + "[text]"]).click(function() { document.forms.prof_annu[pref + "[text]"].blur(); });
- document.forms.prof_annu[pref + "[text]"].className = '';
-}
-
-
-// Groups
+// Groups {{{1
function updateGroup(type)
{
document.getElementById("groupesx_sub").href = href;
}
-
-// Medals
+// Medals {{{1
function updateMedal()
{
updateMedal();
}
-
-// Jobs
+// Jobs {{{1
function removeJob(id, pref)
{
$('.entreprise_' + id).toggle();
}
-// Skills
+// }}}
+// {{{1 Skills
function updateSkill(cat)
{
updateSkill(cat);
}
-
-// Mentor
+// Mentor {{{1
function updateCountry()
{