some listmap fixes
This commit is contained in:
parent
60662a437a
commit
5e54f5394d
3 changed files with 16 additions and 8 deletions
|
@ -117,6 +117,8 @@ Ox.Form = function(options, self) {
|
|||
if (arguments.length == 0) {
|
||||
self.$items.forEach(function($item, i) {
|
||||
values[self.itemIds[i]] = self.$items[i].value();
|
||||
//fixme: make the following work
|
||||
//values[self.itemIds[i]] = self.$items[i].options('value');
|
||||
});
|
||||
//Ox.print('VALUES', values)
|
||||
return values;
|
||||
|
|
|
@ -38,7 +38,8 @@ Ox.Select = function(options, self) {
|
|||
size: 'medium',
|
||||
title: '',
|
||||
type: 'text', // can be 'text' or 'image'
|
||||
width: 'auto'
|
||||
width: 'auto',
|
||||
value: [],
|
||||
})
|
||||
// fixme: make default selection restorable
|
||||
// or allow for extra action items below options
|
||||
|
@ -168,7 +169,9 @@ Ox.Select = function(options, self) {
|
|||
}
|
||||
|
||||
self.setOption = function(key, value) {
|
||||
|
||||
if (key == 'value') {
|
||||
that.selectItem(value);
|
||||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
|
@ -176,6 +176,11 @@ Ox.Map = function(options, self) {
|
|||
self.isAsync = Ox.isFunction(self.options.places);
|
||||
self.mapHeight = getMapHeight();
|
||||
self.minZoom = getMinZoom();
|
||||
self.placeKeys = [
|
||||
'id', 'name', 'alternativeNames', 'geoname', 'countryCode', 'type',
|
||||
'lat', 'lng', 'south', 'west', 'north', 'east', 'area',
|
||||
'editable'
|
||||
],
|
||||
self.scaleMeters = [
|
||||
50000000, 20000000, 10000000,
|
||||
5000000, 2000000, 1000000,
|
||||
|
@ -778,11 +783,7 @@ Ox.Map = function(options, self) {
|
|||
operator: '&'
|
||||
});
|
||||
self.options.places({
|
||||
keys: [
|
||||
'id', 'name', 'geoname', 'countryCode',
|
||||
'lat', 'lng', 'south', 'west', 'north', 'east',
|
||||
'editable'
|
||||
],
|
||||
keys: self.placeKeys,
|
||||
query: {
|
||||
conditions: Ox.merge([
|
||||
{key: 'lat', value: [south, north], operator: '-'}
|
||||
|
@ -1001,13 +1002,15 @@ Ox.Map = function(options, self) {
|
|||
if (place) {
|
||||
select();
|
||||
} else {
|
||||
Ox.print()
|
||||
// async && place doesn't exist yet
|
||||
self.options.places({
|
||||
query: {
|
||||
keys: self.placeKeys,
|
||||
conditions: [
|
||||
{key: 'id', value: id, operator: '='}
|
||||
],
|
||||
operator: ''
|
||||
operator: '&'
|
||||
}
|
||||
}, function(results) {
|
||||
place = new Ox.MapPlace(Ox.extend({
|
||||
|
|
Loading…
Reference in a new issue