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