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