add deselect button to place panel

This commit is contained in:
rolux 2011-05-29 21:05:31 +02:00
parent 95de5ee5c8
commit 548d41d391

View file

@ -325,13 +325,26 @@ Ox.ListMap = function(options, self) {
.attr({ .attr({
src: Ox.getImageByGeoname('icon', 16, '') src: Ox.getImageByGeoname('icon', 16, '')
}) })
.css({float: 'left', margin: '4px 0 0 4px'}) .css({float: 'left', margin: '4px'})
.appendTo(self.$placeTitle); .appendTo(self.$placeTitle);
self.$placeTitleName = Ox.Label({ self.$placeTitleName = Ox.Label({
title: '', title: '',
width: 228 width: 208
})
.css({float: 'left', margin: '4px 0 4px 0'})
.appendTo(self.$placeTitle);
self.$deselectPlaceButton = Ox.Button({
title: 'close',
tooltip: 'Done',
type: 'image'
}) })
.css({float: 'left', margin: '4px'}) .css({float: 'left', margin: '4px'})
.bindEvent({
click: function() {
self.$map.options({selected: null});
}
})
.appendTo(self.$placeTitle); .appendTo(self.$placeTitle);
self.$placeFormItems = Ox.merge([ self.$placeFormItems = Ox.merge([
@ -533,7 +546,7 @@ Ox.ListMap = function(options, self) {
}) })
.bindEvent({ .bindEvent({
resize: function(foo, size) { resize: function(foo, size) {
self.$placeTitleName.options({width: size - 28}); self.$placeTitleName.options({width: size - 48});
// fixme: pass width through form // fixme: pass width through form
self.$placeFormItems.forEach(function($item) { self.$placeFormItems.forEach(function($item) {
$item.options({width: size - 16}); $item.options({width: size - 16});