beb65eee161d3b9da911ae786372ec7555894f50
1 /***************************************************************************
2 * Copyright (C) 2003-2011 Polytechnique.org *
3 * http://opensource.polytechnique.org/ *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
18 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
19 ***************************************************************************/
21 // Page initialization {{{1
23 function wizPage_onLoad(id
)
28 while ($('.edu_' + i
).length
!= 0) {
34 checkCurrentAddress();
41 while ($('#medal_' + i
).length
!= 0) {
47 if ($('#jobs_0').find("[name='jobs[0][name]']").val() == '') {
48 registerEnterpriseAutocomplete(0);
55 var educationDegreeAll
;
56 var educationDegreeName
;
61 // Publicity follows the following ordering: private < ax < public.
63 publicity
['private'] = 0;
65 publicity
['public'] = 2;
69 function toggleNamesAdvanced()
71 $('.names_advanced').toggle();
74 function addSearchName(isFemale
)
77 while ($('#search_name_' + i
).length
!= 0) {
80 $('#search_name_' + i
)
81 .updateHtml('profile/ajax/searchname/' + i + '/' + isFemale
,
83 $('#searchname').before(data
);
88 function removeSearchName(i
, isFemale
)
90 $('#search_name_' + i
).remove();
91 updateNameDisplay(isFemale
);
94 function changeNameFlag(i
)
96 $('#flag_' + i
).remove();
97 var typeid
= $('#search_name_' + i
).find('select').val();
98 var type
= $('#search_name_' + i
).find('select :selected').text();
99 if ($('[name=sn_type_' + typeid
+ '_' + i
+ ']').val() > 0) {
100 $('#flag_cb_' + i
).after('<span id="flag_' + i
+ '"> ' +
101 '<img src="images/icons/flag_green.gif" alt="site public" title="site public" />' +
102 '<input type="hidden" name="search_names[' + i
+ '][pub]" value="1"/>' +
103 '<input type="hidden" name="search_names[' + i
+ '][typeid]" value="' + typeid
+ '"/>' +
104 '<input type="hidden" name="search_names[' + i
+ '][type]" value="' + type
+ '"/></span>');
106 $('#flag_cb_' + i
).after('<span id="flag_' + i
+ '"> ' +
107 '<img src="images/icons/flag_red.gif" alt="site privé" title="site privé" />' +
108 '<input type="hidden" name="search_names[' + i
+ '][typeid]" value="' + typeid
+ '"/>' +
109 '<input type="hidden" name="search_names[' + i
+ '][type]" value="' + type
+ '"/></span>');
113 function updateNameDisplay(isFemale
)
115 var searchnames
= '';
116 for (var i
= 0; i
< 10; i
++) {
117 if ($('#search_name_' + i
).find(':text').val()) {
118 searchnames
+= $('#search_name_' + i
).find('[name*=typeid]').val() + ';';
119 searchnames
+= $('#search_name_' + i
).find(':text').val() + ';;';
122 $.xget('profile/ajax/buildnames/' + searchnames + '/' + isFemale
,
124 var name
= data
.split(';');
125 $('#public_name').html(name
[0]);
126 $('#private_name').html(name
[0] + name
[1]);
130 function toggleParticle(id
)
132 if ($('#search_name_' + id
).find("[name*='[particle]']").val() == '') {
133 $('#search_name_' + id
).find("[name*='[particle]']").val(1);
135 $('#search_name_' + id
).find("[name*='[particle]']").val('');
141 function togglePromotionEdition()
143 $(".promotion_edition").toggle();
146 // Nationalities {{{1
148 function delNationality(i
)
150 $('#nationality' + i
).hide().find('select').val('');
153 function addNationality()
156 if ($('#nationality2').find('select').val() == "") {
158 } else if ($('#nationality3').find('select').val() == "") {
161 if ((i
== 2) || (i
== 3)) {
162 $('#nationality' + i
).show();
168 function prepareType(id
)
170 var edu
= $('.edu_' + id
).find("[name='edus[" + id
+ "][eduid]']").val() - 1;
171 var sel
= $('.edu_' + id
).find('[name=edu_' + id
+ '_tmp]').val();
173 if (educationDegree
[edu
]) {
174 var length
= educationDegree
[edu
].length
;
178 for (i
= 0; i
< length
; ++i
) {
179 html
+= '<option value="' + educationDegree
[edu
][i
] + '"';
180 if (sel
== educationDegree
[edu
][i
]) {
181 html
+= ' selected="selected"';
183 html
+= '>' + educationDegreeName
[educationDegree
[edu
][i
] - 1] + '</option>';
185 // XXX: to be removed once SQL table profile_merge_issues is.
186 if (sel
!= '' && html
== '') {
187 html
+= '<option value="' + sel
+ '" selected="selected">' + educationDegreeName
[sel
- 1] + '</option>';
189 $('.edu_' + id
).find("[name='edus[" + id
+ "][degreeid]']").html(html
);
199 while (!$('#edu_add').hasClass(prefix
+ i
)) {
200 if ($('.' + prefix
+ i
).length
!= 0) {
206 class_parity
= 'pair';
208 class_parity
= 'impair';
210 $('#edu_add').removeClass(prefix
+ i
);
212 $('#edu_add').addClass(prefix
+ i
);
214 $.xget('profile/ajax/edu/' + i + '/' + class_parity
,
216 $('#edu_add').before(data
);
221 function removeEdu(i
)
224 $('.' + prefix
+ i
).remove();
225 while (!$('#edu_add').hasClass(prefix
+ i
)) {
226 $('.' + prefix
+ i
).toggleClass('pair');
227 $('.' + prefix
+ i
).toggleClass('impair');
234 function addNetworking()
237 while ($('#networking_' + i
).length
!= 0) {
241 var html
= '<tr id="networking_' + i
+ '">'
242 + ' <td colspan="2">'
243 + ' <div style="float: left; width: 200px;">'
244 + ' <span class="flags">'
245 + ' <input type="checkbox" name="networking[' + i
+ '][pub]"/>'
246 + ' <img src="images/icons/flag_green.gif" alt="site public" title="site public">'
248 + ' <select name="networking[' + i
+ '][type]" onchange="javascript:updateNetworking(' + i
+ ');">';
249 for (nw
in nw_list
) {
250 if (namefirst
== '') {
253 html
+= ' <option value="' + nw_list
[nw
] + '">' + nw
+ '</option>';
256 + ' <input type="hidden" name="networking[' + i
+ '][name]" value="' + namefirst
+ '"/>'
258 + ' <div style="float: left">'
259 + ' <input type="text" name="networking[' + i
+ '][address]" value="" size="30"/>'
260 + ' <a href="javascript:removeNetworking(' + i
+ ')">'
261 + ' <img src="images/icons/cross.gif" alt="cross" title="Supprimer cet élément"/>'
267 $('#networking').before(html
);
270 function removeNetworking(id
)
272 $('#networking_' + id
).remove();
275 function updateNetworking(i
)
277 $('#networking_' + i
).find("[name='networking[" + i
+ "][name]']").val($('#networking_' + i
).find('select option:selected').text());
282 function toggleAddress(id
, val
)
284 $('#addresses_' + id
+ '_grayed').toggle();
285 $('#addresses_' + id
).toggle();
286 $('#addresses_' + id
+ '_cont').find('[name*=removed]').val(val
);
287 checkCurrentAddress();
290 function checkCurrentAddress(id
)
292 var hasCurrentAddress
= id
? true : false;
294 while ($('#addresses_' + i
+ '_cont').length
!= 0) {
295 if ($('#addresses_' + i
+ '_cont').find('[name*=removed]').val() == 1) {
296 $('#addresses_' + i
+ '_cont').find('[name*=current]').attr('checked', false);
298 if (!hasCurrentAddress
&& $('#addresses_' + i
+ '_cont').find('[name*=current]:checked').length
!= 0) {
299 hasCurrentAddress
= true;
301 $('#addresses_' + i
+ '_cont').find('[name*=current]').attr('checked', false);
305 if (!hasCurrentAddress
) {
307 while ($('#addresses_' + i
+ '_cont').length
!= 0) {
308 if ($('#addresses_' + i
+ '_cont').find('[name*=removed]').val() == 0) {
309 $('#addresses_' + i
+ '_cont').find('[name*=current]').attr('checked', 'checked');
316 $('#addresses_' + id
+ '_cont').find('[name*=current]').attr('checked', 'checked');
320 function addAddress()
323 while ($('#addresses_' + i
+ '_cont').length
!= 0) {
326 $('#add_address').before('<div id="addresses_' + i
+ '_cont"></div>');
327 $('#addresses_' + i
+ '_cont').updateHtml('profile/ajax/address/' + i
,
328 checkCurrentAddress());
331 function addressChanged(prefid
, color
)
333 var text
= $('#' + prefid
+ '_cont').find("[name*='[text]']").val();
334 $('#' + prefid
+ '_cont').find('[name*=changed]').val("1");
335 $.xpost('map_url/', { text
:text
, color
:color
}, function(data
) {
336 $('.static_map_url').find('img').attr('src', data
);
340 function deleteGeocoding(prefid
, hrpid
)
342 var confirmation
= confirm(
343 "La localisation de l'adresse sert Ă deux choses : te placer dans "
344 + "le planisphère et te faire apparaître dans la recherche avancée par "
345 + "pays, région, département, ville... La supprimer t'en fera disparaître. "
346 + "\nIl ne faut le faire que si cette localisation "
347 + "est réellement erronée. Avant de supprimer cette localisation, l'équipe de "
348 + "Polytechnique.org tentera de la réparer.\n\nConfirmes-tu ta "
349 + "demande de suppression de cette localisation ?");
352 var address
= $('#' + prefid
).find("[name*='[text]']").val();
353 $.xpost('profile/ajax/address/del/' + hrpid
, { address
:address
});
354 $('#' + prefid
+ '_geocoding_removal').html('Localisation en attente de validation.');
360 function addTel(prefid
, prefname
, subField
, mainField
, mainId
)
363 var prefix
= prefid
+ '_';
364 while ($('#' + prefix
+ i
).length
!= 0) {
367 $('#' + prefix
+ 'add').before('<div id="' + prefix
+ i
+ '" style="clear: both; padding-top: 4px; padding-bottom: 4px"></div>');
368 $('#' + prefix
+ i
).updateHtml('profile/ajax/tel/' + prefid + '/' + prefname
+ '/' + i + '/' + subField
+ '/' + mainField + '/' + mainId
);
371 function removeTel(prefname
, prefid
, id
)
374 while ($('#' + prefid
+ '_' + total
).length
!= 0) {
377 $('#' + prefid
+ '_' + id
).remove();
378 for (var i
= parseInt(id
) + 1; i
< total
; ++i
) {
379 renumberPhone(prefname
, prefid
, i
);
383 function addPhoneComment(id
)
385 $('#' + id
+ '_comment').show();
386 $('#' + id
+ '_addComment').hide();
389 function removePhoneComment(id
, pref
)
391 $('#' + id
+ '_comment').hide();
392 $('#' + id
+ '_comment').find("[name='" + pref
+ "[comment]']").val('');
393 $('#' + id
+ '_addComment').show();
396 function renumberPhone(prefname
, prefid
, i
)
399 var telprefOld
= prefname
+ '[' + i
+ ']';
400 var telpref
= prefname
+ '[' + telid
+ ']';
401 var idOld
= prefid
+ '_' + i
;
402 var id
= prefid
+ '_' + telid
;
404 $('#' + idOld
).attr('id', id
);
405 $('#' + id
).find('div.titre').html('N°' + i
);
406 $('#' + id
).find('a.removeTel').attr('href', 'javascript:removeTel(\'' + prefname
+ '\',\'' + prefid
+ '\',' + telid
+ ')');
407 $('#' + id
).find('select').attr('name', telpref
+ '[type]');
408 $('#' + id
).find("[name='" + telprefOld
+ "[display]']").attr('name', telpref
+ '[display]');
409 $('#' + id
).find("[name='" + telprefOld
+ "[comment]']").attr('name', telpref
+ '[comment]');
410 $('#' + id
).find('a.removePhoneComment').attr('href', 'javascript:removePhoneComment(' + id
+ ',' + telpref
+ ')');
411 $('#' + id
).find('#' + idOld
+ '_addComment').attr('id', id
+ '_addComment');
412 $('#' + id
).find('#' + id
+ '_addComment').attr('href', 'javascript:addPhoneComment(' + id
+ ')');
413 $('#' + id
).find('#' + idOld
+ '_comment').attr('id', id
+ '_comment');
414 $('#' + id
).find("[name='" + telprefOld
+ "[pub]']").attr('name', telpref
+ '[pub]');
421 var id
= $('#binets_table').find('[name=binets_sel]').val();
422 var text
= $('#binets_table').find('select option:selected').text();
423 var html
= '<tr id="binets_' + id
+ '">'
425 + ' <input type="hidden" name="binets[' + id
+ ']" value="' + text
+ '" />'
428 + ' <div style="float: left; width: 70%">'
431 + ' <a href="javascript:removeElement(\'binets\',' + id
+ ')">'
432 + ' <img src="images/icons/cross.gif" alt="cross" title="Supprimer ce groupe" />'
436 $('#binets_table').after(html
);
437 updateElement('binets');
440 function updateGroupSubLink()
442 var href
= $('[name*=groupesx_sub]').val() ? $('[name*=groupesx_sub]').val() : 'http://www.polytechnique.net';
443 $('#groupesx_sub').attr('href', href
);
448 function prepareMedal(i
)
450 getMedalName($('#medal_' + i
).find('[name="medals[' + i
+ '][id]"]').val());
454 function updateMedal()
456 var val
= $('#medals').find('[name*=medal_sel]').val();
458 if ((multiple
[val
] && subgrades
[val
]) || $('.medal_name_' + val
).length
== 0) {
459 $('#medal_add').show();
461 $('#medal_add').hide();
465 function getMedalName(id
)
467 $('.medal_name_' + id
).html(names
[id
]);
470 function buildGrade(i
)
472 var id
= $('#medal_' + i
).find('[name="medals[' + i
+ '][id]"]').val();
473 var current
= $('#medal_' + i
).find('[name="medals_' + i
+ '_grade"]').val();
474 var subg
= subgrades
[id
];
475 var obj
= $('#medal_grade_' + i
);
477 obj
.prepend('<input type="hidden" name="medals[' + i
+ '][grade]" value="0" />');
479 var html
= 'Agrafe : <select name="medals[' + i
+ '][grade]">';
480 html
+= '<option value="0">Non précisée</option>';
481 for (var grade
= 0; grade
< subg
.length
; ++grade
) {
482 html
+= '<option value="' + subg
[grade
][0] + '"';
483 if (subg
[grade
][0] == current
) {
484 html
+= ' selected="selected"';
486 html
+= '>' + subg
[grade
][1] + '</option>';
493 function makeAddProcess(i
, id
)
495 return function(data
)
497 $('#medals').after(data
);
507 while ($('#medal_' + i
).length
!= 0) {
511 var id
= $('#medals').find('[name=medal_sel]').val();
512 $.xget('profile/ajax/medal/' + i + '/' + id
, makeAddProcess(i
, id
));
515 function removeMedal(id
)
518 while ($('#medal_' + total
).length
!= 0) {
521 $('#medal_' + id
).remove();
522 for (var i
= parseInt(id
) + 1; i
< total
; ++i
) {
528 function renumberMedal(i
)
532 $('#medal_' + i
).attr('id', 'medal_' + new_i
);
533 $('#medal_grade_' + i
).attr('id', 'medal_grade_' + new_i
);
534 $('#medal_grade_' + new_i
).find("[name='medals_" + i
+ "_grade']").attr('name', 'medals_' + new_i
+ '_grade');
535 $('#medal_grade_' + new_i
).find("[name='medals[" + i
+ "][id]']").attr('name', 'medals[' + new_i
+ '][id]');
536 $('#medal_grade_' + new_i
).find("[name='medals[" + i
+ "][valid]']").attr('name', 'medals[' + new_i
+ '][valid]');
537 $('#medal_grade_' + new_i
).find("[name='medals[" + i
+ "][grade]']").attr('name', 'medals[' + new_i
+ '][grade]');
538 $('#medal_' + new_i
).find('a.removeMedal').attr('href', 'javascript:removeMedal(' + new_i
+ ')');
543 function removeJob(id
, pref
)
545 $('#' + id
+ '_cont').hide();
546 if ($('#' + id
).find("[name='" + pref
+ "[new]']").val() == '0') {
547 $('#' + id
+ '_grayed').show();
548 $('#' + id
+ '_grayed_name').html($('#' + id
).find("[name='" + pref
+ "[name]']").val());
550 $('#' + id
).find("[name='" + pref
+ "[removed]']").val('1');
553 function restoreJob(id
, pref
)
555 $('#' + id
+ '_cont').show();
556 $('#' + id
+ '_grayed').hide();
557 $('#' + id
).find("[name='" + pref
+ "[removed]']").val('0');
560 function makeAddJob(id
)
562 return function(data
)
564 $('#add_job').before(data
);
565 registerEnterpriseAutocomplete(id
);
572 while ($('#jobs_' + i
).length
!= 0) {
575 $.xget('profile/ajax/job/' + i
, makeAddJob(i
));
578 function addEntreprise(id
)
580 $('.entreprise_' + id
).toggle();
584 * Adds a job term in job profile page
585 * @param jobid id of profile's job among his different jobs
586 * @param jtid id of job term to add
587 * @param full_name full text of job term
588 * @return false if the term already exist for this job, true otherwise
590 function addJobTerm(jobid
, jtid
, full_name
)
598 formvarname
= 'terms';
600 parentpath
= '#jobs_'+jobid
+' ';
601 formvarname
= 'jobs['+jobid
+'][terms]';
603 var lastJobTerm
= $(parentpath
+ '.jobs_term:last');
604 if (lastJobTerm
.length
!= 0) {
605 termid
= parseInt(lastJobTerm
.children('input').attr('name').replace(/^(jobs\[[0-9]+\]\[terms\]|terms)\[([0-9]+)\]\[jtid\]/, '$2')) + 1;
606 if ($('#job'+jobid
+'_term'+jtid
).length
> 0) {
610 var newdiv
= '<div class="jobs_term" id="job'+jobid
+'_term'+jtid
+'">'+
611 '<span>'+full_name
+'</span>'+
612 '<input type="hidden" name="'+formvarname
+'['+termid
+'][jtid]" value="'+jtid
+'" />'+
613 '<img title="Retirer ce mot-clef" alt="retirer" src="images/icons/cross.gif" />'+
615 if (lastJobTerm
.length
== 0) {
616 $(parentpath
+ '.jobs_terms').prepend(newdiv
);
618 lastJobTerm
.after(newdiv
);
620 $('#job'+jobid
+'_term'+jtid
+' img').css('cursor','pointer').click(removeJobTerm
);
625 * Remove a job term in job profile page.
626 * Must be called from a button in a div containing the term
628 function removeJobTerm()
630 $(this).parent().remove();
634 * Prepare display for autocomplete suggestions in job terms
635 * @param row an array of (title of term, id of term)
636 * @return text to display
637 * If id is negative, it is because there are too much terms to
640 function displayJobTerm(row
)
643 return '... <em>parcourir les résultats dans un arbre</em> ...';
649 * Function called when a job term has been selected from autocompletion
651 * @param li is the list item (<li>) that has been clicked
652 * The context is the jsquery autocomplete object.
654 function selectJobTerm(li
)
656 var jobid
= this.extraParams
.jobid
;
657 if (li
.extra
[0] >= 0) {
658 addJobTerm(jobid
,li
.extra
[0],$(li
).text());
662 search_input
= $('.term_search')[0];
664 search_input
= $('#jobs_'+jobid
+' .term_search')[0];
666 if (li
.extra
[0] >= 0) {
667 search_input
.value
= '';
668 search_input
.focus();
670 search_input
.value
= li
.selectValue
.replace(/%$/,'');
671 toggleJobTermsTree(jobid
, li
.selectValue
);
676 * Function to show or hide a terms tree in job edition
677 * @param jobid is the id of the job currently edited
679 function toggleJobTermsTree(jobid
, textfilter
)
681 $('#term_tree_comment').toggle();
687 treepath
= '#jobs_'+jobid
+' ';
689 treepath
+= '.term_tree';
690 if ($(treepath
+ ' ul').length
> 0) {
691 $(treepath
).empty().removeClass().addClass('term_tree');
696 createJobTermsTree(treepath
, 'profile/ajax/tree/jobterms/all', 'job' + jobid
, 'chooseJobTerm', textfilter
);
700 * Function called when a job term is chosen from terms tree
701 * @param treeid is the full id of the tree (must look like job3)
702 * @param jtid is the id of the job term chosen
703 * @param fullname is the complete name (understandable without context) of the term
705 function chooseJobTerm(treeid
, jtid
, fullname
)
707 addJobTerm(treeid
.replace(/^job(.*)$/, '$1'), jtid
, fullname
);
712 function addSkill(cat
)
714 var val
= $('#' + cat
+ '_table').find('[name=' + cat
+ '_sel]').val();
715 var text
= $('#' + cat
+ '_table').find('[name=' + cat
+ '_sel] :selected').text();
716 $.xget('profile/ajax/skill/' + cat + '/' + val
,
718 $('#' + cat
).append(data
);
719 $('#' + cat
+ '_' + val
+ '_title').text(text
);
726 function addCountry()
728 var val
= $('#countries_table').find('[name=countries_sel] :selected').val();
729 var text
= $('#countries_table').find('[name=countries_sel] :selected').text();
730 var html
= '<div id="countries_' + val
+ '" style="clear: both; margin-bottom: 0.7em">'
731 + ' <a href="javascript:removeElement(\'countries\',\'' + val
+ '\')" style="display: block; float:right">'
732 + ' <img src="images/icons/cross.gif" alt="" title="Supprimer ce pays" />'
734 + ' <div style="float: left; width: 50%">' + text
+ '</div>'
735 + ' <input type="hidden" name="countries[' + val
+ ']" value="' + text
+ '" />'
737 $('#countries').append(html
);
738 updateElement('countries');
741 function registerEnterpriseAutocomplete(id
)
743 $(".enterpriseName").each(
745 if (id
== -1 || this.name
== "jobs[" + id
+ "][name]") {
746 $(this).autocomplete($.plURL("search/autocomplete/entreprise"),
751 width
:$(this).width()
756 $(".sectorName").each(
758 if (id
== -1 || this.name
== "jobs[" + id
+ "][subSubSectorName]") {
759 $(this).autocomplete($.plURL("search/autocomplete/subSubSector"),
764 width
:$(this).width()
770 // {{{1 Multiusage functions
772 function updateElement(cat
)
774 var val
= $('#' + cat
+ '_table').find('[name=' + cat
+ '_sel]').val();
775 if (val
== '' || $('#' + cat
+ '_' + val
).length
!= 0) {
776 $('#' + cat
+ '_add').hide();
778 $('#' + cat
+ '_add').show();
782 function removeElement(cat
, id
)
784 $('#' + cat
+ '_' + id
).remove();
788 function updateSubPublicity(subFieldId
, name
, mainPub
)
790 var subPub
= $(subFieldId
).find("[name='" + name
+ "']:checked").val();
791 if (publicity
[subPub
] > publicity
[mainPub
]) {
792 $(subFieldId
).find("[name='" + name
+ "']:checked").removeAttr('checked');
793 $(subFieldId
).find('[value=' + mainPub
+ ']').attr('checked', 'checked');
797 function updatePublicity(mainField
, mainId
, subField
, subId
)
799 var mainFieldId
= '#' + mainField
+ '_' + mainId
;
800 var mainPub
= $(mainFieldId
).find("[name='" + mainField
+ "[" + mainId
+ "][pub]']:checked").val();
802 var subFields
= subField
.split(',');
803 for (var i
=0; i
< subFields
.length
; ++i
) {
804 var subFieldBaseId
= mainFieldId
+ '_' + subFields
[i
];
805 var name
= mainField
+ '[' + mainId
+ '][' + subFields
[i
] + ']';
806 if ($(subFieldBaseId
).length
!= 0) {
807 updateSubPublicity(subFieldBaseId
, name
+ '[pub]', mainPub
);
808 updateSubPublicity(subFieldBaseId
, mainField
+ '[' + mainId
+ '][' + subFields
[i
] + '_pub]', mainPub
);
811 while ($(subFieldBaseId
+ '_' + subId
).length
!= 0) {
812 updateSubPublicity(subFieldBaseId
+ '_' + subId
, name
+ '[' + subId
+ '][pub]', mainPub
);
818 updateSubPublicity(mainFieldId
+ '_' + subField
, mainField
+ '[' + mainId
+ '][' + subField
+ '_pub]', mainPub
);
819 updateSubPublicity(mainFieldId
+ '_' + subField
, mainField
+ '[' + mainId
+ '][' + subField
+ '][pub]', mainPub
);
821 updateSubPublicity(mainFieldId
+ '_' + subField
+ '_' + subId
, mainField
+ '[' + mainId
+ '][' + subField
+ '][' + subId
+ '][pub]', mainPub
);
826 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: