From 30fa62962dcfb2ad7d3efa3371c8e5d2dc832cff Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 18 Jun 2011 20:48:49 +0200 Subject: [PATCH] load places --- static/js/pandora/pandora.js | 4 ++-- static/js/pandora/ui/list.js | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/static/js/pandora/pandora.js b/static/js/pandora/pandora.js index ba793c5f..365aa4be 100644 --- a/static/js/pandora/pandora.js +++ b/static/js/pandora/pandora.js @@ -92,8 +92,8 @@ pandora.reloadGroups = function(i) { } }); } else if (view == 'map') { - pandora.$ui.list.options({ - items: function(data, callback) { + pandora.$ui.map.options({ + places: function(data, callback) { return pandora.api.findPlaces($.extend(data, { itemQuery: query }), callback); diff --git a/static/js/pandora/ui/list.js b/static/js/pandora/ui/list.js index 8e48f668..4f5eccd0 100644 --- a/static/js/pandora/ui/list.js +++ b/static/js/pandora/ui/list.js @@ -138,9 +138,12 @@ pandora.ui.list = function(view) { // fixme: remove view argument element: pandora.$ui.map = Ox.Map({ height: window.innerHeight - pandora.user.ui.showGroups * pandora.user.ui.groupsSize - 61, places: function(data, callback) { - return pandora.api.findPlaces($.extend({ - query: {conditions: [], operator: ''} - }, data), callback); + var itemQuery = pandora.Query.toObject(), + query = {conditions:[]}; + return pandora.api.findPlaces($.extend(data, { + itemQuery: itemQuery, + query: query + }), callback); }, showTypes: true, toolbar: true,