Fix inbox infinite scroll

This commit is contained in:
Thibault Duplessis 2012-05-29 20:28:10 +02:00
parent a75cb657cb
commit 7c779893e4
3 changed files with 30 additions and 30 deletions

View file

@ -9,35 +9,35 @@ title = trans.inbox.str()) {
@if(threads.nbResults > 0) {
<tbody class="infinitescroll">
@if(threads.hasToPaginate) {
<thead class="pager none"><tr><th>
<a href="@routes.Message.inbox(threads.nextPage | 1)">Next</a>
</th></tr></thead>
<tbody>
}
@threads.currentPageResults.map { thread =>
<tr class="paginated_element @thread.isUnReadBy(me).fold("new", "")">
<td class="subject">
<a href="@routes.Message.thread(thread.id)#bottom">@thread.name</a>
</td>
<td class="author">
@userIdLink(thread.otherUserId(me), none)
</td>
<td class="date">
@showDate(thread.updatedAt)
</td>
</tr>
}
</tbody>
} else {
<tbody>
<tr>
<td colspan="4">
<br />
No message!
</td>
</tr>
</tbody>
<tr><th class="pager none">
<a href="@routes.Message.inbox(threads.nextPage | 1)">Next</a>
</th></tr>
}
@threads.currentPageResults.map { thread =>
<tr class="paginated_element @thread.isUnReadBy(me).fold(" new", "")">
<td class="subject">
<a href="@routes.Message.thread(thread.id)#bottom">@thread.name</a>
</td>
<td class="author">
@userIdLink(thread.otherUserId(me), none)
</td>
<td class="date">
@showDate(thread.updatedAt)
</td>
</tr>
}
</tbody>
} else {
<tbody>
<tr>
<td colspan="4">
<br />
No message!
</td>
</tr>
</tbody>
}
</tbody>
</table>
}

View file

@ -9,7 +9,7 @@ $.websocket = function(url, version, settings) {
},
options: {
name: "unnamed",
debug: true,
debug: false,
offlineDelay: 5000,
offlineTag: false,
pingData: JSON.stringify({t: "p"}),

View file

@ -24,7 +24,7 @@ div.sidebar a {
#lichess_message tr {
border-top: 1px solid #eaeaea;
}
#lichess_message tr:nth-child(odd) {
#lichess_message tr:nth-child(even) {
background: #f7f7f7;
}