This commit is contained in:
didier amyot committed 2017-05-23 22:33:30 -04:00
1 parent 5d630e28f4
commit f67080571a
8 files changed
+10925 -5060

No files matched your search

+2969 -5053
View File
File diff suppressed because it is too large. Load diff

Before

Width:  |  Height:  |  Size: 497 KiB

After

Width:  |  Height:  |  Size: 219 KiB

File diff suppressed because it is too large. Load diff

After

Width:  |  Height:  |  Size: 379 KiB

+3 -1
View File
@@ -7,15 +7,17 @@ requirejs.config({
}); });
requirejs(['m', 'views/mainPage', 'views/newsPage', 'views/calendarPage', 'views/rulesPage', 'views/photosPage', 'views/confidentialPage', 'views/contactPage'], function(m, mainPage, newsPage, calendarPage, rulesPage, photosPage, confidentialPage, contactPage){ requirejs(['m', 'views/mainPage', 'views/historicPage', 'views/newsPage', 'views/calendarPage', 'views/rulesPage', 'views/photosPage', 'views/confidentialPage', 'views/contactPage', 'views/inscriptionForm'], function(m, mainPage, historicPage, newsPage, calendarPage, rulesPage, photosPage, confidentialPage, contactPage, inscriptionForm){
m.route.mode = "hash"; m.route.mode = "hash";
m.route(document.body, "/", { m.route(document.body, "/", {
"/": mainPage, "/": mainPage,
"/nouvelles": newsPage, "/nouvelles": newsPage,
"/inscription-form": inscriptionForm,
"/calendrier": calendarPage, "/calendrier": calendarPage,
"/reglement": rulesPage, "/reglement": rulesPage,
"/photos": photosPage, "/photos": photosPage,
"/membre": confidentialPage, "/membre": confidentialPage,
"/historique": historicPage,
"/contact": contactPage "/contact": contactPage
}); });
}); });
+10
View File
@@ -64,6 +64,15 @@ define(['m', '_', 'util', 'resultParser', 'teams', 'views/topNavBar', 'views/foo
}; };
var tabView = {};
tabView.view = function(){
return m('div.uk-margin', m('h2', 'Calendrier 2017'),
m('ul.uk-tab', [
m('li.uk-active', m('a', 'Saison')),
m('li', m('a', 'Éliminatoire'))
]));
};
var schedulView = {}; var schedulView = {};
@@ -129,6 +138,7 @@ define(['m', '_', 'util', 'resultParser', 'teams', 'views/topNavBar', 'views/foo
m('div.uk-grid.uk-margin-top.uk-margin-bottom', m('div.uk-grid.uk-margin-top.uk-margin-bottom',
m('div.uk-width-large-3-5.uk-width-medium-4-5.uk-width-small-1-1.uk-container-center',[ m('div.uk-width-large-3-5.uk-width-medium-4-5.uk-width-small-1-1.uk-container-center',[
m.component(statsView), m.component(statsView),
m.component(tabView),
m.component(schedulView)])), m.component(schedulView)])),
m.component(footer)]; m.component(footer)];
}; };
+28
View File
@@ -0,0 +1,28 @@
define(['m', '_', 'util', 'views/topNavBar', 'views/calendarPage'], function(m, _, util, topNavBar, calendarPage) {
var yearSelector = {};
yearSelector.view = function(){
return m('div.uk-grid',
m('div.uk-width-large-3-5.uk-width-medium-1-1.uk-container-center',
yearSelector.tab()));
};
yearSelector.tab = function(){
return m('ul.uk-tab.uk-margin-top', [
m('li.uk-active', m('a', 'Saison 2016'))
]);
};
var historicPage = {};
historicPage.view = function(){
return [
m.component(topNavBar),
m.component(yearSelector)
// m.component(calendarPage)
];
};
return historicPage;
});
+53
View File
@@ -0,0 +1,53 @@
define(['m', '_',], function (m, _ ) {
var inscriptionForm = {};
inscriptionForm.title = function(){
return m('h1.uk-width-1-1.uk-text-center', 'Inscription Balle Phénix');
};
inscriptionForm._field = function(label){
return m('label', label, m('input.uk-form-width-large', {type: 'text'}));
};
inscriptionForm.identification = function(){
return m('form.uk-form', m('fieldset',
m('legend', 'Identification'),
m('div.uk-margin-top.uk-margin-bottom.uk-grid',
m('div.uk-width-1-2', inscriptionForm._field('Nom')),
m('div.uk-width-1-2', inscriptionForm._field('Prénom'))),
m('div.uk-margin-top.uk-margin-bottom.uk-grid',
m('div.uk-width-1-2', inscriptionForm._field('Adresse')),
m('div.uk-width-1-2', inscriptionForm._field('Chanson préférée'))),
m('div.uk-margin-top.uk-margin-bottom.uk-grid',
m('div.uk-width-1-3', inscriptionForm._field('Ville')),
m('div.uk-width-1-3', inscriptionForm._field('Code postal')),
m('div.uk-width-1-3', inscriptionForm._field('Tél')))
));
};
inscriptionForm.inscription = function(){
return m('form.uk-form',
m('h2.uk-width-1-1.uk-text-center', 'Inscription'),
m('div.uk-margin-top.uk-margin-bottom.uk-grid',
m('div.uk-width-1-1',
inscriptionForm._field('Inscription en duo. Inscrivez le nom du joueur')))
);
};
inscriptionForm.view = function(){
return [
inscriptionForm.title(),
inscriptionForm.identification(),
inscriptionForm.inscription()
];
// return m('form', m('label', 'Nom', m('input', {type: 'text'})));
};
return inscriptionForm;
});
+23 -6
View File
@@ -49,7 +49,7 @@ define(['m', '_', 'spritz', 'teams'], function (m, _ , spritz, teams) {
playersSelectionBar.chooseScore = function(model){ playersSelectionBar.chooseScore = function(model){
return m('form.uk-grid', {style: {'margin-top': '1em'}}, return m('form.uk-grid', {style: {'margin-top': '1em'}},
m('div.uk-width-1-6', m('label', m('b', 'Quote'))), m('div.uk-width-1-6', m('label', m('b', 'Cote'))),
m('div.uk-width-5-6', m('div.uk-width-5-6',
m('div.uk-grid', [ m('div.uk-grid', [
playersSelectionBar.scoreInput(1, model.activatedScores), playersSelectionBar.scoreInput(1, model.activatedScores),
@@ -57,8 +57,15 @@ define(['m', '_', 'spritz', 'teams'], function (m, _ , spritz, teams) {
playersSelectionBar.scoreInput(3, model.activatedScores), playersSelectionBar.scoreInput(3, model.activatedScores),
playersSelectionBar.scoreInput(4, model.activatedScores), playersSelectionBar.scoreInput(4, model.activatedScores),
playersSelectionBar.scoreInput(5, model.activatedScores) playersSelectionBar.scoreInput(5, model.activatedScores)
])) ])));
); };
playersSelectionBar.searchBar = function(){
var icon = m('i.fa.fa-search', {'aria-hidden': true}, '');
return m('form.uk-grid', {style: {'margin-top': '1em'}},
m('div.uk-width-1-1.', {style: 'text-align: right;'},
m('label', m('b', icon, " Rechercher ")),
m('input', {type: 'text'})));
}; };
playersSelectionBar.controller = function(model){ playersSelectionBar.controller = function(model){
@@ -66,9 +73,12 @@ define(['m', '_', 'spritz', 'teams'], function (m, _ , spritz, teams) {
}; };
playersSelectionBar.view = function(model){ playersSelectionBar.view = function(model){
return m('div', [ return m('div.uk-grid', [
playersSelectionBar.chooseTeams(model), m('div.uk-width-1-2',
playersSelectionBar.chooseScore(model) playersSelectionBar.chooseTeams(model),
playersSelectionBar.chooseScore(model)),
m('div.uk-width-1-2',
playersSelectionBar.searchBar(model))
]); ]);
}; };
@@ -267,11 +277,18 @@ define(['m', '_', 'spritz', 'teams'], function (m, _ , spritz, teams) {
return model; return model;
}; };
playersPage.downloadButton = function(){
return m('button.uk-button.uk-button-success.uk-border-rounded',
m('i.fa.fa-download', {'aria-hidden': true}),
" Télécharger");
};
playersPage.view = function(model){ playersPage.view = function(model){
return m('div.uk-grid.uk-margin-top.uk-margin-bottom', return m('div.uk-grid.uk-margin-top.uk-margin-bottom',
m('div.uk-width-large-3-5.uk-width-small-1-1.uk-container-center', [ m('div.uk-width-large-3-5.uk-width-small-1-1.uk-container-center', [
m.component(playersSelectionBar, model), m.component(playersSelectionBar, model),
m.component(playersTable, model), m.component(playersTable, model),
playersPage.downloadButton()
])); ]));
}; };
+1
View File
@@ -8,6 +8,7 @@ define(['m', '_', 'util'], function (m, _, util) {
{name: 'Calendrier', path: 'calendrier', fa: 'fa-calendar'}, {name: 'Calendrier', path: 'calendrier', fa: 'fa-calendar'},
{name: 'Règlement', path: 'reglement', fa: 'fa-legal'}, {name: 'Règlement', path: 'reglement', fa: 'fa-legal'},
{name: 'Membre', path: 'membre', fa: 'fa-lock'}, {name: 'Membre', path: 'membre', fa: 'fa-lock'},
{name: 'Historique', path: 'historique', fa: 'fa-history'},
{name: 'Nous Joindre', path: 'contact', fa: 'fa-phone'} {name: 'Nous Joindre', path: 'contact', fa: 'fa-phone'}
]; ];