]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/messages.js
Change mark message buttons visibility with hidden attr
[rails.git] / app / assets / javascripts / messages.js
index 8c30f9b34a726b2c399d2ab5eb473f8bb2029cb7..d34ffb46662bfa8caa1aed64b90271b146559d8c 100644 (file)
@@ -27,6 +27,8 @@ $(document).ready(function () {
   function updateReadState(target, isRead) {
     $(target).closest("tr")
       .toggleClass("inbox-row", isRead)
-      .toggleClass("inbox-row-unread", !isRead);
+      .toggleClass("inbox-row-unread", !isRead)
+      .find(".inbox-mark-unread button").prop("hidden", !isRead).end()
+      .find(".inbox-mark-read button").prop("hidden", isRead);
   }
 });