this will clear up any remaining issues with urls ending up wrong

This commit is contained in:
Connor Turland 2015-01-30 21:08:37 -05:00
parent 4ca12c70ab
commit 4d7695a767

View file

@ -10,7 +10,8 @@
"maps/:id": "maps" // #maps/7 "maps/:id": "maps" // #maps/7
}, },
home: function () { home: function () {
clearTimeout(Metamaps.routerTimeoutId);
if (Metamaps.Active.Mapper) document.title = 'Explore Active Maps | Metamaps'; if (Metamaps.Active.Mapper) document.title = 'Explore Active Maps | Metamaps';
else document.title = 'Home | Metamaps'; else document.title = 'Home | Metamaps';
@ -67,7 +68,8 @@
Metamaps.Active.Topic = null; Metamaps.Active.Topic = null;
}, },
explore: function (section, id) { explore: function (section, id) {
clearTimeout(Metamaps.routerTimeoutId);
// just capitalize the variable section // just capitalize the variable section
// either 'featured', 'mapper', or 'active' // either 'featured', 'mapper', or 'active'
var capitalize = section.charAt(0).toUpperCase() + section.slice(1); var capitalize = section.charAt(0).toUpperCase() + section.slice(1);
@ -140,7 +142,8 @@
Metamaps.Active.Topic = null; Metamaps.Active.Topic = null;
}, },
maps: function (id) { maps: function (id) {
clearTimeout(Metamaps.routerTimeoutId);
document.title = 'Map ' + id + ' | Metamaps'; document.title = 'Map ' + id + ' | Metamaps';
Metamaps.currentSection = "map"; Metamaps.currentSection = "map";
@ -173,6 +176,7 @@
Metamaps.Map.launch(id); Metamaps.Map.launch(id);
}, },
topics: function (id) { topics: function (id) {
clearTimeout(Metamaps.routerTimeoutId);
document.title = 'Topic ' + id + ' | Metamaps'; document.title = 'Topic ' + id + ' | Metamaps';