diff --git a/.gitignore b/.gitignore
index c2658d7..e1bbff4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
node_modules/
+*.txt
diff --git a/static/css/my.css b/static/css/my.css
index f51a1d8..cc10b6d 100644
--- a/static/css/my.css
+++ b/static/css/my.css
@@ -12,4 +12,7 @@
.ui.message>.close.icon {
margin: .3em 0em 0em 0em;
right: .2em;
+}
+.pop {
+ cursor: pointer;
}
\ No newline at end of file
diff --git a/static/js/tournamentMatches.js b/static/js/tournamentMatches.js
index f347eba..294ad1f 100644
--- a/static/js/tournamentMatches.js
+++ b/static/js/tournamentMatches.js
@@ -32,17 +32,19 @@ function parseMatches(data) {
var rScore = ''; var bScore = '';
var winner = ''; var winName = '';
var matches = ''; var match = '';
- var itemStart = '
';
var rDot = '';
var bDot = '';
var winDot = '';
- var itemEnd = '
';
var s = data.query_url.split('/');
var currInt = s[s.length -3];
var matchMenu = '#matchMenu' + currInt;
// handle bye series with no matches
if (lenItems === 0) {
- $(matchMenu).append(itemStart + '' + itemEnd);
+ $(matchMenu)
+ .popup({
+ on: 'click',
+ html: ''
+ });
return;
}
// all other series have data
@@ -65,7 +67,10 @@ function parseMatches(data) {
matches += match;
i++;
}
- var final = itemStart + matches + itemEnd;
// attach to the dropdown in the '?' type column
- $(matchMenu).append(final);
+ $(matchMenu)
+ .popup({
+ on: 'click',
+ html: matches
+ });
}
diff --git a/static/js/tournamentSeries.js b/static/js/tournamentSeries.js
index 786d1f3..e6f9dec 100644
--- a/static/js/tournamentSeries.js
+++ b/static/js/tournamentSeries.js
@@ -57,8 +57,10 @@ function parseSeries(data) {
var redT = '';
var blueT = '';
var winner = '';
- var matchDrop = '';
+ var matchPopup = '';
var bye = '- - bye - -';
+ var solidDot = '';
+ var emptyDot = '';
while (i < lenItems) {
// ? COLUMN
// attach dropdown to later attach table of matches, etc
@@ -69,24 +71,20 @@ function parseSeries(data) {
&& data.items[i].redTeam.isBye === true) {
blueT = winner = data.items[i].winner.team.teamName;
redT = bye;
- matchDrop = ''+
- ''+
- ' '+
- ''+
- ''+
- ' | ';
+ matchPopup = ''+ // blue wins
+ '';
}
// redTeam has bye, no blueTeam present, red wins
else if ('isBye' in data.items[i].blueTeam
&& data.items[i].blueTeam.isBye === true) {
redT = winner = data.items[i].winner.team.teamName;
blueT = bye;
- matchDrop = ''+
- ''+
- ' '+
- ''+
- ''+
- ' | ';
+ matchPopup = ''+ // red wins
+ '';
}
// nobody wins by default, get both teams and winner
// actual match
@@ -96,46 +94,48 @@ function parseSeries(data) {
if (data.items[i].winner.isDecided === true) {
winner = data.items[i].winner.team.teamName;
if (winner === redT) {
- matchDrop = ''+ // redTeam winner
- ''+
- ' '+
- ''+
- ''+
- ' | ';
+ matchPopup = ''+ // redTeam winner
+ '';
}
else {
- matchDrop = ''+ // blueTeam winner
- ''+
- ' '+
- ''+
- ''+
- ' | ';
- }
+ matchPopup = ''+ // blueTeam winner
+ '';
+ }
}
else {
winner = 'undecided';
- matchDrop = ''+ // no series winner
- ' '+
- ''+
- ''+
- ' | ';
+ matchPopup = '' + // no series winner
+ '';
}
}
- $('#series').append(matchDrop);
+ $('#series').append(matchPopup);
// WINNER column
// color coordinate winner
if (winner === redT) {
- $('#series').append(''+winner+' | ');
+ $('#series').append(''+winner+' | ');
}
- else {
+ else if (winner === blueT) {
$('#series').append(''+winner+' | ');
}
+ else { // undecided series
+ $('#series').append(''+winner+' | ');
+ }
+
+
// RED COLUMN | BLUE COLUMN
- $('#series').append(''+redT+' | '+
- ''+blueT+' | '
+ $('#series').append('' +
+ ''+redT+' | '+
+ ''+blueT+' | '
);
+
// SERIES WINS COLUMN
// add matches won, link to team info
// should be converted to dropdown table info instead
@@ -158,10 +158,10 @@ function parseSeries(data) {
bLink = '#';
}
// dynamically link team info off this element
- var drop = ''+
+ var teamPop = ' | '+
' '+
''+
- ''+
+ ''+
' | ';
var red_blue_teams = ""+
" " + rWon + " " +