Cleaned up a bit the javascript source.

This commit is contained in:
Alexis Lahouze 2013-01-12 15:51:00 +01:00
parent 37010cca06
commit 631b7f50f5
1 changed files with 5 additions and 4 deletions

View File

@ -25,7 +25,6 @@ function message(alertType, title, message) {
var ListViewModel = function() {
var self = this;
window.viewModel = self;
self.account = ko.observable();
self.accounts = ko.observableArray([]);
@ -275,8 +274,6 @@ var ListViewModel = function() {
self.loadMonths(account);
}
};
$(document).ready(self.loadAccounts);
};
function dateToString(date) {
@ -421,5 +418,9 @@ ko.bindingHandlers.chart = {
}
};
ko.applyBindings(new ListViewModel());
var viewModel = new ListViewModel();
ko.applyBindings(viewModel);
$(viewModel.loadAccounts);