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

View file

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