forked from 0x2620/oxjs
remove new for all Ox.Elements, dont declare arguments again, add some semicolons
This commit is contained in:
parent
3eab11e967
commit
b27ed00356
69 changed files with 430 additions and 440 deletions
|
|
@ -13,21 +13,21 @@ Ox.PlacePicker <f:Ox.Element> PlacePicker Object
|
|||
|
||||
Ox.PlacePicker = function(options, self) {
|
||||
|
||||
var self = $.extend(self || {}, {
|
||||
var that;
|
||||
self = $.extend(self || {}, {
|
||||
options: $.extend({
|
||||
id: '',
|
||||
value: 'United States'
|
||||
}, options)
|
||||
}),
|
||||
that;
|
||||
});
|
||||
|
||||
self.$element = new Ox.Element()
|
||||
self.$element = Ox.Element()
|
||||
.css({
|
||||
width: '256px',
|
||||
height: '192px'
|
||||
})
|
||||
.append(
|
||||
self.$topBar = new Ox.Bar({
|
||||
self.$topBar = Ox.Bar({
|
||||
size: 16
|
||||
})
|
||||
.css({
|
||||
|
|
@ -35,7 +35,7 @@ Ox.PlacePicker = function(options, self) {
|
|||
WebkitBorderRadius: '0 8px 0 0'
|
||||
})
|
||||
.append(
|
||||
self.$input = new Ox.Input({
|
||||
self.$input = Ox.Input({
|
||||
clear: true,
|
||||
id: self.options.id + 'Input',
|
||||
placeholder: 'Find',
|
||||
|
|
@ -45,18 +45,18 @@ Ox.PlacePicker = function(options, self) {
|
|||
)
|
||||
)
|
||||
.append(
|
||||
self.$container = new Ox.Element()
|
||||
self.$container = Ox.Element()
|
||||
.css({
|
||||
width: '256px',
|
||||
height: '160px'
|
||||
})
|
||||
)
|
||||
.append(
|
||||
self.$bottomBar = new Ox.Bar({
|
||||
self.$bottomBar = Ox.Bar({
|
||||
size: 16
|
||||
})
|
||||
.append(
|
||||
self.$range = new Ox.Range({
|
||||
self.$range = Ox.Range({
|
||||
arrows: true,
|
||||
id: self.options.id + 'Range',
|
||||
max: 22,
|
||||
|
|
@ -83,7 +83,7 @@ Ox.PlacePicker = function(options, self) {
|
|||
WebkitBorderRadius: 0
|
||||
});
|
||||
|
||||
that = new Ox.Picker({
|
||||
that = Ox.Picker({
|
||||
element: self.$element,
|
||||
elementHeight: 192,
|
||||
elementWidth: 256,
|
||||
|
|
@ -93,7 +93,7 @@ Ox.PlacePicker = function(options, self) {
|
|||
}, self)
|
||||
.bindEvent('show', showPicker);
|
||||
|
||||
that.$label.bind('click', clickLabel)
|
||||
that.$label.bind('click', clickLabel);
|
||||
|
||||
self.map = false;
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ Ox.PlacePicker = function(options, self) {
|
|||
//Ox.print('findPlace', data);
|
||||
self.$map.find(data.value, function(place) {
|
||||
place && that.$label.html(place.geoname);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function onSelect(event, data) {
|
||||
|
|
@ -133,7 +133,7 @@ Ox.PlacePicker = function(options, self) {
|
|||
|
||||
function showPicker() {
|
||||
if (!self.map) {
|
||||
self.$map = new Ox.Map({
|
||||
self.$map = Ox.Map({
|
||||
clickable: true,
|
||||
id: self.options.id + 'Map',
|
||||
//places: [self.options.value]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue