##// END OF EJS Templates
monoblue: make actual changeset entries have backgrounds on /graph...
av6 -
r35548:acd8a245 default
parent child Browse files
Show More
@@ -1265,6 +1265,7 b' def graph(web, req, tmpl):'
1265 1265 for (id, type, ctx, vtx, edges) in fulltree()]
1266 1266
1267 1267 def nodes():
1268 parity = paritygen(web.stripecount)
1268 1269 for row, (id, type, ctx, vtx, edges) in enumerate(tree):
1269 1270 entry = webutil.commonentry(web.repo, ctx)
1270 1271 edgedata = [{'col': edge[0],
@@ -1276,6 +1277,7 b' def graph(web, req, tmpl):'
1276 1277
1277 1278 entry.update({'col': vtx[0],
1278 1279 'color': (vtx[1] - 1) % 6 + 1,
1280 'parity': next(parity),
1279 1281 'edges': edgedata,
1280 1282 'row': row,
1281 1283 'nextrow': row + 1})
@@ -29,7 +29,6 b''
29 29
30 30 <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div>
31 31 <div id="wrapper">
32 <ul id="nodebgs"></ul>
33 32 <canvas id="graph"></canvas>
34 33 <ul id="graphnodes">{nodes%graphentry}</ul>
35 34 </div>
@@ -40,12 +39,6 b''
40 39 var data = {jsdata|json};
41 40 var graph = new Graph();
42 41 graph.scale({bg_height});
43
44 graph.vertex = function(x, y, radius, color, parity, cur) \{
45 Graph.prototype.vertex.apply(this, arguments);
46 return ['<li class="bg parity' + parity + '"></li>', ''];
47 }
48
49 42 graph.render(data);
50 43 </script>
51 44
@@ -1,7 +1,9 b''
1 <li data-node="{node|short}">
2 <span class="desc">
3 <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>
4 </span>
5 {alltags}
6 <div class="info"><span class="age">{date|rfc822date}</span>, by {author|person}</div>
1 <li class="parity{parity}" data-node="{node|short}">
2 <div class="fg">
3 <span class="desc">
4 <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>
5 </span>
6 {alltags}
7 <div class="info"><span class="age">{date|rfc822date}</span>, by {author|person}</div>
8 </div>
7 9 </li>
@@ -478,27 +478,29 b' canvas {'
478 478 top: -0.7em;
479 479 }
480 480
481 ul#nodebgs li.parity0 {
481 ul#graphnodes li.parity0 {
482 482 background: #F1F6F7;
483 483 }
484 484
485 ul#nodebgs li.parity1 {
485 ul#graphnodes li.parity1 {
486 486 background: #FFFFFF;
487 487 }
488 488
489 489 ul#graphnodes {
490 position: absolute;
491 z-index: 10;
492 top: 7px;
493 490 list-style: none inside none;
491 margin: 0;
492 padding: 0;
494 493 }
495 494
496 ul#nodebgs {
497 list-style: none inside none;
495 ul#graphnodes li {
496 height: 37px;
497 overflow: visible;
498 padding-top: 2px;
498 499 }
499 500
500 ul#graphnodes li, ul#nodebgs li {
501 height: 39px;
501 ul#graphnodes li .fg {
502 position: absolute;
503 z-index: 10;
502 504 }
503 505
504 506 ul#graphnodes li .info {
@@ -731,9 +731,9 b' Set up the repo'
731 731
732 732 $ "$TESTDIR/get-with-headers.py" $LOCALIP:$HGPORT 'graph?style=monoblue' | egrep $REVLINKS
733 733 <li><a href="/file/tip?style=monoblue">files</a></li>
734 <a href="/rev/9d8c40cba617?style=monoblue">third</a>
735 <a href="/rev/a7c1559b7bba?style=monoblue">second</a>
736 <a href="/rev/43c799df6e75?style=monoblue">first</a>
734 <a href="/rev/9d8c40cba617?style=monoblue">third</a>
735 <a href="/rev/a7c1559b7bba?style=monoblue">second</a>
736 <a href="/rev/43c799df6e75?style=monoblue">first</a>
737 737 <a href="/graph/tip?revcount=30&style=monoblue">less</a>
738 738 <a href="/graph/tip?revcount=120&style=monoblue">more</a>
739 739 | <a href="/graph/43c799df6e75?style=monoblue">(0)</a> <a href="/graph/tip?style=monoblue">tip</a>
@@ -813,8 +813,8 b' Set up the repo'
813 813
814 814 $ "$TESTDIR/get-with-headers.py" $LOCALIP:$HGPORT 'graph/xyzzy?style=monoblue' | egrep $REVLINKS
815 815 <li><a href="/file/xyzzy?style=monoblue">files</a></li>
816 <a href="/rev/a7c1559b7bba?style=monoblue">second</a>
817 <a href="/rev/43c799df6e75?style=monoblue">first</a>
816 <a href="/rev/a7c1559b7bba?style=monoblue">second</a>
817 <a href="/rev/43c799df6e75?style=monoblue">first</a>
818 818 <a href="/graph/xyzzy?revcount=30&style=monoblue">less</a>
819 819 <a href="/graph/xyzzy?revcount=120&style=monoblue">more</a>
820 820 | <a href="/graph/43c799df6e75?style=monoblue">(0)</a> <a href="/graph/tip?style=monoblue">tip</a>
General Comments 0
You need to be logged in to leave comments. Login now