/[openfoncier]/trunk/app/consultation_multiple.php
ViewVC logotype

Diff of /trunk/app/consultation_multiple.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 575 by vpihour, Wed Oct 31 17:04:12 2012 UTC revision 1515 by fmichon, Tue Mar 19 18:53:12 2013 UTC
# Line 1  Line 1 
1  <?php  <?php
2  /**  /**
3  * Script personnalisé pour les consultations multiples.   * Script personnalisé pour les consultations multiples.
4  *   *
5  * @package openfoncier   * @package openfoncier
6  * @version SVN : $Id$   * @version SVN : $Id$
7  */   */
8    
9    //
10    require_once "../obj/utils.class.php";
11    $f = new utils("nohtml");
12    
     require_once "../obj/utils.class.php";  
       
13      // Identifiant de l'objet metier a copier      // Identifiant de l'objet metier a copier
14      (isset($_GET['idx']) ? $idx = $_GET['idx'] : $idx = "");      (isset($_GET['idx']) ? $idx = $_GET['idx'] : $idx = "");
15      // Nom de l'objet metier      // Nom de l'objet metier
# Line 16  Line 18 
18      (isset($_GET['ret']) ? $retourformulaire = $_GET['ret'] : $retourformulaire = "");      (isset($_GET['ret']) ? $retourformulaire = $_GET['ret'] : $retourformulaire = "");
19      (isset($_GET['date_envoi']) ? $date_envoi = $_GET['date_envoi'] : $date_envoi = "");      (isset($_GET['date_envoi']) ? $date_envoi = $_GET['date_envoi'] : $date_envoi = "");
20            
     $f = new utils("nohtml");  
   
