1
0
Fork 0
forked from 0x2620/oxjs

remove new for all Ox.Elements, dont declare arguments again, add some semicolons

This commit is contained in:
j 2011-06-19 19:48:32 +02:00
commit b27ed00356
69 changed files with 430 additions and 440 deletions

View file

@ -89,7 +89,7 @@ Ox.Map <function> Basic map object
Ox.Map = function(options, self) {
self = self || {};
var that = new Ox.Element({}, self)
var that = Ox.Element({}, self)
.defaults({
// fixme: isClickable? hasZoombar?
clickable: false,
@ -200,7 +200,7 @@ Ox.Map = function(options, self) {
});
if (self.options.toolbar) {
self.$toolbar = new Ox.Bar({
self.$toolbar = Ox.Bar({
size: 24
})
.appendTo(that);
@ -219,7 +219,7 @@ Ox.Map = function(options, self) {
.css({float: 'left', margin: '4px'})
.appendTo(self.$toolbar);
/*
self.$labelsButton = new Ox.Checkbox({
self.$labelsButton = Ox.Checkbox({
title: 'Labels',
width: 64
})
@ -229,7 +229,7 @@ Ox.Map = function(options, self) {
})
.appendTo(self.$toolbar)
*/
self.$findInput = new Ox.Input({
self.$findInput = Ox.Input({
clear: true,
placeholder: self.options.findPlaceholder,
width: 192
@ -241,7 +241,7 @@ Ox.Map = function(options, self) {
.appendTo(self.$toolbar)
}
self.$map = new Ox.Element()
self.$map = Ox.Element()
.css({
left: 0,
top: self.options.toolbar * 24 + 'px',
@ -251,7 +251,7 @@ Ox.Map = function(options, self) {
.appendTo(that);
if (self.options.zoombar) {
self.$zoombar = new Ox.Bar({
self.$zoombar = Ox.Bar({
size: 16
})
.css({
@ -261,7 +261,7 @@ Ox.Map = function(options, self) {
}
if (self.options.statusbar) {
self.$statusbar = new Ox.Bar({
self.$statusbar = Ox.Bar({
size: 24
})
.css({
@ -275,21 +275,21 @@ Ox.Map = function(options, self) {
})
.css({float: 'left', margin: '4px 2px 4px 4px'})
.appendTo(self.$statusbar.$element);
self.$placeNameInput = new Ox.Input({
self.$placeNameInput = Ox.Input({
placeholder: 'Name',
width: 96
})
//.css({position: 'absolute', left: 4, top: 4})
.css({float: 'left', margin: '4px 2px 4px 2px'})
.appendTo(self.$statusbar);
self.$placeGeonameInput = new Ox.Input({
self.$placeGeonameInput = Ox.Input({
placeholder: 'Geoname',
width: 96
})
//.css({position: 'absolute', left: 104, top: 4})
.css({float: 'left', margin: '4px 2px 4px 2px'})
.appendTo(self.$statusbar);
self.$placeButton = new Ox.Button({
self.$placeButton = Ox.Button({
title: 'New Place',
width: 96
})
@ -301,7 +301,7 @@ Ox.Map = function(options, self) {
}
self.$navigationButtons = {
'center': new Ox.Button({
'center': Ox.Button({
title: 'close',
type: 'image'
})
@ -310,7 +310,7 @@ Ox.Map = function(options, self) {
left: '24px',
top: '24px'
}),
'east': new Ox.Button({
'east': Ox.Button({
title: 'right',
type: 'image'
})
@ -319,7 +319,7 @@ Ox.Map = function(options, self) {
left: '44px',
top: '24px',
}),
'north': new Ox.Button({
'north': Ox.Button({
title: 'up',
type: 'image'
})
@ -328,7 +328,7 @@ Ox.Map = function(options, self) {
left: '24px',
top: '4px',
}),
'south': new Ox.Button({
'south': Ox.Button({
title: 'down',
type: 'image'
})
@ -337,7 +337,7 @@ Ox.Map = function(options, self) {
left: '24px',
top: '44px',
}),
'west': new Ox.Button({
'west': Ox.Button({
title: 'left',
type: 'image'
})
@ -353,7 +353,7 @@ Ox.Map = function(options, self) {
});
});
self.$scaleLabel = new Ox.Label({
self.$scaleLabel = Ox.Label({
textAlign: 'center',
title: '...'
})
@ -393,7 +393,7 @@ Ox.Map = function(options, self) {
northeast = new google.maps.LatLngBounds(
center, bounds.getNorthEast()
).getCenter(),
place = new Ox.MapPlace({
place = Ox.MapPlace({
alternativeNames: [],
countryCode: '',
editable: true,
@ -488,7 +488,7 @@ Ox.Map = function(options, self) {
//Ox.print('constructZoomInput', self.minZoom, self.maxZoom)
if (self.options.zoombar) {
self.$zoomInput && self.$zoomInput.removeElement();
self.$zoomInput = new Ox.Range({
self.$zoomInput = Ox.Range({
arrows: true,
max: self.maxZoom,
min: self.minZoom,
@ -609,12 +609,12 @@ Ox.Map = function(options, self) {
i == length - 1 ||
canContain(bounds, result.geometry.bounds || result.geometry.viewport)
) {
callback(new Ox.MapPlace(parseGeodata(results[i])));
callback(Ox.MapPlace(parseGeodata(results[i])));
return false;
}
});
} else {
callback(new Ox.MapPlace(parseGeodata(results[0])));
callback(Ox.MapPlace(parseGeodata(results[0])));
}
}
if (
@ -637,7 +637,7 @@ Ox.Map = function(options, self) {
address: name
}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
callback(new Ox.MapPlace(parseGeodata(results[0])));
callback(Ox.MapPlace(parseGeodata(results[0])));
}
if (
status == google.maps.GeocoderStatus.OK ||
@ -719,7 +719,7 @@ Ox.Map = function(options, self) {
self.places = [];
if (!self.isAsync) {
self.options.places.forEach(function(place, i) {
self.places[i] = new Ox.MapPlace(Ox.extend({
self.places[i] = Ox.MapPlace(Ox.extend({
map: that
}, place));
});
@ -806,7 +806,7 @@ Ox.Map = function(options, self) {
var place = getPlaceById(item.id);
if (!place) {
self.places.push(
new Ox.MapPlace(Ox.extend({
Ox.MapPlace(Ox.extend({
map: that
}, item)).add()
);
@ -1023,7 +1023,7 @@ Ox.Map = function(options, self) {
]
}
}, function(results) {
place = new Ox.MapPlace(Ox.extend({
place = Ox.MapPlace(Ox.extend({
map: that
}, results.data.items[0])).add();
self.places.push(place);