Replace 'heure française' with actual site timezone
This commit is contained in:
@@ -98,6 +98,7 @@ class Project extends PhpObject {
|
||||
}
|
||||
$asProject['geofile'] = Spot::addTimestampToFilePath(self::GEO_FOLDER.$asProject['geofile']);
|
||||
$asProject['codename'] = $sCodeName;
|
||||
$asProject['timezone_desc'] = Spot::getTimeZoneDesc($asProject['timezone']);
|
||||
}
|
||||
return $bSpecificProj?$asProject:$asProjects;
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ class Spot extends Main
|
||||
|
||||
public function getTile($sMapId, $iX, $iY, $iZ)
|
||||
{
|
||||
if(isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] == $this->asContext['serv_name']) {
|
||||
if(isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] == $this->asContext['serv_name'] || Settings::DEBUG) {
|
||||
$asDomains = array();
|
||||
$sReferer = 'https://spot.lutran.fr';
|
||||
switch($sMapId) {
|
||||
|
||||
@@ -68,6 +68,11 @@ function initProject(sProjectCodeName){
|
||||
self.tmp('first_exec', false);
|
||||
self.vars('project', self.vars(['projects', sProjectCodeName]));
|
||||
|
||||
//Timezone difference notice
|
||||
var bSameTZ = (oSpot.consts.site_timezone == oSpot.vars(['project', 'timezone']));
|
||||
self.tmp('site_tz_notice', bSameTZ?'':' ('+oSpot.consts.site_timezone_desc+')');
|
||||
self.tmp('proj_tz_notice', bSameTZ?'':' ('+self.vars(['project', 'timezone_desc'])+')');
|
||||
|
||||
$.when(
|
||||
//Markers: Spot Messages & Pictures
|
||||
self.get(
|
||||
@@ -235,7 +240,7 @@ function initSpotMessages(aoMessages, aoTracks) {
|
||||
if(oMsg.pics) {
|
||||
var $Pics = $('<div>', {'class':'pics'});
|
||||
$.each(oMsg.pics, function(iKey, asPic){
|
||||
$Pics.append($('<a>', {href: asPic.pic_path, 'data-lightbox': self.consts.title, 'data-title': asPic.formatted_time+' (heure française)'})
|
||||
$Pics.append($('<a>', {href: asPic.pic_path, 'data-lightbox': self.consts.title, 'data-title': asPic.formatted_time+self.tmp('site_tz_notice')})
|
||||
.append($('<img>', {'src': asPic.thumb_path})));
|
||||
});
|
||||
$Tooltip
|
||||
@@ -373,7 +378,7 @@ function getPost(asPost) {
|
||||
case 'message':
|
||||
$Body = $('<div>')
|
||||
.append($('<p>').addIcon('fa-message', true).append(asPost.lat_dms+' '+asPost.lon_dms))
|
||||
.append($('<p>').addIcon('fa-time', true).append(sAbsTime))
|
||||
.append($('<p>').addIcon('fa-time', true).append(sAbsTime+self.tmp('site_tz_notice')))
|
||||
.append(
|
||||
$('<img>', {'class':'staticmap', title: 'Click pour zoomer', src: getStaticMapUrl(asPost.latitude, asPost.longitude)})
|
||||
.data('lat', asPost.latitude)
|
||||
@@ -386,8 +391,8 @@ function getPost(asPost) {
|
||||
);
|
||||
break;
|
||||
case 'picture':
|
||||
var $Image = $('<img>', {'src': asPost.thumb_path/*, 'style':'transform:rotate('+asPost.rotate+'deg);'*/});
|
||||
$Body = $('<a>', {href: asPost.pic_path, 'data-lightbox': self.consts.title, 'data-title': 'Photo ajoutée le '+sAbsTime+' et prise le '+asPost.taken_on_formatted+' (heure française)'}).append($Image);
|
||||
var $Image = $('<img>', {'src': asPost.thumb_path, title: 'Click pour zoomer'/*, 'style':'transform:rotate('+asPost.rotate+'deg);'*/});
|
||||
$Body = $('<a>', {href: asPost.pic_path, 'data-lightbox': self.consts.title, 'data-title': 'Photo ajoutée le '+sAbsTime+' et prise le '+asPost.taken_on_formatted+self.tmp('site_tz_notice')}).append($Image);
|
||||
break;
|
||||
case 'post':
|
||||
$Body = $('<div>')
|
||||
@@ -407,7 +412,7 @@ function getPost(asPost) {
|
||||
$Post
|
||||
.append($('<div>', {'class':'header'})
|
||||
.append($('<span>', {'class':'index'}).addIcon('fa-'+asPost.type))
|
||||
.append($('<span>', {'class':'time', 'title':sAbsTime}).text(sRelTime)))
|
||||
.append($('<span>', {'class':'time', 'title':sAbsTime+self.tmp('site_tz_notice')}).text(sRelTime)))
|
||||
.append($('<div>', {'class':'body'}).append($Body));
|
||||
|
||||
if(asPost.displayed_id) $Post.find('.index').append(' '+asPost.displayed_id);
|
||||
|
||||
Reference in New Issue
Block a user