85 |
$textIdsConsultations .= "&idxConsultations[]=$value"; |
$textIdsConsultations .= "&idxConsultations[]=$value"; |
86 |
|
|
87 |
echo " |
echo " |
88 |
<script> |
<script language='javascript' type='text/javascript'> |
89 |
$.download('../app/pdfetat.php','obj=$obj$textIdsConsultations', 'POST', $obj); |
$.download('../app/pdfetat.php','obj=$obj$textIdsConsultations', 'POST', $obj); |
90 |
</script> |
</script> |
91 |
"; |
"; |
92 |
} |
} |
93 |
/*Affichage du message d'information*/ |
/*Affichage du message d'information*/ |
94 |
$f->displayMessage("valid", count($donnees)._(' service(s) sélectionné(s) dont ').$nbConsPap._(' consultation(s) papier.')); |
$f->displayMessage("valid", count($donnees)._(' service(s) selectionne(s) dont ').$nbConsPap._(' consultation(s) papier.')); |
95 |
} |
} |
96 |
|
|
97 |
} |
} |
131 |
$row['them_lib']. |
$row['them_lib']. |
132 |
'</div> |
'</div> |
133 |
<div |
<div |
134 |
class="liste_gauche_service '.$name.'" |
class="liste_gauche_service t'.$name.'" |
135 |
id="'.$name.'" > |
id="t'.$name.'" > |
136 |
'.$row['ser_lib'].' |
'.$row['ser_lib'].' |
137 |
<input id="'.$name.'" type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '' : 'checked' ).'/> |
<input class="t'.$name.'" type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '' : 'checked="checked"' ).'/> |
138 |
</div> |
</div> |
139 |
'; |
'; |
140 |
} |
} |
144 |
|
|
145 |
$liste_gauche .= ' |
$liste_gauche .= ' |
146 |
<div |
<div |
147 |
class="liste_gauche_service '.$name.'" |
class="liste_gauche_service t'.$name.'" |
148 |
id="'.$name.'" > |
id="t'.$name.'" > |
149 |
'.$row['ser_lib'].' |
'.$row['ser_lib'].' |
150 |
<input id="'.$name.'" type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '' : 'checked' ).'/> |
<input class="t'.$name.'" type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '' : 'checked="checked"' ).'/> |
151 |
</div> |
</div> |
152 |
'; |
'; |
153 |
} |
} |
184 |
(($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '0' : '1' ).'_'; |
(($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '0' : '1' ).'_'; |
185 |
$liste_gauche .= ' |
$liste_gauche .= ' |
186 |
<div |
<div |
187 |
class="liste_gauche_service '.$name.'" |
class="liste_gauche_service t'.$name.'" |
188 |
id="'.$name.'" > |
id="t'.$name.'" > |
189 |
'.$row['libelle'].' |
'.$row['libelle'].' |
190 |
<input id="'.$name.'" type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '' : 'checked' ).'/> |
<input class="t'.$name.'" type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '' : 'checked="checked"' ).'/> |
191 |
</div> |
</div> |
192 |
'; |
'; |
193 |
} |
} |
204 |
echo '<form onsubmit="ajaxIt(\'consultation\', \'../app/consultation_multiple.php\');return false;" |
echo '<form onsubmit="ajaxIt(\'consultation\', \'../app/consultation_multiple.php\');return false;" |
205 |
method="get" action="" name="f2" id="form_val">'; |
method="get" action="" name="f2" id="form_val">'; |
206 |
echo '<div class="formEntete ui-corner-all">'; |
echo '<div class="formEntete ui-corner-all">'; |
207 |
echo "<div id='form-content'>"; |
echo "<div>"; |
208 |
echo '<div class="bloc">'; |
echo '<div class="bloc">'; |
209 |
echo "<fieldset class='cadre ui-corner-all ui-widget-content'>\n"; |
echo "<fieldset class='cadre ui-corner-all ui-widget-content'>\n"; |
210 |
echo "\t<legend class='ui-corner-all ui-widget-content ui-state-active'>". |
echo "\t<legend class='ui-corner-all ui-widget-content ui-state-active'>". |
211 |
_("Consultation par thématique ")."</legend>"; |
_("Consultation par thematique ")."</legend>"; |
212 |
echo "<div class='fieldsetContent' style='width:100%'>"; |
echo "<div class='fieldsetContent' style='width:100%'>"; |
213 |
echo '<div class="field-ser-them field-type-hiddenstatic">'; |
echo '<div class="field-ser-them field-type-hiddenstatic">'; |
214 |
echo '<div class="form-libelle">'; |
echo '<div class="form-libelle">'; |
218 |
echo '</label>'; |
echo '</label>'; |
219 |
echo '</div>'; |
echo '</div>'; |
220 |
echo '<div class="form-content">'; |
echo '<div class="form-content">'; |
221 |
echo '<input id="dossier" class="champFormulaire" type="hidden" value="'.$idx.'" name="dossier">'; |
echo '<input class="champFormulaire" type="hidden" value="'.$idx.'" name="dossier"/>'; |
222 |
echo $idx; |
echo $idx; |
223 |
echo '</div>'; |
echo '</div>'; |
224 |
echo '</div>'; |
echo '</div>'; |
239 |
echo '</div>'; |
echo '</div>'; |
240 |
echo '<div class="list-sel-ser-them">'; |
echo '<div class="list-sel-ser-them">'; |
241 |
echo '<div class=\'row\'>'; |
echo '<div class=\'row\'>'; |
242 |
echo '<div class=\'cell1 liste_gauche_them\' id=\'list-sel-ser-them-title\'>'._('Service a consulter').'</div>'; |
echo '<div class=\'cell1 liste_droite_title list-sel-ser-them-title\'>'._('Service a consulter').'</div>'; |
243 |
echo '<div class=\'cell2 liste_gauche_them\' id=\'list-sel-ser-them-title\'>'._('Version papier').'</div>'; |
echo '<div class=\'cell2 liste_droite_title list-sel-ser-them-title\'>'._('Version papier').'</div>'; |
244 |
echo '</div>'; |
echo '</div>'; |
245 |
echo '</div>'; |
echo '</div>'; |
246 |
echo '</div>'; |
echo '</div>'; |
268 |
echo '<input class="om-button ui-button ui-widget ui-state-default ui-corner-all" |
echo '<input class="om-button ui-button ui-widget ui-state-default ui-corner-all" |
269 |
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\');" |
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\');" |
270 |
value="Ajouter le(s) enregistrement(s) de la table : \'Consultation\'" |
value="Ajouter le(s) enregistrement(s) de la table : \'Consultation\'" |
271 |
role="button" aria-disabled="false" id="button_val">'; |
id="button_val">'; |
272 |
echo '<a class="retour" onclick="ajaxIt(\'consultation\', \'../scr/soustab.php?obj='.$obj.'&retourformulaire='.$retourformulaire.'&idxformulaire='.$idx.'&premier=0&tricol=\');" |
echo '<a class="retour" onclick="ajaxIt(\'consultation\', \'../scr/soustab.php?obj='.$obj.'&retourformulaire='.$retourformulaire.'&idxformulaire='.$idx.'&premier=0&tricol=\');" |
273 |
href="#">'; |
href="#">'; |
274 |
echo 'Retour'; |
echo 'Retour'; |
278 |
echo '</div>'; |
echo '</div>'; |
279 |
|
|
280 |
echo " |
echo " |
281 |
<script> |
<script language='javascript' type='text/javascript'> |
282 |
$(function(){ |
$(function(){ |
283 |
|
|
284 |
/* |
/* |
285 |
Sélectionne tous les services d'un thème au clique sur celui ci. |
Sélectionne tous les services d'un thème au clique sur celui ci. |
286 |
*/ |
*/ |
295 |
function() { |
function() { |
296 |
|
|
297 |
if ( $(this).attr('id').indexOf('them') == -1 && |
if ( $(this).attr('id').indexOf('them') == -1 && |
298 |
$(this).attr('id').indexOf(id) == 0 && |
$(this).attr('id').indexOf(id) == 1 && |
299 |
$(this).hasClass('liste_gauche_service_selected') ) |
$(this).hasClass('liste_gauche_service_selected') ) |
300 |
|
|
301 |
numSerWithClass++; |
numSerWithClass++; |
302 |
|
|
303 |
if ( $(this).attr('id').indexOf('them') == -1 && |
if ( $(this).attr('id').indexOf('them') == -1 && |
304 |
$(this).attr('id').indexOf(id) == 0 ) |
$(this).attr('id').indexOf(id) == 1 ) |
305 |
|
|
306 |
numSer++; |
numSer++; |
307 |
} |
} |
313 |
function() { |
function() { |
314 |
|
|
315 |
if ( $(this).attr('id').indexOf('them') == -1 && |
if ( $(this).attr('id').indexOf('them') == -1 && |
316 |
$(this).attr('id').indexOf(id) == 0 && |
$(this).attr('id').indexOf(id) == 1 && |
317 |
!$(this).hasClass('liste_gauche_service_selected') ) |
!$(this).hasClass('liste_gauche_service_selected') ) |
318 |
|
|
319 |
$(this).addClass('liste_gauche_service_selected'); |
$(this).addClass('liste_gauche_service_selected'); |
327 |
function() { |
function() { |
328 |
|
|
329 |
if ( $(this).attr('id').indexOf('them') == -1 && |
if ( $(this).attr('id').indexOf('them') == -1 && |
330 |
$(this).attr('id').indexOf(id) == 0 && |
$(this).attr('id').indexOf(id) == 1 && |
331 |
$(this).hasClass('liste_gauche_service_selected') ) |
$(this).hasClass('liste_gauche_service_selected') ) |
332 |
|
|
333 |
$(this).removeClass('liste_gauche_service_selected'); |
$(this).removeClass('liste_gauche_service_selected'); |
353 |
'click', |
'click', |
354 |
'.cell1', |
'.cell1', |
355 |
function(){ |
function(){ |
356 |
$(this).parent().toggleClass('liste_droite_service_selected'); |
if ( !$(this).hasClass('liste_droite_title') ) |
357 |
|
$(this).parent().toggleClass('liste_droite_service_selected'); |
358 |
} |
} |
359 |
); |
); |
360 |
|
|
363 |
'input[type=checkbox]', |
'input[type=checkbox]', |
364 |
function(){ |
function(){ |
365 |
|
|
366 |
old_id = $(this).attr('id'); |
old_id = $(this).attr('class'); |
367 |
|
|
368 |
tab_don = old_id.split('_'); |
tab_don = old_id.split('_'); |
369 |
|
|
370 |
new_id = tab_don[0] + '_' + tab_don[1] + '_' + ((tab_don[2] == 0 ) ? 1 : 0 ) + '_'; |
new_id = tab_don[0] + '_' + tab_don[1] + '_' + ((tab_don[2] == 0 ) ? 1 : 0 ) + '_'; |
371 |
|
|
372 |
changeOneData( ';' + tab_don[1] + '_' + tab_don[2], ';' + tab_don[1] + '_' + ((tab_don[2] == 0) ? 1 : 0) ); |
changeOneData( ';' + tab_don[1] + '_' + tab_don[2], ';' + tab_don[1] + '_' + ((tab_don[2] == 0) ? 1 : 0) ); |
373 |
$('div[name=\"' + $(this).attr('class') + '\"]').attr('id', new_id); |
$('div[class=\"' + old_id + '\"]').attr('class', new_id); |
374 |
$(this).attr('id', new_id); |
$(this).attr('class', new_id); |
375 |
|
|
376 |
} |
} |
377 |
); |
); |
385 |
$('.liste_gauche_service_selected').each( |
$('.liste_gauche_service_selected').each( |
386 |
function(i) { |
function(i) { |
387 |
|
|
388 |
var id = $(this).attr('id'); |
var name = $(this).attr('name'); |
389 |
|
|
390 |
if ( listServ.length > 0 && listServ.indexOf(id.split('_')[1]) != -1 ) |
if ( listServ.length > 0 && listServ.indexOf(name.split('_')[1]) != -1 ) |
391 |
return; |
return; |
392 |
listServ[i] = id.split('_')[1]; |
listServ[i] = name.split('_')[1]; |
393 |
data += ';' + id.split('_')[1] + '_' + id.split('_')[2] ; |
data += ';' + name.split('_')[1] + '_' + name.split('_')[2] ; |
394 |
|
|
395 |
} |
} |
396 |
); |
); |
420 |
$('.liste_droite_service_selected').each( |
$('.liste_droite_service_selected').each( |
421 |
function() { |
function() { |
422 |
|
|
423 |
var id = $('#'+ $(this).attr('id') + ' .cell1 div').attr('id'); |
var name = $('#'+ $(this).attr('id') + ' .cell1 div').attr('name'); |
424 |
|
|
425 |
manageListServ('.list-ser-them div', id, 1); |
manageListServ('.list-ser-them div', name, 1); |
426 |
data += ';' + id.split('_')[1] + '_' + id.split('_')[2] ; |
data += ';' + name.split('_')[1] + '_' + name.split('_')[2] ; |
427 |
|
|
428 |
$(this).remove(); |
$(this).remove(); |
429 |
} |
} |
445 |
/* |
/* |
446 |
Affiche ou cache un élément qui n'est pas une thématique et dont son identifiant correspond. |
Affiche ou cache un élément qui n'est pas une thématique et dont son identifiant correspond. |
447 |
*/ |
*/ |
448 |
function manageListServ( objet ,id, type){ |
function manageListServ( objet , name, type){ |
449 |
|
|
450 |
$(objet).each( |
$(objet).each( |
451 |
function() { |
function() { |
452 |
|
|
453 |
if ( isNotthemIsOneServ(this, id) ){ |
if ( isNotthemIsOneServ(this, name) ){ |
454 |
if ( type == 0 ) |
if ( type == 0 ) |
455 |
|
|
456 |
$(this).hide() ; |
$(this).hide() ; |
515 |
$('.list-sel-ser-them').empty(); |
$('.list-sel-ser-them').empty(); |
516 |
$('.list-sel-ser-them').append(''+ |
$('.list-sel-ser-them').append(''+ |
517 |
'<div class=\'row\'>'+ |
'<div class=\'row\'>'+ |
518 |
'<div class=\'cell1 liste_gauche_them\' id=\'list-sel-ser-them-title\'>"._('Service a consulter')."</div>'+ |
'<div class=\'cell1 liste_droite_title list-sel-ser-them-title\'>"._('Service a consulter')."</div>'+ |
519 |
'<div class=\'cell2 liste_gauche_them\' id=\'list-sel-ser-them-title\'>"._('Version papier')."</div>'+ |
'<div class=\'cell2 liste_droite_title list-sel-ser-them-title\'>"._('Version papier')."</div>'+ |
520 |
'</div>') ; |
'</div>') ; |
521 |
} |
} |
522 |
|
|
523 |
$('.liste_gauche_service_selected').each( |
$('.liste_gauche_service_selected').each( |
524 |
function(i) { |
function(i) { |
525 |
|
|
526 |
|
var id = $(this).attr('id'); |
527 |
|
data += ';' + id.split('_')[1] + '_' + id.split('_')[2] ; |
528 |
|
|
529 |
if ( !$(this).is(':visible') ) |
if ( !$(this).is(':visible') ) |
530 |
return; |
return; |
|
|
|
|
var id = $(this).attr('id'); |
|
531 |
|
|
532 |
if ( listServ.length > 0 && listServ.indexOf(id.split('_')[1]) != -1 ) |
if ( listServ.length > 0 && listServ.indexOf(id.split('_')[1]) != -1 ) |
533 |
return; |
return; |
534 |
listServ[i] = id.split('_')[1]; |
listServ[i] = id.split('_')[1]; |
535 |
data += ';' + id.split('_')[1] + '_' + id.split('_')[2] ; |
|
536 |
|
|
537 |
$('.list-sel-ser-them').append( |
$('.list-sel-ser-them').append( |
538 |
'<div class=\'row liste_droite_service\' id=\'' + i + '\'>'+ |
'<div id=\'s' + i + '\' class=\'row liste_droite_service\'>'+ |
539 |
'<div class=\'cell1\'>'+ |
'<div class=\'cell1\'>'+ |
540 |
'<div name=\'' + $(this).attr('id') + '\' id=\'' + $(this).attr('id') + '\'>'+ |
'<div class=\'' + $(this).attr('id') + '\' name=\'' + $(this).attr('id') + '\'>'+ |
541 |
$(this).html().split('<')[0]+ |
$(this).html().split('<')[0]+ |
542 |
'</div>'+ |
'</div>'+ |
543 |
'</div>' + |
'</div>' + |