mark all as read for DMs

This commit is contained in:
erqan 2014-05-06 16:42:35 +03:00
parent b4ebc1fc12
commit 52a568a794
4 changed files with 24 additions and 4 deletions

View File

@ -1211,7 +1211,8 @@ ol.toptrends-list {
color: #fff;
background: rgba( 0, 0, 0, .1 );
}
.modal-back {
.modal-back,
.mark-all-as-read {
position: absolute;
right: 30px;
top: 0;
@ -1223,8 +1224,8 @@ ol.toptrends-list {
transition: all .1s linear;
display: none;
}
.modal-back:hover
{
.modal-back:hover,
.mark-all-as-read:hover {
color: #fff;
background: rgba( 0, 0, 0, .1 );
}
@ -1359,6 +1360,12 @@ ol.toptrends-list {
right: -65px;
left: auto;
}
.mark-all-as-read {
right: 60px;
}
.mark-all-as-read:before {
content: '\2714';
}
/*************************************
****************** NEW USER MODAL
**************************************/

View File

@ -258,11 +258,13 @@
<!-- TEMPLATE INVÓLUCRO DO POST EXPANDIDO END -->
<!-- TEMPLATE DO MODAL GENÉRICO INIT -->
<div class="modal-blackout">
<div class="modal-blackout cancel">
<div class="modal-wrapper">
<div class="modal-header">
<h3></h3>
<span id="closeModal" class="modal-close cancel">&times;</span>
<span class="modal-back">&lt;</span>
<span class="mark-all-as-read"></span>
</div>
<div class="modal-content"></div>
<div class="modal-buttons">

View File

@ -289,6 +289,7 @@
<h3></h3>
<span id="closeModal" class="modal-close cancel">&times;</span>
<span class="modal-back">&lt;</span>
<span class="mark-all-as-read"></span>
</div>
<div class="modal-content"></div>
<div class="modal-buttons">

View File

@ -142,6 +142,16 @@ function directMessagesPopup()
requestDMsnippetList($(".directMessages").find(".direct-messages-list"));
$('.modal-back').css('display','inline');
$('.mark-all-as-read').css('display', 'inline');
$('.mark-all-as-read').attr('title', polyglot.t("Mark all as read"));
$('.mark-all-as-read').on('click', function() {
for (var k in _newDMsPerUser) {
_newDMsPerUser[k] = 0;
}
saveDMsToStorage();
$.MAL.updateNewDMsUI(getNewDMsCount());
});
}