use new place list api
This commit is contained in:
parent
c0d654b141
commit
f31a6cfdc7
1 changed files with 12 additions and 34 deletions
|
@ -20,41 +20,19 @@ pandora.ui.placesDialog = function() {
|
||||||
query: {conditions: [], operator: ''}
|
query: {conditions: [], operator: ''}
|
||||||
}), callback);
|
}), callback);
|
||||||
},
|
},
|
||||||
width: width
|
addPlace: function(data, callback) {
|
||||||
})
|
Ox.print('ADDPLACE', data);
|
||||||
.bindEvent({
|
pandora.api.addPlace(data.place, callback);
|
||||||
addplace: function(event, data) {
|
|
||||||
Ox.print('ADDPLACE', data)
|
|
||||||
pandora.api.addPlace(data.place, function(result) {
|
|
||||||
var id = result.data.id;
|
|
||||||
Ox.print("ID", result.data.id, result)
|
|
||||||
Ox.Request.clearCache(); // fixme: remove
|
|
||||||
Ox.print('AAAAA')
|
|
||||||
app.$ui.placesElement
|
|
||||||
.reloadList()
|
|
||||||
.bindEventOnce({
|
|
||||||
loadlist: function() {
|
|
||||||
app.$ui.placesElement
|
|
||||||
.focusList()
|
|
||||||
.options({selected: [id]});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
removeplace: function(event, data) {
|
editPlace: function(data, callback) {
|
||||||
pandora.api.removePlace(data.id, function(result) {
|
Ox.print('EDITPLACE', data);
|
||||||
// fixme: duplicated
|
pandora.api.editPlace(data.place, callback);
|
||||||
Ox.Request.clearCache(); // fixme: remove
|
},
|
||||||
app.$ui.placesElement
|
removePlace: function(data, callback) {
|
||||||
.reloadList()
|
Ox.print('REMOVEPLACE', data);
|
||||||
.bindEventOnce({
|
pandora.api.removePlace(data.id, callback);
|
||||||
loadlist: function(event, data) {
|
},
|
||||||
app.$ui.placesElement
|
width: width
|
||||||
.focusList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
height: height,
|
height: height,
|
||||||
keys: {enter: 'done', escape: 'done'},
|
keys: {enter: 'done', escape: 'done'},
|
||||||
|
|
Loading…
Reference in a new issue