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