X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/52e5fa6ad78f375cec5a207a123a4aa3939c8ddf..52054e6b23f3ff147ba34104b6f25b44c56ff158:/app/views/message/mark.js.erb?ds=sidebyside 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 -%>