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