Add Project Title
This commit is contained in:
@@ -7,18 +7,18 @@
|
||||
<div id="settings">
|
||||
<div id="settings-panel">
|
||||
<div class="settings-header">
|
||||
<div class="logo"><img src="images/logo_black.png" /></div>
|
||||
<div id="last_update"><p><span><img src="images/spot-logo-only.svg" alt="" /></span><abbr></abbr></p></div>
|
||||
<div class="logo"><img src="images/logo_black.png" /></div>
|
||||
<div id="last_update"><p><span><img src="images/spot-logo-only.svg" alt="" /></span><abbr></abbr></p></div>
|
||||
</div>
|
||||
<div class="settings-sections">
|
||||
<div id="settings-sections-scrollbox">
|
||||
<div class="settings-section">
|
||||
<h1><i class="fa fa-fw push fa-map"></i>[#]lang:maps[#]</h1>
|
||||
<div id="layers"></div>
|
||||
<h1><i class="fa fa-fw push fa-project"></i>[#]lang:hikes[#]</h1>
|
||||
<div id="settings-projects"></div>
|
||||
</div>
|
||||
<div class="settings-section">
|
||||
<h1><i class="fa fa-fw push fa-project"></i>[#]lang:projects[#]</h1>
|
||||
<div id="settings-projects"></div>
|
||||
<h1><i class="fa fa-fw push fa-map"></i>[#]lang:maps[#]</h1>
|
||||
<div id="layers"></div>
|
||||
</div>
|
||||
<div class="settings-section newsletter">
|
||||
<h1><i class="fa fa-fw push fa-newsletter"></i>[#]lang:newsletter[#]</h1>
|
||||
@@ -38,6 +38,7 @@
|
||||
<div id="loading"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="title" class="leaflet-control spot-control"><span id="project_name" class="leaflet-control-attribution"></span></div>
|
||||
<div id="elems">
|
||||
<div id="settings-button" class="spot-control"><i class="fa fa-menu"></i></div>
|
||||
<div id="post-button" class="spot-control"><i class="fa"></i></div>
|
||||
@@ -101,8 +102,12 @@ oSpot.onKeydown = function(oEvent) {
|
||||
|
||||
function toggleFeedPanel(bShow, sMapAction) {
|
||||
self.tmp('$Projects').toggleClass('with-feed', (typeof bShow === 'undefined')?null:bShow);
|
||||
bShow = isFeedPanelOpen();
|
||||
oSpot.onResize();
|
||||
if(isMobile()) $('#settings-button').toggle(!isFeedPanelOpen());
|
||||
if(isMobile()) {
|
||||
$('#settings-button').toggle(!bShow);
|
||||
toggleTitle(!bShow);
|
||||
}
|
||||
|
||||
sMapAction = sMapAction || 'panTo';
|
||||
switch(sMapAction) {
|
||||
@@ -120,7 +125,9 @@ function isFeedPanelOpen() {
|
||||
function toggleSettingsPanel(bShow, sMapAction) {
|
||||
self.tmp('$Projects').toggleClass('with-settings', (typeof bShow === 'undefined')?null:bShow);
|
||||
oSpot.onResize();
|
||||
if(isMobile()) $('#post-button').toggle(!isSettingsPanelOpen());
|
||||
bShow = isSettingsPanelOpen();
|
||||
if(isMobile()) $('#post-button').toggle(!bShow);
|
||||
toggleTitle(!bShow);
|
||||
|
||||
sMapAction = sMapAction || 'panTo';
|
||||
switch(sMapAction) {
|
||||
@@ -134,6 +141,11 @@ function isSettingsPanelOpen() {
|
||||
return self.tmp('$Projects').hasClass('with-settings');
|
||||
}
|
||||
|
||||
function toggleTitle(bShow) {
|
||||
if(bShow) self.tmp('$Title').delay(300).fadeTo(500, 1);
|
||||
else self.tmp('$Title').css('opacity', '0');
|
||||
}
|
||||
|
||||
function updateSettingsPanel(asLastUpdate) {
|
||||
var $LastUpdate = self.tmp('$Settings').find('#last_update').toggle(self.vars(['project', 'mode']) == self.consts.modes.blog && asLastUpdate.unix_time > 0);
|
||||
$LastUpdate.find('abbr')
|
||||
@@ -154,6 +166,7 @@ function initPage(asHash) {
|
||||
self.tmp('$PostList', $('#posts_list'));
|
||||
self.tmp('$Feed', $('#feed'));
|
||||
self.tmp('$Settings', $('#settings'));
|
||||
self.tmp('$Title', $('#title'));
|
||||
self.tmp('updatable', true);
|
||||
self.tmp('out-of-data', false);
|
||||
self.tmp('tile_api', getWmtsApiUrl('{id}', '{y}', '{x}', '{z}'));
|
||||
@@ -215,6 +228,7 @@ function initProject(sProjectCodeName, oFocusPost){
|
||||
|
||||
//Page Title
|
||||
self.setPageTitle(oSpot.vars(['project', 'name']));
|
||||
self.tmp('$Title').find('#project_name').text(oSpot.vars(['project', 'name']));
|
||||
|
||||
//Load Track & Markers
|
||||
$.when(
|
||||
|
||||
Reference in New Issue
Block a user