Submitter | Alexander Plavin |
---|---|
Date | Sept. 29, 2013, 5:15 p.m. |
Message ID | <26dba7f9f0d6576ebe8d.1380474936@debian-alexander.dolgopa> |
Download | mbox | patch |
Permalink | /patch/2664/ |
State | Accepted |
Commit | 5ba3cf17da9e5ccb89bb4f73582dbf26e0f75155 |
Headers | show |
Comments
On Sun, 2013-09-29 at 21:15 +0400, Alexander Plavin wrote: > # HG changeset patch > # User Alexander Plavin <alexander@plav.in> > # Date 1378459858 -14400 > # Fri Sep 06 13:30:58 2013 +0400 > # Node ID 26dba7f9f0d6576ebe8d0cf74f4451064ac28669 > # Parent f65798655fca8f322cba0ed6a7c6656404980e2b > hgweb: call process_dates with a specified selector in ajax scroll > > Now this function processes only newly added entries, and not old ones, > the amount of which can be much bigger. These are queued thanks.
Patch
diff -r f65798655fca -r 26dba7f9f0d6 mercurial/templates/static/mercurial.js --- a/mercurial/templates/static/mercurial.js Fri Sep 06 13:30:58 2013 +0400 +++ b/mercurial/templates/static/mercurial.js Fri Sep 06 13:30:58 2013 +0400 @@ -407,12 +407,14 @@ } else { var doc = docFromHTML(htmlText); var nodes = doc.querySelector(containerSelector).children; + var curClass = 'c' + Date.now(); while (nodes.length) { var node = nodes[0]; node = document.adoptNode(node); + node.classList.add(curClass); container.appendChild(node); } - process_dates(); + process_dates('.' + curClass); } }, function onerror(errorText) {