added basic playoff integration

This commit is contained in:
didier amyot committed 2017-08-08 22:22:51 -04:00
1 parent 7be88a2167
commit 9bf4830f7a
4 files changed
+82 -18

No files matched your search

+6 -3
View File
@@ -5,7 +5,7 @@ define(['m', '_', 'util'], function (m, _, util) {
topNavBar._urlMapping = [
{name: 'Accueil', path: '', fa: 'fa-home'},
{name: 'Nouvelles', path: 'nouvelles', fa: 'fa-newspaper-o'},
{name: 'Calendrier', path: 'calendrier', fa: 'fa-calendar'},
{name: 'Calendrier', path: 'calendrier', fa: 'fa-calendar', includeSubPath: true},
{name: 'Règlement', path: 'reglement', fa: 'fa-legal'},
{name: 'Membre', path: 'membre', fa: 'fa-lock'},
// {name: 'Historique', path: 'historique', fa: 'fa-history'},
@@ -22,7 +22,10 @@ define(['m', '_', 'util'], function (m, _, util) {
return '#/' + id_;
};
topNavBar._isActive = function(id_){
topNavBar._isActive = function(id_, includeSubPath){
if(includeSubPath){
return window.location.hash.startsWith(topNavBar._getUrlForId(id_));
}
return topNavBar._getUrlForId(id_) == window.location.hash;
};
topNavBar._getItemIcon = function(item){
@@ -30,7 +33,7 @@ define(['m', '_', 'util'], function (m, _, util) {
};
topNavBar._getLargeItem = function(item){
var class_ = topNavBar._isActive(item.path) ? 'uk-active' : '';
var class_ = topNavBar._isActive(item.path, item.includeSubPath) ? 'uk-active' : '';
var url = topNavBar._getUrlForId(item.path);
return m("li", {class: class_},
m("a", {href: url},