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