only show themepicker when there is a board on screen

This commit is contained in:
Thibault Duplessis 2013-06-10 12:44:08 +02:00
parent 22a15718fe
commit 49b59e12c4
3 changed files with 3 additions and 1 deletions

View file

@ -75,7 +75,7 @@ signedJs: Option[String] = None)(body: Html)(implicit ctx: Context)
@trans.nbConnectedPlayers("<strong>?</strong>")
</div>
<a id="reconnecting" onclick="location.reload();">@trans.reconnecting()</a>
<div class="themepicker">
<div class="themepicker none">
<a class="theme_toggle toggle" href="#"><span class="s16 ddown">@trans.color()</span></a>
<div class="themes dropdown" data-href="@routes.Setting.set("theme")">
@themeList.map { theme =>

View file

@ -458,6 +458,7 @@ var lichess_sri = Math.random().toString(36).substring(5); // 8 chars
}, 1000);
if ($board = $('div.with_marks').orNot()) {
$('#top .themepicker').show();
$.displayBoardMarks($board.parent(), $('#lichess > div.lichess_player_white').length);
}

View file

@ -77,6 +77,7 @@ function customFunctionOnMove() {
function redrawBoardMarks() {
$.displayBoardMarks($('#GameBoard'), !$('#GameBoard').hasClass('flip'));
$('#top .themepicker').show();
}
function refreshButtonset() {