Skip to content

Commit

Permalink
refactoring and minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bevus committed Nov 7, 2016
1 parent 4eb0645 commit 13e4898
Show file tree
Hide file tree
Showing 42 changed files with 1,087 additions and 1,254 deletions.
9 changes: 6 additions & 3 deletions out/artifacts/foot_war_exploded/Ressources/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ body{
/*background: url("../images/bgs/3.jpg") center no-repeat fixed;*/
background-size: 100%;
height: 100%;
margin: 0;
margin-top: 60px;
padding: 0;
}
p{
word-wrap: break-word;
}
.blackCard{
background: rgba(255, 255, 255, 1);
padding: 10px 20px;
Expand All @@ -32,13 +35,13 @@ body{
}
.searchPanel{
box-shadow: 0 0 9px -4px;
height: 600px;
height: 400px;
width: 270px;
background: rgba(255, 255, 255, 0.9);
}
.affix{
position: fixed;
top : 1px;
top : 60px;
}
.dayWeather {
display: inline-block;
Expand Down
Binary file modified out/artifacts/foot_war_exploded/WEB-INF/classes/Test.class
Binary file not shown.
Binary file not shown.
33 changes: 16 additions & 17 deletions out/artifacts/foot_war_exploded/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
<servlet-name>StadeCommentSubmit</servlet-name>
<servlet-class>servlets.StadeCommentSubmit</servlet-class>
</servlet>
<servlet>
<servlet-name>UserConnected</servlet-name>
<servlet-class>servlets.UserConnected</servlet-class>
</servlet>
<servlet>
<servlet-name>Stades</servlet-name>
<servlet-class>servlets.Stades</servlet-class>
Expand Down Expand Up @@ -86,25 +82,24 @@
<servlet-name>StadeComments</servlet-name>
<servlet-class>servlets.StadeComments</servlet-class>
</servlet>
<servlet>
<servlet-name>AvailableLocalWeather</servlet-name>
<servlet-class>servlets.AvailableLocalWeather</servlet-class>
</servlet>
<servlet>
<servlet-name>CancelParticipation</servlet-name>
<servlet-class>servlets.CancelParticipation</servlet-class>
</servlet>
<servlet>
<servlet-name>MesRencontre</servlet-name>
<servlet-class>servlets.MesRencontre</servlet-class>
</servlet>
<servlet>
<servlet-name>CancelGame</servlet-name>
<servlet-class>servlets.CancelGame</servlet-class>
</servlet>


<servlet-mapping>
<servlet-name>Stades</servlet-name>
<url-pattern>/stades</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserConnected</servlet-name>
<url-pattern>/userConnected</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>OrganiserMatch</servlet-name>
<url-pattern>/organise</url-pattern>
Expand Down Expand Up @@ -163,14 +158,18 @@
<servlet-name>StadeComments</servlet-name>
<url-pattern>/getComments</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AvailableLocalWeather</servlet-name>
<url-pattern>/localWeather</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CancelParticipation</servlet-name>
<url-pattern>/cancelParticipation</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>MesRencontre</servlet-name>
<url-pattern>/myMatches</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CancelGame</servlet-name>
<url-pattern>/cancelGame</url-pattern>
</servlet-mapping>

<listener>
<listener-class>init.Init</listener-class>
Expand Down
38 changes: 14 additions & 24 deletions out/artifacts/foot_war_exploded/liste.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<script src="Ressources/js/bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
<script>
$(function(){
var listMatchElement = $(".listMatch");
$(function () {
$('#date').datetimepicker({
locale: 'fr',
Expand All @@ -41,43 +42,32 @@
$(this).trigger("keyup");
});
});
var listMatchElement = $(".listMatch");
$(".searchControl").keyup(function (e) {
e.preventDefault();
loadRencontres(listMatchElement, getSearchControlParams())
});
loadRencontres(listMatchElement, {});
$('.searchPanel').affix({
offset: {
top: $("nav").offset().top,
bottom: function () {
return (this.bottom = $('.footer').outerHeight(true));
}
}
})
});
listRencontre("/list", getSearchControlParams(), listMatchElement, `<h3 class="text-center">Aucun résultat disponible</h3>`, 0);
$(".searchControl").keyup(function (e) {
e.preventDefault();
listRencontre("/list", getSearchControlParams(), listMatchElement, `<h3 class="text-center">Aucun résultat disponible</h3>`, 0);
});
});

function getSearchControlParams() {
var date = "";
var $date = $('#date');
if($date.data("DateTimePicker") != undefined && $date.data("DateTimePicker").date() != null){
date = $date.data("DateTimePicker").date().valueOf();
}

return {
'keyWord': $('#keyWord').val(),
'date': ($('#date').data("DateTimePicker").date() != null)? $('#date').data("DateTimePicker").date().valueOf() : "",
'date': date,
'nbPlayers': $("#nbPlayers").val()
}
}
function loadRencontres(element, params) {
element.html(`<h3 class="text-center">Aucun résultat disponible</h3>`);
$.get(
'/list',
params,
function (rencontres) {
var html = "";
$.each(rencontres, function(i, rencontre){
html += addRencontre(rencontre);
});
if(html != ""){
element.html(html);
}
}
);
}
</script>
Loading

0 comments on commit 13e4898

Please sign in to comment.