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
1 changed files with 2 additions and 4 deletions

View File

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