Browse Source

mark all as read for DMs

master
erqan 11 years ago
parent
commit
52a568a794
  1. 13
      css/style.css
  2. 4
      following.html
  3. 1
      home.html
  4. 10
      js/twister_directmsg.js

13
css/style.css

@ -1211,7 +1211,8 @@ ol.toptrends-list { @@ -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 { @@ -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 { @@ -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
**************************************/

4
following.html

@ -258,11 +258,13 @@ @@ -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">

1
home.html

@ -289,6 +289,7 @@ @@ -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">

10
js/twister_directmsg.js

@ -142,6 +142,16 @@ function directMessagesPopup() @@ -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());
});
}

Loading…
Cancel
Save