update placeName when editing name, not geoname
This commit is contained in:
parent
6c5b8ef0b6
commit
5a47341367
1 changed files with 5 additions and 4 deletions
|
@ -554,15 +554,17 @@ Ox.MapEditor = function(options, self) {
|
|||
change: function(data) {
|
||||
var isResult = self.selectedPlace[0] == '_';
|
||||
if (data.id == 'name') {
|
||||
!isResult && self.$list.value(self.selectedPlace, 'name', data.data.value);
|
||||
var name = data.data.value;
|
||||
!isResult && self.$list.value(self.selectedPlace, 'name', name);
|
||||
self.$placeName.options({title: name});
|
||||
if (!self.isAsync) {
|
||||
Ox.getObjectById(
|
||||
self.options.places, self.selectedPlace
|
||||
).name = data.data.value;
|
||||
).name = name;
|
||||
} else {
|
||||
!isResult && editPlace(['name']);
|
||||
}
|
||||
self.$map.value(self.selectedPlace, 'name', data.data.value);
|
||||
self.$map.value(self.selectedPlace, 'name', name);
|
||||
} else if (data.id == 'alternativeNames') {
|
||||
if (!self.isAsync) {
|
||||
// ...
|
||||
|
@ -577,7 +579,6 @@ Ox.MapEditor = function(options, self) {
|
|||
self.$placeFlag.attr({
|
||||
src: Ox.getFlagByGeoname(geoname, 16)
|
||||
});
|
||||
self.$placeName.options({title: geoname});
|
||||
self.$placeForm.values({countryCode: countryCode});
|
||||
if (!self.isAsync) {
|
||||
if (!isResult) {
|
||||
|
|
Loading…
Reference in a new issue