28 lines
683 B
JavaScript
28 lines
683 B
JavaScript
define(['m', '_'], function (m, _) {
|
|
var teams = {};
|
|
|
|
teams.teams = function(){
|
|
return [
|
|
{name: 'jaune', color: '#FF0'},
|
|
{name:'rouge', color: '#F00'},
|
|
{name:'bleu', color: '#00F'},
|
|
{name:'gris', color: '#808080'},
|
|
{name:'vert', color: '#008000'},
|
|
{name: 'orange', color: '#FFA500'}
|
|
];
|
|
};
|
|
|
|
teams.getTeamColor = function(teamName){
|
|
var color;
|
|
_.each(teams.teams(), function(team){
|
|
if(team.name == teamName){
|
|
color = team.color;
|
|
return false;
|
|
}
|
|
});
|
|
return color;
|
|
};
|
|
|
|
return teams;
|
|
});
|