Show More
@@ -67,9 +67,6 b' graph.edge = function(x0, y0, x1, y1, co' | |||
|
67 | 67 | |
|
68 | 68 | } |
|
69 | 69 | |
|
70 | var nodes = document.getElementById('graphnodes'); | |
|
71 | var nodebgs = document.getElementById('nodebgs'); | |
|
72 | ||
|
73 | 70 | var revlink = '<li style="_STYLE"><span class="desc">'; |
|
74 | 71 | revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>'; |
|
75 | 72 | revlink += '</span><span class="tag">_TAGS</span>'; |
@@ -83,8 +80,6 b' graph.vertex = function(x, y, color, par' | |||
|
83 | 80 | this.ctx.fill(); |
|
84 | 81 | |
|
85 | 82 | var bg = '<li class="bg parity' + parity + '"></li>'; |
|
86 | nodebgs.innerHTML += bg; | |
|
87 | ||
|
88 | 83 | var left = (this.columns + 1) * this.bg_height; |
|
89 | 84 | var nstyle = 'padding-left: ' + left + 'px;'; |
|
90 | 85 | var item = revlink.replace(/_STYLE/, nstyle); |
@@ -95,7 +90,8 b' graph.vertex = function(x, y, color, par' | |||
|
95 | 90 | item = item.replace(/_USER/, cur[4]); |
|
96 | 91 | item = item.replace(/_DATE/, cur[5]); |
|
97 | 92 | item = item.replace(/_TAGS/, cur[7].join(' ')); |
|
98 | nodes.innerHTML += item; | |
|
93 | ||
|
94 | return [bg, item]; | |
|
99 | 95 | |
|
100 | 96 | } |
|
101 | 97 |
@@ -59,9 +59,6 b' graph.edge = function(x0, y0, x1, y1, co' | |||
|
59 | 59 | |
|
60 | 60 | } |
|
61 | 61 | |
|
62 | var nodes = document.getElementById('graphnodes'); | |
|
63 | var nodebgs = document.getElementById('nodebgs'); | |
|
64 | ||
|
65 | 62 | var revlink = '<li style="_STYLE"><span class="desc">'; |
|
66 | 63 | revlink += '<a class="list" href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID"><b>_DESC</b></a>'; |
|
67 | 64 | revlink += '</span> _TAGS'; |
@@ -75,8 +72,6 b' graph.vertex = function(x, y, color, par' | |||
|
75 | 72 | this.ctx.fill(); |
|
76 | 73 | |
|
77 | 74 | var bg = '<li class="bg parity' + parity + '"></li>'; |
|
78 | nodebgs.innerHTML += bg; | |
|
79 | ||
|
80 | 75 | var left = (this.columns + 1) * this.bg_height; |
|
81 | 76 | var nstyle = 'padding-left: ' + left + 'px;'; |
|
82 | 77 | var item = revlink.replace(/_STYLE/, nstyle); |
@@ -107,7 +102,7 b' graph.vertex = function(x, y, color, par' | |||
|
107 | 102 | } |
|
108 | 103 | |
|
109 | 104 | item = item.replace(/_TAGS/, tagspan); |
|
110 | nodes.innerHTML += item; | |
|
105 | return [bg, item]; | |
|
111 | 106 | |
|
112 | 107 | } |
|
113 | 108 |
@@ -52,9 +52,6 b' graph.edge = function(x0, y0, x1, y1, co' | |||
|
52 | 52 | |
|
53 | 53 | } |
|
54 | 54 | |
|
55 | var nodes = document.getElementById('graphnodes'); | |
|
56 | var nodebgs = document.getElementById('nodebgs'); | |
|
57 | ||
|
58 | 55 | var revlink = '<li style="_STYLE"><span class="desc">'; |
|
59 | 56 | revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>'; |
|
60 | 57 | revlink += '</span><span class="info">_DATE ago, by _USER</span></li>'; |
@@ -67,8 +64,6 b' graph.vertex = function(x, y, color, par' | |||
|
67 | 64 | this.ctx.fill(); |
|
68 | 65 | |
|
69 | 66 | var bg = '<li class="bg parity' + parity + '"></li>'; |
|
70 | nodebgs.innerHTML += bg; | |
|
71 | ||
|
72 | 67 | var left = (this.columns + 1) * this.bg_height; |
|
73 | 68 | var nstyle = 'padding-left: ' + left + 'px;'; |
|
74 | 69 | var item = revlink.replace(/_STYLE/, nstyle); |
@@ -78,7 +73,8 b' graph.vertex = function(x, y, color, par' | |||
|
78 | 73 | item = item.replace(/_DESC/, cur[3]); |
|
79 | 74 | item = item.replace(/_USER/, cur[4]); |
|
80 | 75 | item = item.replace(/_DATE/, cur[5]); |
|
81 | nodes.innerHTML += item; | |
|
76 | ||
|
77 | return [bg, item]; | |
|
82 | 78 | |
|
83 | 79 | } |
|
84 | 80 |
@@ -75,6 +75,9 b' function Graph() {' | |||
|
75 | 75 | |
|
76 | 76 | this.render = function(data) { |
|
77 | 77 | |
|
78 | var backgrounds = ''; | |
|
79 | var nodedata = ''; | |
|
80 | ||
|
78 | 81 | for (var i in data) { |
|
79 | 82 | |
|
80 | 83 | var parity = i % 2; |
@@ -118,12 +121,17 b' function Graph() {' | |||
|
118 | 121 | radius = this.box_size / 8; |
|
119 | 122 | x = this.cell[0] + this.box_size * column + this.box_size / 2; |
|
120 | 123 | y = this.bg[1] - this.bg_height / 2; |
|
121 | this.vertex(x, y, color, parity, cur); | |
|
124 | var add = this.vertex(x, y, color, parity, cur); | |
|
125 | backgrounds += add[0]; | |
|
126 | nodedata += add[1]; | |
|
122 | 127 | |
|
123 | 128 | if (fold) this.columns -= 1; |
|
124 | 129 | |
|
125 | 130 | } |
|
126 | 131 | |
|
132 | document.getElementById('nodebgs').innerHTML += backgrounds; | |
|
133 | document.getElementById('graphnodes').innerHTML += nodedata; | |
|
134 | ||
|
127 | 135 | } |
|
128 | 136 | |
|
129 | 137 | } |
General Comments 0
You need to be logged in to leave comments.
Login now