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['geofile'] = Spot::addTimestampToFilePath(self::GEO_FOLDER.$asProject['geofile']);
|
||||||
$asProject['codename'] = $sCodeName;
|
$asProject['codename'] = $sCodeName;
|
||||||
|
$asProject['timezone_desc'] = Spot::getTimeZoneDesc($asProject['timezone']);
|
||||||
}
|
}
|
||||||
return $bSpecificProj?$asProject:$asProjects;
|
return $bSpecificProj?$asProject:$asProjects;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ class Spot extends Main
|
|||||||
|
|
||||||
public function getTile($sMapId, $iX, $iY, $iZ)
|
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();
|
$asDomains = array();
|
||||||
$sReferer = 'https://spot.lutran.fr';
|
$sReferer = 'https://spot.lutran.fr';
|
||||||
switch($sMapId) {
|
switch($sMapId) {
|
||||||
|
|||||||
@@ -68,6 +68,11 @@ function initProject(sProjectCodeName){
|
|||||||
self.tmp('first_exec', false);
|
self.tmp('first_exec', false);
|
||||||
self.vars('project', self.vars(['projects', sProjectCodeName]));
|
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(
|
$.when(
|
||||||
//Markers: Spot Messages & Pictures
|
//Markers: Spot Messages & Pictures
|
||||||
self.get(
|
self.get(
|
||||||
@@ -235,7 +240,7 @@ function initSpotMessages(aoMessages, aoTracks) {
|
|||||||
if(oMsg.pics) {
|
if(oMsg.pics) {
|
||||||
var $Pics = $('<div>', {'class':'pics'});
|
var $Pics = $('<div>', {'class':'pics'});
|
||||||
$.each(oMsg.pics, function(iKey, asPic){
|
$.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})));
|
.append($('<img>', {'src': asPic.thumb_path})));
|
||||||
});
|
});
|
||||||
$Tooltip
|
$Tooltip
|
||||||
@@ -373,7 +378,7 @@ function getPost(asPost) {
|
|||||||
case 'message':
|
case 'message':
|
||||||
$Body = $('<div>')
|
$Body = $('<div>')
|
||||||
.append($('<p>').addIcon('fa-message', true).append(asPost.lat_dms+' '+asPost.lon_dms))
|
.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(
|
.append(
|
||||||
$('<img>', {'class':'staticmap', title: 'Click pour zoomer', src: getStaticMapUrl(asPost.latitude, asPost.longitude)})
|
$('<img>', {'class':'staticmap', title: 'Click pour zoomer', src: getStaticMapUrl(asPost.latitude, asPost.longitude)})
|
||||||
.data('lat', asPost.latitude)
|
.data('lat', asPost.latitude)
|
||||||
@@ -386,8 +391,8 @@ function getPost(asPost) {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'picture':
|
case 'picture':
|
||||||
var $Image = $('<img>', {'src': asPost.thumb_path/*, 'style':'transform:rotate('+asPost.rotate+'deg);'*/});
|
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+' (heure française)'}).append($Image);
|
$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;
|
break;
|
||||||
case 'post':
|
case 'post':
|
||||||
$Body = $('<div>')
|
$Body = $('<div>')
|
||||||
@@ -407,7 +412,7 @@ function getPost(asPost) {
|
|||||||
$Post
|
$Post
|
||||||
.append($('<div>', {'class':'header'})
|
.append($('<div>', {'class':'header'})
|
||||||
.append($('<span>', {'class':'index'}).addIcon('fa-'+asPost.type))
|
.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));
|
.append($('<div>', {'class':'body'}).append($Body));
|
||||||
|
|
||||||
if(asPost.displayed_id) $Post.find('.index').append(' '+asPost.displayed_id);
|
if(asPost.displayed_id) $Post.find('.index').append(' '+asPost.displayed_id);
|
||||||
|
|||||||
3
todo
3
todo
@@ -5,5 +5,4 @@ To Do List
|
|||||||
- Remove files2/ on server
|
- Remove files2/ on server
|
||||||
- Replace all images with FA icons
|
- Replace all images with FA icons
|
||||||
- on hover sur message : open popup on map (check zoom)
|
- on hover sur message : open popup on map (check zoom)
|
||||||
- on hover on relative time: display absolute time
|
- on hover on relative time: display absolute time
|
||||||
- Replace 'heure française' with actual project timezone
|
|
||||||
Reference in New Issue
Block a user