more love

This commit is contained in:
didier amyot committed 2021-06-15 12:50:49 -04:00
1 parent 9cabb7c2cd
commit 80ddf2b010
10 files changed
+3328 -2394

No files matched your search

+5 -6
View File
@@ -7,8 +7,7 @@ define(['m', '_', 'util', 'resultParser', 'teams', 'views/topNavBar', 'views/foo
statsView.controller = function(year){
var games = m.prop([]);
var url = "api/resultats" + year + ".json";
return m.request({method: "GET", url: url})
return util.getResults(year)
.then(games)
.then(resultParser.getStats);
};
@@ -121,8 +120,7 @@ define(['m', '_', 'util', 'resultParser', 'teams', 'views/topNavBar', 'views/foo
schedulView.controller = function(year){
var games = m.prop([]);
var url = "api/resultats" + year + ".json"
return m.request({method: "GET", url: url})
return util.getResults(year)
.then(games)
.then(resultParser.getNightGames);
};
@@ -179,8 +177,9 @@ define(['m', '_', 'util', 'resultParser', 'teams', 'views/topNavBar', 'views/foo
calendarPage.view = function(vnode){
var isPlayoff = window.location.hash.endsWith('playoff');
var year = _.get(m.route.param(), 'year', '');
var availableYears = window.availableYears || [];
var availableYears = util.getAvailableYears();
var year = _.get(m.route.param(), 'year', util.getDefaultYear());
var main = isPlayoff ? m.component(playoffView) : m.component(schedulView, year, availableYears);
return [m.component(topNavBar),
m('div.uk-grid.uk-margin-top.uk-margin-bottom',