fix mapper page (#1050)

This commit is contained in:
Devin Howard 2017-01-28 15:44:38 -05:00 committed by GitHub
parent c60f7f4525
commit 53bc4ee1c8
2 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@
Metamaps.currentPage = "mapper";
Metamaps.ServerData.Mapper = {
models: <%= @maps.to_json.html_safe %>,
id: <%= params[:id] %>
mapperId: <%= params[:id] %>
};
Metamaps.GlobalUI.Search.focus();
</script>

View file

@ -80,11 +80,11 @@ const DataModel = {
var myCollection = serverData.Mine ? serverData.Mine : []
var sharedCollection = serverData.Shared ? serverData.Shared : []
var starredCollection = serverData.Starred ? serverData.Starred : []
var mapperCollection = []
var mapperCollection = serverData.Mapper ? serverData.Mapper : []
var mapperOptionsObj = { id: 'mapper', sortBy: 'updated_at' }
if (self.Maps.Mapper.mapperId) {
if (serverData.Mapper.mapperId) {
mapperCollection = serverData.Mapper.models
mapperOptionsObj.mapperId = serverData.Mapper.id
mapperOptionsObj.mapperId = serverData.Mapper.mapperId
}
var featuredCollection = serverData.Featured ? serverData.Featured : []
var activeCollection = serverData.Active ? serverData.Active : []