1 /***************************************************************************
2 * Copyright (C) 2003-2010 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();
40 for (var i
in names
) {
41 if ($('#medal_' + i
).length
!= 0) {
43 buildGrade(i
, $('#medal_' + i
).find('[name*=medal_' + i
+ '_grade]').val());
48 for (var i
= 0 ; $('#job_' + i
).length
!= 0; ++i
) {
49 updateJobSector(i
, $('#job_' + i
).find("[name='jobs[" + i
+ "][subSector]']").val());
50 updateJobSubSector(i
, $('#job_' + i
).find("[name='jobs[" + i
+ "][subSubSector]']").val());
51 updateJobAlternates(i
);
53 if ($('#job_0').find("[name='jobs[0][name]']").val() == '') {
54 registerEnterpriseAutocomplete(0);
61 var educationDegreeAll
;
62 var educationDegreeName
;
68 function toggleNamesAdvanced()
70 $('.names_advanced').toggle();
73 function addSearchName(isFemale
)
76 while ($('#search_name_' + i
).length
!= 0) {
79 Ajax
.update_html('search_name_' + i
, 'profile/ajax/searchname/' + i + '/' + isFemale
, function(data
){
80 $('#searchname').before(data
);
85 function removeSearchName(i
, isFemale
)
87 $('#search_name_' + i
).remove();
88 updateNameDisplay(isFemale
);
91 function changeNameFlag(i
)
93 $('#flag_' + i
).remove();
94 var typeid
= $('#search_name_' + i
).find('select').val();
95 var type
= $('#search_name_' + i
).find('select :selected').text();
96 if ($('[name=sn_type_' + typeid
+ '_' + i
+ ']').val() > 0) {
97 $('#flag_cb_' + i
).after('<span id="flag_' + i
+ '"> ' +
98 '<img src="images/icons/flag_green.gif" alt="site public" title="site public" />' +
99 '<input type="hidden" name="search_names[' + i
+ '][pub]" value="1"/>' +
100 '<input type="hidden" name="search_names[' + i
+ '][typeid]" value="' + typeid
+ '"/>' +
101 '<input type="hidden" name="search_names[' + i
+ '][type]" value="' + type
+ '"/></span>');
103 $('#flag_cb_' + i
).after('<span id="flag_' + i
+ '"> ' +
104 '<img src="images/icons/flag_red.gif" alt="site privé" title="site privé" />' +
105 '<input type="hidden" name="search_names[' + i
+ '][typeid]" value="' + typeid
+ '"/>' +
106 '<input type="hidden" name="search_names[' + i
+ '][type]" value="' + type
+ '"/></span>');
110 function updateNameDisplay(isFemale
)
112 var searchnames
= '';
113 for (var i
= 0; i
< 10; i
++) {
114 if ($('#search_name_' + i
).find(':text').val()) {
115 searchnames
+= $('#search_name_' + i
).find('[name*=typeid]').val() + ';';
116 searchnames
+= $('#search_name_' + i
).find(':text').val() + ';;';
119 Ajax
.update_html(null, 'profile/ajax/buildnames/' + searchnames + '/' + isFemale
, function(data
){
120 var name
= data
.split(';');
121 $('#public_name').html(name
[0]);
122 $('#private_name').html(name
[0] + name
[1]);
126 function toggleParticle(id
)
128 if ($('#search_name_' + id
).find("[name*='[particle]']").val() == '') {
129 $('#search_name_' + id
).find("[name*='[particle]']").val(1);
131 $('#search_name_' + id
).find("[name*='[particle]']").val('');
137 function togglePromotionEdition()
139 $(".promotion_edition").toggle();
142 // Nationalities {{{1
144 function delNationality(i
)
146 $('#nationality' + i
).hide().find('select').val('');
149 function addNationality()
152 if ($('#nationality2').find('select').val() == "") {
154 } else if ($('#nationality3').find('select').val() == "") {
157 if ((i
== 2) || (i
== 3)) {
158 $('#nationality' + i
).show();
164 function prepareType(id
)
166 var edu
= $('.edu_' + id
).find("[name='edus[" + id
+ "][eduid]']").val() - 1;
167 var sel
= $('.edu_' + id
).find('[name=edu_' + id
+ '_tmp]').val();
169 var length
= educationDegree
[edu
].length
;
170 for (i
= 0; i
< length
; ++i
) {
171 html
+= '<option value="' + educationDegree
[edu
][i
] + '"';
172 if (sel
== educationDegree
[edu
][i
]) {
173 html
+= ' selected="selected"';
175 html
+= '>' + educationDegreeName
[educationDegree
[edu
][i
] - 1] + '</option>';
177 $('.edu_' + id
).find("[name='edus[" + id
+ "][degreeid]']").html(html
);
187 while (!$('#edu_add').hasClass(prefix
+ i
)) {
188 if ($('.' + prefix
+ i
).length
!= 0) {
194 class_parity
= 'pair';
196 class_parity
= 'impair';
198 $('#edu_add').removeClass(prefix
+ i
);
200 $('#edu_add').addClass(prefix
+ i
);
202 $.get(platal_baseurl
+ 'profile/ajax/edu/' + i + '/' + class_parity
,
204 $('#edu_add').before(data
);
209 function removeEdu(i
)
212 $('.' + prefix
+ i
).remove();
213 while (!$('#edu_add').hasClass(prefix
+ i
)) {
214 $('.' + prefix
+ i
).toggleClass('pair');
215 $('.' + prefix
+ i
).toggleClass('impair');
222 function addNetworking()
225 while ($('#networking_' + i
).length
!= 0) {
229 var html
= '<tr id="networking_' + i
+ '">'
230 + ' <td colspan="2">'
231 + ' <div style="float: left; width: 200px;">'
232 + ' <span class="flags">'
233 + ' <input type="checkbox" name="networking[' + i
+ '][pub]"/>'
234 + ' <img src="images/icons/flag_green.gif" alt="site public" title="site public">'
236 + ' <select name="networking[' + i
+ '][type]" onchange="javascript:updateNetworking(' + i
+ ');">';
237 for (nw
in nw_list
) {
238 if (namefirst
== '') {
241 html
+= ' <option value="' + nw_list
[nw
] + '">' + nw
+ '</option>';
244 + ' <input type="hidden" name="networking[' + i
+ '][name]" value="' + namefirst
+ '"/>'
246 + ' <div style="float: left">'
247 + ' <input type="text" name="networking[' + i
+ '][address]" value="" size="30"/>'
248 + ' <a href="javascript:removeNetworking(' + i
+ ')">'
249 + ' <img src="images/icons/cross.gif" alt="cross" title="Supprimer cet élément"/>'
255 $('#networking').before(html
);
258 function removeNetworking(id
)
260 $('#networking_' + id
).remove();
263 function updateNetworking(i
)
265 $('#networking_' + i
).find("[name='networking[" + i
+ "][name]']").val($('#networking_' + i
).find('select option:selected').text());
270 function toggleAddress(id
, val
)
272 $('#addresses_' + id
+ '_grayed').toggle();
273 $('#addresses_' + id
).toggle();
274 $('#addresses_' + id
+ '_cont').find('[name*=removed]').val(val
);
275 checkCurrentAddress();
278 function checkCurrentAddress(id
)
280 var hasCurrentAddress
= id
? true : false;
282 while ($('#addresses_' + i
+ '_cont').length
!= 0) {
283 if ($('#addresses_' + i
+ '_cont').find('[name*=removed]').val() == 1) {
284 $('#addresses_' + i
+ '_cont').find('[name*=current]').attr('checked', false);
286 if (!hasCurrentAddress
&& $('#addresses_' + i
+ '_cont').find('[name*=current]:checked').length
!= 0) {
287 hasCurrentAddress
= true;
289 $('#addresses_' + i
+ '_cont').find('[name*=current]').attr('checked', false);
293 if (!hasCurrentAddress
) {
295 while ($('#addresses_' + i
+ '_cont').length
!= 0) {
296 if ($('#addresses_' + i
+ '_cont').find('[name*=removed]').val() == 0) {
297 $('#addresses_' + i
+ '_cont').find('[name*=current]').attr('checked', 'checked');
304 $('#addresses_' + id
+ '_cont').find('[name*=current]').attr('checked', 'checked');
308 function addAddress()
311 while ($('#addresses_' + i
+ '_cont').length
!= 0) {
314 $('#add_address').before('<div id="addresses_' + i
+ '_cont"></div>');
315 Ajax
.update_html('addresses_' + i
+ '_cont', 'profile/ajax/address/' + i
, checkCurrentAddress());
318 function addressChanged(prefid
)
320 $('#' + prefid
+ '_cont').find('[name*=changed]').val("1");
323 function validGeoloc(prefid
, id
, geoloc
)
326 $('#' + prefid
+ '_cont').find('[name*=text]').val($('#' + prefid
+ '_cont').find('[name*=geocodedText]').val());
327 $('#' + prefid
+ '_cont').find('[name*=postalText]').val($('#' + prefid
+ '_cont').find('[name*=geocodedPostalText]').val());
330 $('#' + prefid
+ '_cont').find("[name*='[geocodedText]']").remove();
331 $('#' + prefid
+ '_cont').find("[name*='[geocodedPostalText]']").remove();
333 $('#' + prefid
+ '_cont').find('[name*=text]').removeClass('error');
334 $('#' + prefid
+ '_cont').find('[name*=geocodeChosen]').val(geoloc
);
335 $('.' + prefid
+ '_geoloc').remove();
340 function addTel(prefid
, prefname
)
343 var prefix
= prefid
+ '_';
344 while ($('#' + prefix
+ i
).length
!= 0) {
347 $('#' + prefix
+ 'add').before('<div id="' + prefix
+ i
+ '" style="clear: both; padding-top: 4px; padding-bottom: 4px"></div>');
348 Ajax
.update_html(prefix
+ i
, 'profile/ajax/tel/' + prefid + '/' + prefname
+ '/' + i
);
351 function removeTel(prefname
, prefid
, id
)
354 while ($('#' + prefid
+ '_' + total
).length
!= 0) {
357 $('#' + prefid
+ '_' + id
).remove();
358 for (var i
= parseInt(id
) + 1; i
< total
; ++i
) {
359 renumberPhone(prefname
, prefid
, i
);
363 function addPhoneComment(id
)
365 $('#' + id
+ '_comment').show();
366 $('#' + id
+ '_addComment').hide();
369 function removePhoneComment(id
, pref
)
371 $('#' + id
+ '_comment').hide();
372 $('#' + id
+ '_comment').find("[name='" + pref
+ "[comment]']").val('');
373 $('#' + id
+ '_addComment').show();
376 function renumberPhone(prefname
, prefid
, i
)
379 var telprefOld
= prefname
+ '[' + i
+ ']';
380 var telpref
= prefname
+ '[' + telid
+ ']';
381 var idOld
= prefid
+ '_' + i
;
382 var id
= prefid
+ '_' + telid
;
384 $('#' + idOld
).attr('id', id
);
385 $('#' + id
).find('div.titre').html('N°' + i
);
386 $('#' + id
).find('a.removeTel').attr('href', 'javascript:removeTel(\'' + prefname
+ '\',\'' + prefid
+ '\',' + telid
+ ')');
387 $('#' + id
).find('select').attr('name', telpref
+ '[type]');
388 $('#' + id
).find("[name='" + telprefOld
+ "[display]']").attr('name', telpref
+ '[display]');
389 $('#' + id
).find("[name='" + telprefOld
+ "[comment]']").attr('name', telpref
+ '[comment]');
390 $('#' + id
).find('a.removePhoneComment').attr('href', 'javascript:removePhoneComment(' + id
+ ',' + telpref
+ ')');
391 $('#' + id
).find('#' + idOld
+ '_addComment').attr('id', id
+ '_addComment');
392 $('#' + id
).find('#' + id
+ '_addComment').attr('href', 'javascript:addPhoneComment(' + id
+ ')');
393 $('#' + id
).find('#' + idOld
+ '_comment').attr('id', id
+ '_comment');
394 $('#' + id
).find("[name='" + telprefOld
+ "[pub]']").attr('name', telpref
+ '[pub]');
401 var id
= $('#binets_table').find('[name=binets_sel]').val();
402 var text
= $('#binets_table').find('select option:selected').text();
403 var html
= '<tr id="binets_' + id
+ '">'
405 + ' <input type="hidden" name="binets[' + id
+ ']" value="' + text
+ '" />'
408 + ' <div style="float: left; width: 70%">'
411 + ' <a href="javascript:removeElement(\'binets\',' + id
+ ')">'
412 + ' <img src="images/icons/cross.gif" alt="cross" title="Supprimer ce groupe" />'
416 $('#binets_table').after(html
);
417 updateElement('binets');
420 function updateGroupSubLink()
422 var href
= $('[name*=groupesx_sub]').val() ? $('[name*=groupesx_sub]').val() : 'http://www.polytechnique.net';
423 $('#groupesx_sub').attr('href', href
);
428 function updateMedal()
430 var val
= $('#medals').find('[name*=medal_sel]').val();
431 if (val
&& ($('#medal_' + val
).length
== 0)) {
432 $('#medal_add').show();
434 $('#medal_add').hide();
438 function getMedalName(id
)
440 $('#medal_name_' + id
).html(names
[id
]);
443 function buildGrade(id
, current
)
446 var subg
= subgrades
[id
];
447 var obj
= $('#medal_grade_' + id
);
449 obj
.prepend('<input type="hidden" name="medals[' + id
+ '][grade]" value="0" />');
451 var html
= 'Agrafe : <select name="medals[' + id
+ '][grade]">';
452 html
+= '<option value="0">Non précisée</option>';
453 for (grade
= 0 ; grade
< subg
.length
; grade
++) {
454 html
+= '<option value="' + subg
[grade
][0] + '"';
455 if (subg
[grade
][0] == current
) {
456 html
+= ' selected="selected"';
458 html
+= '>' + subg
[grade
][1] + '</option>';
466 function makeAddProcess(id
)
468 return function(data
)
470 $('#medals').after(data
);
479 var id
= $('#medals').find('[name=medal_sel]').val();
480 $.get(platal_baseurl
+ 'profile/ajax/medal/' + id
, makeAddProcess(id
));
483 function removeMedal(id
)
485 $("#medal_" + id
).remove();
491 function removeJob(id
, pref
)
493 $('#' + id
+ '_cont').hide();
494 if ($('#' + id
).find("[name='" + pref
+ "[new]']").val() == '0') {
495 $('#' + id
+ '_grayed').show();
496 $('#' + id
+ '_grayed_name').html($('#' + id
).find("[name='" + pref
+ "[name]']").val());
498 $('#' + id
).find("[name='" + pref
+ "[removed]']").val('1');
501 function restoreJob(id
, pref
)
503 $('#' + id
+ '_cont').show();
504 $('#' + id
+ '_grayed').hide();
505 $('#' + id
).find("[name='" + pref
+ "[removed]']").val('0');
508 function updateJobSector(id
, sel
)
510 var sector
= $('#job_' + id
).find("[name='jobs[" + id
+ "][sector]']").val();
514 Ajax
.update_html('job_' + id
+ '_subSector', 'profile/ajax/sector/' + id + '/job_' + id
+ '/jobs[' + id + ']/' + sector
+ '/' + sel
);
517 function updateJobSubSector(id
, sel
)
519 var subSector
= $('#job_' + id
).find("[name='jobs[" + id
+ "][subSector]']").val();
520 if (subSector
== '') {
523 Ajax
.update_html('job_' + id
+ '_subSubSector', 'profile/ajax/sub_sector/' + id + '/' + subSector
+ '/' + sel
);
526 function updateJobAlternates(id
)
528 var subSubSector
= $('#job_' + id
).find("[name='jobs[" + id
+ "][subSubSector]']").val();
529 if (subSubSector
!= '') {
530 Ajax
.update_html('job_' + id
+ '_alternates', 'profile/ajax/alternates/' + id + '/' + subSubSector
);
534 function emptyJobSubSector(id
)
536 Ajax
.update_html('job_' + id
+ '_subSubSector', 'profile/ajax/sub_sector/' + id + '/-1/-1');
539 function emptyJobAlternates(id
)
541 Ajax
.update_html('job_' + id
+ '_alternates', 'profile/ajax/alternates/' + id + '/-1');
544 function displayAllSector(id
)
546 $('.sector_text_' + id
).remove();
547 $('.sector_' + id
).show();
550 function makeAddJob(id
)
552 return function(data
)
554 $('#add_job').before(data
);
555 registerEnterpriseAutocomplete(id
);
562 while ($('#job_' + i
).length
!= 0) {
565 $.get(platal_baseurl
+ 'profile/ajax/job/' + i
, makeAddJob(i
));
568 function addEntreprise(id
)
570 $('.entreprise_' + id
).toggle();
574 * Adds a job term in job profile page
575 * @param jobid id of profile's job among his different jobs
576 * @param jtid id of job term to add
577 * @param full_name full text of job term
578 * @return false if the term already exist for this job, true otherwise
580 function addJobTerm(jobid
, jtid
, full_name
)
588 formvarname
= 'terms';
590 parentpath
= '#job_'+jobid
+' ';
591 formvarname
= 'jobs['+jobid
+'][terms]';
593 var lastJobTerm
= $(parentpath
+ '.job_term:last');
594 if (lastJobTerm
.length
!= 0) {
595 termid
= parseInt(lastJobTerm
.children('input').attr('name').replace(/^(jobs\[[0-9]+\]\[terms\]|terms)\[([0-9]+)\]\[jtid\]/, '$2')) + 1;
596 if ($('#job'+jobid
+'_term'+jtid
).length
> 0) {
600 var newdiv
= '<div class="job_term" id="job'+jobid
+'_term'+jtid
+'">'+
601 '<span>'+full_name
+'</span>'+
602 '<input type="hidden" name="'+formvarname
+'['+termid
+'][jtid]" value="'+jtid
+'" />'+
603 '<img title="Retirer ce mot-clef" alt="retirer" src="images/icons/cross.gif" />'+
605 if (lastJobTerm
.length
== 0) {
606 $(parentpath
+ '.job_terms').prepend(newdiv
);
608 lastJobTerm
.after(newdiv
);
610 $('#job'+jobid
+'_term'+jtid
+' img').css('cursor','pointer').click(removeJobTerm
);
615 * Remove a job term in job profile page.
616 * Must be called from a button in a div containing the term
618 function removeJobTerm()
620 $(this).parent().remove();
624 * Prepare display for autocomplete suggestions in job terms
625 * @param row an array of (title of term, id of term)
626 * @return text to display
627 * If id is negative, it is because there are too much terms to
630 function displayJobTerm(row
)
633 return '... <em>précise ta recherche</em> ...';
639 * Function called when a job term has been selected from autocompletion
641 * @param li is the list item (<li>) that has been clicked
642 * The context is the jsquery autocomplete object.
644 function selectJobTerm(li
)
646 if (li
.extra
[0] < 0) {
649 var jobid
= this.extraParams
.jobid
;
650 addJobTerm(jobid
,li
.extra
[0],$(li
).text());
653 search_input
= $('.term_search')[0];
655 search_input
= $('#job_'+jobid
+' .term_search')[0];
657 search_input
.value
= '';
658 search_input
.focus();
662 * Function to show or hide a terms tree in job edition
663 * @param jobid is the id of the job currently edited
665 function toggleJobTermsTree(jobid
)
671 treepath
= '#job_'+jobid
+' ';
673 treepath
+= '.term_tree';
674 if ($(treepath
+ ' ul').length
> 0) {
675 $(treepath
).empty().removeClass().addClass('term_tree');
678 createJobTermsTree(treepath
, 'profile/ajax/tree/jobterms/all', 'job' + jobid
, 'chooseJobTerm');
682 * Function called when a job term is chosen from terms tree
683 * @param treeid is the full id of the tree (must look like job3)
684 * @param jtid is the id of the job term chosen
685 * @param fullname is the complete name (understandable without context) of the term
687 function chooseJobTerm(treeid
, jtid
, fullname
)
689 addJobTerm(treeid
.replace(/^job(.*)$/, '$1'), jtid
, fullname
);
694 function addSkill(cat
)
696 var val
= $('#' + cat
+ '_table').find('[name=' + cat
+ '_sel]').val();
697 var text
= $('#' + cat
+ '_table').find('[name=' + cat
+ '_sel] :selected').text();
698 $.get(platal_baseurl
+ 'profile/ajax/skill/' + cat + '/' + val
,
700 $('#' + cat
).append(data
);
701 $('#' + cat
+ '_' + val
+ '_title').text(text
);
708 function addCountry()
710 var val
= $('#countries_table').find('[name=countries_sel] :selected').val();
711 var text
= $('#countries_table').find('[name=countries_sel] :selected').text();
712 var html
= '<div id="countries_' + val
+ '" style="clear: both; margin-bottom: 0.7em">'
713 + ' <a href="javascript:removeElement(\'countries\',\'' + val
+ '\')" style="display: block; float:right">'
714 + ' <img src="images/icons/cross.gif" alt="" title="Supprimer ce pays" />'
716 + ' <div style="float: left; width: 50%">' + text
+ '</div>'
717 + ' <input type="hidden" name="countries[' + val
+ ']" value="' + text
+ '" />'
719 $('#countries').append(html
);
720 updateElement('countries');
723 function updateSubSector()
725 var s
= $('#sectorSelection').find('[name=sectorSelection]').val();
726 var ss
= $('#subSectorSelection').find("[name='jobs[-1][subSector]']").val();
727 if ((s
== '' || ss
== '') || $('#sectors_' + s
+ '_' + ss
).length
!= 0) {
728 $('#addSector').hide();
730 $('#addSector').show();
734 function removeSector(s
, ss
)
736 $('#sectors_' + s
+ '_' + ss
).remove();
740 function updateSector()
742 var sector
= $('#sectorSelection').find('[name=sectorSelection]').val();
745 $('#subSectorSelection').html('');
748 $.get(platal_baseurl
+ 'profile/ajax/sector/-1/0/0/' + sector
,
750 data
= '<a href="javascript:addSector()" style="display: none; float: right" id="addSector">'
751 + ' <img src="images/icons/add.gif" alt="Ajouter ce secteur" title="Ajouter ce secteur" />'
753 $('#subSectorSelection').html(data
);
754 $('#subSectorSelection').find("[name='jobs[-1][subSector]']").change(updateSubSector
);
760 var s
= $('#sectorSelection').find('[name=sectorSelection]').val();
761 var ss
= $('#subSectorSelection').find("[name='jobs[-1][subSector]']").val();
762 var sst
= $('#subSectorSelection').find("[name='jobs[-1][subSector]'] :selected").text();
764 var html
= '<div id="sectors_' + s
+ '_' + ss
+ '" style="clear: both; margin-top: 0.5em" class="titre">'
765 + ' <a href="javascript:removeSector(\'' + s
+ '\',\'' + ss
+ '\')" style="display: block; float: right">'
766 + ' <img src="images/icons/cross.gif" alt="" title="Supprimer ce secteur" />'
768 + ' <input type="hidden" name="sectors[' + s
+ '][' + ss
+ ']" value="' + sst
+ '" />'
771 $('#sectors').append(html
);
775 function registerEnterpriseAutocomplete(id
)
777 $(".enterpriseName").each(
779 if (id
== -1 || this.name
== "jobs[" + id
+ "][name]") {
780 $(this).autocomplete(platal_baseurl
+ "search/autocomplete/entreprise",
785 width
:$(this).width()
790 $(".sectorName").each(
792 if (id
== -1 || this.name
== "jobs[" + id
+ "][subSubSectorName]") {
793 $(this).autocomplete(platal_baseurl
+ "search/autocomplete/subSubSector",
798 width
:$(this).width()
804 // {{{1 Multiusage functions
806 function updateElement(cat
)
808 var val
= $('#' + cat
+ '_table').find('[name=' + cat
+ '_sel]').val();
809 if (val
== '' || $('#' + cat
+ '_' + val
).length
!= 0) {
810 $('#' + cat
+ '_add').hide();
812 $('#' + cat
+ '_add').show();
816 function removeElement(cat
, id
)
818 $('#' + cat
+ '_' + id
).remove();
822 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: