allow for setting the selected id of an Ox.List to an id that is currently not in view

This commit is contained in:
rolux 2011-05-29 15:15:38 +02:00
commit 0e835cc116
4 changed files with 38 additions and 16 deletions

View file

@ -490,8 +490,8 @@ Ox.ListMap = function(options, self) {
self.placesLength = self.options.places.length;
setStatus();
} else {
self.options.places({}, function(result) {
self.placesLength = result.data.items;
self.options.places({}, function(results) {
self.placesLength = results.data.items;
setStatus();
});
}
@ -610,8 +610,8 @@ Ox.ListMap = function(options, self) {
function setStatus() {
self.$status.html(
self.options.placesLength + ' Place' + (
self.options.placesLength == 1 ? '' : 's'
Ox.formatNumber(self.placesLength) + ' Place' + (
self.placesLength == 1 ? '' : 's'
)
);
}