@@ -1265,6 +1265,7 @@ def graph(web, req, tmpl):
for (id, type, ctx, vtx, edges) in fulltree()]
def nodes():
+ parity = paritygen(web.stripecount)
for row, (id, type, ctx, vtx, edges) in enumerate(tree):
entry = webutil.commonentry(web.repo, ctx)
edgedata = [{'col': edge[0],
@@ -1276,6 +1277,7 @@ def graph(web, req, tmpl):
entry.update({'col': vtx[0],
'color': (vtx[1] - 1) % 6 + 1,
+ 'parity': next(parity),
'edges': edgedata,
'row': row,
'nextrow': row + 1})
@@ -29,7 +29,6 @@
<div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div>
<div id="wrapper">
- <ul id="nodebgs"></ul>
<canvas id="graph"></canvas>
<ul id="graphnodes">{nodes%graphentry}</ul>
</div>
@@ -40,12 +39,6 @@
var data = {jsdata|json};
var graph = new Graph();
graph.scale({bg_height});
-
- graph.vertex = function(x, y, radius, color, parity, cur) \{
- Graph.prototype.vertex.apply(this, arguments);
- return ['<li class="bg parity' + parity + '"></li>', ''];
- }
-
graph.render(data);
</script>
@@ -1,7 +1,9 @@
-<li data-node="{node|short}">
- <span class="desc">
- <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>
- </span>
- {alltags}
- <div class="info"><span class="age">{date|rfc822date}</span>, by {author|person}</div>
+<li class="parity{parity}" data-node="{node|short}">
+ <div class="fg">
+ <span class="desc">
+ <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>
+ </span>
+ {alltags}
+ <div class="info"><span class="age">{date|rfc822date}</span>, by {author|person}</div>
+ </div>
</li>
@@ -478,27 +478,29 @@ canvas {
top: -0.7em;
}
-ul#nodebgs li.parity0 {
+ul#graphnodes li.parity0 {
background: #F1F6F7;
}
-ul#nodebgs li.parity1 {
+ul#graphnodes li.parity1 {
background: #FFFFFF;
}
ul#graphnodes {
- position: absolute;
- z-index: 10;
- top: 7px;
list-style: none inside none;
+ margin: 0;
+ padding: 0;
}
-ul#nodebgs {
- list-style: none inside none;
+ul#graphnodes li {
+ height: 37px;
+ overflow: visible;
+ padding-top: 2px;
}
-ul#graphnodes li, ul#nodebgs li {
- height: 39px;
+ul#graphnodes li .fg {
+ position: absolute;
+ z-index: 10;
}
ul#graphnodes li .info {
@@ -731,9 +731,9 @@ Set up the repo
$ "$TESTDIR/get-with-headers.py" $LOCALIP:$HGPORT 'graph?style=monoblue' | egrep $REVLINKS
<li><a href="/file/tip?style=monoblue">files</a></li>
- <a href="/rev/9d8c40cba617?style=monoblue">third</a>
- <a href="/rev/a7c1559b7bba?style=monoblue">second</a>
- <a href="/rev/43c799df6e75?style=monoblue">first</a>
+ <a href="/rev/9d8c40cba617?style=monoblue">third</a>
+ <a href="/rev/a7c1559b7bba?style=monoblue">second</a>
+ <a href="/rev/43c799df6e75?style=monoblue">first</a>
<a href="/graph/tip?revcount=30&style=monoblue">less</a>
<a href="/graph/tip?revcount=120&style=monoblue">more</a>
| <a href="/graph/43c799df6e75?style=monoblue">(0)</a> <a href="/graph/tip?style=monoblue">tip</a>
@@ -813,8 +813,8 @@ Set up the repo
$ "$TESTDIR/get-with-headers.py" $LOCALIP:$HGPORT 'graph/xyzzy?style=monoblue' | egrep $REVLINKS
<li><a href="/file/xyzzy?style=monoblue">files</a></li>
- <a href="/rev/a7c1559b7bba?style=monoblue">second</a>
- <a href="/rev/43c799df6e75?style=monoblue">first</a>
+ <a href="/rev/a7c1559b7bba?style=monoblue">second</a>
+ <a href="/rev/43c799df6e75?style=monoblue">first</a>
<a href="/graph/xyzzy?revcount=30&style=monoblue">less</a>
<a href="/graph/xyzzy?revcount=120&style=monoblue">more</a>
| <a href="/graph/43c799df6e75?style=monoblue">(0)</a> <a href="/graph/tip?style=monoblue">tip</a>