first commit
This commit is contained in:
@@ -0,0 +1,508 @@
|
||||
@charset "ISO-8859-1";
|
||||
|
||||
|
||||
.wrapper {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(16, [col-start] 1fr);
|
||||
grid-gap: 10px;
|
||||
}
|
||||
.wrapper > * {
|
||||
grid-column: col-start / span 16;
|
||||
}
|
||||
.main-nav {
|
||||
background: #f1f1f1;
|
||||
-webkit-box-shadow: 0 10px 5px #888888;
|
||||
-moz-box-shadow: 0 10px 5px #888888;
|
||||
box-shadow: 0 10px 5px #888888;
|
||||
}
|
||||
.main-footer {
|
||||
background: #ff8306;
|
||||
}
|
||||
|
||||
.main-head {
|
||||
background: #ff8306;
|
||||
}
|
||||
|
||||
.cn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
@media (min-width: 500px) {
|
||||
|
||||
.side {
|
||||
grid-column: col-start / span 3;
|
||||
grid-row: 3;
|
||||
}
|
||||
.ad {
|
||||
grid-column: col-start / span 3;
|
||||
grid-row: 4;
|
||||
}
|
||||
.content, .main-footer {
|
||||
grid-column: col-start 4 / span 9;
|
||||
}
|
||||
nav ul {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 700px) {
|
||||
|
||||
.main-head {
|
||||
grid-column: col-start / span 16;
|
||||
grid-row: 1;
|
||||
}
|
||||
.main-nav {
|
||||
grid-column: col-start / span 2;
|
||||
grid-row: 2 / 4;
|
||||
}
|
||||
|
||||
.graph {
|
||||
grid-column: col-start 1 / span 16;
|
||||
grid-row: 2;
|
||||
}
|
||||
|
||||
.team {
|
||||
grid-column: col-start 1 / span 3;
|
||||
grid-row: 2;
|
||||
|
||||
}
|
||||
.side {
|
||||
grid-column: col-start 15 / span 2;
|
||||
grid-row: 2;
|
||||
}
|
||||
.ad {
|
||||
grid-column: col-start 15 / span 2;
|
||||
grid-row: 3;
|
||||
}
|
||||
.main-footer {
|
||||
grid-column: col-start / span 16;
|
||||
}
|
||||
nav ul {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.listing {
|
||||
list-style: none;
|
||||
display: grid;
|
||||
grid-gap: 10px;
|
||||
grid-auto-flow: dense;
|
||||
grid-template-columns: repeat(auto-fill,minmax(350px, 1fr));
|
||||
padding:10px;
|
||||
padding-top:0px;
|
||||
margin:0px;
|
||||
}
|
||||
.listing li {
|
||||
border: 1px solid #ffe066;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background:#ffffff;
|
||||
}
|
||||
.listing .wide {
|
||||
grid-column-end: span 2;
|
||||
}
|
||||
.listing .superwide {
|
||||
grid-column-end: span 3;
|
||||
}
|
||||
|
||||
.listingTeam {
|
||||
list-style: none;
|
||||
display: grid;
|
||||
grid-gap: 10px;
|
||||
grid-auto-flow: dense;
|
||||
grid-template-columns: repeat(auto-fill,minmax(500px, 600px));
|
||||
padding:10px;
|
||||
padding-top:0px;
|
||||
margin:0px;
|
||||
flex-direction: row;
|
||||
}
|
||||
.listingTeam li {
|
||||
border: 1px solid #ffe066;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background:#ffffff;
|
||||
}
|
||||
.listingTeam .wide {
|
||||
grid-column-end: span 2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
body {
|
||||
background: #ff8306;
|
||||
color: #444;
|
||||
font: 100%/20px 'Helvetica Neue', helvetica, arial, sans-serif;
|
||||
text-shadow: 0 1px 0 #974b00;
|
||||
-moz-user-select: -moz-none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.cadre
|
||||
{
|
||||
background: #000051;
|
||||
border: 5px solid #fff;
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.HeaderDiv
|
||||
{
|
||||
background: linear-gradient(#777, #444);
|
||||
color: #fff;
|
||||
text-shadow: 0 1px 0 #000;
|
||||
font-size: 12px ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tableTrade {
|
||||
background: #000051;
|
||||
border-collapse: collapse;
|
||||
font-size: 9px;
|
||||
text-shadow: 0 1px 0 #ffffff;
|
||||
line-height: 12px;
|
||||
-ms-user-select:none;
|
||||
width:100%;
|
||||
|
||||
}
|
||||
|
||||
.tableTrade > thead > tr > th
|
||||
{
|
||||
border-right: 1px solid #fff;
|
||||
border-left: 1px solid #e8e8e8;
|
||||
font-weight: bold;
|
||||
padding: 2px 1px;
|
||||
position: relative;
|
||||
text-shadow: 0 1px 0 #000;
|
||||
font-size: 9px ;
|
||||
|
||||
-ms-user-select:none;
|
||||
}
|
||||
|
||||
.tableTrade > thead > tr > th:first-child
|
||||
{
|
||||
border-left: 0px solid ;
|
||||
}
|
||||
.tableTrade > thead > tr > th:last-child
|
||||
{
|
||||
border-right: 0px solid ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.tableTrade > thead > tr.Header > th
|
||||
{
|
||||
background: linear-gradient(#777, #444);
|
||||
color: #fff;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.tableTrade > thead > tr.Header > th.focus {
|
||||
background: linear-gradient(#959595, #d4d4d4);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tableTrade > tbody > tr.ligneHead > th
|
||||
{
|
||||
padding: 2px 3px;
|
||||
border-right: 1px solid #fff;
|
||||
border-left: 1px solid #e8e8e8;
|
||||
background: linear-gradient(#c0c0c0, #efefef);
|
||||
color: #2b2b2b;
|
||||
text-align:center;
|
||||
}
|
||||
.tableTrade > tbody > tr.ligneHead > th:first-child
|
||||
{
|
||||
border-left: 0px solid ;
|
||||
}
|
||||
.tableTrade > tbody > tr.ligneHead > th:last-child
|
||||
{
|
||||
border-right: 0px solid ;
|
||||
}
|
||||
|
||||
.tableTrade > tbody > tr > th.positive
|
||||
{
|
||||
background: linear-gradient(#91ff91, #d5ffd5);
|
||||
color: #004000;
|
||||
}
|
||||
.tableTrade > tbody > tr > th.negative
|
||||
{
|
||||
background: linear-gradient(#ff8c8c, #ffd5d5);
|
||||
color: #710000;
|
||||
}
|
||||
.tableTrade > tbody > tr > th.neutral
|
||||
{
|
||||
background: linear-gradient(#ffdab5, #ffeedd);
|
||||
color: #ff8306;
|
||||
}
|
||||
.tableTrade > tbody > tr.tab:nth-child(odd) > td.positive
|
||||
{
|
||||
background: linear-gradient(#91ff91, #d5ffd5);
|
||||
color: #004000;
|
||||
}
|
||||
.tableTrade > tbody > tr.tab:nth-child(odd) > td.negative
|
||||
{
|
||||
background: linear-gradient(#ff8c8c, #ffd5d5);
|
||||
color: #710000;
|
||||
}
|
||||
.tableTrade > tbody > tr.tab:nth-child(odd) > td.neutral
|
||||
{
|
||||
background: linear-gradient(#ffdab5, #ffeedd);
|
||||
color: #ff8306;
|
||||
}
|
||||
.tableTrade > tbody > tr.tab:nth-child(even) > td.positive
|
||||
{
|
||||
background: linear-gradient(#91ff91, #d5ffd5);
|
||||
color: #004000;
|
||||
}
|
||||
.tableTrade > tbody > tr.tab:nth-child(even) > td.negative
|
||||
{
|
||||
background: linear-gradient(#ff8c8c, #ffd5d5);
|
||||
color: #710000;
|
||||
}
|
||||
.tableTrade > tbody > tr.tab:nth-child(even) > td.neutral
|
||||
{
|
||||
background: linear-gradient(#ffdab5, #ffeedd);
|
||||
color: #ff8306;
|
||||
}
|
||||
|
||||
.tableTrade > tbody > tr.tab > td:hover {
|
||||
background: linear-gradient(#c9c9c9, #eeeeee);
|
||||
transition: all 300ms;
|
||||
}
|
||||
|
||||
.tableTrade > tbody > tr > td
|
||||
{
|
||||
font-size: 9px ;
|
||||
border-right: 1px solid #fff;
|
||||
border-left: 1px solid #e8e8e8;
|
||||
padding: 2px 1px;
|
||||
position: relative;
|
||||
transition: all 300ms;
|
||||
text-align:center;
|
||||
-ms-user-select:none;
|
||||
}
|
||||
.tableTrade > tbody > tr > td:first-child
|
||||
{
|
||||
border-left: 0px solid ;
|
||||
}
|
||||
.tableTrade > tbody > tr > td:last-child
|
||||
{
|
||||
border-right: 0px solid ;
|
||||
}
|
||||
|
||||
.tableTrade > tbody > tr.freeAgentInjured > td {
|
||||
background: linear-gradient(#c0c0c0, #e6e6e6);
|
||||
}
|
||||
|
||||
.tableTrade > tbody > tr.tab:nth-child(odd) > td
|
||||
{
|
||||
background: linear-gradient(#f3f3f3, #fafafa);
|
||||
color: #2b2b2b;
|
||||
}
|
||||
.tableTrade > tbody > tr.tab:nth-child(even) > td
|
||||
{
|
||||
background: linear-gradient(#f3f3f3, #ffffff);
|
||||
color: #2b2b2b;
|
||||
}
|
||||
|
||||
.tableTrade > tbody > tr.tab:hover > td
|
||||
{
|
||||
background: #8cffff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.tableTrade > tbody > tr:nth-child(odd).displayed > td
|
||||
{
|
||||
background: linear-gradient(#26bf73, #7ae4af);
|
||||
}
|
||||
.tableTrade > tbody > tr:nth-child(even).displayed > td
|
||||
{
|
||||
background: linear-gradient(#48db92, #a5edc9);
|
||||
}
|
||||
.tableTrade > tbody > tr:nth-child(odd).selected > td
|
||||
{
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
.tableTrade > tbody > tr:nth-child(even).selected > td
|
||||
{
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
|
||||
.tableTrade > tbody > tr.tab:nth-child(odd) > td
|
||||
{
|
||||
background: linear-gradient(#f3f3f3, #fafafa);
|
||||
color: #2b2b2b;
|
||||
}
|
||||
.tableTrade > tbody > tr.tab:nth-child(even) > td
|
||||
{
|
||||
background: linear-gradient(#f3f3f3, #ffffff);
|
||||
color: #2b2b2b;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.tableTrade > tbody > tr.hidden
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.asc:after {content: "\25B2"; }
|
||||
.desc:after {content: "\25BC"; }
|
||||
|
||||
.focus {
|
||||
background-color: #ff00ff;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
}
|
||||
.selected {
|
||||
background-color: #ff00ff;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
#myInput {
|
||||
background-image: url('../PICS/searchicon.png'); /* Add a search icon to input */
|
||||
background-position: 5px 6px; /* Position the search icon */
|
||||
background-repeat: no-repeat; /* Do not repeat the icon image */
|
||||
width: 100%; /* Full-width */
|
||||
font-size: 14px; /* Increase font-size */
|
||||
padding: 6px 10px 6px 40px; /* Add some padding */
|
||||
border: 1px solid #ddd; /* Add a grey border */
|
||||
margin-bottom: 6px; /* Add some space below the input */
|
||||
margin-top: 6px; /* Add some space below the input */
|
||||
}
|
||||
|
||||
.positive
|
||||
{
|
||||
background: linear-gradient(#91ff91, #d5ffd5);
|
||||
color: #004000;
|
||||
|
||||
}
|
||||
.negative
|
||||
{
|
||||
background: linear-gradient(#ff8c8c, #ffd5d5);
|
||||
color: #710000;
|
||||
}
|
||||
.neutral
|
||||
{
|
||||
background: linear-gradient(#ff9d3c, #ffc78e);
|
||||
color: #ff8040;
|
||||
}
|
||||
|
||||
#everything-wrapper {
|
||||
display : none;
|
||||
}
|
||||
|
||||
|
||||
span {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
span[class*="l-"] {
|
||||
height: 4px; width: 4px;
|
||||
background: #000;
|
||||
display: inline-block;
|
||||
margin: 12px 2px;
|
||||
|
||||
border-radius: 100%;
|
||||
-webkit-border-radius: 100%;
|
||||
-moz-border-radius: 100%;
|
||||
|
||||
-webkit-animation: loader 4s infinite;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.030, 0.615, 0.995, 0.415);
|
||||
-webkit-animation-fill-mode: both;
|
||||
-moz-animation: loader 4s infinite;
|
||||
-moz-animation-timing-function: cubic-bezier(0.030, 0.615, 0.995, 0.415);
|
||||
-moz-animation-fill-mode: both;
|
||||
-ms-animation: loader 4s infinite;
|
||||
-ms-animation-timing-function: cubic-bezier(0.030, 0.615, 0.995, 0.415);
|
||||
-ms-animation-fill-mode: both;
|
||||
animation: loader 4s infinite;
|
||||
animation-timing-function: cubic-bezier(0.030, 0.615, 0.995, 0.415);
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
span.l-1 {-webkit-animation-delay: 1s;animation-delay: 1s;-ms-animation-delay: 1s;-moz-animation-delay: 1s;}
|
||||
span.l-2 {-webkit-animation-delay: 0.8s;animation-delay: 0.8s;-ms-animation-delay: 0.8s;-moz-animation-delay: 0.8s;}
|
||||
span.l-3 {-webkit-animation-delay: 0.6s;animation-delay: 0.6s;-ms-animation-delay: 0.6s;-moz-animation-delay: 0.6s;}
|
||||
span.l-4 {-webkit-animation-delay: 0.4s;animation-delay: 0.4s;-ms-animation-delay: 0.4s;-moz-animation-delay: 0.4s;}
|
||||
span.l-5 {-webkit-animation-delay: 0.2s;animation-delay: 0.2s;-ms-animation-delay: 0.2s;-moz-animation-delay: 0.2s;}
|
||||
span.l-6 {-webkit-animation-delay: 0;animation-delay: 0;-ms-animation-delay: 0;-moz-animation-delay: 0;}
|
||||
|
||||
@-webkit-keyframes loader {
|
||||
0% {-webkit-transform: translateX(-30px); opacity: 0;}
|
||||
25% {opacity: 1;}
|
||||
50% {-webkit-transform: translateX(30px); opacity: 0;}
|
||||
100% {opacity: 0;}
|
||||
}
|
||||
|
||||
@-moz-keyframes loader {
|
||||
0% {-moz-transform: translateX(-30px); opacity: 0;}
|
||||
25% {opacity: 1;}
|
||||
50% {-moz-transform: translateX(30px); opacity: 0;}
|
||||
100% {opacity: 0;}
|
||||
}
|
||||
|
||||
@-keyframes loader {
|
||||
0% {-transform: translateX(-30px); opacity: 0;}
|
||||
25% {opacity: 1;}
|
||||
50% {-transform: translateX(30px); opacity: 0;}
|
||||
100% {opacity: 0;}
|
||||
}
|
||||
|
||||
@-ms-keyframes loader {
|
||||
0% {-ms-transform: translateX(-30px); opacity: 0;}
|
||||
25% {opacity: 1;}
|
||||
50% {-ms-transform: translateX(30px); opacity: 0;}
|
||||
100% {opacity: 0;}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
dfs{
|
||||
color: #f0f0f0;
|
||||
}
|
||||
|
||||
select {
|
||||
font-size:16px;
|
||||
cursor: pointer;
|
||||
background: linear-gradient(#ffe6cc, #ffffff);
|
||||
width :100%;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<link href="${pageContext.request.contextPath}/CSS/style.css" rel="stylesheet" type="text/css" >
|
||||
|
||||
<title>team</title>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib uri = "http://java.sun.com/jsp/jstl/functions" prefix = "fn" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
var ln = '${team1Stats.size()}';
|
||||
//color other team points
|
||||
var tradeProjSel = $("td[name='tradeProjSel']");
|
||||
var actualProj = $("[name='actualProj']");
|
||||
var cat = $("[name='cat']");
|
||||
var z = 0;
|
||||
for (x=0;x<$(tradeProjSel).size();x++){
|
||||
if(z==$(cat).size()){z=0;}
|
||||
if($(cat).eq(z).text() == "RK-P"){
|
||||
var n = ""+(parseFloat($(tradeProjSel).eq(x).text()) - parseFloat($(actualProj).eq(z).text()));
|
||||
if(n>0){
|
||||
$(tradeProjSel).eq(x).addClass("positive");
|
||||
$(tradeProjSel).eq(x-1).addClass("positive");
|
||||
}else if(n==0){
|
||||
$(tradeProjSel).eq(x).addClass("neutral");
|
||||
$(tradeProjSel).eq(x-1).addClass("neutral");
|
||||
}else{
|
||||
$(tradeProjSel).eq(x).addClass("negative");
|
||||
$(tradeProjSel).eq(x-1).addClass("negative");
|
||||
}
|
||||
}
|
||||
if(z > ln+2){
|
||||
var n = ""+(parseFloat($(tradeProjSel).eq(x).text()) - parseFloat($(actualProj).eq(z).text()));
|
||||
if(n>0){
|
||||
$(tradeProjSel).eq(x).addClass("positive");
|
||||
}else if(n==0){
|
||||
$(tradeProjSel).eq(x).addClass("neutral");
|
||||
}else{
|
||||
$(tradeProjSel).eq(x).addClass("negative");
|
||||
}
|
||||
}
|
||||
z+=1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var sort = $("[title='filter']");
|
||||
$(sort).each(function(col) {
|
||||
$(this).hover(
|
||||
function() { $(this).addClass('focus'); },
|
||||
function() { $(this).removeClass('focus'); }
|
||||
);
|
||||
|
||||
if($(this).text()=="RK-P"){
|
||||
$(this).addClass('desc selected');
|
||||
};
|
||||
|
||||
$(this).click(function() {
|
||||
if ($(this).is('.desc')) {
|
||||
$(this).removeClass('desc');
|
||||
$(this).addClass('asc selected');
|
||||
sortOrder = 1;
|
||||
}
|
||||
else {
|
||||
$(this).addClass('desc selected');
|
||||
$(this).removeClass('asc');
|
||||
sortOrder = -1;
|
||||
}
|
||||
$(this).siblings().removeClass('asc selected');
|
||||
$(this).siblings().removeClass('desc selected');
|
||||
|
||||
var arrData = $('table').find("tr[name='lignesResults']");
|
||||
/* var arrData = $('table').find('tbody:nth-of-type(2) > tr').get(); */
|
||||
|
||||
arrData.sort(function(a, b) {
|
||||
var val1 = $(a).children('td').eq(col).text().replace("+","").toUpperCase();
|
||||
var val2 = $(b).children('td').eq(col).text().replace("+","").toUpperCase();
|
||||
if($.isNumeric(val1) && $.isNumeric(val2))
|
||||
return sortOrder == 1 ? val1-val2 : val2-val1;
|
||||
else
|
||||
return (val1 < val2) ? -sortOrder : (val1 > val2) ? sortOrder : 0;
|
||||
});
|
||||
|
||||
|
||||
$.each(arrData, function(index, row) {
|
||||
$('tbody:nth-of-type(3)').append(row);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<c:set var="mainFA" value="${requestScope.mainFA}" />
|
||||
<c:set var="stats" value="${requestScope.statBase}" />
|
||||
<c:set var="team1" value="${requestScope.team1}" />
|
||||
<c:set var="team1Stats" value="${requestScope.team1Stats}" />
|
||||
<c:set var="otherTeamStats" value="${requestScope.otherTeamStats}" />
|
||||
<c:set var="nbTeam" value="${requestScope.nbTeam}" />
|
||||
|
||||
<table class="tableTrade">
|
||||
<thead>
|
||||
<tr class="Header">
|
||||
<th colspan="2" ><c:out value="TEAM" /></th>
|
||||
<th name="actualRK"><c:out value="Proj RK" /></th>
|
||||
<th name="actualPTS"><c:out value="Proj PTS" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="ligneHead">
|
||||
<th colspan="2"><c:out value="${team1.name}" /></th>
|
||||
<th name="actualRK"><fmt:formatNumber pattern="0.#" value="${team1.projRK}" /></th>
|
||||
<th name="actualPTS"><fmt:formatNumber pattern="0.#" value="${team1.projTot}" /></th>
|
||||
</tr>
|
||||
|
||||
<thead>
|
||||
<tr class="Header">
|
||||
<th><c:out value="Player RK" /></th>
|
||||
<th align="left"><c:out value="Player" /></th>
|
||||
<th ><c:out value="Pot RK" /></th>
|
||||
<th ><c:out value="Pot PTS" /></th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody >
|
||||
<c:forEach var="player" items= "${players}" varStatus="i">
|
||||
<tr name="lignesPlayer" class="tab" id="${i.index}" onclick="return callfilterResults(this);">
|
||||
<td align="center"><fmt:formatNumber pattern="0.#" value="${player.interRK}" /></td>
|
||||
<td align="left" name ="player"><c:out value="${player.nom}" /></td>
|
||||
<td name="potRKcell" ><fmt:formatNumber pattern="0.#" value="${player.potRK}" /></td>
|
||||
<td name="potPTScell" ><fmt:formatNumber pattern="0.#" value="${player.potPoint}" /></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="text" id="myInput" onkeyup="filterName()" placeholder="Search for names..">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="fa_div" style="display: inline-block;vertical-align:top">
|
||||
|
||||
<table class="tableTrade">
|
||||
<thead >
|
||||
<!---------------------- TAB HEADER------------------------------->
|
||||
<tr class="Header" >
|
||||
<th name="statTab" colspan="${fn:length(team1Stats)+1}"><c:out value="Waiver impact" /></th>
|
||||
<th name="teamTab" colspan="${nbTeam - 1}"><c:out value="Impact on other teams" /></th>
|
||||
</tr>
|
||||
<!----------------------------------------- STATS CAT ---------------->
|
||||
<tr name="headers" class="Header" >
|
||||
<th align="left" ><c:out value="Drop" /></th>
|
||||
<th ><c:out value="Pot RK" /></th>
|
||||
<c:forEach var="stat" items= "${stats}" >
|
||||
<c:if test="${!fn:contains(stat.name,'/')}">
|
||||
<th ><c:out value="${fn:replace(stat.name,'Team ','')}" /></th>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</thead>
|
||||
<!------------------------------- LIGNE ACTUAL STATS PROJECTION-->
|
||||
<tbody >
|
||||
<tr name="headers" class="ligneHead" >
|
||||
<c:forEach var="stat" items= "${team1Stats}" varStatus="i">
|
||||
<c:if test="${i.first}">
|
||||
<th name="actualPlayers">Actual Projection</th>
|
||||
<th name="actualProj"><fmt:formatNumber pattern="0.#" value="${team1projectedRK}" /></th>
|
||||
<th name="actualProj"><fmt:formatNumber pattern="0.#" value="${team1projTot}" /></th>
|
||||
</c:if>
|
||||
<c:if test="${!fn:contains(stat.name,'/')}">
|
||||
<th name="actualProj"><c:out value="${stat.valProjection}" /></th>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
<c:forEach var="stat" items= "${otherTeamStats}" >
|
||||
<th name="actualProj"><c:out value="${stat}" /></th>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
|
||||
<!-- LIGNE WITH FA STATS PROJECTION-->
|
||||
<tr name="headers" class="ligneHead" >
|
||||
<c:forEach var="stat" items= "${stats}" varStatus="i">
|
||||
<c:if test="${stat.name == 'RK-P'}">
|
||||
<th name="tradePlayers" >Proj with FA</th>
|
||||
<th name="tradeProj"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${!stat.name.contains('/')}">
|
||||
<th name="tradeProj"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</tr>
|
||||
|
||||
<!------------- LIGNE DIFFERENCES ----->
|
||||
<tr name="headers" class="ligneHead" >
|
||||
<c:forEach var="stat" items= "${stats}" varStatus="i">
|
||||
<c:if test="${stat.name == 'RK-P'}">
|
||||
<th >Difference</th>
|
||||
<th id="diff" name="diff"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${!stat.name.contains('/')}">
|
||||
<th id="diff" name="diff"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
<thead >
|
||||
<!----------------------------------------- STATS CAT ---------------->
|
||||
<tr name="headers" class="Header" >
|
||||
<th align="left" title="filter"><c:out value="Waiver" /></th>
|
||||
<th name="cat" title="filter"><c:out value="Pot RK" /></th>
|
||||
<c:forEach var="stat" items= "${stats}" >
|
||||
<c:if test="${!fn:contains(stat.name,'/')}">
|
||||
<th name="cat" title="filter"><c:out value="${fn:replace(stat.name,'Team ','')}" /></th>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</thead>
|
||||
<!------------------------ START RESULT TAB-------------------------------->
|
||||
|
||||
<tbody id="tTrade" style="overflow-y: scroll;overflow-x: hidden;" >
|
||||
<c:forEach var="fa" items= "${mainFA}" >
|
||||
|
||||
<tr name="lignesResults" class="tab" id="${i.index}" onclick="return listDiff(this);">
|
||||
|
||||
<c:forEach var="stat" items= "${fa}" varStatus="i" >
|
||||
|
||||
<c:if test="${i.first}">
|
||||
<td align="left" name="get"><c:out value="${stat.player}" /></td>
|
||||
<td name="tradeProjSel"><fmt:formatNumber pattern="0.#" value="${stat.projectedRK}" /></td>
|
||||
</c:if>
|
||||
<c:if test="${!fn:contains(stat.name,'/')}">
|
||||
<c:if test="${!fn:contains(stat.name,'%')}">
|
||||
<td name="tradeProjSel" align="center"><fmt:formatNumber pattern="0.#" value="${stat.valProjection}" /></td>
|
||||
</c:if>
|
||||
<c:if test="${fn:contains(stat.name,'%')}">
|
||||
<td name="tradeProjSel" align="center"><fmt:formatNumber pattern="0.00" value="${stat.valProjection}" /></td>
|
||||
</c:if>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
|
||||
</tr>
|
||||
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<link href="${pageContext.request.contextPath}/CSS/style.css" rel="stylesheet" type="text/css" >
|
||||
|
||||
<title>GRAPH</title>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var title = '${title}';
|
||||
var maxVal = '${maxVal}';
|
||||
var lowVal = '${lowVal}';
|
||||
var width = '${width}';
|
||||
var height = '${height}';
|
||||
var left = '${left}';
|
||||
var top = '${top}';
|
||||
var divGraph = '${divGraph}';
|
||||
var legPos = '${legPos}';
|
||||
var direc = '${direc}';
|
||||
var heightPour = '${heightPour}';
|
||||
var widthPour = '${widthPour}';
|
||||
|
||||
|
||||
function drawLineColors() {
|
||||
$.ajax({
|
||||
url: 'GRAPH_CALL',
|
||||
dataType: 'json',
|
||||
success: function (json) {
|
||||
console.log(json);
|
||||
// assumes json is a DataTable-compatible JSON string
|
||||
var data = new google.visualization.DataTable(json);
|
||||
|
||||
console.log(data);
|
||||
var options = {
|
||||
title: title,
|
||||
titlePosition: {'position':'top','alignment':'center'},
|
||||
|
||||
hAxis: {
|
||||
//title: 'Season Days',
|
||||
gridlines: {count: 0},
|
||||
|
||||
},
|
||||
|
||||
vAxis: {
|
||||
//title: 'Relative Rotisserie Points',
|
||||
direction: direc,
|
||||
gridlines: {color: '#e3e3e2', count: 11},
|
||||
viewWindow: {
|
||||
max: maxVal,
|
||||
min: lowVal
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
'width':width,
|
||||
'height':height,
|
||||
legend: {'position':legPos,'alignment':'center', textStyle: {fontSize: 10}},
|
||||
chartArea:{
|
||||
left:left,top:top,width:widthPour+"%",height:heightPour+"%",
|
||||
/* backgroundColor: {
|
||||
stroke: '#4322c0',
|
||||
strokeWidth: 1
|
||||
} */
|
||||
},
|
||||
colors: ['#9b2b7a', '#FFC300', '#C70039','#d3fe04','#33ebff','#ff33ed','#0309af','#0aaf03','#fe0404','#bd5200','#037512','#acafad','#070105']
|
||||
};
|
||||
var chart = new google.visualization.LineChart(document.getElementById(divGraph));
|
||||
chart.draw(data, options);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
google.charts.load('current', {packages: ['corechart', 'line']});
|
||||
google.charts.setOnLoadCallback(drawLineColors);
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<c:set var="divGraphe" value="${divGraph}" />
|
||||
|
||||
<div style="text-align:center;" id="${divGraphe}"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<link href="${pageContext.request.contextPath}/CSS/style.css" rel="stylesheet" type="text/css" >
|
||||
|
||||
<title>MaxPace</title>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
// color impact in center columns
|
||||
var pace = $("[name='pace']");
|
||||
for (x=0;x<$(pace).size();x++){
|
||||
var n = ""+(parseFloat($(pace).eq(x).text()));
|
||||
if(n>0){
|
||||
$(pace).eq(x).text("+" + n);
|
||||
$(pace).eq(x).removeClass("negative").addClass("positive");
|
||||
}else{
|
||||
$(pace).eq(x).removeClass("positive").addClass("negative");
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(window).load(function() {
|
||||
|
||||
|
||||
}); //end doc ready
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<c:set var="teams" value="${requestScope.teamList}" />
|
||||
<c:set var="slots" value="${requestScope.slotList}" />
|
||||
|
||||
<table class="tableTrade">
|
||||
<thead>
|
||||
<tr class="Header" style="line-height: 20px;">
|
||||
<c:forEach var="team" items= "${teams}" >
|
||||
<th colspan="3"><strong><c:out value="${team.name}" /></strong></th>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
<tr class="Header" style="line-height: 20px;">
|
||||
<c:forEach var="team" items= "${teams}" varStatus="i">
|
||||
<th name="head" style="text-align:left">Slot</th>
|
||||
<th name="head" style="text-align:center">Played</th>
|
||||
<th name="head">Pace</th>
|
||||
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<c:forEach var="slot" items= "${slotList}" varStatus="i">
|
||||
|
||||
<c:if test="${i.index < 8}">
|
||||
|
||||
<tr name="ligne" class="tab">
|
||||
|
||||
<c:forEach var="team" items= "${teams}" >
|
||||
|
||||
<td style="text-align:left;"><strong><c:out value="${team.slots[i.index].nomPos}" /></strong></td>
|
||||
|
||||
<td align="center"><c:out value="${team.slots[i.index].gamesPlayed}" /></td>
|
||||
<td name="pace" align="center"><fmt:formatNumber pattern="0.#" value="${team.slots[i.index].pace}" /></td>
|
||||
|
||||
</c:forEach>
|
||||
|
||||
</tr>
|
||||
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<link href="${pageContext.request.contextPath}/CSS/style.css" rel="stylesheet" type="text/css" >
|
||||
|
||||
<title>League Teams</title>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<script src="${pageContext.request.contextPath}/WEB-INF/lib/jquery.rowselector.min.js"></script>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#${tableName} > tbody > tr").each(function() {
|
||||
if($(this).attr("teamid") != '${teamID}')
|
||||
{
|
||||
this.className='hidden';
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(window).load(function() {
|
||||
|
||||
var cellP = $("td[name='player']");
|
||||
var nbPlayer = '${Tplayers.size()}';
|
||||
var tmp = generateColor('#ffd157','#ff0000',nbTeam/2);
|
||||
var tmp2 = generateColor('#00d700','#d6fa05',nbTeam/2);
|
||||
$.merge(tmp,tmp2);
|
||||
var z = 0;
|
||||
$(cellP).each(function() {
|
||||
for(x=0;x<nbPlayer;x++){
|
||||
if($(cellP).eq(z).text() < nbTeam - x +0.5 && $(cellP).eq(z).text() >= nbTeam - x -0.5){
|
||||
$(this).css('background', 'linear-gradient(#'+tmp[x] + ', #' +tmp[x] + ')');
|
||||
}
|
||||
}
|
||||
z+=1;
|
||||
});
|
||||
|
||||
function hex (c) {
|
||||
var s = "0123456789abcdef";
|
||||
var i = parseInt (c);
|
||||
if (i == 0 || isNaN (c))
|
||||
return "00";
|
||||
i = Math.round (Math.min (Math.max (0, i), 255));
|
||||
return s.charAt ((i - i % 16) / 16) + s.charAt (i % 16);
|
||||
}
|
||||
|
||||
/* Convert an RGB triplet to a hex string */
|
||||
function convertToHex (rgb) {
|
||||
return hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
|
||||
}
|
||||
|
||||
/* Remove '#' in color hex string */
|
||||
function trim (s) { return (s.charAt(0) == '#') ? s.substring(1, 7) : s }
|
||||
|
||||
/* Convert a hex string to an RGB triplet */
|
||||
function convertToRGB (hex) {
|
||||
var color = [];
|
||||
color[0] = parseInt ((trim(hex)).substring (0, 2), 16);
|
||||
color[1] = parseInt ((trim(hex)).substring (2, 4), 16);
|
||||
color[2] = parseInt ((trim(hex)).substring (4, 6), 16);
|
||||
return color;
|
||||
}
|
||||
|
||||
function generateColor(colorStart,colorEnd,colorCount){
|
||||
// The beginning of your gradient
|
||||
var start = convertToRGB (colorStart);
|
||||
// The end of your gradient
|
||||
var end = convertToRGB (colorEnd);
|
||||
// The number of colors to compute
|
||||
var len = colorCount;
|
||||
//Alpha blending amount
|
||||
var alpha = 0.0;
|
||||
var saida = [];
|
||||
for (i = 0; i < len; i++) {
|
||||
var c = [];
|
||||
alpha += (1.0/len);
|
||||
|
||||
c[0] = start[0] * alpha + (1 - alpha) * end[0];
|
||||
c[1] = start[1] * alpha + (1 - alpha) * end[1];
|
||||
c[2] = start[2] * alpha + (1 - alpha) * end[2];
|
||||
|
||||
saida.push(convertToHex (c));
|
||||
}
|
||||
return saida;
|
||||
}
|
||||
}); //end doc ready
|
||||
|
||||
|
||||
function RowClick(currenttr,table, otherTable) {
|
||||
|
||||
$("#" + table +" > tbody > tr").each(function() {
|
||||
var tableRow = this;
|
||||
|
||||
if($(tableRow).attr("id") == $(currenttr).attr("id"))
|
||||
{
|
||||
|
||||
if($(tableRow).attr("teamid") != $(tableRow).attr("tid")){
|
||||
tableRow.className='hidden';
|
||||
$("#" + otherTable +" > tbody > tr").each(function() {
|
||||
var otableRow = this;
|
||||
if(otableRow.className=='selected' && $(tableRow).attr("player") == $(otableRow).attr("player")){
|
||||
otableRow.className ='tab';
|
||||
}
|
||||
});
|
||||
|
||||
}else if(tableRow.className=='selected')
|
||||
{
|
||||
tableRow.className='tab';
|
||||
$("#" + otherTable +" > tbody > tr").each(function() {
|
||||
var otableRow = this;
|
||||
if(otableRow.className=='displayed' && $(tableRow).attr("player") == $(otableRow).attr("player")){
|
||||
otableRow.className ='hidden';
|
||||
}
|
||||
});
|
||||
}else
|
||||
{
|
||||
tableRow.className='selected';
|
||||
$("#" + otherTable +" > tbody > tr").each(function() {
|
||||
var otableRow = this;
|
||||
if(otableRow.className=='hidden' && $(tableRow).attr("player") == $(otableRow).attr("player")){
|
||||
otableRow.className ='displayed';
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<c:set var="players" value="${requestScope.Tplayers}" />
|
||||
<c:set var="stats" value="${players[0].stats}" />
|
||||
|
||||
<table id="${tableName}" class="tableTrade" >
|
||||
|
||||
<thead>
|
||||
<tr class="Header">
|
||||
<th align="left"><c:out value="Pos" /></th>
|
||||
<th align="left" style="width:120px"><c:out value="Players" /></th>
|
||||
<th align="left"><c:out value="Team RK" /></th>
|
||||
<c:forEach var="stat" items= "${stats}" varStatus="i">
|
||||
<th ><c:out value="${stat.name}" /></th>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody style="font-size:16px;font-weight: bold; ">
|
||||
<c:forEach var="player" items= "${players}" varStatus="i">
|
||||
<tr style="height:20px;" class="tab" id="${i.index}" tid="${teamID}" teamid="${player.teamID}" player="${player.nom}" onclick="RowClick(this,'${tableName}','${otherTableName}');">
|
||||
|
||||
<c:set var="stats" value="${player.stats}" />
|
||||
|
||||
<td>
|
||||
<c:forEach items="${player.positions}" var="position">
|
||||
<c:out value="${position}," />
|
||||
</c:forEach>
|
||||
</td>
|
||||
|
||||
<td style="width:120px;text-align:left;" ><c:out value="${player.nom}" /></td>
|
||||
<td name="player" align="center"><fmt:formatNumber pattern="0.#" value="${player.interRK}" /></td>
|
||||
|
||||
<c:forEach var="stat" items= "${stats}" varStatus="i">
|
||||
<td style="align:center"><c:out value="${stat.statVal}" /></td>
|
||||
</c:forEach>
|
||||
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,407 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<link href="${pageContext.request.contextPath}/CSS/style.css" rel="stylesheet" type="text/css" >
|
||||
|
||||
<title>team</title>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<%@ taglib uri = "http://java.sun.com/jsp/jstl/functions" prefix = "fn" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var ln = parseInt('${team1Stats.size()}');
|
||||
|
||||
//$(document).ready(function() {
|
||||
var headers = $("[name='headers']");
|
||||
var lignesResults = $("[name='lignesResults']");
|
||||
|
||||
var nbTeam = $(headers).find("th").size() - ln *2 -12;
|
||||
|
||||
|
||||
|
||||
// color impact in center columns
|
||||
var impSel = $("[name='impSel']");
|
||||
for (x=0;x<$(impSel).size();x++){
|
||||
var n = ""+(parseFloat($(impSel).eq(x).text()));
|
||||
if(n>0){
|
||||
$(impSel).eq(x).text("+" + n);
|
||||
$(impSel).eq(x).removeClass("negative").addClass("positive");
|
||||
}else{
|
||||
$(impSel).eq(x).removeClass("positive").addClass("negative");
|
||||
}
|
||||
}
|
||||
|
||||
var entete = $("[name='headers']");
|
||||
//hide ft / fg stats
|
||||
$(entete).find('th').each (function() {
|
||||
if($(this).text().includes("/")){
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
var entete2 = $("[name='headersTop']");
|
||||
//hide ft / fg stats
|
||||
$(entete2).find('th').each (function() {
|
||||
if($(this).text().includes("/")){
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
var entete3 = $("[name='headersMid']");
|
||||
//hide ft / fg stats
|
||||
$(entete3).find('th').each (function() {
|
||||
if($(this).text().includes("/")){
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
var tradeProjSel = $("td[name='tradeProjSel']");
|
||||
//hide ft / fg stats
|
||||
$(tradeProjSel).each (function() {
|
||||
if($(this).text().includes("/")){
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
|
||||
//color other team points
|
||||
var actualProj = $("[name='actualProj']");
|
||||
var cat = $("[name='cat']");
|
||||
var z = 0;
|
||||
for (x=0;x<$(tradeProjSel).size();x++){
|
||||
if(z==$(cat).size()){z=0;}
|
||||
if(z>$(cat).size()-nbTeam-1){
|
||||
var n = ""+(parseFloat($(tradeProjSel).eq(x).text()) - parseFloat($(actualProj).eq(z).text()));
|
||||
if(n>0){
|
||||
$(tradeProjSel).eq(x).removeClass("negative").addClass("positive");
|
||||
}else{
|
||||
$(tradeProjSel).eq(x).removeClass("positive").addClass("negative");
|
||||
}
|
||||
|
||||
}
|
||||
z+=1;
|
||||
}
|
||||
|
||||
var sort = $("[name='sort']");
|
||||
$(sort).each(function(col) {
|
||||
$(this).hover(
|
||||
function() { $(this).addClass('focus'); },
|
||||
function() { $(this).removeClass('focus'); }
|
||||
);
|
||||
|
||||
if($(this).text()=="TOT RD"){
|
||||
$(this).addClass('desc selected');
|
||||
}
|
||||
|
||||
$(this).click(function() {
|
||||
if ($(this).is('.desc')) {
|
||||
$(this).removeClass('desc');
|
||||
$(this).addClass('asc selected');
|
||||
sortOrder = 1;
|
||||
}
|
||||
else {
|
||||
$(this).addClass('desc selected');
|
||||
$(this).removeClass('asc');
|
||||
sortOrder = -1;
|
||||
}
|
||||
$(this).siblings().removeClass('asc selected');
|
||||
$(this).siblings().removeClass('desc selected');
|
||||
|
||||
var arrData = $('table').find("tr[name='lignesResults']");
|
||||
/* var arrData = $('table').find('tbody:nth-of-type(2) > tr').get(); */
|
||||
|
||||
arrData.sort(function(a, b) {
|
||||
var val1 = $(a).children('td').eq(col+${nbStats}+4).text().replace("+","").toUpperCase();
|
||||
var val2 = $(b).children('td').eq(col+${nbStats}+4).text().replace("+","").toUpperCase();
|
||||
if($.isNumeric(val1) && $.isNumeric(val2))
|
||||
return sortOrder == 1 ? val1-val2 : val2-val1;
|
||||
else
|
||||
return (val1 < val2) ? -sortOrder : (val1 > val2) ? sortOrder : 0;
|
||||
});
|
||||
|
||||
|
||||
|
||||
$.each(arrData, function(index, row) {
|
||||
$('tbody:nth-of-type(2)').append(row);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#everything-wrapper").fadeIn();
|
||||
$('#loader').hide();
|
||||
});
|
||||
|
||||
function listDiff(Elem)
|
||||
{
|
||||
|
||||
var impSel = $(Elem).find("td[name='impSel']");
|
||||
var imp = $("[name='imp']");
|
||||
var drop = $(Elem).find("td[name='drop']");
|
||||
var get = $(Elem).find("td[name='get']");
|
||||
var actualPlayers = $("[name='actualPlayers']");
|
||||
var tradePlayers = $("[name='tradePlayers']");
|
||||
var cat = $("[name='cat']");
|
||||
var actualProj = $("[name='actualProj']");
|
||||
var tradeProj = $("[name='tradeProj']");
|
||||
var diff = $("[name='diff']")
|
||||
var tradeProjSel = $(Elem).find("td[name='tradeProjSel']");
|
||||
|
||||
$(actualPlayers).eq(0).text($(drop).eq(0).text());
|
||||
$(tradePlayers).eq(0).text($(get).eq(0).text());
|
||||
//$(actualPlayers).eq(1).text($(drop).eq(1).text());
|
||||
//$(tradePlayers).eq(1).text($(get).eq(1).text());
|
||||
|
||||
for (x=0;x<$(impSel).size();x++){
|
||||
$(imp).eq(x).text($(impSel).eq(x).text());
|
||||
var n = ""+(parseFloat($(imp).eq(x).text()));
|
||||
if(n>0){
|
||||
$(imp).eq(x).removeClass("negative").addClass("positive");
|
||||
}else{
|
||||
$(imp).eq(x).removeClass("positive").addClass("negative");
|
||||
}
|
||||
}
|
||||
|
||||
for (x=0;x<$(cat).size();x++){
|
||||
|
||||
if($(cat).eq(x).text().includes('/')){
|
||||
var decomp = $(tradeProjSel).eq(x).text().split("/");
|
||||
var decomp2 = $(actualProj).eq(x).text().split("/");
|
||||
|
||||
$(tradeProj).eq(x).text(parseFloat(decomp[0]).toFixed(0) + "/" + parseFloat(decomp[1]).toFixed(0));
|
||||
|
||||
var valProj1 = parseFloat(decomp[0]) - parseFloat(decomp2[0]);
|
||||
var valProj2 = parseFloat(decomp[1]) - parseFloat(decomp2[1]);
|
||||
$(diff).eq(x).text(valProj1.toFixed(0) + "/" + valProj2.toFixed(0));//remaining points
|
||||
}else if($(cat).eq(x).text().includes('%')){
|
||||
$(tradeProj).eq(x).text(parseFloat($(tradeProjSel).eq(x).text()).toFixed(2));
|
||||
var n = (parseFloat($(tradeProj).eq(x).text()) - parseFloat($(actualProj).eq(x).text())).toFixed(2);
|
||||
if(n>0){
|
||||
$(diff).eq(x).text("+" + n);
|
||||
$(diff).eq(x).removeClass("negative").addClass("positive");
|
||||
$(diff).eq(x+1).removeClass("negative").addClass("positive");
|
||||
}else{
|
||||
$(diff).eq(x).text(n);
|
||||
$(diff).eq(x).removeClass("positive").addClass("negative");
|
||||
$(diff).eq(x+1).removeClass("positive").addClass("negative");
|
||||
}
|
||||
}else if($(cat).eq(x).text() == 'TO'){
|
||||
$(tradeProj).eq(x).text(parseFloat($(tradeProjSel).eq(x).text()));
|
||||
var n = ""+(parseFloat($(tradeProj).eq(x).text()) - parseFloat($(actualProj).eq(x).text()));
|
||||
if(n>0){
|
||||
$(diff).eq(x).text("+" + n);
|
||||
$(diff).eq(x).removeClass("positive").addClass("negative");
|
||||
}else{
|
||||
$(diff).eq(x).text(n);
|
||||
$(diff).eq(x).removeClass("negative").addClass("positive");
|
||||
}
|
||||
}else{
|
||||
$(tradeProj).eq(x).text(parseFloat($(tradeProjSel).eq(x).text()));
|
||||
//inverse diff si col RK
|
||||
if($(cat).eq(x).text() == 'RK'){
|
||||
var n = ""+(parseFloat($(actualProj).eq(x).text()) - parseFloat($(tradeProj).eq(x).text()));
|
||||
if(n>0){
|
||||
$(diff).eq(x).text("+" + n);
|
||||
$(diff).eq(x).removeClass("negative").addClass("positive");
|
||||
}else{
|
||||
$(diff).eq(x).text(n);
|
||||
$(diff).eq(x).removeClass("positive").addClass("negative");
|
||||
}
|
||||
}else{
|
||||
var n = parseFloat($(tradeProj).eq(x).text()) - parseFloat($(actualProj).eq(x).text());
|
||||
if(n>0){
|
||||
$(diff).eq(x).text("+" + n);
|
||||
$(diff).eq(x).removeClass("negative").addClass("positive");
|
||||
}else{
|
||||
$(diff).eq(x).text(n);
|
||||
$(diff).eq(x).removeClass("positive").addClass("negative");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="">
|
||||
|
||||
|
||||
<c:set var="mainTRADE" value="${requestScope.mainTRADE}" />
|
||||
<c:set var="stats" value="${requestScope.statBase}" />
|
||||
<c:set var="nbTeam" value="${requestScope.nbTeam}" />
|
||||
<c:set var="team1" value="${requestScope.team1}" />
|
||||
<c:set var="team1Stats" value="${requestScope.team1Stats}" />
|
||||
<c:set var="team2" value="${requestScope.team2}" />
|
||||
<c:set var="team2Stats" value="${requestScope.team2Stats}" />
|
||||
<c:set var="otherTeamStats" value="${requestScope.otherTeamStats}" />
|
||||
|
||||
<div id="everything-wrapper" >
|
||||
|
||||
<table class="tableTrade" style="font-size: 7px;">
|
||||
|
||||
<thead ">
|
||||
<!-- ajoute 3 titres de section ----- TEAM 2 -------------TEAM 2 --------OTHERS -->
|
||||
<tr class="Header"">
|
||||
<th name="tradeTab" rowspan="2" colspan="2"><c:out value="Traded players" /></th>
|
||||
<th name="team1Tab" colspan="${(fn:length(stats)-nbTeam+2-6-2)/2 }"><c:out value="${team1.name}" /></th>
|
||||
<th name="impTab" rowspan="2" colspan="6"><c:out value="Trade Impact" /></th>
|
||||
<th name="team2Tab" colspan="${(fn:length(stats)-nbTeam+2-6-2)/2 }"><c:out value="${team2.name}" /></th>
|
||||
<th name="impTeamTab" colspan="${nbTeam - 2}"><c:out value="Impact on other teams" /></th>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- STATS CAT -->
|
||||
<tr name="headersTop" class="Header">
|
||||
<c:forEach var="stat" items= "${stats}" varStatus="i">
|
||||
<c:if test="${stat.name == 'RK-P'}">
|
||||
|
||||
<c:if test="${i.first}">
|
||||
|
||||
</c:if>
|
||||
<th ><c:out value="RK" /></th>
|
||||
</c:if>
|
||||
<c:if test="${stat.name != 'IMP'}">
|
||||
<th><c:out value="${stat.name}" /></th>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- LIGNE ACTUAL STATS PROJECTION-->
|
||||
<tr name="headersTop" class="ligneHead" ">
|
||||
<c:forEach var="stat" items= "${team1Stats}" varStatus="i">
|
||||
<c:if test="${i.first}">
|
||||
<th name="actualPlayers" rowspan="3">T1 trade</th>
|
||||
<th name="tradePlayers" rowspan="3">T1 trade</th>
|
||||
<th name="actualProj"><fmt:formatNumber pattern="0.#" value="${team1projectedRK}" /></th>
|
||||
<th name="actualProj"><fmt:formatNumber pattern="0.#" value="${team1projTot}" /></th>
|
||||
</c:if>
|
||||
<th name="actualProj"><c:out value="${stat.valProjection}" /></th>
|
||||
</c:forEach>
|
||||
|
||||
<th colspan="6">ACTUAL PROJECTION</th>
|
||||
|
||||
<c:forEach var="stat" items= "${team2Stats}" varStatus="i" >
|
||||
<c:if test="${i.first}">
|
||||
<th name="actualProj"><fmt:formatNumber pattern="0.#" value="${team2projectedRK}" /></th>
|
||||
<th name="actualProj"><fmt:formatNumber pattern="0.#" value="${team2projTot}" /></th>
|
||||
</c:if>
|
||||
<th name="actualProj"><c:out value="${stat.valProjection}" /></th>
|
||||
</c:forEach>
|
||||
|
||||
<c:forEach var="stat" items= "${otherTeamStats}" >
|
||||
<th name="actualProj"><c:out value="${stat}" /></th>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
|
||||
<!-- LIGNE WITH TRADE STATS PROJECTION-->
|
||||
<tr name="headersMid" class="ligneHead" ">
|
||||
<c:forEach var="stat" items= "${stats}" varStatus="i">
|
||||
<c:if test="${i.first}">
|
||||
|
||||
</c:if>
|
||||
<c:if test="${stat.name == 'RK-P'}">
|
||||
<th name="tradeProj"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
<c:if test="${stat.name != 'IMP'}">
|
||||
<c:if test="${stat.name.contains('/')}">
|
||||
<th name="tradeProj"><c:out value="--/--" /></th>
|
||||
</c:if>
|
||||
<c:if test="${!stat.name.contains('/')}">
|
||||
<th name="tradeProj"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
</c:if>
|
||||
<c:if test="${stat.name == 'IMP'}">
|
||||
<th name="imp"><c:out value="<>" /></th>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</tr>
|
||||
<!------------- LIGNE DIFFERENCES ----->
|
||||
<tr name="headersTop" class="ligneHead" ">
|
||||
<c:forEach var="stat" items= "${stats}" varStatus="i">
|
||||
<c:if test="${stat.name == 'RK-P'}">
|
||||
<c:if test="${!i.first}">
|
||||
<th colspan="6">DIFFERENCES</th>
|
||||
</c:if>
|
||||
<c:if test="${i.first}">
|
||||
|
||||
</c:if>
|
||||
<th id="diff" name="diff"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
<c:if test="${stat.name != 'IMP'}">
|
||||
<c:if test="${stat.name.contains('/')}">
|
||||
<th id="diff" name="diff"><c:out value="--/--" /></th>
|
||||
</c:if>
|
||||
<c:if test="${!stat.name.contains('/')}">
|
||||
<th id="diff" name="diff"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</tbody>
|
||||
<thead>
|
||||
<!------ DROP GET / REPEAT STATS CAT ----->
|
||||
<tr name="headers" class="Header" ">
|
||||
<c:forEach var="stat" items= "${stats}" varStatus="i">
|
||||
<c:if test="${stat.name == 'RK-P'}">
|
||||
<c:if test="${!i.first}">
|
||||
<th name="sort">RK D</th>
|
||||
<th name="sort">PT D</th>
|
||||
<th name="sort">TOT RD</th>
|
||||
<th name="sort">TOT PD</th>
|
||||
<th name="sort">RK D</th>
|
||||
<th name="sort">PT D</th>
|
||||
</c:if>
|
||||
<c:if test="${i.first}">
|
||||
<th ><c:out value="${team1.name}" /></th>
|
||||
<th ><c:out value="${team2.name}" /></th>
|
||||
</c:if>
|
||||
|
||||
<th name="cat"><c:out value="RK" /></th>
|
||||
</c:if>
|
||||
<c:if test="${stat.name != 'IMP'}">
|
||||
<th name="cat"><c:out value="${stat.name}" /></th>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</thead>
|
||||
<!------------------------ START RESULT TAB-------------------------------->
|
||||
<tbody id="tTradediv" style="">
|
||||
<c:forEach var="trade" items= "${mainTRADE}" varStatus="j">
|
||||
|
||||
<tr name="lignesResults" class="tab" id="${i.index}" onclick="return listDiff(this);">
|
||||
<c:forEach var="stat" items= "${trade}" varStatus="i" >
|
||||
<c:if test="${i.first}">
|
||||
<td name="drop"><c:out value="${stat.player}" /></td>
|
||||
<td name="get"><c:out value="${stat.team}" /></td>
|
||||
</c:if>
|
||||
<c:if test="${stat.name == 'RK-P'}">
|
||||
<td name="tradeProjSel" align="center"><fmt:formatNumber pattern="0.#" value="${stat.projectedRK}" /></td>
|
||||
</c:if>
|
||||
<c:if test="${stat.name != 'IMP'}">
|
||||
<td name="tradeProjSel" align="center"><c:out value="${stat.valProjection}" /></td>
|
||||
</c:if>
|
||||
<c:if test="${stat.name == 'IMP'}">
|
||||
<td name="impSel" align="center"><c:out value="${stat.valProjection}" /></td>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
|
||||
</tr>
|
||||
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#Generated by Maven Integration for Eclipse
|
||||
#Mon Oct 22 16:28:29 CEST 2018
|
||||
m2e.projectLocation=C\:\\Users\\lejay\\eclipse-workspace\\sd.zip_expanded\\FantasyManager
|
||||
m2e.projectName=FantasyManager
|
||||
groupId=FantasyManager
|
||||
artifactId=FantasyManager
|
||||
version=0.0.1-SNAPSHOT
|
||||
@@ -0,0 +1,81 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>FantasyManager</groupId>
|
||||
<artifactId>FantasyManager</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.7.0</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<configuration>
|
||||
<warSourceDirectory>WebContent</warSourceDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.visualization</groupId>
|
||||
<artifactId>visualization-datasource</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.9.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.39</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.webfolder</groupId>
|
||||
<artifactId>ui4j-webkit</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-firefox-driver</artifactId>
|
||||
<version>3.13.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
<packaging>war</packaging>
|
||||
</project>
|
||||
@@ -0,0 +1,419 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<link href="${pageContext.request.contextPath}/CSS/style.css" rel="stylesheet" type="text/css" >
|
||||
<title>Insert title here</title>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<!--Load the AJAX API-->
|
||||
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
//-------------desactivate btn trade >>> need import players------------
|
||||
//document.getElementById("btnTrade").disabled = true;
|
||||
var rows = $('table').find("tr[name='ligne']");
|
||||
var rowsInTable = $(rows).size();
|
||||
var height = 267 / rowsInTable;
|
||||
$(rows).each(function() {
|
||||
$(this).css("height", height);
|
||||
});
|
||||
|
||||
var head = $("th[name='head']");
|
||||
var x= 0;
|
||||
$(head).each(function() {
|
||||
if(x==0){
|
||||
$(this).css("width", 110.6);
|
||||
}else if(x==1 || x==3 || x==5 || x==7){
|
||||
$(this).css("width", 25); //140
|
||||
}else {
|
||||
$(this).css("width", 45); //135
|
||||
}
|
||||
|
||||
x+=1;
|
||||
});
|
||||
|
||||
|
||||
|
||||
}); //end doc ready
|
||||
|
||||
|
||||
$(window).load(function() {
|
||||
|
||||
var totproj = $("[name='totproj']");
|
||||
var RKproj = $("[name='RKproj']");
|
||||
var RKteam = $("[name='RKteam']");
|
||||
var RKrel = $("[name='RKrel']");
|
||||
var tot = $("[name='tot']");
|
||||
var totRel = $("[name='totRel']");
|
||||
var nbTeam = '${teamList.size()}';
|
||||
var tmp = generateColor('#ffd157','#ff0000',nbTeam/2);
|
||||
var tmp2 = generateColor('#00d700','#ffff00',nbTeam/2);
|
||||
$.merge(tmp,tmp2);
|
||||
var z = 0;
|
||||
$(tot).each(function() {
|
||||
for(x=0;x<nbTeam;x++){
|
||||
if($(RKteam).eq(z).text() < nbTeam - x +0.5 && $(RKteam).eq(z).text() >= nbTeam - x -0.5){
|
||||
$(this).css('background', 'linear-gradient(#'+tmp[x] + ', #ffffff)');
|
||||
$(this).css('text-shadow' , '0 1px 0 ##261300');
|
||||
}
|
||||
}
|
||||
z+=1;
|
||||
});
|
||||
z = 0;
|
||||
$(totRel).each(function() {
|
||||
for(x=0;x<nbTeam;x++){
|
||||
if($(RKrel).eq(z).text() < nbTeam - x +0.5 && $(RKrel).eq(z).text() >= nbTeam - x -0.5){
|
||||
$(this).css('background', 'linear-gradient(#'+tmp[x] + ', #ffffff)' );
|
||||
$(this).css('text-shadow' , '0 1px 0 ##261300');
|
||||
}
|
||||
}
|
||||
z+=1;
|
||||
});
|
||||
z = 0;
|
||||
$(totproj).each(function() {
|
||||
for(x=0;x<nbTeam;x++){
|
||||
if($(RKproj).eq(z).text() < nbTeam - x +0.5 && $(RKproj).eq(z).text() >= nbTeam - x -0.5){
|
||||
$(this).css('background', 'linear-gradient(#'+tmp[x] + ', #ffffff)');
|
||||
$(this).css('text-shadow' , '0 1px 0 ##261300');
|
||||
}
|
||||
}
|
||||
z+=1;
|
||||
});
|
||||
|
||||
|
||||
function hex (c) {
|
||||
var s = "0123456789abcdef";
|
||||
var i = parseInt (c);
|
||||
if (i == 0 || isNaN (c))
|
||||
return "00";
|
||||
i = Math.round (Math.min (Math.max (0, i), 255));
|
||||
return s.charAt ((i - i % 16) / 16) + s.charAt (i % 16);
|
||||
}
|
||||
|
||||
/* Convert an RGB triplet to a hex string */
|
||||
function convertToHex (rgb) {
|
||||
return hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
|
||||
}
|
||||
|
||||
/* Remove '#' in color hex string */
|
||||
function trim (s) { return (s.charAt(0) == '#') ? s.substring(1, 7) : s }
|
||||
|
||||
/* Convert a hex string to an RGB triplet */
|
||||
function convertToRGB (hex) {
|
||||
var color = [];
|
||||
color[0] = parseInt ((trim(hex)).substring (0, 2), 16);
|
||||
color[1] = parseInt ((trim(hex)).substring (2, 4), 16);
|
||||
color[2] = parseInt ((trim(hex)).substring (4, 6), 16);
|
||||
return color;
|
||||
}
|
||||
|
||||
function generateColor(colorStart,colorEnd,colorCount){
|
||||
// The beginning of your gradient
|
||||
var start = convertToRGB (colorStart);
|
||||
// The end of your gradient
|
||||
var end = convertToRGB (colorEnd);
|
||||
// The number of colors to compute
|
||||
var len = colorCount;
|
||||
//Alpha blending amount
|
||||
var alpha = 0.0;
|
||||
var saida = [];
|
||||
for (i = 0; i < len; i++) {
|
||||
var c = [];
|
||||
alpha += (1.0/len);
|
||||
|
||||
c[0] = start[0] * alpha + (1 - alpha) * end[0];
|
||||
c[1] = start[1] * alpha + (1 - alpha) * end[1];
|
||||
c[2] = start[2] * alpha + (1 - alpha) * end[2];
|
||||
|
||||
saida.push(convertToHex (c));
|
||||
}
|
||||
return saida;
|
||||
}
|
||||
}); //end doc ready
|
||||
|
||||
|
||||
function rebuildGraph() {
|
||||
$.ajax({
|
||||
url:'CALL_Rebuild',
|
||||
type:'post',
|
||||
success:function(response)
|
||||
{
|
||||
drawMain();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var stats = '${statsJson}';
|
||||
var json = JSON.parse(stats);
|
||||
|
||||
drawMain();
|
||||
|
||||
function drawMain() {
|
||||
$.ajax({
|
||||
url:'GRAPH_CALL',
|
||||
type:'post',
|
||||
data: {typeGraph: "mainGraph"},
|
||||
success:function(response)
|
||||
{
|
||||
$("#cont_chart_div").html(response);
|
||||
$('#loader').hide();
|
||||
|
||||
//---------------------------------------change to load graphs
|
||||
|
||||
drawMaxPace();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function drawStat(x) {
|
||||
$.ajax(
|
||||
{
|
||||
url:'GRAPH_CALL',
|
||||
type:'post',
|
||||
data: {typeGraph: json[x]["name"]},
|
||||
success:function(response)
|
||||
{
|
||||
$("#cont_"+json[x]["name"].replace("%","")).html(response);
|
||||
|
||||
if(json[x]["name"] != "PTS"){
|
||||
if(json[x+1]["name"].includes("/")){
|
||||
drawStat(x+2);
|
||||
}else{
|
||||
drawStat(x+1);
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
//drawLast(x);
|
||||
|
||||
}
|
||||
$('#loader'+json[x]["name"].replace("%","")).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function drawLast(x) {
|
||||
$.ajax(
|
||||
{
|
||||
url:'GRAPH_CALL',
|
||||
type:'post',
|
||||
data: {typeGraph: json[x]["name"]},
|
||||
success:function(response)
|
||||
{
|
||||
$("#cont_"+json[x]["name"].replace("%","")).html(response);
|
||||
$('#loader'+json[x]["name"].replace("%","")).hide();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function loader() {
|
||||
|
||||
$.ajax({
|
||||
url:'LoadTester',
|
||||
type:'get',
|
||||
success:function(response)
|
||||
{
|
||||
//$("#trade_div").html(response);
|
||||
document.getElementById("btnTrade").disabled = false;
|
||||
|
||||
//--------------BTN LIGNE LEAM---------------need import player stats
|
||||
$(document).on("click","tr", function(e){
|
||||
document.getElementById($(this).index()).submit();
|
||||
});
|
||||
|
||||
|
||||
drawStat(0);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function drawMaxPace() {
|
||||
|
||||
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url:'CALL_DIV_maxPace',
|
||||
type:'post',
|
||||
data: {},
|
||||
success:function(response)
|
||||
{
|
||||
$("#cont_maxPace").html(response);
|
||||
$('#loaderMaxPace').hide();
|
||||
|
||||
loader();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<c:set var="teams" value="${sessionScope.teamList}" />
|
||||
<c:set var="stats" value="${requestScope.statsBase}" />
|
||||
|
||||
|
||||
<div class="wrapper">
|
||||
|
||||
<header class="main-head">
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<article class="graph">
|
||||
<ul class="listing">
|
||||
|
||||
<li class="superwide">
|
||||
<div class="HeaderDiv" style="width:100%;line-height: 20px;text-align: center;"><c:out value="League ${leagueName} - ${season} Rotisserie - Day : ${day} / ${totDays}" /></div>
|
||||
|
||||
<div style="width: 100%;text-align: center;margin-bottom:10px;">
|
||||
<div style="display: inline-block;vertical-align:top;">
|
||||
<form name='TradeForm' method='post' action='tradeServlet'>
|
||||
<input id='btnTrade' type='submit' value='Trade' /></form>
|
||||
</div>
|
||||
<div style="display: inline-block;vertical-align:top;">
|
||||
<input id="btnRebuild" type="button" value="Rebuild Graph" onclick="rebuildGraph();" />
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<table class="tableTrade">
|
||||
<thead>
|
||||
<tr class="Header" style="line-height: 20px;">
|
||||
<th colspan="4">ESPN RANKING</th>
|
||||
<th colspan="2">RELATIVE</th>
|
||||
<th colspan="2">PROJECTION</th>
|
||||
</tr>
|
||||
<tr class="Header" style="line-height: 20px;">
|
||||
<th name="head" style="text-align:left">TEAM</th>
|
||||
<th name="head">GP</th>
|
||||
<th name="head" style="width: 49px;">ESPN PTS</th>
|
||||
<th name="head">E-RK</th>
|
||||
<th name="head" style="width: 49px;">REL PTS</th>
|
||||
<th name="head">R-RK</th>
|
||||
<th name="head" style="width: 49px;">PROJ PTS</th>
|
||||
<th name="head">P-RK</th>
|
||||
</tr>
|
||||
<%-- <tr class="Header" ><th align="left"><c:out value="Team" /></th>
|
||||
<c:forEach var="stat" items= "${stats}" >
|
||||
<th><c:out value="${stat.name}" /></th>
|
||||
</c:forEach>
|
||||
<th><c:out value="ESPN Pts" /></th>
|
||||
<th><c:out value="REL Pts" /></th>
|
||||
</tr> --%>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach var="team" items= "${teams}" >
|
||||
<tr name="ligne" class="tab">
|
||||
<td style="text-align:left;"><strong><c:out value="${team.name}" /></strong></td>
|
||||
<%-- <c:forEach var="stat" items= "${team.stats}" >
|
||||
<td align="center"><c:out value="${stat.valRot}" /></td>
|
||||
</c:forEach> --%>
|
||||
<td align="center"><c:out value="${team.gamesPlayed}" /></td>
|
||||
<td name="tot" align="center"><fmt:formatNumber pattern="0.#" value="${team.totalrotPts}" /></td>
|
||||
<td name="RKteam" align="center"><fmt:formatNumber pattern="0.#" value="${team.RK}" /></td>
|
||||
<td name="totRel" align="center"><fmt:formatNumber pattern="0.#" value="${team.totalrotPtsRel}" /></td>
|
||||
<td name="RKrel" align="center"><fmt:formatNumber pattern="0.#" value="${team.relativeRK}" /></td>
|
||||
<td name="totproj" align="center"><fmt:formatNumber pattern="0.#" value="${team.projTot}" /></td>
|
||||
<td name="RKproj" align="center"><fmt:formatNumber pattern="0.#" value="${team.projRK}" /></td>
|
||||
<form id="${team.ID}" action="teamServlet" method="post" >
|
||||
<input type="submit" style="display:none;"/>
|
||||
<input type="hidden" name="teamId" value="${team.ID}"/>
|
||||
</form>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
|
||||
<li class="wide">
|
||||
|
||||
<div class="HeaderDiv" style="line-height: 20px;text-align: center;"><c:out value="RANKING EVOLUTION RELATIVE TO GAMES PLAYED" /></div>
|
||||
<div class="cn">
|
||||
<div id="cont_chart_div" style="height: 295px;">
|
||||
<div id="loader" style="width: 100%;text-align: center;display:block;vertical-align:center; margin-top: 135px">
|
||||
<span>Buildind RK Graph</span>
|
||||
<span class="l-1"></span>
|
||||
<span class="l-2"></span>
|
||||
<span class="l-3"></span>
|
||||
<span class="l-4"></span>
|
||||
<span class="l-5"></span>
|
||||
<span class="l-6"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<c:forEach var="stat" items= "${stats}" varStatus="i">
|
||||
<c:if test="${!fn:contains(stat.name,'/')}">
|
||||
<li >
|
||||
<div class="HeaderDiv" style="line-height: 20px;text-align: center;"><c:out value="${stat.name}" /></div>
|
||||
|
||||
<div class="cn">
|
||||
|
||||
<div id="cont_${fn:replace(stat.name ,'%','')}" style="height: 200px;">
|
||||
<div id="loader${fn:replace(stat.name ,'%','')}" style="width: 100%;text-align: center; margin-top: 80px">
|
||||
<span><c:out value="Buildind ${stat.name} Graph" /></span>
|
||||
<span class="l-1"></span>
|
||||
<span class="l-2"></span>
|
||||
<span class="l-3"></span>
|
||||
<span class="l-4"></span>
|
||||
<span class="l-5"></span>
|
||||
<span class="l-6"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
<li class="superwide">
|
||||
|
||||
<div class="HeaderDiv" style="line-height: 20px;text-align: center;"><c:out value="MAX & PACE" /></div>
|
||||
<div class="cn">
|
||||
<div id="cont_maxPace" style="width: 100%;">
|
||||
<div id="loadermaxPace" style="width: 100%;text-align: center;display:block;vertical-align:center; margin-top: 35px">
|
||||
<span>Calculating Max & Pace</span>
|
||||
<span class="l-1"></span>
|
||||
<span class="l-2"></span>
|
||||
<span class="l-3"></span>
|
||||
<span class="l-4"></span>
|
||||
<span class="l-5"></span>
|
||||
<span class="l-6"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</article>
|
||||
<!-- <footer class="main-footer">The footer</footer> -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,566 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<link href="${pageContext.request.contextPath}/CSS/style.css" rel="stylesheet" type="text/css" >
|
||||
|
||||
<title>team</title>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib uri = "http://java.sun.com/jsp/jstl/functions" prefix = "fn" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(window).load(function() {
|
||||
var ln = parseInt('${team1Stats.size()}');
|
||||
|
||||
//$(document).ready(function() {
|
||||
|
||||
var lignesResults = $("[name='lignesResults']");
|
||||
var z = 0;
|
||||
$(lignesResults).each (function() {
|
||||
z = 0;
|
||||
$(this).find("td").each(function() {
|
||||
if(z==0){
|
||||
$(this).css("width", "95");
|
||||
}else if (+z <= ln ){
|
||||
$(this).css("width", "28");
|
||||
}else {
|
||||
$(this).css("width", "48");
|
||||
}
|
||||
z+=1;
|
||||
});
|
||||
});
|
||||
var headers = $("[name='headers']");
|
||||
$(headers).each (function() {
|
||||
z=0;
|
||||
$(this).find("th").each(function() {
|
||||
if(z==0){
|
||||
$(this).css("width", "95");
|
||||
}else if (+z <= ln ){
|
||||
$(this).css("width", "28");
|
||||
}else{
|
||||
$(this).css("width", "48");
|
||||
}
|
||||
z+=1;
|
||||
});
|
||||
});
|
||||
|
||||
var statTab = $("[name='statTab']");
|
||||
var teamTab = $("[name='teamTab']");
|
||||
|
||||
$(statTab).css("width", 95+6.8 + (ln) * (28+6.8) -6.8);
|
||||
$(teamTab).css("width", (48+6.8) * (z-ln-1) -6.8);
|
||||
|
||||
|
||||
//color other team points
|
||||
var tradeProjSel = $("td[name='tradeProjSel']");
|
||||
var actualProj = $("[name='actualProj']");
|
||||
var cat = $("[name='cat']");
|
||||
z = 0;
|
||||
for (x=0;x<$(tradeProjSel).size();x++){
|
||||
if(z==$(cat).size()){z=0;}
|
||||
if($(cat).eq(z).text() == "RK-P"){
|
||||
var n = ""+(parseFloat($(tradeProjSel).eq(x).text()) - parseFloat($(actualProj).eq(z).text()));
|
||||
if(n>0){
|
||||
$(tradeProjSel).eq(x).addClass("positive");
|
||||
$(tradeProjSel).eq(x-1).addClass("positive");
|
||||
}else if(n==0){
|
||||
$(tradeProjSel).eq(x).addClass("neutral");
|
||||
$(tradeProjSel).eq(x-1).addClass("neutral");
|
||||
}else{
|
||||
$(tradeProjSel).eq(x).addClass("negative");
|
||||
$(tradeProjSel).eq(x-1).addClass("negative");
|
||||
}
|
||||
}
|
||||
if(z >= ln){
|
||||
var n = ""+(parseFloat($(tradeProjSel).eq(x).text()) - parseFloat($(actualProj).eq(z).text()));
|
||||
if(n>0){
|
||||
$(tradeProjSel).eq(x).addClass("positive");
|
||||
}else if(n==0){
|
||||
$(tradeProjSel).eq(x).addClass("neutral");
|
||||
}else{
|
||||
$(tradeProjSel).eq(x).addClass("negative");
|
||||
}
|
||||
}
|
||||
z+=1;
|
||||
}
|
||||
|
||||
var actual = $(actualProj).eq(1).text();
|
||||
var potPTScell = $("[name='potPTScell']");
|
||||
var potRKcell = $("[name='potRKcell']");
|
||||
z = 0;
|
||||
$(potPTScell).each (function() {
|
||||
var n = ""+(parseFloat($(this).text()) - parseFloat(actual));
|
||||
if(n>0){
|
||||
$(this).addClass("positive");
|
||||
$(potRKcell).eq(z).addClass("positive");
|
||||
}else if(n==0){
|
||||
$(this).addClass("neutral");
|
||||
$(potRKcell).eq(z).addClass("neutral");
|
||||
}else{
|
||||
$(this).addClass("negative");
|
||||
$(potRKcell).eq(z).addClass("negative")
|
||||
}
|
||||
z+=1;
|
||||
});
|
||||
|
||||
//var player = $("[name='player']");
|
||||
//callfilterResults($(player).eq(0).text());
|
||||
|
||||
// var potRK = '${potRKJson}';
|
||||
// var potRKJson = JSON.parse(potRK);
|
||||
// var potRKcell = $("[name='potRKcell']");
|
||||
// x=0;
|
||||
// $(potRKcell).each(function(col) {
|
||||
// $(this).text(potRKJson[x]);
|
||||
// x+=1;
|
||||
// });
|
||||
|
||||
// var potPts = '${potPtsJson}';
|
||||
// var potPtsJson = JSON.parse(potPts);
|
||||
// var potPTScell = $("[name='potPTScell']");
|
||||
// var x=0;
|
||||
// $(potPTScell).each(function(col) {
|
||||
// $(this).text(potPtsJson[x]);
|
||||
// x+=1;
|
||||
// });
|
||||
/* var actualProj = $("[name='actualProj']");
|
||||
var actual = $(actualProj).eq(1).text();
|
||||
// Declare variables
|
||||
var input, filter, table, tr, td,td2, i;
|
||||
|
||||
table = document.getElementById("tableList");
|
||||
tr = $("[name='lignesPlayer']");
|
||||
// Loop through all table rows, and hide those who don't match the search query
|
||||
for (i = 0; i < tr.length; i++) {
|
||||
td = tr[i].getElementsByTagName("td")[3];
|
||||
if (td) {
|
||||
if (td.innerHTML > actual) {
|
||||
tr[i].classList.remove('normal');
|
||||
tr[i].classList.add("freeAgentGreen");
|
||||
} else if (td.innerHTML == actual) {
|
||||
tr[i].classList.remove('normal');
|
||||
tr[i].classList.add("freeAgentOrange");
|
||||
} else if (td.innerHTML < actual) {
|
||||
tr[i].classList.remove('normal');
|
||||
tr[i].classList.add("freeAgentRed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
table = document.getElementById("tTrade");
|
||||
tr = $("[name='lignesResults']");
|
||||
// Loop through all table rows, and hide those who don't match the search query
|
||||
for (i = 0; i < tr.length; i++) {
|
||||
td = tr[i].getElementsByTagName("td")[3];
|
||||
td2 = tr[i].getElementsByTagName("td")[0];
|
||||
if (td) {
|
||||
if (td2.innerHTML.indexOf("*") > -1) {
|
||||
tr[i].classList.remove('tab');
|
||||
tr[i].classList.add("freeAgentInjured");
|
||||
} else if (td.innerHTML > actual) {
|
||||
tr[i].classList.remove('tab');
|
||||
tr[i].classList.add("freeAgentGreen");
|
||||
} else if (td.innerHTML == actual) {
|
||||
tr[i].classList.remove('tab');
|
||||
tr[i].classList.add("freeAgentOrange");
|
||||
} else if (td.innerHTML < actual) {
|
||||
tr[i].classList.remove('tab');
|
||||
tr[i].classList.add("freeAgentRed");
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var sort = $("[title='filter']");
|
||||
$(sort).each(function(col) {
|
||||
$(this).hover(
|
||||
function() { $(this).addClass('focus'); },
|
||||
function() { $(this).removeClass('focus'); }
|
||||
);
|
||||
|
||||
if($(this).text()=="RK-P"){
|
||||
$(this).addClass('desc selected');
|
||||
};
|
||||
|
||||
$(this).click(function() {
|
||||
if ($(this).is('.desc')) {
|
||||
$(this).removeClass('desc');
|
||||
$(this).addClass('asc selected');
|
||||
sortOrder = 1;
|
||||
}
|
||||
else {
|
||||
$(this).addClass('desc selected');
|
||||
$(this).removeClass('asc');
|
||||
sortOrder = -1;
|
||||
}
|
||||
$(this).siblings().removeClass('asc selected');
|
||||
$(this).siblings().removeClass('desc selected');
|
||||
|
||||
var arrData = $('table').find("tr[name='lignesResults']");
|
||||
/* var arrData = $('table').find('tbody:nth-of-type(2) > tr').get(); */
|
||||
|
||||
arrData.sort(function(a, b) {
|
||||
var val1 = $(a).children('td').eq(col).text().replace("+","").toUpperCase();
|
||||
var val2 = $(b).children('td').eq(col).text().replace("+","").toUpperCase();
|
||||
if($.isNumeric(val1) && $.isNumeric(val2))
|
||||
return sortOrder == 1 ? val1-val2 : val2-val1;
|
||||
else
|
||||
return (val1 < val2) ? -sortOrder : (val1 > val2) ? sortOrder : 0;
|
||||
});
|
||||
|
||||
|
||||
$.each(arrData, function(index, row) {
|
||||
$('tbody:nth-of-type(3)').append(row);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$("#everything-wrapper").fadeIn("fast");
|
||||
});
|
||||
//});
|
||||
|
||||
|
||||
|
||||
function filterName(){
|
||||
// Declare variables
|
||||
var input, filter, table, tr, td, i;
|
||||
input = document.getElementById("myInput");
|
||||
filter = input.value.toUpperCase();
|
||||
table = document.getElementById("tTrade");
|
||||
tr = $("[name='lignesResults']");
|
||||
|
||||
// Loop through all table rows, and hide those who don't match the search query
|
||||
for (i = 0; i < tr.length; i++) {
|
||||
td = tr[i].getElementsByTagName("td")[0];
|
||||
if (td) {
|
||||
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
|
||||
tr[i].style.display = "";
|
||||
} else {
|
||||
tr[i].style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function filterResults(Search)
|
||||
{
|
||||
// Declare variables
|
||||
var input, filter, table, tr, td, i;
|
||||
table = document.getElementById("tTrade");
|
||||
tr = $("[name='lignesResults']");
|
||||
|
||||
// Loop through all table rows, and hide those who don't match the search query
|
||||
for (i = 0; i < tr.length; i++) {
|
||||
td = tr[i].getElementsByTagName("td")[0];
|
||||
if (td) {
|
||||
if (td.innerHTML.toUpperCase().indexOf(Search) > -1) {
|
||||
tr[i].style.display = "";
|
||||
} else {
|
||||
tr[i].style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function callfilterResults(Elem) {
|
||||
|
||||
var player = $("[name='player']");
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url:'teamServlet',
|
||||
type:'post',
|
||||
data: {teamId:'${team1.code}', playerId: $(Elem).index() , action: 'faDiv'},
|
||||
success:function(response)
|
||||
{
|
||||
$("#fa_div").html(response);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function listDiff(Elem)
|
||||
{
|
||||
var drop = '${player.nom}';
|
||||
var get = $(Elem).find("td[name='get']");
|
||||
var actualPlayers = $("[name='actualPlayers']");
|
||||
var tradePlayers = $("[name='tradePlayers']");
|
||||
var cat = $("[name='cat']");
|
||||
var actualProj = $("[name='actualProj']");
|
||||
var tradeProj = $("[name='tradeProj']");
|
||||
var diff = $("[name='diff']")
|
||||
var tradeProjSel = $(Elem).find("td[name='tradeProjSel']");
|
||||
|
||||
$(actualPlayers).eq(0).text(drop);
|
||||
$(tradePlayers).eq(0).text($(get).eq(0).text());
|
||||
|
||||
for (x=0;x<$(cat).size();x++){
|
||||
|
||||
if($(cat).eq(x).text().includes('/')){
|
||||
var decomp = $(tradeProjSel).eq(x).text().split("/");
|
||||
var decomp2 = $(actualProj).eq(x).text().split("/");
|
||||
$(tradeProj).eq(x).text(parseFloat(decomp[0]).toFixed(0) + "/" + parseFloat(decomp[1]).toFixed(0));
|
||||
var valProj1 = parseFloat(decomp[0]) - parseFloat(decomp2[0]);
|
||||
var valProj2 = parseFloat(decomp[1]) - parseFloat(decomp2[1]);
|
||||
$(diff).eq(x).text(valProj1.toFixed(0) + "/" + valProj2.toFixed(0));//remaining points
|
||||
}else if($(cat).eq(x).text().includes('%')){
|
||||
$(tradeProj).eq(x).text(parseFloat($(tradeProjSel).eq(x).text()).toFixed(2));
|
||||
var n = (parseFloat($(tradeProj).eq(x).text()) - parseFloat($(actualProj).eq(x).text())).toFixed(2);
|
||||
changeStyle(diff,n);
|
||||
}else if($(cat).eq(x).text().includes('TO')){
|
||||
$(tradeProj).eq(x).text(parseFloat($(tradeProjSel).eq(x).text()));
|
||||
var n = ""+(parseFloat($(actualProj).eq(x).text()) - parseFloat($(tradeProj).eq(x).text()));
|
||||
if(n>0){
|
||||
$(diff).eq(x).text(n);
|
||||
$(diff).eq(x).removeClass("positive neutral").addClass("negative");
|
||||
}else if(n==0){
|
||||
$(diff).eq(x).text(n);
|
||||
$(diff).eq(x).removeClass("positive negative").addClass("neutral");
|
||||
}else{
|
||||
$(diff).eq(x).text(n);
|
||||
$(diff).eq(x).removeClass("negative neutral").addClass("positive");
|
||||
}
|
||||
}else{
|
||||
$(tradeProj).eq(x).text(parseFloat($(tradeProjSel).eq(x).text()));
|
||||
//inverse diff si col RK
|
||||
if($(cat).eq(x).text() == 'Pot RK'){
|
||||
var n = ""+(parseFloat($(actualProj).eq(x).text()) - parseFloat($(tradeProj).eq(x).text()));
|
||||
changeStyle(diff,n);
|
||||
}else{
|
||||
var n = parseFloat($(tradeProj).eq(x).text()) - parseFloat($(actualProj).eq(x).text());
|
||||
changeStyle(diff,n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function changeStyle(diff,n)
|
||||
{
|
||||
if(n>0){
|
||||
$(diff).eq(x).text("+" + n);
|
||||
$(diff).eq(x).removeClass("negative neutral").addClass("positive");
|
||||
}else if(n==0){
|
||||
$(diff).eq(x).text(n);
|
||||
$(diff).eq(x).removeClass("positive negative").addClass("neutral");
|
||||
}else{
|
||||
$(diff).eq(x).text(n);
|
||||
$(diff).eq(x).removeClass("positive neutral").addClass("negative");
|
||||
}
|
||||
}
|
||||
|
||||
function makeTableScroll() {
|
||||
|
||||
var maxRows = 25;
|
||||
var tablebody = document.getElementById('tTrade');
|
||||
var rowsInTable = tablebody.rows.length;
|
||||
var height = 0;
|
||||
if (rowsInTable > maxRows) {
|
||||
for (var i = 0; i < maxRows; i++) {
|
||||
height += tablebody.rows[i].clientHeight;
|
||||
}
|
||||
tablebody.style.height = height + "px";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="makeTableScroll()">
|
||||
|
||||
<c:set var="players" value="${requestScope.playerList}" />
|
||||
<c:set var="teamID" value="${requestScope.teamID}" />
|
||||
|
||||
<c:set var="mainFA" value="${requestScope.mainFA}" />
|
||||
<c:set var="stats" value="${requestScope.statBase}" />
|
||||
<c:set var="team1" value="${requestScope.team1}" />
|
||||
<c:set var="team1Stats" value="${requestScope.team1Stats}" />
|
||||
<c:set var="otherTeamStats" value="${requestScope.otherTeamStats}" />
|
||||
<c:set var="nbTeam" value="${requestScope.nbTeam}" />
|
||||
|
||||
<h1 align='center'>Find Free Agents</h1>
|
||||
|
||||
<!-- <div style="width: 100%;text-align: center;">
|
||||
<input type="submit" value="test fa" onclick="listFA();"/>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div id="everything-wrapper" style="width: 100%;text-align: center;">
|
||||
|
||||
<div style="display: inline-block;vertical-align:top;width:275px;" >
|
||||
|
||||
<table class="tableTrade">
|
||||
<thead>
|
||||
<tr class="Header">
|
||||
<th colspan="2" ><c:out value="TEAM" /></th>
|
||||
<th name="actualRK"><c:out value="Proj RK" /></th>
|
||||
<th name="actualPTS"><c:out value="Proj PTS" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="ligneHead">
|
||||
<th colspan="2"><c:out value="${team1.name}" /></th>
|
||||
<th name="actualRK"><fmt:formatNumber pattern="0.#" value="${team1.projRK}" /></th>
|
||||
<th name="actualPTS"><fmt:formatNumber pattern="0.#" value="${team1.projTot}" /></th>
|
||||
</tr>
|
||||
|
||||
<thead>
|
||||
<tr class="Header">
|
||||
<th><c:out value="Player RK" /></th>
|
||||
<th align="left"><c:out value="Player" /></th>
|
||||
<th ><c:out value="Pot RK" /></th>
|
||||
<th ><c:out value="Pot PTS" /></th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody >
|
||||
<c:forEach var="player" items= "${players}" varStatus="i">
|
||||
<tr name="lignesPlayer" class="tab" id="${i.index}" onclick="return callfilterResults(this);">
|
||||
<td align="center"><fmt:formatNumber pattern="0.#" value="${player.interRK}" /></td>
|
||||
<td align="left" name ="player"><c:out value="${player.nom}" /></td>
|
||||
<td name="potRKcell" ><fmt:formatNumber pattern="0.#" value="${player.potRK}" /></td>
|
||||
<td name="potPTScell" ><fmt:formatNumber pattern="0.#" value="${player.potPoint}" /></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="text" id="myInput" onkeyup="filterName()" placeholder="Search for names..">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="fa_div" style="display: inline-block;vertical-align:top">
|
||||
|
||||
<table class="tableTrade">
|
||||
<thead >
|
||||
<!---------------------- TAB HEADER------------------------------->
|
||||
<tr class="Header" >
|
||||
<th name="statTab" colspan="${fn:length(team1Stats)+1}"><c:out value="Waiver impact" /></th>
|
||||
<th name="teamTab" colspan="${nbTeam - 1}"><c:out value="Impact on other teams" /></th>
|
||||
</tr>
|
||||
<!----------------------------------------- STATS CAT ---------------->
|
||||
<tr name="headers" class="Header" >
|
||||
<th align="left" ><c:out value="Drop" /></th>
|
||||
<th ><c:out value="Pot RK" /></th>
|
||||
<c:forEach var="stat" items= "${stats}" >
|
||||
<c:if test="${!fn:contains(stat.name,'/')}">
|
||||
<th ><c:out value="${fn:replace(stat.name,'Team ','')}" /></th>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</thead>
|
||||
<!------------------------------- LIGNE ACTUAL STATS PROJECTION-->
|
||||
<tbody >
|
||||
<tr name="headers" class="ligneHead" >
|
||||
<c:forEach var="stat" items= "${team1Stats}" varStatus="i">
|
||||
<c:if test="${i.first}">
|
||||
<th name="actualPlayers">Actual Projection</th>
|
||||
<th name="actualProj"><fmt:formatNumber pattern="0.#" value="${team1projectedRK}" /></th>
|
||||
<th name="actualProj"><fmt:formatNumber pattern="0.#" value="${team1projTot}" /></th>
|
||||
</c:if>
|
||||
<c:if test="${!fn:contains(stat.name,'/')}">
|
||||
<th name="actualProj"><c:out value="${stat.valProjection}" /></th>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
<c:forEach var="stat" items= "${otherTeamStats}" >
|
||||
<th name="actualProj"><c:out value="${stat}" /></th>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
|
||||
<!-- LIGNE WITH FA STATS PROJECTION-->
|
||||
<tr name="headers" class="ligneHead" >
|
||||
<c:forEach var="stat" items= "${stats}" varStatus="i">
|
||||
<c:if test="${stat.name == 'RK-P'}">
|
||||
<th name="tradePlayers" >Proj with FA</th>
|
||||
<th name="tradeProj"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${!stat.name.contains('/')}">
|
||||
<th name="tradeProj"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</tr>
|
||||
|
||||
<!------------- LIGNE DIFFERENCES ----->
|
||||
<tr name="headers" class="ligneHead" >
|
||||
<c:forEach var="stat" items= "${stats}" varStatus="i">
|
||||
<c:if test="${stat.name == 'RK-P'}">
|
||||
<th >Difference</th>
|
||||
<th id="diff" name="diff"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${!stat.name.contains('/')}">
|
||||
<th id="diff" name="diff"><c:out value="--" /></th>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
<thead >
|
||||
<!----------------------------------------- STATS CAT ---------------->
|
||||
<tr name="headers" class="Header" >
|
||||
<th align="left" title="filter"><c:out value="Waiver" /></th>
|
||||
<th name="cat" title="filter"><c:out value="Pot RK" /></th>
|
||||
<c:forEach var="stat" items= "${stats}" >
|
||||
<c:if test="${!fn:contains(stat.name,'/')}">
|
||||
<th name="cat" title="filter"><c:out value="${fn:replace(stat.name,'Team ','')}" /></th>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</thead>
|
||||
<!------------------------ START RESULT TAB-------------------------------->
|
||||
|
||||
<tbody id="tTrade" style="overflow-y: scroll;overflow-x: hidden;" >
|
||||
<c:forEach var="fa" items= "${mainFA}" >
|
||||
|
||||
<tr name="lignesResults" class="tab" id="${i.index}" onclick="return listDiff(this);">
|
||||
|
||||
<c:forEach var="stat" items= "${fa}" varStatus="i" >
|
||||
|
||||
<c:if test="${i.first}">
|
||||
<td align="left" name="get"><c:out value="${stat.player}" /></td>
|
||||
<td name="tradeProjSel"><fmt:formatNumber pattern="0.#" value="${stat.projectedRK}" /></td>
|
||||
</c:if>
|
||||
<c:if test="${!fn:contains(stat.name,'/')}">
|
||||
<c:if test="${!fn:contains(stat.name,'%')}">
|
||||
<td name="tradeProjSel" align="center"><fmt:formatNumber pattern="0.#" value="${stat.valProjection}" /></td>
|
||||
</c:if>
|
||||
<c:if test="${fn:contains(stat.name,'%')}">
|
||||
<td name="tradeProjSel" align="center"><fmt:formatNumber pattern="0.00" value="${stat.valProjection}" /></td>
|
||||
</c:if>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
|
||||
</tr>
|
||||
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<link href="${pageContext.request.contextPath}/CSS/style.css" rel="stylesheet" type="text/css" >
|
||||
|
||||
<title>trade</title>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#drop1').val(6);
|
||||
listTeam('drop1','team1_div','team2_div',true)
|
||||
|
||||
|
||||
|
||||
}); //end doc ready
|
||||
|
||||
|
||||
function listTeam(Elem, Div, otherDiv, first)
|
||||
{
|
||||
var selT = document.getElementsByName(Elem)[0].value;
|
||||
|
||||
if (Elem == 'drop1'){
|
||||
//desactive l entree dans la liste 2
|
||||
$("#drop2 > option").each(function() {
|
||||
this.removeAttribute("disabled");
|
||||
if(this.value == selT){
|
||||
this.setAttribute("disabled", "disabled");
|
||||
}
|
||||
});
|
||||
var othT = $('#drop2 option:selected').val();
|
||||
}else{
|
||||
//desactive l entree dans la liste 1
|
||||
$("#drop1 > option").each(function() {
|
||||
this.removeAttribute("disabled");
|
||||
if(this.value == selT){
|
||||
this.setAttribute("disabled", "disabled");
|
||||
}
|
||||
});
|
||||
var othT = $('#drop1 option:selected').val();
|
||||
}
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url:'CALL_DIV_team',
|
||||
type:'get',
|
||||
data: {selectedT: selT, otherT: othT, tableName: Div, otherTableName: otherDiv},
|
||||
success:function(response)
|
||||
{
|
||||
$("#"+Div).html(response);
|
||||
}
|
||||
});
|
||||
|
||||
if(Elem == 'drop2' && first){
|
||||
listTeam('drop1','team1_div','team2_div',false)
|
||||
}
|
||||
else if(Elem == 'drop1' && first){
|
||||
listTeam('drop2','team2_div','team1_div',false)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function listTrade()
|
||||
{
|
||||
|
||||
//$("#divTeams").fadeOut();
|
||||
$("#divTrade").fadeIn();
|
||||
|
||||
//$("#btnList").fadeOut();
|
||||
|
||||
|
||||
var T1 = document.getElementById('drop1').value;
|
||||
var T2 = document.getElementById('drop2').value;
|
||||
|
||||
stringSelT1 = "";
|
||||
$("#team1_div tr.selected").each(function() {
|
||||
stringSelT1 += $(this).attr("player") +",";
|
||||
});
|
||||
stringSelT2 = "";
|
||||
$("#team2_div tr.selected").each(function() {
|
||||
stringSelT2 += $(this).attr("player") +",";
|
||||
});
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url:'DIV_trade',
|
||||
type:'get',
|
||||
data: {team1: T1 , team2: T2 , selTeam1: stringSelT1 , selTeam2: stringSelT2},
|
||||
success:function(response)
|
||||
{
|
||||
$("#trade_div").html(response);
|
||||
//$("#btnTrade").fadeIn();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
function chooseTrade()
|
||||
{
|
||||
//$("#divTeams").fadeIn();
|
||||
//$("#btnList").fadeIn();
|
||||
//$("#divTrade").fadeOut();
|
||||
//$("#btnTrade").fadeOut();
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<c:set var="teams" value="${requestScope.teamList}" />
|
||||
|
||||
<div class="wrapper">
|
||||
<header class="main-head">
|
||||
<c:out value="Trade Analyser" />
|
||||
<div style="width: 100%;text-align: center;margin-bottom:10px;">
|
||||
<div id="btnList" style="display: inline-block;vertical-align:top;">
|
||||
<input type="submit" value="Test trade" onclick="listTrade();"/>
|
||||
</div>
|
||||
<div id="btnTrade" style="display: inline-block;vertical-align:top;display: none;">
|
||||
<input type="submit" value="Select Trade" onclick="chooseTrade();"/>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- <nav class="main-nav">
|
||||
<ul>
|
||||
<li><a href="">Nav 1</a></li>
|
||||
<li><a href="">Nav 2</a></li>
|
||||
<li><a href="">Nav 3</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
-->
|
||||
|
||||
<article class="team">
|
||||
<ul class="listingTeam">
|
||||
<li id="divTeams1">
|
||||
<Select id="drop1" name="drop1" onchange="return listTeam('drop1','team1_div','team2_div',true);">
|
||||
<c:forEach var="team" items= "${teams}" varStatus="i">
|
||||
<Option value="${i.index}">${team.name}</ Option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<div id="team1_div"></div>
|
||||
</li>
|
||||
|
||||
<li id="divTeams2">
|
||||
<Select id="drop2" name="drop2" onchange="return listTeam('drop2','team2_div','team1_div',true);">
|
||||
<c:forEach var="team" items= "${teams}" varStatus="i">
|
||||
<Option value="${i.index}">${team.name}</ Option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<div id="team2_div"></div>
|
||||
</li>
|
||||
|
||||
<li class="wide" id="divTrade" style="display: none;">
|
||||
<div class="cn">
|
||||
<div id="loader" style="width: 100%;text-align: center;margin-top: 15px">
|
||||
<span><c:out value="Calculating best trades" /></span>
|
||||
<span class="l-1"></span>
|
||||
<span class="l-2"></span>
|
||||
<span class="l-3"></span>
|
||||
<span class="l-4"></span>
|
||||
<span class="l-5"></span>
|
||||
<span class="l-6"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="trade_div"></div>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</article>
|
||||
<footer class="main-footer">The footer</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 174 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
||||
!function(s){"use strict";s.fn.selectedrows=function(){var t,e=s(this[0]);if("TABLE"===e.prop("tagName").toUpperCase()&&void 0!==e.attr("data-rs-selectable")){var a=e.attr("data-rs-class")||"selected";t=s(e).find("tbody tr."+a)}return t}}(jQuery),$(document).ready(function(){"use strict";var s={};$("body").on("mouseover","table[data-rs-selectable]",function(){$(this).addClass("unselectable").attr("unselectable","on")}),$("body").on("click","table[data-rs-selectable] tr",function(t){var e=$(this),a=e.closest("table"),r=a.attr("data-rs-type")||"many",l=a.attr("data-rs-class")||"selected";if("none"!==r)if("one"===r)$(this).siblings().removeClass(l).end().addClass(l);else if($(this).toggleClass(l),t.shiftKey){var i=s[a.id]||!1;if(i&&this!==i&&$(this).hasClass(l)===$(i).hasClass(l))for(var n=this.rowIndex>i.rowIndex?i:this,d=this.rowIndex>i.rowIndex?this:i,o=$(this).hasClass(l),c=$(n).nextAll("tr"),h=0,f=c.length;f>h&&c[h]!==d;h+=1)o?$(c[h]).addClass(l):$(c[h]).removeClass(l)}s[a.id]=this,$(a).trigger("clicked.rs.row")})});
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
|
||||
<display-name>FantasyManager</display-name>
|
||||
<welcome-file-list>
|
||||
|
||||
<welcome-file>index.jsp</welcome-file><welcome-file>index.html</welcome-file><welcome-file>index.htm</welcome-file>
|
||||
|
||||
<welcome-file>default.html</welcome-file>
|
||||
<welcome-file>default.htm</welcome-file>
|
||||
<welcome-file>default.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
<servlet>
|
||||
<description></description>
|
||||
<display-name>FreeAgent</display-name>
|
||||
<servlet-name>FreeAgent</servlet-name>
|
||||
<servlet-class>test.serv.Team</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>FreeAgent</servlet-name>
|
||||
<url-pattern>/FreeAgent</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
|
||||
</web-app>
|
||||
@@ -0,0 +1,57 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<link href="${pageContext.request.contextPath}/CSS/style.css" rel="stylesheet" type="text/css" >
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
function showHide() {
|
||||
$('#loader').show();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<title>league</title>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<h1 align='center'>Choose League</h1>
|
||||
|
||||
<div style="width: 100%;text-align: center;">
|
||||
|
||||
<div style="display: inline-block;">
|
||||
|
||||
<form id='loginForm' name='loginForm' method='post' action='fantasyServlet' onsubmit="showHide()">
|
||||
Year : <br/>
|
||||
<input style="text-align: center;" type='text' name='year' value='2019'/> <br/>
|
||||
League ID : <br/>
|
||||
<input style="text-align: center;" type='text' name='league' value='209346' /> <br/>
|
||||
<br/>
|
||||
<input type='submit' value='Enter' /></form>
|
||||
</div>
|
||||
<br/>
|
||||
<img style="width:250px;height:250px;" src="${pageContext.request.contextPath}/PICS/Fantasy-Basketball-badge.png" alt = "NBA Fantasy" />
|
||||
|
||||
</div>
|
||||
|
||||
<div id="loader" style= "width: 100%;text-align: center;display:none;">
|
||||
<span>Importing Teams</span>
|
||||
<span class="l-1"></span>
|
||||
<span class="l-2"></span>
|
||||
<span class="l-3"></span>
|
||||
<span class="l-4"></span>
|
||||
<span class="l-5"></span>
|
||||
<span class="l-6"></span>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user