oxjs/source/Ox.UI/js/Form/Ox.PlaceInput.js
2011-11-05 17:46:53 +01:00

48 lines
1.2 KiB
JavaScript

// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
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 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;
};