##// 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 for (id, type, ctx, vtx, edges) in fulltree()]
1265 for (id, type, ctx, vtx, edges) in fulltree()]
1266
1266
1267 def nodes():
1267 def nodes():
1268 parity = paritygen(web.stripecount)
1268 for row, (id, type, ctx, vtx, edges) in enumerate(tree):
1269 for row, (id, type, ctx, vtx, edges) in enumerate(tree):
1269 entry = webutil.commonentry(web.repo, ctx)
1270 entry = webutil.commonentry(web.repo, ctx)
1270 edgedata = [{'col': edge[0],
1271 edgedata = [{'col': edge[0],
@@ -1276,6 +1277,7 b' def graph(web, req, tmpl):'
1276
1277
1277 entry.update({'col': vtx[0],
1278 entry.update({'col': vtx[0],
1278 'color': (vtx[1] - 1) % 6 + 1,
1279 'color': (vtx[1] - 1) % 6 + 1,
1280 'parity': next(parity),
1279 'edges': edgedata,
1281 'edges': edgedata,
1280 'row': row,
1282 'row': row,
1281 'nextrow': row + 1})
1283 'nextrow': row + 1})
@@ -29,7 +29,6 b''
29
29
30 <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div>
30 <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div>
31 <div id="wrapper">
31 <div id="wrapper">
32 <ul id="nodebgs"></ul>
33 <canvas id="graph"></canvas>
32 <canvas id="graph"></canvas>
34 <ul id="graphnodes">{nodes%graphentry}</ul>
33 <ul id="graphnodes">{nodes%graphentry}</ul>
35 </div>
34 </div>
@@ -40,12 +39,6 b''
40 var data = {jsdata|json};
39 var data = {jsdata|json};
41 var graph = new Graph();
40 var graph = new Graph();
42 graph.scale({bg_height});
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 graph.render(data);
42 graph.render(data);
50 </script>
43 </script>
51
44
@@ -1,7 +1,9 b''
1 <li data-node="{node|short}">
1 <li class="parity{parity}" data-node="{node|short}">
2 <div class="fg">
2 <span class="desc">
3 <span class="desc">
3 <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>
4 <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>
4 </span>
5 </span>
5 {alltags}
6 {alltags}
6 <div class="info"><span class="age">{date|rfc822date}</span>, by {author|person}</div>
7 <div class="info"><span class="age">{date|rfc822date}</span>, by {author|person}</div>
8 </div>
7 </li>
9 </li>
@@ -478,27 +478,29 b' canvas {'
478 top: -0.7em;
478 top: -0.7em;
479 }
479 }
480
480
481 ul#nodebgs li.parity0 {
481 ul#graphnodes li.parity0 {
482 background: #F1F6F7;
482 background: #F1F6F7;
483 }
483 }
484
484
485 ul#nodebgs li.parity1 {
485 ul#graphnodes li.parity1 {
486 background: #FFFFFF;
486 background: #FFFFFF;
487 }
487 }
488
488
489 ul#graphnodes {
489 ul#graphnodes {
490 position: absolute;
491 z-index: 10;
492 top: 7px;
493 list-style: none inside none;
490 list-style: none inside none;
491 margin: 0;
492 padding: 0;
494 }
493 }
495
494
496 ul#nodebgs {
495 ul#graphnodes li {
497 list-style: none inside none;
496 height: 37px;
497 overflow: visible;
498 padding-top: 2px;
498 }
499 }
499
500
500 ul#graphnodes li, ul#nodebgs li {
501 ul#graphnodes li .fg {
501 height: 39px;
502 position: absolute;
503 z-index: 10;
502 }
504 }
503
505
504 ul#graphnodes li .info {
506 ul#graphnodes li .info {
General Comments 0
You need to be logged in to leave comments. Login now