Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3453 → Rev 3454

/trunk/widget/modules/saisie2/squelettes/js/Utils.js
225,7 → 225,7
 
if( fileMimeType.match( 'image' ) ) {
var extention = fileMimeType.replace( /(?:imag)?e\/?/g , '' ),
content = '<img src="' + lthis.cheminFichiers + thisFieldKey + '.' + extention + '" style="max-width:100%" alt="' + thisFieldKey + '" />';
content = '<img id="modale-aide-img" src="' + lthis.cheminFichiers + thisFieldKey + '.' + extention + '" style="" alt="' + thisFieldKey + '" />';
}
lthis.activerModale( label, content );
});
241,7 → 241,7
 
if( fileMimeType.match( 'image' ) ) {
var extention = fileMimeType.replace( /(?:imag)?e\/?/g , '' ),
content = '<img src="' + lthis.cheminFichiers + 'info.' + extention + '" style="max-width:100%" alt="info projet" />';
content = '<img id="modale-aide-img" src="' + lthis.cheminFichiers + 'info.' + extention + '" style="" alt="info projet" />';
}
lthis.activerModale( label, content );
});
269,8 → 269,12
// Due to how HTML5 defines its semantics,
// the autofocus HTML attribute has no effect in Bootstrap modals.
// To achieve the same effect, use some custom JavaScript
$( '#fenetre-modal' ).on( 'shown.bs.modal' , function () {
$( '#fenetre-modal' ).off( 'shown.bs.modal' ).on( 'shown.bs.modal' , function () {
$( '#myInput' ).trigger( 'focus' );
if( lthis.valOk( $( '#modale-aide-img' ) ) ) {
lthis.redimentionnerImgAide();
$( window ).on( 'resize', lthis.redimentionnerImgAide.bind( lthis ) );
}
});
if ( this.valOk( buttons ) ) {
buttonsHtml = '';
288,6 → 292,16
});
};
 
Utils.prototype.redimentionnerImgAide = function() {
var espHorizDisp = $( '.modal-dialog' ).innerWidth() <= 768 ? $( '.modal-dialog' ).innerWidth() - 30 : 768,
cssImg = {
'width': espHorizDisp,
'height' : 'auto'
};
 
$( '#modale-aide-img' ).css(cssImg).show(50);
};
 
// Faire apparaitre un champ text "Autre"
Utils.prototype.onOtherOption = function() {
const PREFIX = 'collect-other-';