fixup callbacks when fetching user
This commit is contained in:
parent
d90c87c35c
commit
d7ee879590
2 changed files with 6 additions and 6 deletions
|
@ -47,9 +47,9 @@
|
||||||
Metamaps.GlobalUI.hideDiv('#yield')
|
Metamaps.GlobalUI.hideDiv('#yield')
|
||||||
|
|
||||||
Metamaps.Header.changeSection(!!Metamaps.Active.Mapper, 'active')
|
Metamaps.Header.changeSection(!!Metamaps.Active.Mapper, 'active')
|
||||||
//Metamaps.Famous.maps.resetScroll() // sets the scroll back to the top
|
|
||||||
Metamaps.GlobalUI.showDiv('#exploreMapsHeader')
|
Metamaps.GlobalUI.showDiv('#exploreMapsHeader')
|
||||||
Metamaps.GlobalUI.showDiv('#exploreMaps')
|
Metamaps.GlobalUI.showDiv('#exploreMaps')
|
||||||
|
$('#exploreMaps').scrollTop(0)
|
||||||
|
|
||||||
Metamaps.GlobalUI.Search.open()
|
Metamaps.GlobalUI.Search.open()
|
||||||
Metamaps.GlobalUI.Search.lock()
|
Metamaps.GlobalUI.Search.lock()
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
if (Metamaps.Router.currentPage === 'mapper') {
|
if (Metamaps.Router.currentPage === 'mapper') {
|
||||||
path += '/' + Metamaps.Maps.Mapper.mapperId
|
path += '/' + Metamaps.Maps.Mapper.mapperId
|
||||||
}
|
}
|
||||||
|
|
||||||
Metamaps.Router.navigate(path)
|
Metamaps.Router.navigate(path)
|
||||||
}
|
}
|
||||||
var navigateTimeout = function () {
|
var navigateTimeout = function () {
|
||||||
|
@ -147,9 +147,9 @@
|
||||||
Metamaps.GlobalUI.Search.lock()
|
Metamaps.GlobalUI.Search.lock()
|
||||||
Metamaps.GlobalUI.showDiv('#exploreMaps')
|
Metamaps.GlobalUI.showDiv('#exploreMaps')
|
||||||
Metamaps.GlobalUI.showDiv('#exploreMapsHeader')
|
Metamaps.GlobalUI.showDiv('#exploreMapsHeader')
|
||||||
// Metamaps.Famous.maps.resetScroll() // sets scroll back to top
|
$('#exploreMaps').scrollTop(0)
|
||||||
if (id) {
|
if (id) {
|
||||||
Metamaps.Header.fetchUserThenchangeSection(!!Metamaps.Active.Mapper, id)
|
Metamaps.Header.fetchUserThenChangeSection(!!Metamaps.Active.Mapper, id)
|
||||||
}
|
}
|
||||||
else Metamaps.Header.changeSection(!!Metamaps.Active.Mapper, section)
|
else Metamaps.Header.changeSection(!!Metamaps.Active.Mapper, section)
|
||||||
Metamaps.GlobalUI.hideDiv('#yield')
|
Metamaps.GlobalUI.hideDiv('#yield')
|
||||||
|
|
|
@ -57,11 +57,11 @@ Metamaps.Views.init = function () {
|
||||||
this.listenTo(this.collection, 'successOnFetch', this.handleSuccess)
|
this.listenTo(this.collection, 'successOnFetch', this.handleSuccess)
|
||||||
this.listenTo(this.collection, 'errorOnFetch', this.handleError)
|
this.listenTo(this.collection, 'errorOnFetch', this.handleError)
|
||||||
},
|
},
|
||||||
render: function (mapperObj, cbArg) {
|
render: function (mapperObj, cb) {
|
||||||
var that = this
|
var that = this
|
||||||
|
|
||||||
if (typeof mapperObj === 'function') {
|
if (typeof mapperObj === 'function') {
|
||||||
var cb = mapperObj
|
cb = mapperObj
|
||||||
mapperObj = null
|
mapperObj = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue