better behaviour when editing (only send changed key/value pairs, only reload list if sort order is affected)
This commit is contained in:
parent
03f368c7b8
commit
1eebdf3805
2 changed files with 16 additions and 10 deletions
|
|
@ -60,8 +60,11 @@ Ox.load('Geo', function() {
|
|||
},
|
||||
editPlace: function(data, callback) {
|
||||
var place = Ox.getObjectById(places, data.id);
|
||||
place = Ox.extend(place, data, {
|
||||
geonameSort: getGeonameSort(data.geoname)
|
||||
Ox.forEach(data, function(value, key) {
|
||||
place[key] = value;
|
||||
if (key == 'geoname') {
|
||||
place.geonameSort = getGeonameSort(place.geoname);
|
||||
}
|
||||
});
|
||||
callback({
|
||||
result: {code: 200, text: 'OK'}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue