Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3945 → Rev 3946

/trunk/widget/modules/photo/squelettes/js/WidgetPhotoPopup.js
51,6 → 51,13
this.titreImage = this.item['titre'];
this.urlLienEflore = this.item['lien'];
this.idImage = this.item['id_photo'];
 
// If last caract of the url is a ',' we remove it
const lastCaractUrlImage = this.item['url_photo'].slice(-1);
if (lastCaractUrlImage === ','){
this.item['url_photo'] = this.item['url_photo'].replace(/.$/,'');
}
 
this.urlThisImage = this.item['url_photo']+'.jpg';
this.obs = this.item['obs'];
this.nn = '[nn' + this.obs['nom_sel_nn']+']';
634,7 → 641,6
event.preventDefault();
 
let url = lthis.urlServiceRegenererMiniature + lthis.idImage;
 
$.get( url, function( data ) {
console.log( data );
}
/trunk/widget/modules/photo/Photo.php
274,8 → 274,9
$item['date_redige'] = strftime('%A %d %B %Y', $item['date_photo']);
$item['date'] = date_format(date_create($item['date_photo']),"d/m/Y");
$item['lien'] = sprintf($this->eflore_url_tpl, $image['obs']['nom_referentiel'], $image['obs']['nom_sel_nn']);
$item['url_tpl'] = preg_replace('/(O|XS|[SML]|X(?:[23]|)L|CR(?:|X2)S|C(?:|X)S)$/', '%s.jpg', $image['url_photo']);
// Formatage titre
$image['url_photo'] = preg_replace('/,/', "", $image['url_photo']);
$item['url_tpl'] = preg_replace('/(O|XS|[SML]|X(?:[23]|)L|CR(?:|X2)S|C(?:|X)S)$/', '%s.jpg',$image['url_photo']);
// Formatage titre
$item['titre'] = $image['obs']['nom_sel'].' [nn'.$image['obs']['nom_sel_nn'].'] par '.$image['utilisateur']['nom_utilisateur'].' le '.date_format(date_create($image['obs']['date_obs']),"d/m/Y").' - '.$image['obs']['localisation'];
$item['id_photo_formate'] = sprintf('%09d', $image['id_photo']);
$item['urlProfil'] = sprintf($this->config['photo']['tbProfilUrlTpl'], $image['utilisateur']['id_utilisateur'] );