Always select last month after loading them.

This commit is contained in:
Alexis Lahouze 2013-01-08 18:53:45 +01:00
parent 5ccddb0511
commit 9b1c906032

View File

@ -181,9 +181,7 @@ var ListViewModel = function() {
$.post("api/entry.php", {action: "get_months", account: account.id}).success(function (result) { $.post("api/entry.php", {action: "get_months", account: account.id}).success(function (result) {
self.months(result); self.months(result);
if(! self.month()) { self.month(result[result.length - 1]);
self.month(result[result.length - 1]);
}
}); });
}; };