Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 3230 Rev 3239
Line 112... Line 112...
112
    var options = {
112
    var options = {
113
      success: lthis.afficherMiniature.bind( lthis ), // post-submit callback
113
      success: lthis.afficherMiniature.bind( lthis ), // post-submit callback
114
      dataType: 'xml', // 'xml', 'script', or 'json' (expected server response type)
114
      dataType: 'xml', // 'xml', 'script', or 'json' (expected server response type)
115
      resetForm: true // reset the form after successful submit
115
      resetForm: true // reset the form after successful submit
116
    };
116
    };
117
    $( '#miniature' ).append( '<img id="miniature-chargement" class="miniature" alt="chargement" src="' + this.chargementImageIconeUrl + '">' );
117
    $( '#miniature' ).append( '<img id="miniature-chargement" class="miniature" alt="chargement" src="' + this.chargementImageIconeUrl + '"/>' );
118
    $( '#ajouter-obs' ).attr( 'disabled', 'disabled' );
118
    $( '#ajouter-obs' ).attr( 'disabled', 'disabled' );
119
    if( lthis.verifierFormat( $( '#fichier' ).val() ) ) {
119
    if( lthis.verifierFormat( $( '#fichier' ).val() ) ) {
120
      $( '#form-upload' ).ajaxSubmit( options );
120
      $( '#form-upload' ).ajaxSubmit( options );
121
    } else {
121
    } else {
122
      $( '#form-upload' )[0].reset();
122
      $( '#form-upload' )[0].reset();
Line 199... Line 199...
199
WidgetSaisie.prototype.creerWidgetMiniature = function( reponse ) {
199
WidgetSaisie.prototype.creerWidgetMiniature = function( reponse ) {
200
  var miniatureUrl = $( 'miniature-url', reponse ).text();
200
  var miniatureUrl = $( 'miniature-url', reponse ).text();
201
  var imgNom = $( 'image-nom', reponse ).text();
201
  var imgNom = $( 'image-nom', reponse ).text();
202
  var html =
202
  var html =
203
    '<div class="miniature mb-3 mr-3">'+
203
    '<div class="miniature mb-3 mr-3">'+
204
      '<img class="miniature-img" class="miniature img-rounded" alt="' + imgNom + '" src="' + miniatureUrl + '">'+
204
      '<img class="miniature-img" class="miniature img-rounded" alt="' + imgNom + '" src="' + miniatureUrl + '"/>'+
205
      '<a class="effacer-miniature"><i class="far fa-trash-alt"></i></a>'+
205
      '<a class="effacer-miniature"><i class="far fa-trash-alt"></i></a>'+
206
    '</div>'
206
    '</div>'
207
  return html;
207
  return html;
208
};
208
};
Line 411... Line 411...
411
            '<li>'+
411
            '<li>'+
412
            //   '<span>Lieu-dit :</span> ' + $( '#lieudit' ).val() + ' '+
412
            //   '<span>Lieu-dit :</span> ' + $( '#lieudit' ).val() + ' '+
413
            //   '<span>Station :</span> ' + $( '#station' ).val() + ' '+
413
            //   '<span>Station :</span> ' + $( '#station' ).val() + ' '+
414
              '<span>Milieu :</span> '+ $ ( '#milieu' ).val() + ' '+
414
              '<span>Milieu :</span> '+ $ ( '#milieu' ).val() + ' '+
415
            '</li>'+
415
            '</li>'+
416
             '<li>'+
416
            '<li>'+
417
               'Commentaires : <span class="discretion">' + $( '#notes' ).val() + '</span>'+
417
              'Commentaires : <span class="discretion">' + $( '#notes' ).val() + '</span>'+
418
             '</li>'+
418
            '</li>'+
419
          '</ul>'+
419
          '</ul>'+
420
        '</div>'+
420
        '</div>'+
421
      '</div>'+
421
      '</div>'+
Line 422... Line 422...
422
 
422
 
Line 493... Line 493...
493
};
493
};
Line 494... Line 494...
494
 
494
 
495
WidgetSaisie.prototype.surChangementReferentiel = function() {
495
WidgetSaisie.prototype.surChangementReferentiel = function() {
496
  this.nomSciReferentiel = $( '#referentiel' ).val();
496
  this.nomSciReferentiel = $( '#referentiel' ).val();
497
  $( '#taxon' ).val( '' );
497
  $( '#taxon' ).val( '' );
498
  //this.initialiserAutocompleteCommune();
498
  this.initialiserAutocompleteCommune();
499
  //this.initialiserGoogleMap( false );
499
  this.initialiserGoogleMap( false );
Line 500... Line 500...
500
};
500
};
501
 
501
 
502
WidgetSaisie.prototype.surChangementNbreObs = function() {
502
WidgetSaisie.prototype.surChangementNbreObs = function() {