21      $liste_gauche = "";      $liste_gauche = "";
22    
23      if ( isset($_GET) && isset($_GET['data']) && !empty($_GET['data']) ){      if ( isset($_GET) && isset($_GET['data']) && !empty($_GET['data']) ){
# Line 43  Line 43 
43                            
44              foreach ($donnees as $value) {              foreach ($donnees as $value) {
45                                    
46                  $sql = "SELECT delai FROM service WHERE service = $value[0]";                  $sql = "SELECT delai, type_consultation FROM ".DB_PREFIXE."service WHERE service = $value[0]";
47                  $res = $f->db->query($sql);                  $res = $f->db->query($sql);
48                  $f->isDatabaseError($res);                  $f->isDatabaseError($res);
49                  $row=& $res->fetchRow();                  $row=& $res->fetchRow();
50                  $delai = $row[0];                  $delai = $row[0];
51                                    $type_consultation = $row[1];
52    
53                  /*Calcul du delai de retour*/                  /*Calcul du delai de retour*/
54                  $date_envoi_temp = $om_dbform->datePHP($date_envoi);                  $date_envoi_temp = $om_dbform->datePHP($date_envoi);
55                  $delai = $om_dbform->dateDB($consultation->moisdate($date_envoi_temp, $delai));                  $delai = $om_dbform->dateDB($consultation->moisdate($date_envoi_temp, $delai));
# Line 72  Line 73 
73    
74                  /*Comptage du nombre de consultations papier demandées et récupération des ids des PDFs à éditer*/                  /*Comptage du nombre de consultations papier demandées et récupération des ids des PDFs à éditer*/
75                  if ($value[1]==1){                  if ($value[1]==1){
76                      $idxConsultations[] = $consultation->valF['consultation'];                      $idxConsultations[] = $consultation->valF['consultation'];
77                        $objConsultations[] = $type_consultation;
78                      $nbConsPap++;                      $nbConsPap++;
79                  }                  }
80              }              }
# Line 80  Line 82 
82              /*Génération du PDF*/              /*Génération du PDF*/
83              if ( isset($idxConsultations) && count($idxConsultations) > 0 ){              if ( isset($idxConsultations) && count($idxConsultations) > 0 ){
84                                    
85                  $textIdsConsultations = "";                  $textIdsConsultations = "idx=";
86                  foreach ($idxConsultations as $value)                  foreach ($idxConsultations as $value) {
87                      $textIdsConsultations .= "&idxConsultations[]=$value";                      $textIdsConsultations .= $value.";";
88                                    }
89                    $textObjConsultations = "obj=";
90                    foreach ($objConsultations as $value) {
91                        $textObjConsultations .= "consultation_".$value.";";
92                    }
93                  echo "                  echo "
94                      <script>                      <script language='javascript' type='text/javascript'>
95                          $.download('../app/pdfetat.php','obj=$obj$textIdsConsultations', 'POST', $obj);                          $.download('../pdf/pdfetat.php?output=download','".$textObjConsultations."&".$textIdsConsultations."', 'POST', 'consultation_avec_avis_attendu');
96                      </script>                      </script>
97                  ";                  ";
98              }              }
99              /*Affichage du message d'information*/              /*Affichage du message d'information*/
100              $f->displayMessage("valid", count($donnees)._(' service(s) s&eacute;lectionn&eacute;(s) dont ').$nbConsPap._(' consultation(s) papier.'));              $f->displayMessage("valid", count($donnees)._(' service(s) selectionne(s) dont ').$nbConsPap._(' consultation(s) papier.'));
101          }          }
102                    
103      }      }
# Line 102  Line 108 
108                  ser_cat.service_categorie, ser_cat.libelle AS them_lib,                  ser_cat.service_categorie, ser_cat.libelle AS them_lib,
109                  ser.service, ser.libelle AS ser_lib, ser.consultation_papier                  ser.service, ser.libelle AS ser_lib, ser.consultation_papier
110              FROM              FROM
111                  public.lien_service_service_categorie lie,                  ".DB_PREFIXE."lien_service_service_categorie lie,
112                  public.service_categorie ser_cat,                  ".DB_PREFIXE."service_categorie ser_cat,
113                  public.service ser                  ".DB_PREFIXE."service ser
114              WHERE              WHERE
115                  ser_cat.service_categorie = lie.service_categorie AND                  ser_cat.service_categorie = lie.service_categorie AND
116                  ser.service = lie.service AND                  ser.service = lie.service AND
117                  (                  (
118                      ser.om_validite_fin <= CURRENT_DATE OR                   (ser.om_validite_debut IS NULL
119                      ser.om_validite_fin IS NULL                    AND (ser.om_validite_fin IS NULL
120                           OR ser.om_validite_fin > CURRENT_DATE))
121                     OR
122                     (ser.om_validite_debut <= CURRENT_DATE
123                      AND (ser.om_validite_fin IS NULL
124                           OR ser.om_validite_fin > CURRENT_DATE))
125                  )                  )
126                ORDER BY them_lib, ser_lib
127              ";              ";
128                    
129          $res = $f->db->query($sql);          $res = $f->db->query($sql);
130            $f->addToLog("app/consultation_multiple.php: db->query(\"".$sql."\")", VERBOSE_MODE);
131          $f->isDatabaseError($res);          $f->isDatabaseError($res);
132                    
133          $temp_ser_cat = 0;          $temp_ser_cat = 0;
134          while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) {          while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
135              $name = $row['service_categorie'].'_'.              $name = $row['service_categorie'].'_'.
136                      $row['service'].'_'.                      $row['service'].'_'.
137                      (($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '0' : '1' ).'_';                      (($row['consultation_papier'] == '' || $row['consultation_papier'] == 'f' ) ? '0' : '1' ).'_';
138              /*On change de thématique, donc rajoute le nom de la thématique*/              /*On change de thématique, donc rajoute le nom de la thématique*/
139              if ( $temp_ser_cat != $row['service_categorie'] ){              if ( $temp_ser_cat != $row['service_categorie'] ){
140                                    
# Line 131  Line 144 
144                      $row['them_lib'].                      $row['them_lib'].
145                  '</div>                  '</div>
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'] == 'f' ) ? '' : 'checked="checked"' ).'/>
151                      </div>                      </div>
152                  ';                  ';
153              }              }
# Line 144  Line 157 
157                                    
158                  $liste_gauche .= '                  $liste_gauche .= '
159                      <div                      <div
160                          class="liste_gauche_service '.$name.'"                          class="liste_gauche_service t'.$name.'"
161                          id="'.$name.'" >                          id="t'.$name.'" >
162                          '.$row['ser_lib'].'                          '.$row['ser_lib'].'
163                          <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'] == 'f' ) ? '' : 'checked="checked"' ).'/>
164                      </div>                      </div>
165                  ';                  ';
166              }              }
# Line 157  Line 170 
170          /*Requête qui récupère les services qui ne sont pas dans une thématique*/          /*Requête qui récupère les services qui ne sont pas dans une thématique*/
171          $sql =          $sql =
172              "SELECT service, libelle, consultation_papier              "SELECT service, libelle, consultation_papier
173              FROM public.service              FROM ".DB_PREFIXE."service
174              WHERE service NOT IN              WHERE service NOT IN
175                  (                  (
176                      SELECT service                      SELECT service
177                      FROM lien_service_service_categorie                      FROM ".DB_PREFIXE."lien_service_service_categorie
178                  )                  )
179                   AND                   AND
180                  (                  (
# Line 172  Line 185 
185                    
186          $res = $f->db->query($sql);          $res = $f->db->query($sql);
187          $f->isDatabaseError($res);          $f->isDatabaseError($res);
188                
189          if ( $res->numrows() > 0 )          if ( $res->numrows() > 0 )
190              $liste_gauche .= '              $liste_gauche .= '
191                  <div id="them_0" class="liste_gauche_them">Autres</div>';                  <div id="them_0" class="liste_gauche_them">Autres</div>';
192                    
193          while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) {          while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
194                
195              /*Ajout de tous les services qui n'ont pas de thématique*/              /*Ajout de tous les services qui n'ont pas de thématique*/
196              $name = '0_'.              $name = '0_'.
197                      $row['service'].'_'.                      $row['service'].'_'.
198                      (($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '0' : '1' ).'_';                      (($row['consultation_papier'] == '' || $row['consultation_papier'] == 'f'  ) ? '0' : '1' ).'_';
199              $liste_gauche .= '              $liste_gauche .= '
200                  <div                  <div
201                      class="liste_gauche_service '.$name.'"                      class="liste_gauche_service t'.$name.'"
202                      id="'.$name.'" >                      id="t'.$name.'" >
203                      '.$row['libelle'].'&nbsp;                      '.$row['libelle'].'&nbsp;
204                      <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'] == 'f' ) ? '' : 'checked="checked"' ).'/>
205                  </div>                  </div>
206              ';              ';
207          }          }
# Line 204  Line 218 
218              echo '<form onsubmit="ajaxIt(\'consultation\', \'../app/consultation_multiple.php\');return false;"              echo '<form onsubmit="ajaxIt(\'consultation\', \'../app/consultation_multiple.php\');return false;"
219                    method="get" action="" name="f2" id="form_val">';                    method="get" action="" name="f2" id="form_val">';
220                  echo '<div class="formEntete ui-corner-all">';                  echo '<div class="formEntete ui-corner-all">';
221                      echo "<div id='form-content'>";                      echo "<div>";
222                          echo '<div class="bloc">';                          echo '<div class="bloc">';
223                              echo "<fieldset class='cadre ui-corner-all ui-widget-content'>\n";                              echo "<fieldset class='cadre ui-corner-all ui-widget-content'>\n";
224                                  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'>".
225                                      _("Consultation par th&eacute;matique ")."</legend>";                                      _("Consultation par thematique ")."</legend>";
226                                  echo "<div class='fieldsetContent' style='width:100%'>";                                  echo "<div class='fieldsetContent' style='width:100%'>";
227                                      echo '<div class="field-ser-them field-type-hiddenstatic">';                                      echo '<div class="field-ser-them field-type-hiddenstatic">';
228                                          echo '<div class="form-libelle">';                                          echo '<div class="form-libelle">';
# Line 218  Line 232 
232                                              echo '</label>';                                              echo '</label>';
233                                          echo '</div>';                                          echo '</div>';
234                                          echo '<div class="form-content">';                                          echo '<div class="form-content">';
235                                              echo '<input id="dossier" class="champFormulaire" type="hidden" value="'.$idx.'" name="dossier">';                                              echo '<input class="champFormulaire" type="hidden" value="'.$idx.'" name="dossier"/>';
236                                              echo $idx;                                              echo $idx;
237                                          echo '</div>';                                          echo '</div>';
238                                      echo '</div>';                                      echo '</div>';
# Line 239  Line 253 
253                                          echo '</div>';                                          echo '</div>';
254                                          echo '<div class="list-sel-ser-them">';                                          echo '<div class="list-sel-ser-them">';
255                                              echo '<div class=\'row\'>';                                              echo '<div class=\'row\'>';
256                                                  echo '<div class=\'cell1 liste_gauche_them\' id=\'list-sel-ser-them-title\'>'._('Service à consulter').'</div>';                                                  echo '<div class=\'cell1 liste_droite_title list-sel-ser-them-title\'>'._('Service a consulter').'</div>';
257                                                  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>';
258                                              echo '</div>';                                              echo '</div>';
259                                          echo '</div>';                                          echo '</div>';
260                                      echo '</div>';                                      echo '</div>';
# Line 268  Line 282 
282                      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"
283                            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\');"
284                            value="Ajouter le(s) enregistrement(s) de la table : \'Consultation\'"                            value="Ajouter le(s) enregistrement(s) de la table : \'Consultation\'"
285                            role="button" aria-disabled="false" id="button_val">';                            id="button_val">';
286                      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=\');"
287                            href="#">';                            href="#">';
288                         echo 'Retour';                         echo 'Retour';
# Line 278  Line 292 
292          echo '</div>';          echo '</div>';
293                    
294          echo "          echo "
295          <script>          <script language='javascript' type='text/javascript'>
296              $(function(){              $(function(){
297                    
298                  /*                  /*
299                      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.
300                  */                  */
# Line 287  Line 302 
302                      function(){                      function(){
303                                                    
304                          var id = $(this).attr('id').split('_')[1];                          var id = $(this).attr('id').split('_')[1];
305                            var numSer = 0;
306                            var numSerWithClass = 0;
307                            
308                          $('.list-ser-them div').each(                          $('.list-ser-them div').each(
309                              function() {                              function() {
310                                            
311                                    if ( $(this).attr('id').indexOf('them') == -1 &&
312                                         $(this).attr('id').indexOf(id) == 1  &&
313                                         $(this).hasClass('liste_gauche_service_selected') )
314                                        
315                                         numSerWithClass++;                                    
316                                                                    
317                                  if ( $(this).attr('id').indexOf('them') == -1 &&                                  if ( $(this).attr('id').indexOf('them') == -1 &&
318                                       $(this).attr('id').indexOf(id) == 0  ){                                       $(this).attr('id').indexOf(id) == 1  )
319                                      $(this).toggleClass('liste_gauche_service_selected');                                      
320                                  }                                      numSer++;
321                              }                              }
322                          );                          );
323                            
324                            if ( numSerWithClass < numSer && numSerWithClass >= 0 ){
325                            
326                                 $('.list-ser-them div').each(
327                                    function() {
328                                        
329                                        if ( $(this).attr('id').indexOf('them') == -1 &&
330                                         $(this).attr('id').indexOf(id) == 1 &&
331                                         !$(this).hasClass('liste_gauche_service_selected') )
332                                        
333                                            $(this).addClass('liste_gauche_service_selected');
334                                    }
335                                );
336                            }
337                            
338                            else {
339                                
340                                $('.list-ser-them div').each(
341                                    function() {
342                                        
343                                       if ( $(this).attr('id').indexOf('them') == -1 &&
344                                        $(this).attr('id').indexOf(id) == 1  &&
345                                        $(this).hasClass('liste_gauche_service_selected') )
346                                        
347                                           $(this).removeClass('liste_gauche_service_selected');
348                                    }
349                               );
350                            }
351                      }                      }
352                  );                  );
353                                    
# Line 313  Line 365 
365                  */                  */
366                  $('.field-ser-them').on(                  $('.field-ser-them').on(
367                      'click',                      'click',
368                      '.liste_droite_service',                      '.cell1',
369                      function(){                      function(){
370                          $(this).toggleClass('liste_droite_service_selected');                          if ( !$(this).hasClass('liste_droite_title') )
371                                $(this).parent().toggleClass('liste_droite_service_selected');
372                      }                      }
373                  );                  );
374                                    
# Line 324  Line 377 
377                      'input[type=checkbox]',                      'input[type=checkbox]',
378                      function(){                      function(){
379                                                    
380                          old_id = $(this).attr('id');                          old_id = $(this).attr('class');
381                                                    
382                          tab_don = old_id.split('_');                          tab_don = old_id.split('_');
383                                                    
384                          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 ) + '_';
385    
386                          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) );
387                          $('div[name=\"' + $(this).attr('class') + '\"]').attr('id', new_id);                          $('div[class=\"' + old_id + '\"]').attr('class', new_id);
388                          $(this).attr('id', new_id);                          $(this).attr('class', new_id);
389    
390                      }                      }
391                  );                  );
# Line 346  Line 399 
399                          $('.liste_gauche_service_selected').each(                          $('.liste_gauche_service_selected').each(
400                              function(i) {                              function(i) {
401                                                                    
402                                  var id = $(this).attr('id');                                  var name = $(this).attr('name');
403                                                                    
404                                                                    if ( listServ.length > 0 && listServ.indexOf(name.split('_')[1]) != -1 )
                                 if ( listServ.length > 0 && listServ.indexOf(id.split('_')[1]) != -1 )  
405                                      return;                                      return;
406                                  listServ[i] = id.split('_')[1];                                  listServ[i] = name.split('_')[1];
407                                  data += ';' + id.split('_')[1] + '_' + id.split('_')[2] ;                                  data += ';' + name.split('_')[1] + '_' + name.split('_')[2] ;
408                                                                    
409                              }                              }
410                          );                          );
# Line 382  Line 434 
434                          $('.liste_droite_service_selected').each(                          $('.liste_droite_service_selected').each(
435                              function() {                              function() {
436                                                                    
437                                  var id = $('#'+ $(this).attr('id') + ' .cell1 div').attr('id');                                  var name = $('#'+ $(this).attr('id') + ' .cell1 div').attr('name');
438                                                                    
439                                  manageListServ('.list-ser-them div', id, 1);                                  manageListServ('.list-ser-them div', name, 1);
440                                  data += ';' + id.split('_')[1] + '_' + id.split('_')[2] ;                                  data += ';' + name.split('_')[1] + '_' + name.split('_')[2] ;
441                                                                    
442                                  $(this).remove();                                  $(this).remove();
443                              }                              }
# Line 407  Line 459 
459              /*              /*
460                  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.
461              */              */
462              function manageListServ( objet ,id, type){              function manageListServ( objet , name, type){
463            
464                  $(objet).each(                  $(objet).each(
465                      function() {                      function() {
466                                                    
467                          if ( isNotthemIsOneServ(this, id) ){                          if ( isNotthemIsOneServ(this, name) ){
468                              if ( type == 0 )                              if ( type == 0 )
469                                                            
470                                  $(this).hide() ;                                  $(this).hide() ;
# Line 431  Line 483 
483                  );                  );
484              }              }
485                            
486                /*
487                    Change les actions qui sont réalisées lors de la soumission du formulaire
488                */
489              function changeActionVal(data){              function changeActionVal(data){
490                  date = $('#date_envoi').val();                  date = $('#date_envoi').val();
491                                    
# Line 447  Line 502 
502                                            
503                  );                  );
504              }              }
505                
506                /*
507                    Change les actions qui sont réalisées lors de la soumission du formulaire
508                */
509              function changeOneData( oldData, newData) {              function changeOneData( oldData, newData) {
510                                    
511                  date = $('#date_envoi').val();                  date = $('#date_envoi').val();
# Line 464  Line 522 
522                            
523              function changeDataLeftColumn(){              function changeDataLeftColumn(){
524                                    
525                    $('.list-sel-ser-them').empty();
526                    $('.list-sel-ser-them').html(
527                        '<div class=\"row\">' +
528                            '<div class=\"cell1 liste_droite_title list-sel-ser-them-title\">Service a consulter</div>' +
529                            '<div class=\"cell2 liste_droite_title list-sel-ser-them-title\">Version papier</div>' +
530                        '</div>'
531                    );
532                    
533                  var listServ = new Array();                  var listServ = new Array();
534                  var data = '';                  var data = '';
535                                                    
                 if ( $('.liste_droite_service').length == 0 ){  
                     $('.list-sel-ser-them').empty();  
                     $('.list-sel-ser-them').append(''+  
                                 '<div class=\'row\'>'+  
                                     '<div class=\'cell1 liste_gauche_them\' id=\'list-sel-ser-them-title\'>"._('Service à consulter')."</div>'+  
                                     '<div class=\'cell2 liste_gauche_them\' id=\'list-sel-ser-them-title\'>"._('Version papier')."</div>'+  
                                 '</div>') ;  
                 }  
                   
536                  $('.liste_gauche_service_selected').each(                  $('.liste_gauche_service_selected').each(
537                      function(i) {                      function(i) {
538                                                    
                         if ( !$(this).is(':visible') )  
                             return;  
                               
539                          var id = $(this).attr('id');                          var id = $(this).attr('id');
540                                                    
541                          if ( listServ.length > 0 && listServ.indexOf(id.split('_')[1]) != -1 )                          if ( $.inArray(id.split('_')[1], listServ) != -1 )                            
542                              return;                              return;
543                          listServ[i] = id.split('_')[1];                          
544                          data += ';' + id.split('_')[1] + '_' + id.split('_')[2] ;                          data += ';' + id.split('_')[1] + '_' + id.split('_')[2] ;
545                            listServ[i] = id.split('_')[1];
546                                                    
547                          $('.list-sel-ser-them').append(                          $('.list-sel-ser-them').append(
548                              '<div class=\'row liste_droite_service\' id=\'' + i + '\'>'+                              '<div id=\'s' + i + '\' class=\'row liste_droite_service\'>'+
549                                  '<div class=\'cell1\'>'+                                  '<div class=\'cell1\'>'+
550                                      '<div name=\'' + $(this).attr('id') + '\' id=\'' + $(this).attr('id') + '\'>'+                                      '<div class=\'' + $(this).attr('id') + '\' name=\'' + $(this).attr('id') + '\'>'+
551                                          $(this).html().split('<')[0]+                                          $(this).html().split('<')[0]+
552                                      '</div>'+                                      '</div>'+
553                                  '</div>' +                                  '</div>' +
# Line 510  Line 565 
565                                                    
566                      }                      }
567                  );                  );
   
568                  changeActionVal(data);                  changeActionVal(data);
569              }              }
570          </script>";          </script>";

Legend:
Removed from v.575  
changed lines
  Added in v.1515

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26