1 |
<?php |
2 |
/** |
3 |
* Script personnalisé pour les consultations multiples. |
4 |
* |
5 |
* @package openfoncier |
6 |
* @version SVN : $Id$ |
7 |
*/ |
8 |
|
9 |
// |
10 |
require_once "../obj/utils.class.php"; |
11 |
$f = new utils("nohtml"); |
12 |
|
13 |
// Identifiant de l'objet metier a copier |
14 |
(isset($_GET['idx']) ? $idx = $_GET['idx'] : $idx = ""); |
15 |
// Nom de l'objet metier |
16 |
(isset($_GET['obj']) ? $obj = $_GET['obj'] : $obj = ""); |
17 |
//formulaire retour |
18 |
(isset($_GET['ret']) ? $retourformulaire = $_GET['ret'] : $retourformulaire = ""); |
19 |
(isset($_GET['date_envoi']) ? $date_envoi = $_GET['date_envoi'] : $date_envoi = ""); |
20 |
|
21 |
$liste_gauche = ""; |
22 |
|
23 |
if ( isset($_GET) && isset($_GET['data']) && !empty($_GET['data']) ){ |
24 |
$f->disableLog(); |
25 |
/*Récupération des données et formatage.*/ |
26 |
$donnees_temp = explode(';', $_GET['data']); |
27 |
for ( $i = 1 ; $i < count($donnees_temp) ; $i++ ) |
28 |
$donnees[] = explode('_', $donnees_temp[$i]); |
29 |
|
30 |
/* Nombre de consultations papier à générer */ |
31 |
$nbConsPap = 0; |
32 |
|
33 |
/* Ajout des données en base de données |
34 |
* 0 : l'ID du service |
35 |
* 1 : consultation papier {0,1} |
36 |
* */ |
37 |
if ( isset($donnees) && count($donnees) > 0 ){ |
38 |
|
39 |
require_once "../core/om_dbform.class.php"; |
40 |
$om_dbform = new dbForm(); |
41 |
require_once "../obj/consultation.class.php"; |
42 |
$consultation = new consultation("]",$f->db,DEBUG); |
43 |
|
44 |
foreach ($donnees as $value) { |
45 |
|
46 |
$sql = "SELECT delai, type_consultation FROM ".DB_PREFIXE."service WHERE service = $value[0]"; |
47 |
$res = $f->db->query($sql); |
48 |
$f->isDatabaseError($res); |
49 |
$row=& $res->fetchRow(); |
50 |
$delai = $row[0]; |
51 |
$type_consultation = $row[1]; |
52 |
|
53 |
/*Calcul du delai de retour*/ |
54 |
$date_envoi_temp = $om_dbform->datePHP($date_envoi); |
55 |
$delai = $om_dbform->dateDB($consultation->moisdate($date_envoi_temp, $delai)); |
56 |
|
57 |
/*Les données à ajouter*/ |
58 |
$arrayVal = array( |
59 |
'consultation' => "]", |
60 |
'dossier' => $idx, |
61 |
'date_envoi' => $date_envoi, |
62 |
'date_retour' => NULL, |
63 |
'date_limite' => $delai, |
64 |
'service' => $value[0], |
65 |
'avis_consultation' => NULL, |
66 |
'date_reception' => NULL, |
67 |
'motivation' => "", |
68 |
'fichier' => NULL, |
69 |
'lu' => TRUE, |
70 |
'code_barres' => NULL, |
71 |
'om_final_consultation' => FALSE, |
72 |
'om_fichier_consultation' => "", |
73 |
|
74 |
); |
75 |
|
76 |
$consultation->ajouter($arrayVal, $f->db, DEBUG); |
77 |
|
78 |
/*Comptage du nombre de consultations papier demandées et récupération des ids des PDFs à éditer*/ |
79 |
if ($value[1]==1){ |
80 |
$idxConsultations[] = $consultation->valF['consultation']; |
81 |
$objConsultations[] = $type_consultation; |
82 |
$nbConsPap++; |
83 |
} |
84 |
} |
85 |
|
86 |
/*Génération du PDF*/ |
87 |
if ( isset($idxConsultations) && count($idxConsultations) > 0 ){ |
88 |
|
89 |
$textIdsConsultations = "idx="; |
90 |
foreach ($idxConsultations as $value) { |
91 |
$textIdsConsultations .= $value.";"; |
92 |
} |
93 |
$textObjConsultations = "obj="; |
94 |
foreach ($objConsultations as $value) { |
95 |
$textObjConsultations .= "consultation_".$value.";"; |
96 |
} |
97 |
echo " |
98 |
<script language='javascript' type='text/javascript'> |
99 |
$.download('../pdf/pdfetat.php?output=download','".$textObjConsultations."&".$textIdsConsultations."', 'POST', 'consultation_avec_avis_attendu'); |
100 |
</script> |
101 |
"; |
102 |
} |
103 |
/*Affichage du message d'information*/ |
104 |
$f->displayMessage("valid", count($donnees)._(' service(s) selectionne(s) dont ').$nbConsPap._(' consultation(s) papier.')); |
105 |
} |
106 |
|
107 |
} |
108 |
else { |
109 |
/*Requête qui récupère les services qui sont dans des thématiques*/ |
110 |
$sql = |
111 |
"SELECT |
112 |
ser_cat.service_categorie, ser_cat.libelle AS them_lib, |
113 |
ser.service, ser.libelle AS ser_lib, ser.consultation_papier |
114 |
FROM |
115 |
".DB_PREFIXE."lien_service_service_categorie lie, |
116 |
".DB_PREFIXE."service_categorie ser_cat, |
117 |
".DB_PREFIXE."service ser |
118 |
WHERE |
119 |
ser_cat.service_categorie = lie.service_categorie AND |
120 |
ser.service = lie.service AND |
121 |
( |
122 |
(ser.om_validite_debut IS NULL |
123 |
AND (ser.om_validite_fin IS NULL |
124 |
OR ser.om_validite_fin > CURRENT_DATE)) |
125 |
OR |
126 |
(ser.om_validite_debut <= CURRENT_DATE |
127 |
AND (ser.om_validite_fin IS NULL |
128 |
OR ser.om_validite_fin > CURRENT_DATE)) |
129 |
) |
130 |
ORDER BY them_lib, ser_lib |
131 |
"; |
132 |
|
133 |
$res = $f->db->query($sql); |
134 |
$f->addToLog("app/consultation_multiple.php: db->query(\"".$sql."\")", VERBOSE_MODE); |
135 |
$f->isDatabaseError($res); |
136 |
|
137 |
$temp_ser_cat = 0; |
138 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) { |
139 |
$name = $row['service_categorie'].'_'. |
140 |
$row['service'].'_'. |
141 |
(($row['consultation_papier'] == '' || $row['consultation_papier'] == 'f' ) ? '0' : '1' ).'_'; |
142 |
/*On change de thématique, donc rajoute le nom de la thématique*/ |
143 |
if ( $temp_ser_cat != $row['service_categorie'] ){ |
144 |
|
145 |
$temp_ser_cat = $row['service_categorie']; |
146 |
$liste_gauche .= ' |
147 |
<div id="them_'.$row['service_categorie'].'" class="liste_gauche_them" >'. |
148 |
$row['them_lib']. |
149 |
'</div> |
150 |
<div |
151 |
class="liste_gauche_service t'.$name.'" |
152 |
id="t'.$name.'" > |
153 |
'.$row['ser_lib'].' |
154 |
<input class="t'.$name.'" type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == 'f' ) ? '' : 'checked="checked"' ).'/> |
155 |
</div> |
156 |
'; |
157 |
} |
158 |
|
159 |
/*On est dans la même thématique*/ |
160 |
else { |
161 |
|
162 |
$liste_gauche .= ' |
163 |
<div |
164 |
class="liste_gauche_service t'.$name.'" |
165 |
id="t'.$name.'" > |
166 |
'.$row['ser_lib'].' |
167 |
<input class="t'.$name.'" type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == 'f' ) ? '' : 'checked="checked"' ).'/> |
168 |
</div> |
169 |
'; |
170 |
} |
171 |
|
172 |
} |
173 |
|
174 |
/*Requête qui récupère les services qui ne sont pas dans une thématique*/ |
175 |
$sql = |
176 |
"SELECT service, libelle, consultation_papier |
177 |
FROM ".DB_PREFIXE."service |
178 |
WHERE service NOT IN |
179 |
( |
180 |
SELECT service |
181 |
FROM ".DB_PREFIXE."lien_service_service_categorie |
182 |
) |
183 |
AND |
184 |
( |
185 |
om_validite_fin <= CURRENT_DATE OR |
186 |
om_validite_fin IS NULL |
187 |
) |
188 |
"; |
189 |
|
190 |
$res = $f->db->query($sql); |
191 |
$f->isDatabaseError($res); |
192 |
|
193 |
if ( $res->numrows() > 0 ) |
194 |
$liste_gauche .= ' |
195 |
<div id="them_0" class="liste_gauche_them">Autres</div>'; |
196 |
|
197 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) { |
198 |
|
199 |
/*Ajout de tous les services qui n'ont pas de thématique*/ |
200 |
$name = '0_'. |
201 |
$row['service'].'_'. |
202 |
(($row['consultation_papier'] == '' || $row['consultation_papier'] == 'f' ) ? '0' : '1' ).'_'; |
203 |
$liste_gauche .= ' |
204 |
<div |
205 |
class="liste_gauche_service t'.$name.'" |
206 |
id="t'.$name.'" > |
207 |
'.$row['libelle'].' |
208 |
<input class="t'.$name.'" type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == 'f' ) ? '' : 'checked="checked"' ).'/> |
209 |
</div> |
210 |
'; |
211 |
} |
212 |
|
213 |
/*Affichage du formulaire*/ |
214 |
echo '<div class="subtitle">'; |
215 |
echo '<h3>'; |
216 |
echo '<span class="om-icon om-icon-16 om-icon-fix arrow-right-16"></span>'; |
217 |
echo _("consultation"); |
218 |
echo '</h3>'; |
219 |
echo '</div>'; |
220 |
echo '<div class="sformulaire">'; |
221 |
echo '<form onsubmit="ajaxIt(\'consultation\', \'../app/consultation_multiple.php\');return false;" |
222 |
method="get" action="" name="f2" id="form_val">'; |
223 |
echo '<div class="formEntete ui-corner-all">'; |
224 |
echo "<div>"; |
225 |
echo '<div class="bloc">'; |
226 |
echo "<fieldset class='cadre ui-corner-all ui-widget-content'>\n"; |
227 |
echo "\t<legend class='ui-corner-all ui-widget-content ui-state-active'>". |
228 |
_("Consultation par thematique ")."</legend>"; |
229 |
echo "<div class='fieldsetContent' style='width:100%'>"; |
230 |
echo '<div class="field-ser-them field-type-hiddenstatic">'; |
231 |
echo '<div class="form-libelle">'; |
232 |
echo '<label class="libelle-dossier" for="dossier">'; |
233 |
echo _('dossier'); |
234 |
echo '<span class="not-null-tag">*</span>'; |
235 |
echo '</label>'; |
236 |
echo '</div>'; |
237 |
echo '<div class="form-content">'; |
238 |
echo '<input class="champFormulaire" type="hidden" value="'.$idx.'" name="dossier"/>'; |
239 |
echo $idx; |
240 |
echo '</div>'; |
241 |
echo '</div>'; |
242 |
/*Code du nouveau champ*/ |
243 |
echo '<div class="field-ser-them ser-them">'; |
244 |
echo '<div class="list-ser-them">'; |
245 |
echo $liste_gauche; |
246 |
echo '</div>'; |
247 |
echo '<div class="button-ser-them">'; |
248 |
echo '<ul>'; |
249 |
echo '<li>'; |
250 |
echo '<input type="button" value="'._("Ajouter").' >>" id="add-ser-them"/>'; |
251 |
echo '</li>'; |
252 |
echo '<li>'; |
253 |
echo '<input type="button" value="<< '._("Supprimer").'" id="del-ser-them"/>'; |
254 |
echo '</li>'; |
255 |
echo '</ul>'; |
256 |
echo '</div>'; |
257 |
echo '<div class="list-sel-ser-them">'; |
258 |
echo '<div class=\'row\'>'; |
259 |
echo '<div class=\'cell1 liste_droite_title list-sel-ser-them-title\'>'._('Service a consulter').'</div>'; |
260 |
echo '<div class=\'cell2 liste_droite_title list-sel-ser-them-title\'>'._('Version papier').'</div>'; |
261 |
echo '</div>'; |
262 |
echo '</div>'; |
263 |
echo '</div>'; |
264 |
/* -- FIN --*/ |
265 |
echo '<div class="field-ser-them field-type-date2">'; |
266 |
echo '<div class="form-libelle">'; |
267 |
echo '<label class="libelle-date_envoi" for="date_envoi">'; |
268 |
echo _('date_envoi'); |
269 |
echo '<span class="not-null-tag">*</span>'; |
270 |
echo '</label>'; |
271 |
echo '</div>'; |
272 |
echo '<div class="form-content">'; |
273 |
echo '<input id="date_envoi" class="champFormulaire datepicker" |
274 |
type="text" onkeyup="" onchange="fdate(this)" |
275 |
maxlength="10" size="12" value="'.date("d/m/Y").'" |
276 |
name="date_envoi">'; |
277 |
echo '</div>'; |
278 |
echo '</div>'; |
279 |
echo "</div>"; |
280 |
echo "</fieldset>"; |
281 |
echo '</div>'; |
282 |
echo '</div>'; |
283 |
echo '</div>'; |
284 |
echo '<div class="formControls">'; |
285 |
echo '<input class="om-button ui-button ui-widget ui-state-default ui-corner-all" |
286 |
type="button" onclick="if ( $(\'.liste_gauche_service_selected\').length > 0 && $(\'#date_envoi\').val() != \'\' ) { ajaxIt(\'consultation\', \'../app/consultation_multiple.php\'); } else alert(\'Veuillez choisir au moins un service et une date d envoi\');" |
287 |
value="Ajouter le(s) enregistrement(s) de la table : \'Consultation\'" |
288 |
id="button_val">'; |
289 |
echo '<a class="retour" onclick="ajaxIt(\'consultation\', \'../scr/soustab.php?obj='.$obj.'&retourformulaire='.$retourformulaire.'&idxformulaire='.$idx.'&premier=0&tricol=\');" |
290 |
href="#">'; |
291 |
echo 'Retour'; |
292 |
echo '</a>'; |
293 |
echo '</div>'; |
294 |
echo '</form>'; |
295 |
echo '</div>'; |
296 |
|
297 |
echo " |
298 |
<script language='javascript' type='text/javascript'> |
299 |
$(function(){ |
300 |
|
301 |
/* |
302 |
Sélectionne tous les services d'un thème au clique sur celui ci. |
303 |
*/ |
304 |
$('.liste_gauche_them').click( |
305 |
function(){ |
306 |
|
307 |
var id = $(this).attr('id').split('_')[1]; |
308 |
var numSer = 0; |
309 |
var numSerWithClass = 0; |
310 |
|
311 |
$('.list-ser-them div').each( |
312 |
function() { |
313 |
|
314 |
if ( $(this).attr('id').indexOf('them') == -1 && |
315 |
$(this).attr('id').indexOf(id) == 1 && |
316 |
$(this).hasClass('liste_gauche_service_selected') ) |
317 |
|
318 |
numSerWithClass++; |
319 |
|
320 |
if ( $(this).attr('id').indexOf('them') == -1 && |
321 |
$(this).attr('id').indexOf(id) == 1 ) |
322 |
|
323 |
numSer++; |
324 |
} |
325 |
); |
326 |
|
327 |
if ( numSerWithClass < numSer && numSerWithClass >= 0 ){ |
328 |
|
329 |
$('.list-ser-them div').each( |
330 |
function() { |
331 |
|
332 |
if ( $(this).attr('id').indexOf('them') == -1 && |
333 |
$(this).attr('id').indexOf(id) == 1 && |
334 |
!$(this).hasClass('liste_gauche_service_selected') ) |
335 |
|
336 |
$(this).addClass('liste_gauche_service_selected'); |
337 |
} |
338 |
); |
339 |
} |
340 |
|
341 |
else { |
342 |
|
343 |
$('.list-ser-them div').each( |
344 |
function() { |
345 |
|
346 |
if ( $(this).attr('id').indexOf('them') == -1 && |
347 |
$(this).attr('id').indexOf(id) == 1 && |
348 |
$(this).hasClass('liste_gauche_service_selected') ) |
349 |
|
350 |
$(this).removeClass('liste_gauche_service_selected'); |
351 |
} |
352 |
); |
353 |
} |
354 |
} |
355 |
); |
356 |
|
357 |
/* |
358 |
Change la class CSS d'un service sur lequel on clique dans la liste de gauche. |
359 |
*/ |
360 |
$('.liste_gauche_service').click( |
361 |
function(){ |
362 |
$(this).toggleClass('liste_gauche_service_selected'); |
363 |
} |
364 |
); |
365 |
|
366 |
/* |
367 |
Change la class CSS d'un service sur lequel on clique dans la liste de droite. |
368 |
*/ |
369 |
$('.field-ser-them').on( |
370 |
'click', |
371 |
'.cell1', |
372 |
function(){ |
373 |
if ( !$(this).hasClass('liste_droite_title') ) |
374 |
$(this).parent().toggleClass('liste_droite_service_selected'); |
375 |
} |
376 |
); |
377 |
|
378 |
$('.liste_droite_service input[type=checkbox]').live( |
379 |
'click', |
380 |
'input[type=checkbox]', |
381 |
function(){ |
382 |
|
383 |
old_id = $(this).attr('class'); |
384 |
|
385 |
tab_don = old_id.split('_'); |
386 |
|
387 |
new_id = tab_don[0] + '_' + tab_don[1] + '_' + ((tab_don[2] == 0 ) ? 1 : 0 ) + '_'; |
388 |
|
389 |
changeOneData( ';' + tab_don[1] + '_' + tab_don[2], ';' + tab_don[1] + '_' + ((tab_don[2] == 0) ? 1 : 0) ); |
390 |
$('div[class=\"' + old_id + '\"]').attr('class', new_id); |
391 |
$(this).attr('class', new_id); |
392 |
|
393 |
} |
394 |
); |
395 |
|
396 |
$('#date_envoi').change( |
397 |
function (){ |
398 |
|
399 |
var listServ = new Array(); |
400 |
var data = ''; |
401 |
|
402 |
$('.liste_gauche_service_selected').each( |
403 |
function(i) { |
404 |
|
405 |
var name = $(this).attr('name'); |
406 |
|
407 |
if ( listServ.length > 0 && listServ.indexOf(name.split('_')[1]) != -1 ) |
408 |
return; |
409 |
listServ[i] = name.split('_')[1]; |
410 |
data += ';' + name.split('_')[1] + '_' + name.split('_')[2] ; |
411 |
|
412 |
} |
413 |
); |
414 |
|
415 |
changeActionVal(data); |
416 |
} |
417 |
); |
418 |
|
419 |
/* |
420 |
Passe les services sélectionnés dans la liste de gauche dans celle de droite. |
421 |
*/ |
422 |
$('#add-ser-them').click( |
423 |
function() { |
424 |
|
425 |
changeDataLeftColumn(); |
426 |
} |
427 |
); |
428 |
|
429 |
/* |
430 |
Passe les services sélectionnés dans la liste de droite dans celle de gauche. |
431 |
*/ |
432 |
$('#del-ser-them').click( |
433 |
function() { |
434 |
|
435 |
var data = ''; |
436 |
|
437 |
//Supprime les éléments de la liste de droite |
438 |
$('.liste_droite_service_selected').each( |
439 |
function() { |
440 |
|
441 |
var name = $('#'+ $(this).attr('id') + ' .cell1 div').attr('name'); |
442 |
|
443 |
manageListServ('.list-ser-them div', name, 1); |
444 |
|
445 |
$(this).remove(); |
446 |
} |
447 |
); |
448 |
|
449 |
//Change les valeurs qui vont être renvoyées à la validation du formulaire |
450 |
$('.liste_droite_service').each( |
451 |
function(){ |
452 |
|
453 |
var name = $('#'+ $(this).attr('id') + ' .cell1 div').attr('name'); |
454 |
data += ';' + name.split('_')[1] + '_' + name.split('_')[2] ; |
455 |
} |
456 |
); |
457 |
|
458 |
changeActionVal(data); |
459 |
} |
460 |
); |
461 |
}); |
462 |
|
463 |
/* |
464 |
Vérifie que l'objet n'est pas une thématique et que son identifiant correspond. |
465 |
*/ |
466 |
function isNotthemIsOneServ( objet, id ){ |
467 |
return ( $(objet).attr('id').indexOf('them') == -1 && |
468 |
$(objet).attr('id').indexOf('_' + id.split('_')[1] + '_') != -1 ); |
469 |
} |
470 |
|
471 |
/* |
472 |
Affiche ou cache un élément qui n'est pas une thématique et dont son identifiant correspond. |
473 |
*/ |
474 |
function manageListServ( objet , name, type){ |
475 |
|
476 |
$(objet).each( |
477 |
function() { |
478 |
|
479 |
if ( isNotthemIsOneServ(this, name) ){ |
480 |
if ( type == 0 ) |
481 |
|
482 |
$(this).hide() ; |
483 |
|
484 |
else { |
485 |
|
486 |
if ( $(this).hasClass('liste_gauche_service_selected') ) |
487 |
|
488 |
$(this).toggleClass('liste_gauche_service_selected'); |
489 |
|
490 |
$(this).show() ; |
491 |
|
492 |
} |
493 |
} |
494 |
} |
495 |
); |
496 |
} |
497 |
|
498 |
/* |
499 |
Change les actions qui sont réalisées lors de la soumission du formulaire |
500 |
*/ |
501 |
function changeActionVal(data){ |
502 |
date = $('#date_envoi').val(); |
503 |
|
504 |
$('#form_val').attr( |
505 |
'onsubmit', |
506 |
'if ( $(\'.liste_gauche_service_selected\').length > 0 && $(\'#date_envoi\').val() != \'\' ) { messageIt(\'consultation\', \'../app/consultation_multiple.php?obj=$obj&data='+data+'&idx=$idx&date_envoi='+date+'\',true);return false;' + |
507 |
'messageIt(\'consultation\', \'../scr/soustab.php?obj=$obj&retourformulaire=$retourformulaire&idxformulaire=$idx&premier=0&tricol=\',false);} else alert(\'Veuillez choisir au moins un service et une date d envoi\');' |
508 |
|
509 |
); |
510 |
$('#button_val').attr( |
511 |
'onclick', |
512 |
'if ( $(\'.liste_gauche_service_selected\').length > 0 && $(\'#date_envoi\').val() != \'\' ) { messageIt(\'consultation\', \'../app/consultation_multiple.php?obj=$obj&data='+data+'&idx=$idx&date_envoi='+date+'\',true);' + |
513 |
'messageIt(\'consultation\', \'../scr/soustab.php?obj=$obj&retourformulaire=$retourformulaire&idxformulaire=$idx&premier=0&tricol=\',false);} else alert(\'Veuillez choisir au moins un service et une date d envoi\');' |
514 |
|
515 |
); |
516 |
} |
517 |
|
518 |
/* |
519 |
Change les actions qui sont réalisées lors de la soumission du formulaire |
520 |
*/ |
521 |
function changeOneData( oldData, newData) { |
522 |
|
523 |
date = $('#date_envoi').val(); |
524 |
|
525 |
$('#form_val').attr( |
526 |
'onsubmit', |
527 |
$('#form_val').attr('onsubmit').replace(oldData,newData) |
528 |
); |
529 |
$('#button_val').attr( |
530 |
'onclick', |
531 |
$('#button_val').attr('onclick').replace(oldData,newData) |
532 |
); |
533 |
} |
534 |
|
535 |
function changeDataLeftColumn(){ |
536 |
|
537 |
$('.list-sel-ser-them').empty(); |
538 |
$('.list-sel-ser-them').html( |
539 |
'<div class=\"row\">' + |
540 |
'<div class=\"cell1 liste_droite_title list-sel-ser-them-title\">Service a consulter</div>' + |
541 |
'<div class=\"cell2 liste_droite_title list-sel-ser-them-title\">Version papier</div>' + |
542 |
'</div>' |
543 |
); |
544 |
|
545 |
var listServ = new Array(); |
546 |
var data = ''; |
547 |
|
548 |
$('.liste_gauche_service_selected').each( |
549 |
function(i) { |
550 |
|
551 |
var id = $(this).attr('id'); |
552 |
|
553 |
if ( $.inArray(id.split('_')[1], listServ) != -1 ) |
554 |
return; |
555 |
|
556 |
data += ';' + id.split('_')[1] + '_' + id.split('_')[2] ; |
557 |
listServ[i] = id.split('_')[1]; |
558 |
|
559 |
$('.list-sel-ser-them').append( |
560 |
'<div id=\'s' + i + '\' class=\'row liste_droite_service\'>'+ |
561 |
'<div class=\'cell1\'>'+ |
562 |
'<div class=\'' + $(this).attr('id') + '\' name=\'' + $(this).attr('id') + '\'>'+ |
563 |
$(this).html().split('<')[0]+ |
564 |
'</div>'+ |
565 |
'</div>' + |
566 |
'<div class=\'cell2\'>'+ |
567 |
'<div>'+ |
568 |
'<input class=\'' + $(this).attr('id') + '\''+$(this).html().split('<input')[1]+ |
569 |
'</div>'+ |
570 |
'</div>'+ |
571 |
'</div>' |
572 |
); |
573 |
|
574 |
$(this).hide(); |
575 |
|
576 |
manageListServ('.list-ser-them div', id, 0); |
577 |
|
578 |
} |
579 |
); |
580 |
changeActionVal(data); |
581 |
} |
582 |
</script>"; |
583 |
} |
584 |
?> |