diff --git a/view-webapp/src/main/sass/tour.scss b/view-webapp/src/main/sass/tour.scss index 7e057e0..18d162c 100644 --- a/view-webapp/src/main/sass/tour.scss +++ b/view-webapp/src/main/sass/tour.scss @@ -208,4 +208,18 @@ .choose-round.button { padding: 0.2em 0.8em; } + + /* results section */ + + #results-list { + text-align: center; + .player, .result { + cursor: pointer; + &:hover { + background: rgba(0,0,0,.05); + color: rgba(0,0,0,.95); + } + } + } + } diff --git a/view-webapp/src/main/webapp/js/tour-pairing.inc.js b/view-webapp/src/main/webapp/js/tour-pairing.inc.js index 78a709e..7ea71d1 100644 --- a/view-webapp/src/main/webapp/js/tour-pairing.inc.js +++ b/view-webapp/src/main/webapp/js/tour-pairing.inc.js @@ -30,7 +30,8 @@ onLoad(()=>{ } let parent = e.target.closest('.multi-select'); let children = parent.childNodes.filter('.listitem'); - for (let j = from; j <= to; ++j) { + for (let j = from; j <= to; ++j) { new Tablesort($('#players')[0]); + children.item(j).addClass('selected'); children.item(j).attr('draggable', true); } diff --git a/view-webapp/src/main/webapp/js/tour-results.inc.js b/view-webapp/src/main/webapp/js/tour-results.inc.js new file mode 100644 index 0000000..52003e8 --- /dev/null +++ b/view-webapp/src/main/webapp/js/tour-results.inc.js @@ -0,0 +1,3 @@ +onLoad(()=>{ + new Tablesort($('#results-table')[0]); +}); \ No newline at end of file diff --git a/view-webapp/src/main/webapp/tour-pairing.inc.html b/view-webapp/src/main/webapp/tour-pairing.inc.html index 7804130..74d0cde 100644 --- a/view-webapp/src/main/webapp/tour-pairing.inc.html +++ b/view-webapp/src/main/webapp/tour-pairing.inc.html @@ -38,7 +38,7 @@ Unpair -
+
#foreach($game in $games) #set($white = $pmap[$game.w]) #set($black = $pmap[$game.b]) diff --git a/view-webapp/src/main/webapp/tour-results.inc.html b/view-webapp/src/main/webapp/tour-results.inc.html index 67b7ee3..8f1267f 100644 --- a/view-webapp/src/main/webapp/tour-results.inc.html +++ b/view-webapp/src/main/webapp/tour-results.inc.html @@ -1,3 +1,26 @@
- Results... +
+ + + + + + + + +#foreach($game in $games) + #set($white = $pmap[$game.w]) + #set($black = $pmap[$game.b]) + #if($black && $white) + + + + + + + #end +#end + +
tablewhiteblackresult
#t#if($white)$white.name $white.firstname #rank($white.rank)#{else}BIP#end#if($black)$black.name $black.firstname #rank($black.rank)#{else}BIP#end$game.r
+
diff --git a/view-webapp/src/main/webapp/tour.html b/view-webapp/src/main/webapp/tour.html index 2ee112d..8d0355d 100644 --- a/view-webapp/src/main/webapp/tour.html +++ b/view-webapp/src/main/webapp/tour.html @@ -168,6 +168,7 @@ #include('/js/tour-information.inc.js') #include('/js/tour-registration.inc.js') #include('/js/tour-pairing.inc.js') +#include('/js/tour-results.inc.js')