# HG changeset patch # User Alexander Plavin # Date 1378459858 -14400 # Node ID 4a8c5a51f7a10a0ad49145eeec57e75c17dc0bc1 # Parent 14fddba036f89cf4935a80e392342e3d306f0aa2 hgweb: add parentSelector argument to process_dates Allow specifying parent selector of elements to process, useful for incremental page updates. diff -r 14fddba036f8 -r 4a8c5a51f7a1 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 @@ -176,7 +176,7 @@ } -function process_dates(){ +function process_dates(parentSelector){ // derived from code from mercurial/templatefilter.py @@ -253,7 +253,7 @@ } } - var nodes = document.querySelectorAll('.age'); + var nodes = document.querySelectorAll((parentSelector || '') + ' .age'); var dateclass = new RegExp('\\bdate\\b'); for (var i=0; i