more love
This commit is contained in:
1 parent
9cabb7c2cd
commit
80ddf2b010
10 files changed
+3328
-2394
No files matched your search
@@ -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',
|
||||
|
||||
@@ -34,8 +34,7 @@ define(['m', '_', 'util', 'resultParser', 'views/topNavBar', 'views/footer', 'ar
|
||||
|
||||
nextGameDaySchedule.controller = function(){
|
||||
var games = m.prop([]);
|
||||
var toDay = new Date();
|
||||
return m.request({method: "GET", url: util.resultatsURL()})
|
||||
return util.getDefaultResults()
|
||||
.then(games)
|
||||
.then(resultParser.getNightGames)
|
||||
.then(function(nightGames){
|
||||
|
||||
Reference in new issue
Block a user