]> git.scottworley.com Git - reliable-chat/commitdiff
Feed the median-timestamp updates back into the UI
authorScott Worley <sworley@chkno.net>
Fri, 3 Aug 2012 19:22:48 +0000 (12:22 -0700)
committerScott Worley <sworley@chkno.net>
Fri, 3 Aug 2012 19:22:48 +0000 (12:22 -0700)
webclient/rc.html

index 573ee6a42c78e44d4eb50aea1ee63f28aff96074..4137de1d2c06c8613a5ecf040bcc0c1ee5ea12c5 100644 (file)
                        history.splice(hi,1);
                        rcaddmessagetohistory(message);
                }
                        history.splice(hi,1);
                        rcaddmessagetohistory(message);
                }
+
+               // Update the UI
+               var spans = message.UI.getElementsByTagName("span");
+               for (var i in spans) {
+                       if (spans[i].getAttribute && spans[i].getAttribute("class") == "timestamp") {
+                               spans[i].firstChild.data = rcformattime(message.Time);
+                       }
+               }
        }
 
        function rcreceivemessages(server, messages) {
        }
 
        function rcreceivemessages(server, messages) {