##// END OF EJS Templates
hgweb: plug followlines action in annotate view...
Denis Laxalde -
r32994:1c97df5e default
parent child Browse files
Show More
@@ -865,6 +865,7 b' def annotate(web, req, tmpl):'
865 fctx = webutil.filectx(web.repo, req)
865 fctx = webutil.filectx(web.repo, req)
866 f = fctx.path()
866 f = fctx.path()
867 parity = paritygen(web.stripecount)
867 parity = paritygen(web.stripecount)
868 ishead = fctx.filerev() in fctx.filelog().headrevs()
868
869
869 # parents() is called once per line and several lines likely belong to
870 # parents() is called once per line and several lines likely belong to
870 # same revision. So it is worth caching.
871 # same revision. So it is worth caching.
@@ -927,6 +928,7 b' def annotate(web, req, tmpl):'
927 symrev=webutil.symrevorshortnode(req, fctx),
928 symrev=webutil.symrevorshortnode(req, fctx),
928 rename=webutil.renamelink(fctx),
929 rename=webutil.renamelink(fctx),
929 permissions=fctx.manifest().flags(f),
930 permissions=fctx.manifest().flags(f),
931 ishead=int(ishead),
930 **webutil.commonentry(web.repo, fctx))
932 **webutil.commonentry(web.repo, fctx))
931
933
932 @webcommand('filelog')
934 @webcommand('filelog')
@@ -66,10 +66,15 b' annotate |'
66 </div>
66 </div>
67 <div class="page_body">
67 <div class="page_body">
68 <table>
68 <table>
69 <tbody>
69 <tbody class="sourcelines"
70 data-logurl="{url|urlescape}log/{symrev}/{file|urlescape}"
71 data-selectabletag="TR"
72 data-ishead="{ishead}">
70 {annotate%annotateline}
73 {annotate%annotateline}
71 </tbody>
74 </tbody>
72 </table>
75 </table>
73 </div>
76 </div>
74
77
78 <script type="text/javascript" src="{staticurl|urlescape}followlines.js"></script>
79
75 {footer}
80 {footer}
@@ -73,7 +73,10 b''
73 <th class="line">&nbsp;&nbsp;line source</th>
73 <th class="line">&nbsp;&nbsp;line source</th>
74 </tr>
74 </tr>
75 </thead>
75 </thead>
76 <tbody class="stripes2">
76 <tbody class="stripes2 sourcelines"
77 data-logurl="{url|urlescape}log/{symrev}/{file|urlescape}"
78 data-selectabletag="TR"
79 data-ishead="{ishead}">
77 {annotate%annotateline}
80 {annotate%annotateline}
78 </tbody>
81 </tbody>
79 </table>
82 </table>
@@ -81,4 +84,6 b''
81 </div>
84 </div>
82 </div>
85 </div>
83
86
87 <script type="text/javascript" src="{staticurl|urlescape}followlines.js"></script>
88
84 {footer}
89 {footer}
@@ -177,10 +177,12 b' pre.sourcelines.stripes > span:target {'
177 }
177 }
178
178
179 /* Followlines */
179 /* Followlines */
180 div.page_body table tbody.sourcelines > tr.followlines-select:hover,
180 div.page_body pre.sourcelines > span.followlines-select:hover {
181 div.page_body pre.sourcelines > span.followlines-select:hover {
181 cursor: cell;
182 cursor: cell;
182 }
183 }
183
184
185 tbody.sourcelines > tr.followlines-selected,
184 pre.sourcelines > span.followlines-selected {
186 pre.sourcelines > span.followlines-selected {
185 background-color: #99C7E9 !important;
187 background-color: #99C7E9 !important;
186 }
188 }
@@ -280,10 +280,12 b' td.annotate:hover div.annotate-info { di'
280 background-color: #bfdfff;
280 background-color: #bfdfff;
281 }
281 }
282
282
283 div.overflow table tbody.sourcelines > tr.followlines-select:hover,
283 div.overflow pre.sourcelines > span.followlines-select:hover {
284 div.overflow pre.sourcelines > span.followlines-select:hover {
284 cursor: cell;
285 cursor: cell;
285 }
286 }
286
287
288 tbody.sourcelines > tr.followlines-selected,
287 pre.sourcelines > span.followlines-selected {
289 pre.sourcelines > span.followlines-selected {
288 background-color: #99C7E9;
290 background-color: #99C7E9;
289 }
291 }
@@ -340,7 +340,7 b' static file'
340
340
341 $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server
341 $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server
342 200 Script output follows
342 200 Script output follows
343 content-length: 8349
343 content-length: 8463
344 content-type: text/css
344 content-type: text/css
345
345
346 body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; }
346 body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; }
@@ -522,10 +522,12 b' static file'
522 }
522 }
523
523
524 /* Followlines */
524 /* Followlines */
525 div.page_body table tbody.sourcelines > tr.followlines-select:hover,
525 div.page_body pre.sourcelines > span.followlines-select:hover {
526 div.page_body pre.sourcelines > span.followlines-select:hover {
526 cursor: cell;
527 cursor: cell;
527 }
528 }
528
529
530 tbody.sourcelines > tr.followlines-selected,
529 pre.sourcelines > span.followlines-selected {
531 pre.sourcelines > span.followlines-selected {
530 background-color: #99C7E9 !important;
532 background-color: #99C7E9 !important;
531 }
533 }
@@ -292,7 +292,10 b' hgweb fileannotate, html'
292 <th class="line">&nbsp;&nbsp;line source</th>
292 <th class="line">&nbsp;&nbsp;line source</th>
293 </tr>
293 </tr>
294 </thead>
294 </thead>
295 <tbody class="stripes2">
295 <tbody class="stripes2 sourcelines"
296 data-logurl="/log/tip/primes.py"
297 data-selectabletag="TR"
298 data-ishead="1">
296
299
297 <tr id="l1" class="thisrev">
300 <tr id="l1" class="thisrev">
298 <td class="annotate parity0">
301 <td class="annotate parity0">
@@ -829,6 +832,8 b' hgweb fileannotate, html'
829 </div>
832 </div>
830 </div>
833 </div>
831
834
835 <script type="text/javascript" src="/static/followlines.js"></script>
836
832
837
833
838
834 </body>
839 </body>
General Comments 0
You need to be logged in to leave comments. Login now