resize chats

This commit is contained in:
Thibault Duplessis 2013-05-31 19:34:33 +02:00
parent a7a8948b2f
commit 7f367f8896
4 changed files with 9 additions and 4 deletions

View file

@ -7,7 +7,7 @@ import controllers.routes
trait AssetHelper {
val assetVersion = 20
val assetVersion = 21
def cssTag(name: String) = css("stylesheets/" + name)

View file

@ -5,7 +5,7 @@
<div class="lichess_goodies">
<div class="box">
@game.metadata.flatMap(_.pgnDate).map { date =>
PGN Import @date
PGN Import - @date
@game.metadata.flatMap(_.pgnUser).map { user =>
<br />
@userIdLink(user.some)
@ -16,8 +16,9 @@
} else {
@game.updatedAt.map(timeago)
}
<br />
}
<br /><br />
<br />
@tour.map { t =>
@tournament.linkTo(t)
<br /><br />

View file

@ -1355,7 +1355,8 @@ var lichess_sri = Math.random().toString(36).substring(5); // 8 chars
self.$msgs = self.element.find('.lichess_messages');
if (this.options.resize) {
var headerHeight = self.element.parent().height();
self.element.css("top", headerHeight + 13);
self.element.css("top", headerHeight + 13)
.find('.lichess_messages').css('height', 459 - headerHeight);
self.$msgs.scrollTop(999999);
}
var $form = self.element.find('form');
@ -2086,6 +2087,7 @@ var lichess_sri = Math.random().toString(36).substring(5); // 8 chars
var $watchers = $("div.watchers").watchers();
var $chat = $("div.lichess_chat").chat({
resize: true,
render: function(u, t) {
return '<li><span>' + $.userLinkLimit(u, 14) + '</span>' + urlToLink(t) + '</li>';
}

2
todo
View file

@ -68,6 +68,8 @@ the forum search user:mephostophilis returns no result
check team average elo http://en.lichess.org/inbox/benuegti#bottom
if game ends during move -> bug
LilaError['[analysis] fred65 already analyses ueogn4fr, won't process ueogn4fr']
promote game importer in #chess
remove fen view in analysis mode (replace with continue from here)
---