diff --git a/source/Ox.UI/js/Form/Ox.Form.js b/source/Ox.UI/js/Form/Ox.Form.js index 3df3eccf..c694e984 100644 --- a/source/Ox.UI/js/Form/Ox.Form.js +++ b/source/Ox.UI/js/Form/Ox.Form.js @@ -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; diff --git a/source/Ox.UI/js/Form/Ox.Select.js b/source/Ox.UI/js/Form/Ox.Select.js index 8429a146..4d45fe75 100644 --- a/source/Ox.UI/js/Form/Ox.Select.js +++ b/source/Ox.UI/js/Form/Ox.Select.js @@ -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); + } }; /*@ diff --git a/source/Ox.UI/js/Map/Ox.Map.js b/source/Ox.UI/js/Map/Ox.Map.js index baea2aa3..96baff04 100644 --- a/source/Ox.UI/js/Map/Ox.Map.js +++ b/source/Ox.UI/js/Map/Ox.Map.js @@ -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({