X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/52e5fa6ad78f375cec5a207a123a4aa3939c8ddf..93d3e4f85b90acc70088e44701c351423e1407cf:/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 -%>