Adding Last Update
This commit is contained in:
17
images/spot-logo-only.svg
Normal file
17
images/spot-logo-only.svg
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg width="406" height="469" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 406 469" style="enable-background:new 0 0 406 469;">
|
||||||
|
<style type="text/css">.st0{fill:#F18A00;}</style>
|
||||||
|
<g id="Layer_3"/>
|
||||||
|
<g id="Layer_8"/>
|
||||||
|
<g id="Layer_9"/>
|
||||||
|
<g id="Layer_7"/>
|
||||||
|
<g id="Layer_6"/>
|
||||||
|
<g id="Layer_4"/>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<path class="st0" d="m85.80618,195.80013c-1,-0.8 -1.3,-2.3 -0.6,-3.4c11.1,-18.2 56.5,-85.8 117.3,-85.8c49.6,0 90.4,33.4 110.3,53.3c1.2,1.2 2.9,1.9 4.6,1.9c1.7,0 3.4,-0.7 4.6,-1.9l16.4,-16.3c1,-1 1.1,-2.5 0.2,-3.5c-5.1,-6.1 -15.3,-17.2 -29.8,-28.2c-31.7,-24.1 -67.5,-36.3 -106.3,-36.3c-79.4,0 -129.8,75.4 -142.3,96.5c-0.8,1.4 -2.6,1.7 -3.8,0.7l-55.4,-43.6c-1,-0.8 -1.3,-2.2 -0.7,-3.3c5.9,-10.8 23,-39.4 48.5,-63.7c42.8,-40.7 95.1,-62.2 151.4,-62.2c56,0 109.2,18.9 153.9,54.8c27.3,21.9 45.5,43.2 51.3,50.4c0.8,1 0.7,2.5 -0.2,3.5l-12.3,12.2c-1.1,1.1 -2.9,1 -3.8,-0.2c-7.3,-8.9 -26.2,-30.5 -49.7,-49.2c-41.1,-32.7 -88,-49.2 -139.2,-49.2c-50.9,0 -96.5,18.6 -135.4,55.4c-20.9,19.7 -30.4,34.1 -35.6,42.3c-0.7,1.1 -0.5,2.6 0.6,3.5l16.7,13.2c1.2,0.9 2.6,1.4 4.1,1.4c2.2,0 4.2,-1.1 5.4,-2.9c7.4,-10.7 15.9,-20.6 26.8,-31.1c34.3,-33.1 75.7,-50.6 119.9,-50.6c92,0 151.2,70.7 165.3,89.4c0.8,1.1 0.7,2.5 -0.3,3.4l-49.8,49.3c-1.1,1.1 -2.8,1 -3.8,-0.1c-15.9,-18.1 -63,-66.5 -111.4,-66.5c-23.6,0 -46.6,11.3 -68.4,33.5c-7.2,7.3 -13.9,15.6 -19.9,24.4c-0.8,1.1 -0.5,2.7 0.6,3.6l93.1,73.2c1.1,0.9 1.3,2.5 0.4,3.7l-10.5,13.3c-0.9,1.1 -2.5,1.3 -3.7,0.4l-108.5,-85.3z" />
|
||||||
|
<path class="st0" d="m205.90618,468.90013c-56,0 -109.2,-18.9 -153.9,-54.8c-27.3,-21.9 -45.5,-43.2 -51.3,-50.4c-0.8,-1 -0.7,-2.5 0.2,-3.5l12.3,-12.2c1.1,-1.1 2.9,-1 3.8,0.2c7.3,8.9 26.2,30.5 49.7,49.2c41.1,32.7 88,49.2 139.2,49.2c50.9,0 96.5,-18.6 135.4,-55.4c20.9,-19.7 30.4,-34.1 35.6,-42.3c0.7,-1.1 0.5,-2.6 -0.6,-3.5l-16.7,-13.2c-1.2,-0.9 -2.6,-1.4 -4.1,-1.4c-2.2,0 -4.2,1.1 -5.4,2.9c-7.4,10.7 -15.9,20.6 -26.8,31.1c-34.3,33.1 -75.7,50.6 -119.8,50.6c-92,0 -151.2,-70.7 -165.3,-89.4c-0.8,-1.1 -0.7,-2.5 0.3,-3.4l49.8,-49.3c1.1,-1.1 2.8,-1 3.8,0.1c15.9,18.1 63,66.5 111.4,66.5c23.6,0 46.6,-11.3 68.4,-33.5c7.2,-7.3 13.9,-15.6 19.9,-24.4c0.8,-1.1 0.5,-2.7 -0.6,-3.6l-93.1,-73.2c-1.1,-0.9 -1.3,-2.5 -0.4,-3.7l10.5,-13.3c0.9,-1.1 2.5,-1.3 3.7,-0.4l108.3,85.2c1,0.8 1.3,2.3 0.6,3.4c-11.1,18.2 -56.5,85.8 -117.3,85.8c-49.6,0 -90.4,-33.4 -110.3,-53.3c-1.2,-1.2 -2.9,-1.9 -4.6,-1.9s-3.4,0.7 -4.6,1.9l-16.4,16.3c-1,1 -1.1,2.5 -0.2,3.5c5.1,6.1 15.3,17.2 29.8,28.2c31.7,24.1 67.5,36.3 106.3,36.3c79.4,0 129.8,-75.4 142.3,-96.5c0.8,-1.4 2.6,-1.7 3.8,-0.7l55.4,43.6c1,0.8 1.3,2.2 0.7,3.3c-5.9,10.8 -23,39.4 -48.5,63.7c-42.6,40.8 -95,62.3 -151.3,62.3z" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.7 KiB |
48
images/spot-logo.svg
Normal file
48
images/spot-logo.svg
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1466.5 481.4" style="enable-background:new 0 0 1466.5 481.4;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#F18A00;}
|
||||||
|
.st1{fill:#FFFFFF;}
|
||||||
|
</style>
|
||||||
|
<g id="Layer_3">
|
||||||
|
</g>
|
||||||
|
<g id="Layer_8">
|
||||||
|
</g>
|
||||||
|
<g id="Layer_9">
|
||||||
|
</g>
|
||||||
|
<g id="Layer_7">
|
||||||
|
</g>
|
||||||
|
<g id="Layer_6">
|
||||||
|
</g>
|
||||||
|
<g id="Layer_4">
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<path class="st0" d="M99.7,202.1c-1-0.8-1.3-2.3-0.6-3.4c11.1-18.2,56.5-85.8,117.3-85.8c49.6,0,90.4,33.4,110.3,53.3 c1.2,1.2,2.9,1.9,4.6,1.9c1.7,0,3.4-0.7,4.6-1.9l16.4-16.3c1-1,1.1-2.5,0.2-3.5c-5.1-6.1-15.3-17.2-29.8-28.2 C291,94.1,255.2,81.9,216.4,81.9c-79.4,0-129.8,75.4-142.3,96.5c-0.8,1.4-2.6,1.7-3.8,0.7l-55.4-43.6c-1-0.8-1.3-2.2-0.7-3.3 c5.9-10.8,23-39.4,48.5-63.7c42.8-40.7,95.1-62.2,151.4-62.2c56,0,109.2,18.9,153.9,54.8c27.3,21.9,45.5,43.2,51.3,50.4 c0.8,1,0.7,2.5-0.2,3.5l-12.3,12.2c-1.1,1.1-2.9,1-3.8-0.2c-7.3-8.9-26.2-30.5-49.7-49.2c-41.1-32.7-88-49.2-139.2-49.2 c-50.9,0-96.5,18.6-135.4,55.4c-20.9,19.7-30.4,34.1-35.6,42.3c-0.7,1.1-0.5,2.6,0.6,3.5L60.4,143c1.2,0.9,2.6,1.4,4.1,1.4 c2.2,0,4.2-1.1,5.4-2.9c7.4-10.7,15.9-20.6,26.8-31.1c34.3-33.1,75.7-50.6,119.9-50.6c92,0,151.2,70.7,165.3,89.4 c0.8,1.1,0.7,2.5-0.3,3.4l-49.8,49.3c-1.1,1.1-2.8,1-3.8-0.1c-15.9-18.1-63-66.5-111.4-66.5c-23.6,0-46.6,11.3-68.4,33.5 c-7.2,7.3-13.9,15.6-19.9,24.4c-0.8,1.1-0.5,2.7,0.6,3.6L222,270c1.1,0.9,1.3,2.5,0.4,3.7L211.9,287c-0.9,1.1-2.5,1.3-3.7,0.4 L99.7,202.1z"/>
|
||||||
|
<path class="st0" d="M219.8,475.2c-56,0-109.2-18.9-153.9-54.8c-27.3-21.9-45.5-43.2-51.3-50.4c-0.8-1-0.7-2.5,0.2-3.5l12.3-12.2 c1.1-1.1,2.9-1,3.8,0.2c7.3,8.9,26.2,30.5,49.7,49.2c41.1,32.7,88,49.2,139.2,49.2c50.9,0,96.5-18.6,135.4-55.4 c20.9-19.7,30.4-34.1,35.6-42.3c0.7-1.1,0.5-2.6-0.6-3.5l-16.7-13.2c-1.2-0.9-2.6-1.4-4.1-1.4c-2.2,0-4.2,1.1-5.4,2.9 c-7.4,10.7-15.9,20.6-26.8,31.1c-34.3,33.1-75.7,50.6-119.8,50.6c-92,0-151.2-70.7-165.3-89.4c-0.8-1.1-0.7-2.5,0.3-3.4l49.8-49.3 c1.1-1.1,2.8-1,3.8,0.1c15.9,18.1,63,66.5,111.4,66.5c23.6,0,46.6-11.3,68.4-33.5c7.2-7.3,13.9-15.6,19.9-24.4 c0.8-1.1,0.5-2.7-0.6-3.6L212,211.5c-1.1-0.9-1.3-2.5-0.4-3.7l10.5-13.3c0.9-1.1,2.5-1.3,3.7-0.4l108.3,85.2 c1,0.8,1.3,2.3,0.6,3.4c-11.1,18.2-56.5,85.8-117.3,85.8c-49.6,0-90.4-33.4-110.3-53.3c-1.2-1.2-2.9-1.9-4.6-1.9s-3.4,0.7-4.6,1.9 l-16.4,16.3c-1,1-1.1,2.5-0.2,3.5c5.1,6.1,15.3,17.2,29.8,28.2c31.7,24.1,67.5,36.3,106.3,36.3c79.4,0,129.8-75.4,142.3-96.5 c0.8-1.4,2.6-1.7,3.8-0.7l55.4,43.6c1,0.8,1.3,2.2,0.7,3.3c-5.9,10.8-23,39.4-48.5,63.7C328.5,453.7,276.1,475.2,219.8,475.2z"/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<path class="st1" d="M543.5,95.1c-1.3-4.8-3.7-8.6-8.4-8.6c-3.6,0-5.9,2.1-5.9,5.4c0,13.9,31.3,12,31.3,38.3 c0,14.2-10,22.3-25.4,22.3c-15,0-22.4-6.7-25-21.3L527,128c0.8,6.1,3.3,9.9,8.9,9.9c4.1,0,7.1-2.1,7.1-6.4 c0-14.6-31.4-12.6-31.4-39c0-12.3,8.9-20.6,23.2-20.6c14.9,0,21.5,7.6,24.4,19.9L543.5,95.1z"/>
|
||||||
|
<path class="st1" d="M620,151.5l-3-17h-14.9l-2.7,17h-18.6l16.9-78.6h23.9l17.3,78.6H620z M604.7,119h9.7l-4.8-28.2h-0.3 L604.7,119z"/>
|
||||||
|
<path class="st1" d="M674.5,151.5l-18.1-78.6h19.8l8.8,52h0.2l9.6-52h19.6l-18.5,78.6H674.5z"/>
|
||||||
|
<path class="st1" d="M741.3,151.5V72.9h44.1v15.9h-25.8v14.7H779v15.4h-19.4v16.8h26.8v15.9L741.3,151.5L741.3,151.5z"/>
|
||||||
|
<path class="st1" d="M816.3,151.5V72.9h21.8c21.2,0,32.1,10.3,32.1,38.2c0,25.3-8.5,40.4-31.8,40.4H816.3z M839.4,135 c8.6,0,12-7.9,12-23.5c0-17.2-4.4-22-12.1-22H835V135H839.4z"/>
|
||||||
|
<path class="st1" d="M944.8,151.5V72.9h22.6c19.1,0,27.4,6.2,27.4,20.8c0,7.9-3.5,13.6-10.2,16.5v0.2c7.7,2.6,11.8,8.1,11.8,18 c0,18.8-12.9,23.1-28.9,23.1H944.8z M968.3,104.1c4.9,0,7.8-2.4,7.8-8.3c0-5.6-3.2-7.2-7.8-7.2h-5.6v15.5H968.3z M968.8,135.8 c6.7,0,9-2.7,9-8.9c0-6.7-3.6-8.9-8.9-8.9h-6.1v17.7L968.8,135.8L968.8,135.8z"/>
|
||||||
|
<path class="st1" d="M1036.6,151.5v-30.4l-19.5-48.2h19.3l9.3,27.9h0.2l9.9-27.9h19.1l-19.8,48.2v30.4H1036.6z"/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path class="st1" d="M492.2,363.3h121.3c15,0,15.6-9.7,15.6-15c0-7.5-3.7-13.8-16.9-17.8l-85.6-25.6 c-28.4-8.4-36.9-30.6-36.9-61.3c0-32.8,14.4-55.3,50.6-55.3h135v43.8H562.2c-8.1,0-15.3,3.1-15.3,14.4c0,8.4,4.4,14.4,17.5,18.4 l76.9,22.5c32.5,9.4,45.3,25.6,45.3,61.6c0,34.7-12.8,58.1-50,58.1H492.2V363.3z"/>
|
||||||
|
<path class="st1" d="M706.9,407.1v-185c0-23.4,12.8-33.8,33.1-33.8h116.3c48.4,0,59.1,30.3,59.1,74.1s-10.6,74.7-59.1,74.7 h-93.1v70H706.9z M827.3,293.3c23.4,0,30.6-9.1,30.6-30.9s-7.2-30.3-30.6-30.3h-49.4c-10.9,0-14.7,3.8-14.7,14.7v46.6 L827.3,293.3L827.3,293.3z"/>
|
||||||
|
<path class="st1" d="M1162.1,297.7c0,91.3-30.3,111.9-116.3,111.9S929.5,389,929.5,297.7c0-91,30.3-111.9,116.3-111.9 C1131.7,185.8,1162.1,206.7,1162.1,297.7z M1045.8,365.8c45.6,0,58.8-16.6,58.8-68.1s-13.1-68.1-58.8-68.1 c-45.6,0-58.8,16.6-58.8,68.1S1000.2,365.8,1045.8,365.8z"/>
|
||||||
|
<path class="st1" d="M1248,407.1v-175h-81.3v-43.8h218.8v43.8h-81.3v175H1248z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path class="st1" d="M1410.9,214.7v-21.5h-6.9v-4.9h19.7v4.9h-6.9v21.5H1410.9z M1448.6,214.7v-18.9h-0.1l-5.2,18.9h-5l-5.5-18.9 h-0.1v18.9h-5.5v-26.4h8.3l5.2,18.4h0.1l5.4-18.4h8v26.4H1448.6z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.2 KiB |
@@ -37,6 +37,10 @@ class Feed extends PhpObject {
|
|||||||
return $this->iFeedId;
|
return $this->iFeedId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getLastUpdate(): int {
|
||||||
|
return $this->iLastUpdate;
|
||||||
|
}
|
||||||
|
|
||||||
public function setFeedId($iFeedId) {
|
public function setFeedId($iFeedId) {
|
||||||
$this->iFeedId = $iFeedId;
|
$this->iFeedId = $iFeedId;
|
||||||
$asFeed = $this->getFeed();
|
$asFeed = $this->getFeed();
|
||||||
|
|||||||
@@ -157,6 +157,17 @@ class Project extends PhpObject {
|
|||||||
return $this->getProjects($this->getProjectId());
|
return $this->getProjects($this->getProjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getLastUpdate(): int {
|
||||||
|
$iLastUpdate = INF;
|
||||||
|
|
||||||
|
$asFeedIds = $this->getFeedIds();
|
||||||
|
foreach($asFeedIds as $iFeedId) {
|
||||||
|
$iLastUpdate = min($iLastUpdate, (new Feed($this->oDb, $iFeedId))->getLastUpdate());
|
||||||
|
}
|
||||||
|
|
||||||
|
return $iLastUpdate;
|
||||||
|
}
|
||||||
|
|
||||||
private function setProjectInfo() {
|
private function setProjectInfo() {
|
||||||
if($this->getProjectId() > 0) {
|
if($this->getProjectId() > 0) {
|
||||||
$asProject = $this->getProject();
|
$asProject = $this->getProject();
|
||||||
|
|||||||
11
inc/spot.php
11
inc/spot.php
@@ -146,7 +146,7 @@ class Spot extends Main
|
|||||||
'default_timezone' => Settings::TIMEZONE
|
'default_timezone' => Settings::TIMEZONE
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'index',
|
$sMainPage,
|
||||||
array(
|
array(
|
||||||
'host_url' => $this->asContext['serv_name'],
|
'host_url' => $this->asContext['serv_name'],
|
||||||
'filepath_css' => self::addTimestampToFilePath('style/spot.css'),
|
'filepath_css' => self::addTimestampToFilePath('style/spot.css'),
|
||||||
@@ -250,7 +250,11 @@ class Spot extends Main
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::getJsonResult($bSuccess, $sDesc, $asMessages);
|
//Add Project Last Update
|
||||||
|
$asLastUpdate = array();
|
||||||
|
$this->addTimeStamp($asLastUpdate, $this->oProject->getLastUpdate());
|
||||||
|
|
||||||
|
return self::getJsonResult($bSuccess, $sDesc, array('messages' => $asMessages, 'last_update'=>$asLastUpdate));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function subscribe($sEmail) {
|
public function subscribe($sEmail) {
|
||||||
@@ -301,8 +305,11 @@ class Spot extends Main
|
|||||||
$this->addTimeStamp($asMessage, $asMessage['unix_time']);
|
$this->addTimeStamp($asMessage, $asMessage['unix_time']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Sort chronologically
|
||||||
usort($asMessages, function($a, $b){return $a['unix_time'] > $b['unix_time'];});
|
usort($asMessages, function($a, $b){return $a['unix_time'] > $b['unix_time'];});
|
||||||
|
|
||||||
|
//Add Display ID
|
||||||
$asSortedMessages = array_values($asMessages);
|
$asSortedMessages = array_values($asMessages);
|
||||||
foreach($asSortedMessages as $iIndex=>&$asSortedMessage) $asSortedMessage['displayed_id'] = $iIndex + 1;
|
foreach($asSortedMessages as $iIndex=>&$asSortedMessage) $asSortedMessage['displayed_id'] = $iIndex + 1;
|
||||||
|
|
||||||
|
|||||||
@@ -94,5 +94,3 @@ $sDebug = ob_get_clean();
|
|||||||
if(Settings::DEBUG && $sDebug!='') $oSpot->addUncaughtError($sDebug);
|
if(Settings::DEBUG && $sDebug!='') $oSpot->addUncaughtError($sDebug);
|
||||||
|
|
||||||
echo $sResult;
|
echo $sResult;
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -28,6 +28,7 @@ map_ign_france = IGN (France)
|
|||||||
map_ign_spain = IGN (Spain)
|
map_ign_spain = IGN (Spain)
|
||||||
map_linz = LINZ (New Zealand)
|
map_linz = LINZ (New Zealand)
|
||||||
map_usgs = USGS (USA)
|
map_usgs = USGS (USA)
|
||||||
|
map_natgeo = National Geographic (USA)
|
||||||
|
|
||||||
pic = Picture
|
pic = Picture
|
||||||
pics = Pictures
|
pics = Pictures
|
||||||
@@ -56,7 +57,7 @@ ref_feed_id = Ref. Feed ID
|
|||||||
spot_id = Spot ID
|
spot_id = Spot ID
|
||||||
name = Name
|
name = Name
|
||||||
status = Status
|
status = Status
|
||||||
last_update = Last Update
|
last_update = Last Spot update
|
||||||
ref_spot_id = Ref. Spot ID
|
ref_spot_id = Ref. Spot ID
|
||||||
model = Model
|
model = Model
|
||||||
delete = Delete
|
delete = Delete
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ map_ign_france = IGN (France)
|
|||||||
map_ign_spain = IGN (Espagne)
|
map_ign_spain = IGN (Espagne)
|
||||||
map_linz = LINZ (Nouvelle-Zélande)
|
map_linz = LINZ (Nouvelle-Zélande)
|
||||||
map_usgs = USGS (États-Unis)
|
map_usgs = USGS (États-Unis)
|
||||||
|
map_natgeo = National Geographic (États-Unis)
|
||||||
|
|
||||||
pic = Photo
|
pic = Photo
|
||||||
pics = Photos
|
pics = Photos
|
||||||
@@ -56,7 +57,7 @@ ref_feed_id = ID Feed ref.
|
|||||||
spot_id = ID Spot
|
spot_id = ID Spot
|
||||||
name = Description
|
name = Description
|
||||||
status = Statut
|
status = Statut
|
||||||
last_update = Dernière maj
|
last_update = Dernière maj depuis Spot
|
||||||
ref_spot_id = ID Spot ref.
|
ref_spot_id = ID Spot ref.
|
||||||
model = Modèle
|
model = Modèle
|
||||||
delete = Supprimer
|
delete = Supprimer
|
||||||
|
|||||||
@@ -5,7 +5,10 @@
|
|||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
<div id="settings">
|
<div id="settings">
|
||||||
<div id="settings-panel">
|
<div id="settings-panel">
|
||||||
<div class="settings-header"><div class="logo"><img src="images/logo_black.png" /></div></div>
|
<div class="settings-header">
|
||||||
|
<div class="logo"><img src="images/logo_black.png" /></div>
|
||||||
|
<div id="last_update"><p><img src="images/spot-logo-only.svg" /><abbr></abbr></p></div>
|
||||||
|
</div>
|
||||||
<div class="settings-sections">
|
<div class="settings-sections">
|
||||||
<div id="settings-sections-scrollbox">
|
<div id="settings-sections-scrollbox">
|
||||||
<div class="settings-section">
|
<div class="settings-section">
|
||||||
@@ -121,6 +124,13 @@ function isSettingsPanelOpen() {
|
|||||||
return self.tmp('$Projects').hasClass('with-settings');
|
return self.tmp('$Projects').hasClass('with-settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateSettingsPanel(asLastUpdate) {
|
||||||
|
var $LastUpdate = self.tmp('$Settings').find('#last_update').toggle(self.vars(['project', 'mode']) == self.consts.modes.blog);
|
||||||
|
$LastUpdate.find('abbr')
|
||||||
|
.attr('title', asLastUpdate.formatted_time)
|
||||||
|
.text(oSpot.lang('last_update')+' '+asLastUpdate.relative_time);
|
||||||
|
}
|
||||||
|
|
||||||
function isMobile() {
|
function isMobile() {
|
||||||
return $('#mobile').is(':visible');
|
return $('#mobile').is(':visible');
|
||||||
}
|
}
|
||||||
@@ -194,10 +204,14 @@ function initProject(sProjectCodeName, oFocusPost){
|
|||||||
self.setPageTitle(oSpot.vars(['project', 'name']));
|
self.setPageTitle(oSpot.vars(['project', 'name']));
|
||||||
|
|
||||||
//Timezone difference notice
|
//Timezone difference notice
|
||||||
var bSameTime = ((new Date()).toLocaleString([], {timeZone: oSpot.consts.timezone}) == (new Date()).toLocaleString([], {timeZone: oSpot.vars(['project', 'timezone'])}));
|
var bSameTime = (
|
||||||
|
(new Date()).toLocaleString([], {timeZone: oSpot.consts.timezone}) ==
|
||||||
|
(new Date()).toLocaleString([], {timeZone: oSpot.vars(['project', 'timezone'])})
|
||||||
|
);
|
||||||
self.tmp('site_tz_notice', bSameTime?'':getTimeZoneDesc(oSpot.consts.timezone));
|
self.tmp('site_tz_notice', bSameTime?'':getTimeZoneDesc(oSpot.consts.timezone));
|
||||||
self.tmp('proj_tz_notice', bSameTime?'':getTimeZoneDesc(self.vars(['project', 'timezone'])));
|
self.tmp('proj_tz_notice', bSameTime?'':getTimeZoneDesc(self.vars(['project', 'timezone'])));
|
||||||
|
|
||||||
|
//Load Track & Markers
|
||||||
$.when(
|
$.when(
|
||||||
//Markers: Spot Messages & Medias
|
//Markers: Spot Messages & Medias
|
||||||
self.get(
|
self.get(
|
||||||
@@ -213,7 +227,8 @@ function initProject(sProjectCodeName, oFocusPost){
|
|||||||
mimeType: 'application/json'
|
mimeType: 'application/json'
|
||||||
})
|
})
|
||||||
).done(function(aoMessages, aoTracks) {
|
).done(function(aoMessages, aoTracks) {
|
||||||
initSpotMessages(aoMessages[0]['data'] || [], aoTracks[0], aoMessages[0]['desc']=='No Data');
|
initSpotMessages(aoMessages[0]['data']['messages'] || [], aoTracks[0], aoMessages[0]['desc']=='No Data');
|
||||||
|
updateSettingsPanel(aoMessages[0]['data']['last_update']);
|
||||||
});
|
});
|
||||||
|
|
||||||
//Show/Hide Poster Panel
|
//Show/Hide Poster Panel
|
||||||
@@ -347,6 +362,7 @@ function initSpotMessages(aoMessages, aoTracks, bNoFeed) {
|
|||||||
aoLayers[oSpot.lang('map_ign_spain')] = L.tileLayer(self.tmp('tile_api'), {id: 'ign.es', minZoom: 1, maxZoom: 20});
|
aoLayers[oSpot.lang('map_ign_spain')] = L.tileLayer(self.tmp('tile_api'), {id: 'ign.es', minZoom: 1, maxZoom: 20});
|
||||||
aoLayers[oSpot.lang('map_linz')] = L.tileLayer(self.tmp('tile_api'), {id: 'linz', maxZoom: 17, continuousWorld: true, attribution: 'Sourced from LINZ. CC BY 4.0'});
|
aoLayers[oSpot.lang('map_linz')] = L.tileLayer(self.tmp('tile_api'), {id: 'linz', maxZoom: 17, continuousWorld: true, attribution: 'Sourced from LINZ. CC BY 4.0'});
|
||||||
aoLayers[oSpot.lang('map_usgs')] = L.tileLayer(self.tmp('tile_api'), {id: 'usgs', minZoom: 1, maxZoom: 16});
|
aoLayers[oSpot.lang('map_usgs')] = L.tileLayer(self.tmp('tile_api'), {id: 'usgs', minZoom: 1, maxZoom: 16});
|
||||||
|
//aoLayers[oSpot.lang('map_natgeo')] = L.tileLayer(self.tmp('tile_api'), {id: 'natgeo.pct', minZoom: 5, maxZoom: 14});
|
||||||
|
|
||||||
//Map
|
//Map
|
||||||
var oMap = L.map(self.tmp('$Map')[0], {
|
var oMap = L.map(self.tmp('$Map')[0], {
|
||||||
@@ -609,8 +625,51 @@ function initSpotMessages(aoMessages, aoTracks, bNoFeed) {
|
|||||||
|
|
||||||
oSpot.tmp(['markers', oMsg.id_message], oMarker);
|
oSpot.tmp(['markers', oMsg.id_message], oMarker);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
oSpot.tmp('tracks', aoTracks);
|
||||||
|
next(24, 0, 0, 5);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
function next(iCurrTrack, iCurrIndex, iCurrOffset, iCurrZoom) {
|
||||||
|
var aoTracks = oSpot.tmp('tracks');
|
||||||
|
var aoOffset = {0:[0,0], 1:[-1,0], 2:[-1,1], 3:[0,1], 4:[1,1], 5:[1,0], 6:[1,-1], 7:[0,-1], 8:[-1,-1]};
|
||||||
|
|
||||||
|
console.log('Getting Track '+iCurrTrack+'/'+(aoTracks.features.length - 1)+', '+
|
||||||
|
'Point '+iCurrIndex+'/'+(aoTracks.features[iCurrTrack].geometry.coordinates.length - 1)+', '+
|
||||||
|
'Zoom '+iCurrZoom+'/14, '+
|
||||||
|
'Offset ['+aoOffset[iCurrOffset][0]+','+aoOffset[iCurrOffset][1]+']');
|
||||||
|
|
||||||
|
//Position map
|
||||||
|
var iLat = aoTracks.features[iCurrTrack].geometry.coordinates[iCurrIndex][1] + aoOffset[iCurrOffset][1] * 0.0347910214271;
|
||||||
|
var iLng = aoTracks.features[iCurrTrack].geometry.coordinates[iCurrIndex][0] + aoOffset[iCurrOffset][0] * 0.1016235351560;
|
||||||
|
oSpot.tmp('map').setView(L.latLng(iLat, iLng), iCurrZoom);
|
||||||
|
|
||||||
|
//Go to next
|
||||||
|
iCurrOffset++;
|
||||||
|
if(iCurrZoom < 13 || iCurrOffset > 8) {
|
||||||
|
iCurrOffset = 0;
|
||||||
|
iCurrZoom++;
|
||||||
|
if(iCurrZoom > 14) {
|
||||||
|
iCurrZoom = 5;
|
||||||
|
iCurrIndex += 100;
|
||||||
|
if(!(iCurrIndex in aoTracks.features[iCurrTrack].geometry.coordinates)) {
|
||||||
|
iCurrIndex = 0;
|
||||||
|
iCurrTrack++;
|
||||||
|
if(!(iCurrTrack in aoTracks.features)) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
timer = setTimeout(function(){next(iCurrTrack, iCurrIndex, iCurrOffset, iCurrZoom);}, 1000);
|
||||||
|
}
|
||||||
|
function stop() {
|
||||||
|
clearTimeout(timer);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
function getDivIcon(sIcon) {
|
function getDivIcon(sIcon) {
|
||||||
return L.divIcon({
|
return L.divIcon({
|
||||||
className: '',
|
className: '',
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ $message-bg: #6DFF58;
|
|||||||
$media-color: #333; //#635C28;
|
$media-color: #333; //#635C28;
|
||||||
$media-bg: rgba(255,255,255,.8); //#F3EC9F;
|
$media-bg: rgba(255,255,255,.8); //#F3EC9F;
|
||||||
|
|
||||||
|
//Settings colors
|
||||||
|
$title-color: $post-color;
|
||||||
|
$subtitle-color: #999;
|
||||||
|
|
||||||
//Legend colors
|
//Legend colors
|
||||||
$track-main-color: #00ff78;
|
$track-main-color: #00ff78;
|
||||||
$track-off-track-color: #0000ff;
|
$track-off-track-color: #0000ff;
|
||||||
@@ -338,7 +342,7 @@ $legend-color: $post-color;
|
|||||||
cursor: default;
|
cursor: default;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: visible;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
&.index {
|
&.index {
|
||||||
@@ -520,7 +524,7 @@ $legend-color: $post-color;
|
|||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
background: rgba(255, 255, 255, .4);
|
background: rgba(255, 255, 255, .4);
|
||||||
padding: 1.5rem;
|
padding: 2rem 1rem;
|
||||||
border-radius: 3px 3px 0 0;
|
border-radius: 3px 3px 0 0;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
@@ -529,6 +533,31 @@ $legend-color: $post-color;
|
|||||||
transform: translateX(-10%); //Center Text, not logo. logo width (40px) / image width (200px) = 20%. And centering: 20% / 2 = 10%
|
transform: translateX(-10%); //Center Text, not logo. logo width (40px) / image width (200px) = 20%. And centering: 20% / 2 = 10%
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#last_update {
|
||||||
|
margin-top: -2em;
|
||||||
|
padding: 0 1rem;
|
||||||
|
|
||||||
|
p {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0.8em;
|
||||||
|
margin: 0;
|
||||||
|
color: $subtitle-color;
|
||||||
|
cursor: pointer;
|
||||||
|
transform: translateX(calc(-0.5 * (12px + 0.5em))); //icon width + margin right
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 12px;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr {
|
||||||
|
text-decoration: none;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings-footer {
|
.settings-footer {
|
||||||
@@ -566,6 +595,7 @@ $legend-color: $post-color;
|
|||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
margin: 0 0 $block-spacing;
|
margin: 0 0 $block-spacing;
|
||||||
|
color: $title-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user