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) {
|
change: function(data) {
|
||||||
var isResult = self.selectedPlace[0] == '_';
|
var isResult = self.selectedPlace[0] == '_';
|
||||||
if (data.id == 'name') {
|
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) {
|
if (!self.isAsync) {
|
||||||
Ox.getObjectById(
|
Ox.getObjectById(
|
||||||
self.options.places, self.selectedPlace
|
self.options.places, self.selectedPlace
|
||||||
).name = data.data.value;
|
).name = name;
|
||||||
} else {
|
} else {
|
||||||
!isResult && editPlace(['name']);
|
!isResult && editPlace(['name']);
|
||||||
}
|
}
|
||||||
self.$map.value(self.selectedPlace, 'name', data.data.value);
|
self.$map.value(self.selectedPlace, 'name', name);
|
||||||
} else if (data.id == 'alternativeNames') {
|
} else if (data.id == 'alternativeNames') {
|
||||||
if (!self.isAsync) {
|
if (!self.isAsync) {
|
||||||
// ...
|
// ...
|
||||||
|
@ -577,7 +579,6 @@ Ox.MapEditor = function(options, self) {
|
||||||
self.$placeFlag.attr({
|
self.$placeFlag.attr({
|
||||||
src: Ox.getFlagByGeoname(geoname, 16)
|
src: Ox.getFlagByGeoname(geoname, 16)
|
||||||
});
|
});
|
||||||
self.$placeName.options({title: geoname});
|
|
||||||
self.$placeForm.values({countryCode: countryCode});
|
self.$placeForm.values({countryCode: countryCode});
|
||||||
if (!self.isAsync) {
|
if (!self.isAsync) {
|
||||||
if (!isResult) {
|
if (!isResult) {
|
||||||
|
|
Loading…
Reference in a new issue