/[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 579 by nhaye, Fri Nov 2 13:36:51 2012 UTC
# Line 239  Line 239 
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 à consulter').'</div>';                                                  echo '<div class=\'cell1 liste_gauche_them\' id=\'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_gauche_them\' id=\'list-sel-ser-them-title\'>'._('Version papier').'</div>';
244                                              echo '</div>';                                              echo '</div>';
245                                          echo '</div>';                                          echo '</div>';
# Line 287  Line 287 
287                      function(){                      function(){
288                                                    
289                          var id = $(this).attr('id').split('_')[1];                          var id = $(this).attr('id').split('_')[1];
290                            var numSer = 0;
291                            var numSerWithClass = 0;
292                            
293                          $('.list-ser-them div').each(                          $('.list-ser-them div').each(
294                              function() {                              function() {
295                                            
296                                    if ( $(this).attr('id').indexOf('them') == -1 &&
297                                         $(this).attr('id').indexOf(id) == 0  &&
298                                         $(this).hasClass('liste_gauche_service_selected') )
299                                        
300                                         numSerWithClass++;                                    
301                                                                    
302                                  if ( $(this).attr('id').indexOf('them') == -1 &&                                  if ( $(this).attr('id').indexOf('them') == -1 &&
303                                       $(this).attr('id').indexOf(id) == 0  ){                                       $(this).attr('id').indexOf(id) == 0  )
304                                      $(this).toggleClass('liste_gauche_service_selected');                                      
305                                  }                                      numSer++;
306                              }                              }
307                          );                          );
308                            
309                            if ( numSerWithClass < numSer && 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) == 0 &&
316                                         !$(this).hasClass('liste_gauche_service_selected') )
317                                        
318                                            $(this).addClass('liste_gauche_service_selected');
319                                    }
320                                );
321                            }
322                            
323                            else {
324                                
325                                $('.list-ser-them div').each(
326                                    function() {
327                                        
328                                       if ( $(this).attr('id').indexOf('them') == -1 &&
329                                        $(this).attr('id').indexOf(id) == 0  &&
330                                        $(this).hasClass('liste_gauche_service_selected') )
331                                        
332                                           $(this).removeClass('liste_gauche_service_selected');
333                                    }
334                               );
335                            }
336                      }                      }
337                  );                  );
338                                    
# Line 313  Line 350 
350                  */                  */
351                  $('.field-ser-them').on(                  $('.field-ser-them').on(
352                      'click',                      'click',
353                      '.liste_droite_service',                      '.cell1',
354                      function(){                      function(){
355                          $(this).toggleClass('liste_droite_service_selected');                          $(this).parent().toggleClass('liste_droite_service_selected');
356                      }                      }
357                  );                  );
358                                    
# Line 348  Line 385 
385                                                                    
386                                  var id = $(this).attr('id');                                  var id = $(this).attr('id');
387                                                                    
                                   
388                                  if ( listServ.length > 0 && listServ.indexOf(id.split('_')[1]) != -1 )                                  if ( listServ.length > 0 && listServ.indexOf(id.split('_')[1]) != -1 )
389                                      return;                                      return;
390                                  listServ[i] = id.split('_')[1];                                  listServ[i] = id.split('_')[1];
# Line 431  Line 467 
467                  );                  );
468              }              }
469                            
470                /*
471                    Change les actions qui sont réalisées lors de la soumission du formulaire
472                */
473              function changeActionVal(data){              function changeActionVal(data){
474                  date = $('#date_envoi').val();                  date = $('#date_envoi').val();
475                                    
# Line 447  Line 486 
486                                            
487                  );                  );
488              }              }
489                
490                /*
491                    Change les actions qui sont réalisées lors de la soumission du formulaire
492                */
493              function changeOneData( oldData, newData) {              function changeOneData( oldData, newData) {
494                                    
495                  date = $('#date_envoi').val();                  date = $('#date_envoi').val();
# Line 471  Line 513 
513                      $('.list-sel-ser-them').empty();                      $('.list-sel-ser-them').empty();
514                      $('.list-sel-ser-them').append(''+                      $('.list-sel-ser-them').append(''+
515                                  '<div class=\'row\'>'+                                  '<div class=\'row\'>'+
516                                      '<div class=\'cell1 liste_gauche_them\' id=\'list-sel-ser-them-title\'>"._('Service à consulter')."</div>'+                                      '<div class=\'cell1 liste_gauche_them\' id=\'list-sel-ser-them-title\'>"._('Service a consulter')."</div>'+
517                                      '<div class=\'cell2 liste_gauche_them\' id=\'list-sel-ser-them-title\'>"._('Version papier')."</div>'+                                      '<div class=\'cell2 liste_gauche_them\' id=\'list-sel-ser-them-title\'>"._('Version papier')."</div>'+
518                                  '</div>') ;                                  '</div>') ;
519                  }                  }

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26