|
1 {header} |
|
2 <title>{repo|escape}: graph</title> |
|
3 <link rel="alternate" type="application/atom+xml" |
|
4 href="{url}atom-tags" title="Atom feed for {repo|escape}: tags"> |
|
5 <link rel="alternate" type="application/rss+xml" |
|
6 href="{url}rss-tags" title="RSS feed for {repo|escape}: tags"> |
|
7 <!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]--> |
|
8 </head> |
|
9 <body> |
|
10 |
|
11 <div class="buttons"> |
|
12 <a href="{url}log{sessionvars%urlparameter}">changelog</a> |
|
13 <a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
|
14 <a href="{url}tags{sessionvars%urlparameter}">tags</a> |
|
15 <a href="{url}branches{sessionvars%urlparameter}">branches</a> |
|
16 <a href="{url}file/{node|short}/{sessionvars%urlparameter}">files</a> |
|
17 <a href="{url}help{sessionvars%urlparameter}">help</a> |
|
18 </div> |
|
19 |
|
20 <h2>graph</h2> |
|
21 |
|
22 <form action="{url}log"> |
|
23 {sessionvars%hiddenformentry} |
|
24 <p> |
|
25 <label for="search1">search:</label> |
|
26 <input name="rev" id="search1" type="text" size="30"> |
|
27 navigate: <small class="navigate">{changenav%navgraph}</small> |
|
28 </p> |
|
29 </form> |
|
30 |
|
31 <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript> |
|
32 |
|
33 <div id="wrapper"> |
|
34 <ul id="nodebgs"></ul> |
|
35 <canvas id="graph" width="224" height="{canvasheight}"></canvas> |
|
36 <ul id="graphnodes"></ul> |
|
37 </div> |
|
38 |
|
39 <script type="text/javascript" src="{staticurl}graph.js"></script> |
|
40 <script type="text/javascript"> |
|
41 <!-- hide script content |
|
42 |
|
43 var data = {jsdata|json}; |
|
44 var graph = new Graph(); |
|
45 graph.scale({bg_height}); |
|
46 |
|
47 graph.edge = function(x0, y0, x1, y1, color) \{ |
|
48 |
|
49 this.setColor(color, 0.0, 0.65); |
|
50 this.ctx.beginPath(); |
|
51 this.ctx.moveTo(x0, y0); |
|
52 this.ctx.lineTo(x1, y1); |
|
53 this.ctx.stroke(); |
|
54 |
|
55 } |
|
56 |
|
57 var revlink = '<li style="_STYLE"><span class="desc">'; |
|
58 revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>'; |
|
59 revlink += '</span><span class="info">_DATE, by _USER</span></li>'; |
|
60 |
|
61 graph.vertex = function(x, y, color, parity, cur) \{ |
|
62 |
|
63 this.ctx.beginPath(); |
|
64 color = this.setColor(color, 0.25, 0.75); |
|
65 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true); |
|
66 this.ctx.fill(); |
|
67 |
|
68 var bg = '<li class="bg parity' + parity + '"></li>'; |
|
69 var left = (this.columns + 1) * this.bg_height; |
|
70 var nstyle = 'padding-left: ' + left + 'px;'; |
|
71 var item = revlink.replace(/_STYLE/, nstyle); |
|
72 item = item.replace(/_PARITY/, 'parity' + parity); |
|
73 item = item.replace(/_NODEID/, cur[0]); |
|
74 item = item.replace(/_NODEID/, cur[0]); |
|
75 item = item.replace(/_DESC/, cur[3]); |
|
76 item = item.replace(/_USER/, cur[4]); |
|
77 item = item.replace(/_DATE/, cur[5]); |
|
78 |
|
79 return [bg, item]; |
|
80 |
|
81 } |
|
82 |
|
83 graph.render(data); |
|
84 |
|
85 // stop hiding script --> |
|
86 </script> |
|
87 |
|
88 <form action="{url}log"> |
|
89 {sessionvars%hiddenformentry} |
|
90 <p> |
|
91 <label for="search1">search:</label> |
|
92 <input name="rev" id="search1" type="text" size="30"> |
|
93 navigate: <small class="navigate">{changenav%navgraph}</small> |
|
94 </p> |
|
95 </form> |
|
96 |
|
97 {footer} |