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