oxjs/source/Ox.UI/js/Form/Ox.PlaceInput.js
2011-05-16 12:49:48 +02:00

47 lines
1.1 KiB
JavaScript

// vim: et:ts=4:sw=4:sts=4:ft=js
/*@
Ox.PlaceInput <f:Ox.FormElementGroup> PlaceInput Object
() -> <f> PlaceInput Object
(options) -> <f> PlaceInput Object
(options, self) -> <f> PlaceInput Object
options <o> Options object
id <s> element id
value <s|United States> default value of place input
self <o> shared private variable
@*/
Ox.PlaceInput = function(options, self) {
var self = $.extend(self || {}, {
options: $.extend({
id: '',
value: 'United States'
}, options)
}),
that;
that = new Ox.FormElementGroup({
id: self.options.id,
elements: [
new Ox.Input({
id: 'input',
value: self.options.value
}),
new Ox.PlacePicker({
id: 'picker',
overlap: 'left',
value: self.options.value
})
],
float: 'right'
}, self)
.bindEvent('change', change);
function change() {
}
return that;
};