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.
Showing
- mercurial/templates/gitweb/filerevision.tmpl 6 additions, 1 deletionmercurial/templates/gitweb/filerevision.tmpl
- mercurial/templates/paper/filerevision.tmpl 6 additions, 1 deletionmercurial/templates/paper/filerevision.tmpl
- mercurial/templates/static/followlines.js 23 additions, 15 deletionsmercurial/templates/static/followlines.js
- tests/test-hgweb-commands.t 14 additions, 4 deletionstests/test-hgweb-commands.t
- tests/test-highlight.t 7 additions, 2 deletionstests/test-highlight.t
Loading
Please register or sign in to comment