Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
32994:9fda810cd0db | 32995:7c82bfd55d47 |
---|---|
1345 </table> | 1345 </table> |
1346 | 1346 |
1347 <div class="overflow"> | 1347 <div class="overflow"> |
1348 <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div> | 1348 <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div> |
1349 <div class="sourcefirst"> line source</div> | 1349 <div class="sourcefirst"> line source</div> |
1350 <pre class="sourcelines stripes4 wrap bottomline" data-logurl="/log/1/foo" data-ishead="0"> | 1350 <pre class="sourcelines stripes4 wrap bottomline" |
1351 <span id="l1">foo</span><a href="#l1"></a></pre> | 1351 data-logurl="/log/1/foo" |
1352 data-selectabletag="SPAN" | |
1353 data-ishead="0"> | |
1354 | |
1355 <span id="l1">foo</span><a href="#l1"></a> | |
1356 </pre> | |
1352 </div> | 1357 </div> |
1353 | 1358 |
1354 <script type="text/javascript" src="/static/followlines.js"></script> | 1359 <script type="text/javascript" src="/static/followlines.js"></script> |
1355 | 1360 |
1356 </div> | 1361 </div> |
1474 </table> | 1479 </table> |
1475 | 1480 |
1476 <div class="overflow"> | 1481 <div class="overflow"> |
1477 <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div> | 1482 <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div> |
1478 <div class="sourcefirst"> line source</div> | 1483 <div class="sourcefirst"> line source</div> |
1479 <pre class="sourcelines stripes4 wrap bottomline" data-logurl="/log/2/foo" data-ishead="1"> | 1484 <pre class="sourcelines stripes4 wrap bottomline" |
1480 <span id="l1">another</span><a href="#l1"></a></pre> | 1485 data-logurl="/log/2/foo" |
1486 data-selectabletag="SPAN" | |
1487 data-ishead="1"> | |
1488 | |
1489 <span id="l1">another</span><a href="#l1"></a> | |
1490 </pre> | |
1481 </div> | 1491 </div> |
1482 | 1492 |
1483 <script type="text/javascript" src="/static/followlines.js"></script> | 1493 <script type="text/javascript" src="/static/followlines.js"></script> |
1484 | 1494 |
1485 </div> | 1495 </div> |