Always select last month after loading them.
This commit is contained in:
parent
5ccddb0511
commit
9b1c906032
@ -180,10 +180,8 @@ var ListViewModel = function() {
|
|||||||
self.loadMonths = function(account){
|
self.loadMonths = function(account){
|
||||||
$.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]);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user