Show More
@@ -1,115 +1,117 | |||
|
1 | 1 | #header# |
|
2 | 2 | <title>#repo|escape#: graph</title> |
|
3 | 3 | <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for #repo|escape#"/> |
|
4 | 4 | <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for #repo|escape#"/> |
|
5 | 5 | <!--[if IE]><script type="text/javascript" src="#staticurl#excanvas.js"></script><![endif]--> |
|
6 | 6 | </head> |
|
7 | 7 | |
|
8 | 8 | <body> |
|
9 | 9 | <div id="container"> |
|
10 | 10 | <div class="page-header"> |
|
11 | 11 | <h1><a href="{url}summary{sessionvars%urlparameter}">#repo|escape#</a> / graph</h1> |
|
12 | 12 | |
|
13 | 13 | <form action="{url}log"> |
|
14 | 14 | {sessionvars%hiddenformentry} |
|
15 | 15 | <dl class="search"> |
|
16 | 16 | <dt><label>Search: </label></dt> |
|
17 | 17 | <dd><input type="text" name="rev" /></dd> |
|
18 | 18 | </dl> |
|
19 | 19 | </form> |
|
20 | 20 | |
|
21 | 21 | <ul class="page-nav"> |
|
22 | 22 | <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li> |
|
23 | 23 | <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li> |
|
24 | 24 | <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li> |
|
25 | 25 | <li class="current">graph</li> |
|
26 | 26 | <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li> |
|
27 | 27 | <li><a href="{url}file/#node|short#{sessionvars%urlparameter}">files</a></li> |
|
28 | 28 | </ul> |
|
29 | 29 | </div> |
|
30 | 30 | |
|
31 | 31 | <h2 class="no-link no-border">graph</h2> |
|
32 | 32 | |
|
33 | 33 | <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div> |
|
34 | 34 | <div id="wrapper"> |
|
35 | 35 | <ul id="nodebgs"></ul> |
|
36 | 36 | <canvas id="graph" width="224" height="#canvasheight#"></canvas> |
|
37 | 37 | <ul id="graphnodes"></ul> |
|
38 | 38 | </div> |
|
39 | 39 | |
|
40 | 40 | <script type="text/javascript" src="#staticurl#graph.js"></script> |
|
41 | 41 | <script> |
|
42 | 42 | <!-- hide script content |
|
43 | 43 | |
|
44 | 44 | document.getElementById('noscript').style.display = 'none'; |
|
45 | 45 | |
|
46 | 46 | var data = {jsdata|json}; |
|
47 | 47 | var graph = new Graph(); |
|
48 | 48 | graph.scale({bg_height}); |
|
49 | 49 | |
|
50 | 50 | graph.edge = function(x0, y0, x1, y1, color) { |
|
51 | 51 | |
|
52 | 52 | this.setColor(color, 0.0, 0.65); |
|
53 | 53 | this.ctx.beginPath(); |
|
54 | 54 | this.ctx.moveTo(x0, y0); |
|
55 | 55 | this.ctx.lineTo(x1, y1); |
|
56 | 56 | this.ctx.stroke(); |
|
57 | 57 | |
|
58 | 58 | } |
|
59 | 59 | |
|
60 | 60 | var revlink = '<li style="_STYLE"><span class="desc">'; |
|
61 | 61 | revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>'; |
|
62 | 62 | revlink += '</span>_TAGS<span class="info">_DATE ago, by _USER</span></li>'; |
|
63 | 63 | |
|
64 | 64 | graph.vertex = function(x, y, color, parity, cur) { |
|
65 | 65 | |
|
66 | 66 | this.ctx.beginPath(); |
|
67 | 67 | color = this.setColor(color, 0.25, 0.75); |
|
68 | 68 | this.ctx.arc(x, y, radius, 0, Math.PI * 2, true); |
|
69 | 69 | this.ctx.fill(); |
|
70 | 70 | |
|
71 | 71 | var bg = '<li class="bg parity' + parity + '"></li>'; |
|
72 | 72 | var left = (this.columns + 1) * this.bg_height; |
|
73 | 73 | var nstyle = 'padding-left: ' + left + 'px;'; |
|
74 | 74 | var item = revlink.replace(/_STYLE/, nstyle); |
|
75 | 75 | item = item.replace(/_PARITY/, 'parity' + parity); |
|
76 | 76 | item = item.replace(/_NODEID/, cur[0]); |
|
77 | 77 | item = item.replace(/_NODEID/, cur[0]); |
|
78 | 78 | item = item.replace(/_DESC/, cur[3]); |
|
79 | 79 | item = item.replace(/_USER/, cur[4]); |
|
80 | 80 | item = item.replace(/_DATE/, cur[5]); |
|
81 | 81 | |
|
82 | 82 | var tagspan = ''; |
|
83 | 83 | if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { |
|
84 | 84 | tagspan = '<span class="logtags">'; |
|
85 | 85 | if (cur[6][1]) { |
|
86 | 86 | tagspan += '<span class="branchtag" title="' + cur[6][0] + '">'; |
|
87 | 87 | tagspan += cur[6][0] + '</span> '; |
|
88 | 88 | } else if (!cur[6][1] && cur[6][0] != 'default') { |
|
89 | 89 | tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">'; |
|
90 | 90 | tagspan += cur[6][0] + '</span> '; |
|
91 | 91 | } |
|
92 | 92 | if (cur[7].length) { |
|
93 | 93 | for (var t in cur[7]) { |
|
94 | 94 | var tag = cur[7][t]; |
|
95 | 95 | tagspan += '<span class="tagtag">' + tag + '</span> '; |
|
96 | 96 | } |
|
97 | 97 | } |
|
98 | 98 | tagspan += '</span>'; |
|
99 | 99 | } |
|
100 | 100 | |
|
101 | 101 | item = item.replace(/_TAGS/, tagspan); |
|
102 | 102 | return [bg, item]; |
|
103 | 103 | |
|
104 | 104 | } |
|
105 | 105 | |
|
106 | 106 | graph.render(data); |
|
107 | 107 | |
|
108 | 108 | // stop hiding script --> |
|
109 | 109 | </script> |
|
110 | 110 | |
|
111 | 111 | <div class="page-path"> |
|
112 | #changenav%navgraphentry# | |
|
112 | <a href="{url}graph/{rev}{lessvars%urlparameter}">less</a> | |
|
113 | <a href="{url}graph/{rev}{morevars%urlparameter}">more</a> | |
|
114 | | {changenav%navgraphentry} | |
|
113 | 115 | </div> |
|
114 | 116 | |
|
115 | 117 | #footer# |
General Comments 0
You need to be logged in to leave comments.
Login now