set page title
This commit is contained in:
@@ -70,12 +70,13 @@ function initPage(asHash) {
|
|||||||
self.tmp('$Map', $('#map'));
|
self.tmp('$Map', $('#map'));
|
||||||
self.tmp('updatable', true);
|
self.tmp('updatable', true);
|
||||||
self.tmp('out-of-data', false);
|
self.tmp('out-of-data', false);
|
||||||
toggleFeedPanel(!isMobile(), false);
|
|
||||||
oSpot.onResize();
|
|
||||||
self.tmp('tile_api', getWmtsApiUrl('{id}', '{y}', '{x}', '{z}'));
|
self.tmp('tile_api', getWmtsApiUrl('{id}', '{y}', '{x}', '{z}'));
|
||||||
self.tmp('markers', 'object');
|
self.tmp('markers', 'object');
|
||||||
self.tmp('marker_size', {width: 32, height: 32});
|
self.tmp('marker_size', {width: 32, height: 32});
|
||||||
|
|
||||||
|
toggleFeedPanel(!isMobile());
|
||||||
|
oSpot.onResize();
|
||||||
|
|
||||||
//Lightbox options
|
//Lightbox options
|
||||||
lightbox.option({
|
lightbox.option({
|
||||||
alwaysShowNavOnTouchDevices: true,
|
alwaysShowNavOnTouchDevices: true,
|
||||||
@@ -114,6 +115,9 @@ 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]));
|
||||||
|
|
||||||
|
//Page Title
|
||||||
|
self.setPageTitle(oSpot.vars(['project', 'name']));
|
||||||
|
|
||||||
//Timezone difference notice
|
//Timezone difference notice
|
||||||
var bSameTZ = (oSpot.consts.site_timezone == oSpot.vars(['project', 'timezone']));
|
var bSameTZ = (oSpot.consts.site_timezone == oSpot.vars(['project', 'timezone']));
|
||||||
self.tmp('site_tz_notice', bSameTZ?'':' ('+oSpot.consts.site_timezone_desc+')');
|
self.tmp('site_tz_notice', bSameTZ?'':' ('+oSpot.consts.site_timezone_desc+')');
|
||||||
|
|||||||
@@ -169,8 +169,7 @@ function Spot(asGlobals)
|
|||||||
self.vars('page', sPageName);
|
self.vars('page', sPageName);
|
||||||
|
|
||||||
//Update Page Title
|
//Update Page Title
|
||||||
var sDetail = asHash.items[0] || '';
|
this.setPageTitle(sPageName+' '+(asHash.items[0] || ''));
|
||||||
document.title = self.consts.title+' - '+sPageName+' '+sDetail;
|
|
||||||
|
|
||||||
//Replacing DOM
|
//Replacing DOM
|
||||||
var $Dom = $(self.consts.pages[sPageName]);
|
var $Dom = $(self.consts.pages[sPageName]);
|
||||||
@@ -185,6 +184,10 @@ function Spot(asGlobals)
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setPageTitle = function(sTitle) {
|
||||||
|
document.title = self.consts.title+' - '+sTitle;
|
||||||
|
};
|
||||||
|
|
||||||
this.splash = function($Dom, asHash, bFirstPage)
|
this.splash = function($Dom, asHash, bFirstPage)
|
||||||
{
|
{
|
||||||
//Switch main content
|
//Switch main content
|
||||||
|
|||||||
Reference in New Issue
Block a user