Subversion Repositories eFlore/Applications.cel

Rev

Rev 3239 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3239 Rev 3240
Line 28... Line 28...
28
 
28
 
29
// Style et affichage des list-checkboxes
29
// Style et affichage des list-checkboxes
30
function inputListCheckbox() {
30
function inputListCheckbox() {
31
  // On écoute le click sur une list-checkbox ('.selectBox')
31
  // On écoute le click sur une list-checkbox ('.selectBox')
32
  // à tout moment de son insertion dans le dom
-
 
33
  // Todo :
32
  // à tout moment de son insertion dans le dom
34
  // _ S'assurer de bien viser la bonne list-checkbox
33
  // _ S'assurer de bien viser la bonne list-checkbox
35
  // _ Au click sur un autre champ remballer la list-checkbox
34
  // _ Au click sur un autre champ remballer la list-checkbox
36
  $( document ).click( function( event ) {
35
  $( document ).click( function( event ) {
Line 45... Line 44...
45
      });
44
      });
46
    }
45
    }
47
  });
46
  });
Line 48... Line 47...
48
 
47
 
49
  $( '#zone-appli' ).on( 'click' , '.selectBox' , function() {
48
  $( '#zone-appli' ).on( 'click' , '.selectBox' , function() {
50
    // $( '.checkboxes[data-id="' + $(this).attr( 'data-id' ) + '"]' ).toggleClass( 'hidden' );
49
    // afficher/cacher le volet des checkboxes et focus
51
    $( this ).next().toggleClass( 'hidden' );
50
    $( this ).next().toggleClass( 'hidden' );
Line -... Line 51...
-
 
51
    $( this ).find( 'select' ).toggleClass( 'focus' );
-
 
52
 
-
 
53
    // Cacher le volet des autres checkboxes et retirer leur focus
-
 
54
    var $checkboxes = $( this ).next(),
-
 
55
        count = $( '.checkboxes' ).length;
-
 
56
    for ( var i = 0; i < count; i++ ) {
-
 
57
      if ( $( '.checkboxes' )[i] !== $checkboxes[0] && !$checkboxes.hasClass( 'hidden' ) ) {
-
 
58
        var $otherListCheckboxes = $( '.checkboxes' )[i];
-
 
59
        if ( !$otherListCheckboxes.classList.contains( 'hidden' ) ) {
-
 
60
          $otherListCheckboxes.classList.add( 'hidden' );
-
 
61
        }
-
 
62
        if( $otherListCheckboxes.previousElementSibling.firstElementChild.classList.contains( 'focus' ) ) {
-
 
63
          $otherListCheckboxes.previousElementSibling.firstElementChild.classList.remove( 'focus' );
-
 
64
        }
-
 
65
      }
52
    $( this ).find( 'select' ).toggleClass( 'focus' );
66
    }
53
 
67
 
Line 54... Line 68...
54
  });
68
  });
55
}
69
}
56
 
70
 
Line 57... Line 71...
57
// Style et affichage des input type="range"
71
// Style et affichage des input type="range"
58
function inputRangeDisplayNumber() {
72
function inputRangeDisplayNumber() {
59
  $( 'input[type="range"]' ).each( function() {
73
  $( 'input[type="range"]' ).each( function() {
60
 
-
 
61
    $( this ).siblings( '.range-live-value' ).text( $( this ).val() );
74
 
62
  });
75
    $( this ).siblings( '.range-live-value' ).text( $( this ).val() );
63
  $( '#zone-supp' ).on( 'input' , 'input[type="range"]' , function () {
76
  });
Line 64... Line 77...
64
    console.log( 'nello' );
77
  $( '#zone-supp' ).on( 'input' , 'input[type="range"]' , function () {
Line 244... Line 257...
244
 *  Lancement des scripts  *
257
 *  Lancement des scripts  *
245
 ***************************/
258
 ***************************/
246
const CHEMIN_FICHIERS = $( '#zone-appli' ).data('url-fichiers');
259
const CHEMIN_FICHIERS = $( '#zone-appli' ).data('url-fichiers');
Line 247... Line 260...
247
 
260
 
-
 
261
jQuery( document ).ready( function() {
-
 
262
  $( '#form-supp' )[0].reset();
-
 
263
 
-
 
264
    // console.log( $('#taxon').val() !== '' );
-
 
265
    // $('#ajouter-obs').click( function() {
-
 
266
    //   // console.log( $('#taxon').val() !== '' );
-
 
267
    // });
Line 248... Line 268...
248
jQuery( document ).ready( function() {
268
    //pattern="(^(((0[1-9]|1[0-9]|2[0-8])[\/](0[1-9]|1[012]))|((29|30|31)[\/](0[13578]|1[02]))|((29|30)[\/](0[4,6,9]|11)))[\/](19|[2-9][0-9])\d\d$)|(^29[\/]02[\/](19|[2-9][0-9])(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96)$)"
249
 
269
 
Line 250... Line 270...
250
  // Volet de profil/déconnexion
270
  // Volet de profil/déconnexion