fixes #1363
This commit is contained in:
@@ -16,6 +16,14 @@ $(function() {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("#hide-dmail-notice").click(function(e) {
|
||||
$dmail_notice = $("#dmail-notice")
|
||||
$dmail_notice.hide();
|
||||
var dmail_id = $dmail_notice.data("id");
|
||||
Danbooru.Cookie.put("hide_dmail_notice", dmail_id);
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("#close-notice-link").click(function(e) {
|
||||
$('#notice').fadeOut("fast");
|
||||
e.preventDefault();
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<%= render "users/ban_notice" %>
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.dmail_count.present? %>
|
||||
<% if CurrentUser.dmail_count.present? && CurrentUser.dmails.unread.present? && cookies[:hide_dmail_notice].to_i != CurrentUser.dmails.unread.first.id %>
|
||||
<%= render "users/dmail_notice" %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<div class="ui-corner-all ui-state-highlight" id="dmail-notice">
|
||||
<div class="ui-corner-all ui-state-highlight" id="dmail-notice" data-id="<%= CurrentUser.dmails.unread.first.id %>">
|
||||
<h1>You have <%= link_to "unread mail", dmails_path(:search => {:owner_id => CurrentUser.id, :to_id => CurrentUser.id}, :folder => "received") %>.</h1>
|
||||
<p><%= link_to "Close this", "#", :id => "hide-dmail-notice" %></p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user