Mercurial > hg
diff tests/test-hgweb-commands.t @ 32995:7c82bfd55d47
hgweb: parameterize the tag name of elements holding followlines selection
While plugging followlines.js into "annotate" view, we'll need to walk a
different DOM structure from that of "filerevision" view. In particular, the
selectable source line element is a <tr> in annotate view (in contrast with a
<span> in filerevision view). So make this tag name a parameter of
followlines.js script by passing its value as a "selectabletag" data attribute
of <pre class="sourcelines"> element.
As <pre class="sourcelines"> tags are getting quite long in templates, rewrite
them on several lines.
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Wed, 21 Jun 2017 17:07:51 +0200 |
parents | 816a4fa7d5f8 |
children | 8e6f4939a69a |
line wrap: on
line diff
--- a/tests/test-hgweb-commands.t Wed Jun 21 17:02:21 2017 +0200 +++ b/tests/test-hgweb-commands.t Wed Jun 21 17:07:51 2017 +0200 @@ -1347,8 +1347,13 @@ <div class="overflow"> <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div> <div class="sourcefirst"> line source</div> - <pre class="sourcelines stripes4 wrap bottomline" data-logurl="/log/1/foo" data-ishead="0"> - <span id="l1">foo</span><a href="#l1"></a></pre> + <pre class="sourcelines stripes4 wrap bottomline" + data-logurl="/log/1/foo" + data-selectabletag="SPAN" + data-ishead="0"> + + <span id="l1">foo</span><a href="#l1"></a> + </pre> </div> <script type="text/javascript" src="/static/followlines.js"></script> @@ -1476,8 +1481,13 @@ <div class="overflow"> <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div> <div class="sourcefirst"> line source</div> - <pre class="sourcelines stripes4 wrap bottomline" data-logurl="/log/2/foo" data-ishead="1"> - <span id="l1">another</span><a href="#l1"></a></pre> + <pre class="sourcelines stripes4 wrap bottomline" + data-logurl="/log/2/foo" + data-selectabletag="SPAN" + data-ishead="1"> + + <span id="l1">another</span><a href="#l1"></a> + </pre> </div> <script type="text/javascript" src="/static/followlines.js"></script>