2011-11-05 16:46:53 +00:00
|
|
|
'use strict';
|
|
|
|
|
2011-05-16 10:49:48 +00:00
|
|
|
/*@
|
2012-05-31 10:32:54 +00:00
|
|
|
Ox.PlaceInput <f> PlaceInput Object
|
2011-05-16 10:49:48 +00:00
|
|
|
options <o> Options object
|
|
|
|
id <s> element id
|
|
|
|
value <s|United States> default value of place input
|
2012-07-04 11:29:18 +00:00
|
|
|
self <o> Shared private variable
|
|
|
|
([options[, self]]) -> <o:Ox.FormElementGroup> PlaceInput Object
|
2011-05-16 10:49:48 +00:00
|
|
|
@*/
|
|
|
|
|
2011-04-22 22:03:10 +00:00
|
|
|
Ox.PlaceInput = function(options, self) {
|
|
|
|
|
2011-06-19 17:48:32 +00:00
|
|
|
var that;
|
2011-09-17 18:36:09 +00:00
|
|
|
self = Ox.extend(self || {}, {
|
|
|
|
options: Ox.extend({
|
2011-04-22 22:03:10 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
};
|