finishings on the pairing page
This commit is contained in:
@@ -216,6 +216,9 @@
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: space-between;
|
||||
&.right {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="number"] {
|
||||
@@ -317,6 +320,11 @@
|
||||
border-radius: 5px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
.popup-header {
|
||||
text-align: center;
|
||||
font-size: 1.5em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.popup-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@@ -209,8 +209,14 @@
|
||||
flex-flow: column nowrap;
|
||||
min-height: 10vh;
|
||||
max-height: 30vh;
|
||||
min-width: 50vw;
|
||||
}
|
||||
|
||||
#pairing-right {
|
||||
display: inline-flex;
|
||||
flex-flow: row wrap;
|
||||
gap: 1em;
|
||||
}
|
||||
|
||||
.choose-round.button {
|
||||
padding: 0.2em 0.8em;
|
||||
}
|
||||
|
@@ -191,14 +191,12 @@ onLoad(() => {
|
||||
document.on('keyup', e => {
|
||||
switch (e.key) {
|
||||
case 'Escape': {
|
||||
if ($('#player').hasClass('shown')) {
|
||||
if ($('#needle')[0].value) {
|
||||
if ($('#player').hasClass('shown') && $('#needle')[0].value) {
|
||||
$('#needle')[0].value = '';
|
||||
initSearch();
|
||||
} else {
|
||||
close_modal();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'ArrowDown': {
|
||||
|
@@ -51,6 +51,7 @@ onLoad(()=>{
|
||||
$('#unpair').on('click', e => {
|
||||
let games = $('#paired')[0].childNodes.filter('.selected.listitem').map(item => parseInt(item.data("id")));
|
||||
if (games.length == 0) {
|
||||
$('#paired .listitem').addClass('selected');
|
||||
games = $('#paired')[0].childNodes.filter('.selected.listitem').map(item => parseInt(item.data("id")));
|
||||
}
|
||||
unpair(games);
|
||||
|
@@ -39,4 +39,10 @@ onLoad(() => {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
$('#publish').on('click', e => {
|
||||
modal('publish-modal');
|
||||
});
|
||||
$('#publish-modal').on('click', e => {
|
||||
close_modal();
|
||||
});
|
||||
});
|
||||
|
@@ -22,12 +22,21 @@
|
||||
<button class="ui floating choose-round next-round button">»</button>
|
||||
</div>
|
||||
<div id="pairing-lists">
|
||||
<div id="pairing-left">
|
||||
<div id="pairables" class="multi-select" title="pairable players">
|
||||
#foreach($p in $pairables)
|
||||
#set($part = $pmap[$p])
|
||||
<div data-id="$part.id" class="listitem pairable"><span>$part.name $part.firstname</span><span>#rank($part.rank) $part.country</span></div>
|
||||
#end
|
||||
</div>
|
||||
<div id="unpairables" class="multi-select" title="unpairable players">
|
||||
#foreach($p in $unpairables)
|
||||
#set($part = $pmap[$p])
|
||||
<div class="listitem unpairable" data-id="$part.id"><span>$part.name $part.firstname</span><span>#rank($part.rank) $part.country</span></div>
|
||||
#end
|
||||
</div>
|
||||
</div>
|
||||
<div id="pairing-right">
|
||||
<div id="pairing-buttons">
|
||||
<button id="pair" class="ui blue right labeled icon floating button">
|
||||
<i class="angle double right icon"></i>
|
||||
@@ -39,18 +48,13 @@
|
||||
</button>
|
||||
</div>
|
||||
<div id="paired" class="multi-select" title="white vs. black">
|
||||
#foreach($game in $games)
|
||||
#foreach($game in $games)
|
||||
#set($white = $pmap[$game.w])
|
||||
#set($black = $pmap[$game.b])
|
||||
<div class="listitem game" data-id="$game.id"><span class="table">#$game.t</span><span class="white">#if($white)$white.name $white.firstname #rank($white.rank)#{else}BIP#end</span><span> </span><span class="black">#if($black)$black.name $black.firstname #rank($black.rank)#{else}BIP#end</span>#if($game.h)<span class="handicap">h$game.h</span>#end</div>
|
||||
#end
|
||||
#end
|
||||
</div>
|
||||
</div>
|
||||
<div id="unpairables" class="multi-select" title="unpairable players">
|
||||
#foreach($p in $unpairables)
|
||||
#set($part = $pmap[$p])
|
||||
<div class="listitem unpairable" data-id="$part.id"><span>$part.name $part.firstname</span><span>#rank($part.rank) $part.country</span></div>
|
||||
#end
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -87,4 +87,26 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="right form-actions">
|
||||
<button id="publish" class="ui yellow floating button">Publish</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="publish-modal" class="popup">
|
||||
<div class="popup-body">
|
||||
<div class="popup-header">
|
||||
Download Standings
|
||||
</div>
|
||||
<div class="popup-content">
|
||||
Choose format
|
||||
</div>
|
||||
<div class="popup-footer">
|
||||
<div class="form-actions">
|
||||
<button class="ui gray floating cancel button">Cancel</button>
|
||||
<button class="ui blue floating button">EGF</button>
|
||||
<button class="ui blue floating button">FFG</button>
|
||||
<button class="ui blue floating button">PDF</button>
|
||||
<button class="ui blue floating button">HTML</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user