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

44 lines
1 KiB
JavaScript

'use strict';
/*@
Ox.PlaceInput <f:Ox.FormElementGroup> 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 that;
self = Ox.extend(self || {}, {
options: Ox.extend({
id: '',
value: 'United States'
}, options)
});
that = Ox.FormElementGroup({
id: self.options.id,
elements: [
Ox.Input({
id: 'input',
value: self.options.value
}),
Ox.PlacePicker({
id: 'picker',
overlap: 'left',
value: self.options.value
})
],
float: 'right'
}, self)
.bindEvent('change', change);
function change() {
}
return that;
};