individual new messages counters in DM modals for each peer/group

This commit is contained in:
Simon Grim 2015-10-30 04:28:23 +05:00
parent a82c802edd
commit 50827a6691
7 changed files with 33 additions and 0 deletions

View File

@ -1534,6 +1534,13 @@ ol.toptrends-list {
color: rgba( 0, 0, 0, .4 );
}
.direct-messages-list .post .messages-qtd {
display: none;
top: 8px;
left: 16px;
line-height: 8px;
}
.direct-messages-thread {
padding: 10px;
}

View File

@ -373,6 +373,7 @@
</div>
<!-- o texto do post (restrição de caracteres?) -->
<p class="post-text"></p>
<div class="messages-qtd">0</div>
</li>
<div class="messages-thread-template">

View File

@ -465,6 +465,7 @@
</div>
<!-- o texto do post (restrição de caracteres?) -->
<p class="post-text"></p>
<div class="messages-qtd">0</div>
</li>
<div class="messages-thread-template">

View File

@ -28,6 +28,11 @@ function processDMsnippet(dmUsers, dmThreadList, forGroup) {
// convert snipped to html and add it to date-sorted list
var dmItem = dmDataToSnippetItem(dmUsers[u][0], u);
console.log(u + ': ' + _newDMsPerUser[u]);
if (_newDMsPerUser[u] > 0) {
dmItem.addClass('new')
.find('.messages-qtd').text(_newDMsPerUser[u]).show();
}
var timeDmItem = parseInt(dmItem.attr('data-time'));
var existingItems = dmThreadList.children();
for (var j = 0; j < existingItems.length; j++) {

View File

@ -1919,6 +1919,13 @@ textarea.splited-post {
color: rgba( 0, 0, 0, .4 );
}
.direct-messages-list .post .messages-qtd {
display: none;
top: 8px;
left: 16px;
line-height: 8px;
}
.direct-messages-thread {
padding: 10px;
}

View File

@ -2905,6 +2905,13 @@ ol.toptrends-list a:hover {
display: none;
}
.direct-messages-list .post .messages-qtd {
display: none;
top: -2px;
right: -2px;
font-size: 0.7em;
}
/* line 782, ../sass/style.sass */
.direct-messages-list .post:hover:after {
display: block;

View File

@ -847,6 +847,11 @@ ol.toptrends-list
margin: -6px 0 0 0
color: rgba(0, 0, 0, 0.4)
display: none
.messages-qtd
display: none
top: -2px
right: -2px
font-size: 0.7em
.direct-messages-list
.post:hover:after