alternate way to show the colorpicker

This commit is contained in:
Thibault Duplessis 2013-06-10 12:46:37 +02:00
parent 49b59e12c4
commit 515f908649
7 changed files with 12 additions and 9 deletions

View file

@ -1,4 +1,4 @@
@(title: String, goodies: Option[Html] = None, chat: Option[Html] = None, underchat: Option[Html] = None, moreCss: Html = Html(""), moreJs: Html = Html(""))(body: Html)(implicit ctx: Context)
@(title: String, goodies: Option[Html] = None, chat: Option[Html] = None, underchat: Option[Html] = None, moreCss: Html = Html(""), moreJs: Html = Html(""), themepicker: Boolean = false)(body: Html)(implicit ctx: Context)
@base.layout(
title = title,
@ -7,4 +7,5 @@ chat = chat,
underchat = underchat,
active = siteMenu.game.some,
moreCss = moreCss,
moreJs = moreJs)(body)
moreJs = moreJs,
themepicker = themepicker)(body)

View file

@ -35,7 +35,8 @@ goodies = views.html.game.infoBox(pov, tour).some,
chat = round.room(roomHtml, true).some,
underchat = underchat.some,
moreCss = moreCss,
moreJs = moreJs) {
moreJs = moreJs,
themepicker = true) {
<div class="analyse clearfix">
<div class="board_wrap">
<div

View file

@ -9,7 +9,8 @@ underchat: Option[Html] = None,
robots: Boolean = true,
moreCss: Html = Html(""),
moreJs: Html = Html(""),
signedJs: Option[String] = None)(body: Html)(implicit ctx: Context)
signedJs: Option[String] = None,
themepicker: Boolean = false)(body: Html)(implicit ctx: Context)
<!doctype html>
<html lang="@lang.language">
<head>
@ -75,7 +76,8 @@ 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 none">
@if(themepicker) {
<div class="themepicker">
<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 =>
@ -83,6 +85,7 @@ signedJs: Option[String] = None)(body: Html)(implicit ctx: Context)
}
</div>
</div>
}
<a href="@routes.Setting.set("bg")" title="@trans.toggleBackground()" class="bgpicker">
<span></span>
</a>

View file

@ -7,4 +7,5 @@ active = siteMenu.play.some,
chat = chat,
underchat = underchat,
robots = robots,
signedJs = signedJs)(body)
signedJs = signedJs,
themepicker = true)(body)

View file

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

1
todo
View file

@ -69,7 +69,6 @@ add fast tooltips to plots
replace plot with watch plot when game starts
real rematch against AI
lobby table sort
colorpicker does nothing on homepage
---