fixup callbacks when fetching user

This commit is contained in:
Connor Turland 2016-08-17 13:28:37 +00:00
parent d90c87c35c
commit d7ee879590
2 changed files with 6 additions and 6 deletions

View file

@ -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()
@ -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')

View file

@ -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
} }