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) {
|
if (arguments.length == 0) {
|
||||||
self.$items.forEach(function($item, i) {
|
self.$items.forEach(function($item, i) {
|
||||||
values[self.itemIds[i]] = self.$items[i].value();
|
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)
|
//Ox.print('VALUES', values)
|
||||||
return values;
|
return values;
|
||||||
|
|
|
@ -38,7 +38,8 @@ Ox.Select = function(options, self) {
|
||||||
size: 'medium',
|
size: 'medium',
|
||||||
title: '',
|
title: '',
|
||||||
type: 'text', // can be 'text' or 'image'
|
type: 'text', // can be 'text' or 'image'
|
||||||
width: 'auto'
|
width: 'auto',
|
||||||
|
value: [],
|
||||||
})
|
})
|
||||||
// fixme: make default selection restorable
|
// fixme: make default selection restorable
|
||||||
// or allow for extra action items below options
|
// or allow for extra action items below options
|
||||||
|
@ -168,7 +169,9 @@ Ox.Select = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.setOption = function(key, value) {
|
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.isAsync = Ox.isFunction(self.options.places);
|
||||||
self.mapHeight = getMapHeight();
|
self.mapHeight = getMapHeight();
|
||||||
self.minZoom = getMinZoom();
|
self.minZoom = getMinZoom();
|
||||||
|
self.placeKeys = [
|
||||||
|
'id', 'name', 'alternativeNames', 'geoname', 'countryCode', 'type',
|
||||||
|
'lat', 'lng', 'south', 'west', 'north', 'east', 'area',
|
||||||
|
'editable'
|
||||||
|
],
|
||||||
self.scaleMeters = [
|
self.scaleMeters = [
|
||||||
50000000, 20000000, 10000000,
|
50000000, 20000000, 10000000,
|
||||||
5000000, 2000000, 1000000,
|
5000000, 2000000, 1000000,
|
||||||
|
@ -778,11 +783,7 @@ Ox.Map = function(options, self) {
|
||||||
operator: '&'
|
operator: '&'
|
||||||
});
|
});
|
||||||
self.options.places({
|
self.options.places({
|
||||||
keys: [
|
keys: self.placeKeys,
|
||||||
'id', 'name', 'geoname', 'countryCode',
|
|
||||||
'lat', 'lng', 'south', 'west', 'north', 'east',
|
|
||||||
'editable'
|
|
||||||
],
|
|
||||||
query: {
|
query: {
|
||||||
conditions: Ox.merge([
|
conditions: Ox.merge([
|
||||||
{key: 'lat', value: [south, north], operator: '-'}
|
{key: 'lat', value: [south, north], operator: '-'}
|
||||||
|
@ -1001,13 +1002,15 @@ Ox.Map = function(options, self) {
|
||||||
if (place) {
|
if (place) {
|
||||||
select();
|
select();
|
||||||
} else {
|
} else {
|
||||||
|
Ox.print()
|
||||||
// async && place doesn't exist yet
|
// async && place doesn't exist yet
|
||||||
self.options.places({
|
self.options.places({
|
||||||
query: {
|
query: {
|
||||||
|
keys: self.placeKeys,
|
||||||
conditions: [
|
conditions: [
|
||||||
{key: 'id', value: id, operator: '='}
|
{key: 'id', value: id, operator: '='}
|
||||||
],
|
],
|
||||||
operator: ''
|
operator: '&'
|
||||||
}
|
}
|
||||||
}, function(results) {
|
}, function(results) {
|
||||||
place = new Ox.MapPlace(Ox.extend({
|
place = new Ox.MapPlace(Ox.extend({
|
||||||
|
|
Loading…
Reference in a new issue