2011-04-23 16:45:50 +00:00
|
|
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
2011-05-16 10:49:48 +00:00
|
|
|
|
|
|
|
/*@
|
|
|
|
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
|
|
|
|
@*/
|
|
|
|
|
2011-04-22 22:03:10 +00:00
|
|
|
Ox.PlaceInput = function(options, self) {
|
|
|
|
|
2011-06-19 17:48:32 +00:00
|
|
|
var that;
|
|
|
|
self = $.extend(self || {}, {
|
2011-04-22 22:03:10 +00:00
|
|
|
options: $.extend({
|
|
|
|
id: '',
|
|
|
|
value: 'United States'
|
|
|
|
}, options)
|
2011-06-19 17:48:32 +00:00
|
|
|
});
|
|
|
|
that = Ox.FormElementGroup({
|
2011-04-22 22:03:10 +00:00
|
|
|
id: self.options.id,
|
|
|
|
elements: [
|
2011-06-19 17:48:32 +00:00
|
|
|
Ox.Input({
|
2011-04-22 22:03:10 +00:00
|
|
|
id: 'input',
|
|
|
|
value: self.options.value
|
|
|
|
}),
|
2011-06-19 17:48:32 +00:00
|
|
|
Ox.PlacePicker({
|
2011-04-22 22:03:10 +00:00
|
|
|
id: 'picker',
|
|
|
|
overlap: 'left',
|
|
|
|
value: self.options.value
|
|
|
|
})
|
|
|
|
],
|
|
|
|
float: 'right'
|
|
|
|
}, self)
|
|
|
|
.bindEvent('change', change);
|
|
|
|
|
|
|
|
function change() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return that;
|
|
|
|
|
|
|
|
};
|