Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3606 → Rev 3607

/trunk/widget/modules/saisie2/squelettes/js/WidgetsSaisiesCommun.js
660,15 → 660,17
thisNomImage = '',
nonDupliquee = true;
 
nomImage = nomImage.toLowerCase();
 
$( 'img.miniature-img,img.miniature' ).each( function() {
// vérification avec alt de l'image
if ( lthis.valOk ( $( this ).attr ( 'alt' ), true, nomImage ) ) {
if ( lthis.valOk ( $( this ).attr( 'alt' ) ) && $( this ).attr('alt' ).toLowerCase() === nomImage ) {
nonDupliquee = false;
return false;// Pas besoin de poursuivre la boucle
} else { // sinon vérifie aussi avec l'adresse (src) de l'image
thisSrcParts = $( this ).attr( 'src' ).split( '/' );
thisNomImage = thisSrcParts[ thisSrcParts.length - 1 ].replace( '_min', '' );
if ( lthis.valOk ( thisNomImage, true, nomImage ) ) {
thisNomImage = thisSrcParts[ thisSrcParts.length - 1 ].replace( '_min', '' ).toLowerCase();
if ( lthis.valOk( thisNomImage, true, nomImage ) ) {
nonDupliquee = false;
return false;
}