update place panel ui

This commit is contained in:
rolux 2011-06-01 15:25:07 +02:00
parent b5363b38f4
commit f6803dd9e5
2 changed files with 15 additions and 8 deletions

View file

@ -505,27 +505,32 @@ Ox.ListMap = function(options, self) {
size: 24
});
self.$placeButton = Ox.Button({
self.$newPlaceButton = Ox.Button({
title: 'New Place',
width: 96
})
.css({float: 'left', margin: '4px 2px 4px 4px'})
.bindEvent({
click: self.$map.newPlace
})
self.$placeButton = Ox.Button({
title: 'Add Place',
width: 96
})
.css({float: 'right', margin: '4px 4px 4px 2px'})
.bindEvent({
click: function() {
var title = self.$placeButton.options('title');
// fixme: these should be separate functions
if (title == 'New Place') {
self.$map.newPlace();
self.$placeButton.options({title: 'Add Place'})
} else if (title == 'Add Place') {
if (self.$placeButton.options('title') == 'Add Place') {
addPlace();
} else if (title == 'Remove Place') {
} else {
removePlace();
}
}
})
.appendTo(self.$placeStatusbar);
/*
self.$revertButton = Ox.Button({
title: 'Revert',
width: 96
@ -533,6 +538,7 @@ Ox.ListMap = function(options, self) {
.css({float: 'right', margin: '4px 4px 4px 2px'})
.hide()
.appendTo(self.$placeStatusbar);
*/
/*
self.mapResize = [

View file

@ -393,6 +393,7 @@ Ox.Map = function(options, self) {
center, bounds.getNorthEast()
).getCenter(),
place = new Ox.MapPlace({
alternativeNames: [],
countryCode: '',
editable: true,
geoname: '',