fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-02-21 11:24 am

[dw-free] No visual indication when marking an item in the inbox read/unread dynamically

[commit: http://hg.dwscoalition.org/dw-free/rev/d157ea166cf2]

http://bugs.dwscoalition.org/show_bug.cgi?id=3521

Apply and remove the "read" class, when marking something as read using JS,
so that there's a change of appearance without a pageload.

Patch by [personal profile] fu.

Files modified:
  • htdocs/js/esn_inbox.js
--------------------------------------------------------------------------------
diff -r 3407797b6f9f -r d157ea166cf2 htdocs/js/esn_inbox.js
--- a/htdocs/js/esn_inbox.js	Mon Feb 21 18:32:39 2011 +0800
+++ b/htdocs/js/esn_inbox.js	Mon Feb 21 19:24:45 2011 +0800
@@ -345,8 +345,10 @@ ESN_Inbox.finishedUpdate = function (inf
             if (read) {
                 DOM.removeClassName(titleElement, "InboxItem_Unread");
                 DOM.addClassName(titleElement, "InboxItem_Read");
+                DOM.addClassName(titleElement, "read");
             } else {
                 DOM.removeClassName(titleElement, "InboxItem_Read");
+                DOM.removeClassName(titleElement, "read");
                 DOM.addClassName(titleElement, "InboxItem_Unread");
             }
         }
--------------------------------------------------------------------------------