update cities example

This commit is contained in:
rolux 2012-06-19 19:32:47 +02:00
parent e1bd7d0cb3
commit 5fb5198008

View file

@ -101,12 +101,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
); );
*/ */
var listAPI = Ox.api(cities, { var $preview = Ox.Button({
cache: true,
sort: ['-population', '+name'],
sums: ['population']
}),
$preview = Ox.Button({
disabled: true, disabled: true,
selectable: true, selectable: true,
title: 'view', title: 'view',
@ -127,8 +122,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
}) })
.bindEvent({ .bindEvent({
submit: function(data) { submit: function(data) {
listAPI({ $list.options({
keys: [],
query: { query: {
conditions: data.value ? [ conditions: data.value ? [
{ {
@ -140,12 +134,15 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
key: 'region', key: 'region',
operator: '=', operator: '=',
value: data.value value: data.value
},
{
key: 'continent',
operator: '=',
value: data.value
} }
] : [], ] : [],
operator: '|' operator: '|'
} }
}, function(result) {
$list.options({items: result.data.items});
}); });
} }
}), }),
@ -495,9 +492,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
}, },
{ {
element: $map.bindEvent({ element: $map.bindEvent({
resizeend: function(data) { resizeend: $map.resizeMap
$map.resizeMap();
}
}) })
} }
], ],
@ -512,11 +507,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() {
}); });
} }
Ox.$window.bind({ Ox.$window.bind({resize: $map.resizeMap});
resize: function() {
$map.resizeMap();
}
});
}); });