diff --git a/masks/project.html b/masks/project.html index db92e0d..10b02fd 100755 --- a/masks/project.html +++ b/masks/project.html @@ -70,12 +70,13 @@ function initPage(asHash) { self.tmp('$Map', $('#map')); self.tmp('updatable', true); self.tmp('out-of-data', false); - toggleFeedPanel(!isMobile(), false); - oSpot.onResize(); self.tmp('tile_api', getWmtsApiUrl('{id}', '{y}', '{x}', '{z}')); self.tmp('markers', 'object'); self.tmp('marker_size', {width: 32, height: 32}); + toggleFeedPanel(!isMobile()); + oSpot.onResize(); + //Lightbox options lightbox.option({ alwaysShowNavOnTouchDevices: true, @@ -114,6 +115,9 @@ function initProject(sProjectCodeName){ self.tmp('first_exec', false); self.vars('project', self.vars(['projects', sProjectCodeName])); + //Page Title + self.setPageTitle(oSpot.vars(['project', 'name'])); + //Timezone difference notice var bSameTZ = (oSpot.consts.site_timezone == oSpot.vars(['project', 'timezone'])); self.tmp('site_tz_notice', bSameTZ?'':' ('+oSpot.consts.site_timezone_desc+')'); diff --git a/script/spot.js b/script/spot.js index 0a57320..666084a 100755 --- a/script/spot.js +++ b/script/spot.js @@ -169,8 +169,7 @@ function Spot(asGlobals) self.vars('page', sPageName); //Update Page Title - var sDetail = asHash.items[0] || ''; - document.title = self.consts.title+' - '+sPageName+' '+sDetail; + this.setPageTitle(sPageName+' '+(asHash.items[0] || '')); //Replacing DOM 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) { //Switch main content