X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/13289d404188bd397ee72852f66c415a2bb87066..0a3dd82c47f5df0d55554c80a3b47f54ef6d204b:/app/views/message/mark.js.erb diff --git a/app/views/message/mark.js.erb b/app/views/message/mark.js.erb index 2e545b62e..d67e74ace 100644 --- a/app/views/message/mark.js.erb +++ b/app/views/message/mark.js.erb @@ -1,3 +1,7 @@ $("#inboxanchor").replaceWith("<%=j render :partial => "layouts/inbox" %>"); $("#inbox-count").replaceWith("<%=j render :partial => "message_count" %>"); -$("#inbox-<%= @message.id %>").replaceWith("<%=j render :partial => "message_summary", :object => @message %>"); +<% if @message.message_read? -%> +$("#inbox-<%= @message.id %>").removeClass("inbox-row-unread").addClass("inbox-row"); +<% else -%> +$("#inbox-<%= @message.id %>").removeClass("inbox-row").addClass("inbox-row-unread"); +<% end -%>