oxjs/source/UI/js/Form/PlaceInput.js

45 lines
1 KiB
JavaScript
Raw Normal View History

2011-11-05 17:46:53 +01:00
'use strict';
2011-05-16 12:49:48 +02:00
/*@
2012-05-31 12:32:54 +02:00
Ox.PlaceInput <f> PlaceInput Object
2011-05-16 12:49:48 +02:00
options <o> Options object
id <s> element id
value <s|United States> default value of place input
self <o> Shared private variable
([options[, self]]) -> <o:Ox.FormElementGroup> PlaceInput Object
2011-05-16 12:49:48 +02:00
@*/
2011-04-23 00:03:10 +02:00
Ox.PlaceInput = function(options, self) {
var that;
self = Ox.extend(self || {}, {
options: Ox.extend({
2011-04-23 00:03:10 +02:00
id: '',
value: 'United States'
}, options)
});
that = Ox.FormElementGroup({
2011-04-23 00:03:10 +02:00
id: self.options.id,
elements: [
Ox.Input({
2011-04-23 00:03:10 +02:00
id: 'input',
value: self.options.value
}),
Ox.PlacePicker({
2011-04-23 00:03:10 +02:00
id: 'picker',
overlap: 'left',
value: self.options.value
})
],
float: 'right'
}, self)
.bindEvent('change', change);
function change() {
}
return that;
};