##// END OF EJS Templates
fixes issue #159, thanks to Thomas Waldmann
marcink -
r1240:2c558e22 beta
parent child Browse files
Show More
@@ -1,703 +1,704 b''
1 1 <%inherit file="/base/base.html"/>
2 2
3 3 <%def name="title()">
4 4 ${c.repo_name} ${_('Summary')} - ${c.rhodecode_name}
5 5 </%def>
6 6
7 7 <%def name="breadcrumbs_links()">
8 8 ${h.link_to(u'Home',h.url('/'))}
9 9 &raquo;
10 10 ${h.link_to(c.dbrepo.just_name,h.url('summary_home',repo_name=c.repo_name))}
11 11 &raquo;
12 12 ${_('summary')}
13 13 </%def>
14 14
15 15 <%def name="page_nav()">
16 16 ${self.menu('summary')}
17 17 </%def>
18 18
19 19 <%def name="main()">
20 20 <div class="box box-left">
21 21 <!-- box / title -->
22 22 <div class="title">
23 23 ${self.breadcrumbs()}
24 24 </div>
25 25 <!-- end box / title -->
26 26 <div class="form">
27 27 <div class="fields">
28 28
29 29 <div class="field">
30 30 <div class="label">
31 31 <label>${_('Name')}:</label>
32 32 </div>
33 33 <div class="input-short">
34 34 %if c.rhodecode_user.username != 'default':
35 35 %if c.following:
36 36 <span id="follow_toggle" class="following" title="${_('Stop following this repository')}"
37 37 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
38 38 </span>
39 39 %else:
40 40 <span id="follow_toggle" class="follow" title="${_('Start following this repository')}"
41 41 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
42 42 </span>
43 43 %endif
44 44 %endif:
45 45
46 46 ##REPO TYPE
47 47 %if c.dbrepo.repo_type =='hg':
48 48 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/>
49 49 %endif
50 50 %if c.dbrepo.repo_type =='git':
51 51 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/>
52 52 %endif
53 53
54 54 ##PUBLIC/PRIVATE
55 55 %if c.dbrepo.private:
56 56 <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url("/images/icons/lock.png")}"/>
57 57 %else:
58 58 <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url("/images/icons/lock_open.png")}"/>
59 59 %endif
60 60
61 61 ##REPO NAME
62 62 <span style="font-size: 1.6em;font-weight: bold;vertical-align: baseline;clear:right">${h.repo_link(c.dbrepo.groups_and_repo)}</span>
63 63
64 64 ##FORK
65 65 %if c.dbrepo.fork:
66 66 <div style="margin-top:5px;clear:both"">
67 67 <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}">
68 68 <img class="icon" alt="${_('public')}"
69 69 title="${_('Fork of')} ${c.dbrepo.fork.repo_name}"
70 70 src="${h.url("/images/icons/arrow_divide.png")}"/>
71 71 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
72 72 </a>
73 73 </div>
74 74 %endif
75 75 ##REMOTE
76 76 %if c.dbrepo.clone_uri:
77 77 <div style="margin-top:5px;clear:both">
78 78 <a href="${h.url(str(c.dbrepo.clone_uri))}">
79 79 <img class="icon" alt="${_('remote clone')}"
80 80 title="${_('Clone from')} ${c.dbrepo.clone_uri}"
81 81 src="${h.url("/images/icons/connect.png")}"/>
82 82 ${_('Clone from')} ${c.dbrepo.clone_uri}
83 83 </a>
84 84 </div>
85 85 %endif
86 86 </div>
87 87 </div>
88 88
89 89
90 90 <div class="field">
91 91 <div class="label">
92 92 <label>${_('Description')}:</label>
93 93 </div>
94 94 <div class="input-short">
95 95 ${c.dbrepo.description}
96 96 </div>
97 97 </div>
98 98
99 99
100 100 <div class="field">
101 101 <div class="label">
102 102 <label>${_('Contact')}:</label>
103 103 </div>
104 104 <div class="input-short">
105 105 <div class="gravatar">
106 106 <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/>
107 107 </div>
108 108 ${_('Username')}: ${c.dbrepo.user.username}<br/>
109 109 ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/>
110 110 ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a>
111 111 </div>
112 112 </div>
113 113
114 114 <div class="field">
115 115 <div class="label">
116 116 <label>${_('Last change')}:</label>
117 117 </div>
118 118 <div class="input-short">
119 119 <b>${'r%s:%s' % (h.get_changeset_safe(c.rhodecode_repo,'tip').revision,
120 120 h.get_changeset_safe(c.rhodecode_repo,'tip').short_id)}</b> -
121 121 <span class="tooltip" title="${c.rhodecode_repo.last_change}">
122 122 ${h.age(c.rhodecode_repo.last_change)}</span><br/>
123 123 ${_('by')} ${h.get_changeset_safe(c.rhodecode_repo,'tip').author}
124 124
125 125 </div>
126 126 </div>
127 127
128 128 <div class="field">
129 129 <div class="label">
130 130 <label>${_('Clone url')}:</label>
131 131 </div>
132 132 <div class="input-short">
133 133 <input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/>
134 134 </div>
135 135 </div>
136 136
137 137 <div class="field">
138 138 <div class="label">
139 139 <label>${_('Trending source files')}:</label>
140 140 </div>
141 141 <div class="input-short">
142 142 <div id="lang_stats"></div>
143 143 </div>
144 144 </div>
145 145
146 146 <div class="field">
147 147 <div class="label">
148 148 <label>${_('Download')}:</label>
149 149 </div>
150 150 <div class="input-short">
151 151 %if len(c.rhodecode_repo.revisions) == 0:
152 152 ${_('There are no downloads yet')}
153 153 %elif c.enable_downloads is False:
154 154 ${_('Downloads are disabled for this repository')}
155 155 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
156 156 [${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name))}]
157 157 %endif
158 158 %else:
159 159 ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)}
160 160 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
161 161 %if cnt >=1:
162 162 |
163 163 %endif
164 164 <span class="tooltip" title="${_('Download %s as %s') %('tip',archive['type'])}"
165 165 id="${archive['type']+'_link'}">${h.link_to(archive['type'],
166 166 h.url('files_archive_home',repo_name=c.dbrepo.repo_name,
167 167 fname='tip'+archive['extension']),class_="archive_icon")}</span>
168 168 %endfor
169 169 %endif
170 170 </div>
171 171 </div>
172 172
173 173 <div class="field">
174 174 <div class="label">
175 175 <label>${_('Feeds')}:</label>
176 176 </div>
177 177 <div class="input-short">
178 178 %if c.rhodecode_user.username != 'default':
179 179 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='rss_icon')}
180 180 ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='atom_icon')}
181 181 %else:
182 182 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name),class_='rss_icon')}
183 183 ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')}
184 184 %endif
185 185 </div>
186 186 </div>
187 187 </div>
188 188 </div>
189 189 <script type="text/javascript">
190 190 YUE.onDOMReady(function(e){
191 191 id = 'clone_url';
192 192 YUE.on(id,'click',function(e){
193 193 YUD.get('clone_url').select();
194 194 })
195 195 })
196 196 var data = ${c.trending_languages|n};
197 197 var total = 0;
198 198 var no_data = true;
199 199 for (k in data){
200 200 total += data[k];
201 201 no_data = false;
202 202 }
203 203 var tbl = document.createElement('table');
204 204 tbl.setAttribute('class','trending_language_tbl');
205 205 var cnt =0;
206 206 for (k in data){
207 207 cnt+=1;
208 208 var hide = cnt>2;
209 209 var tr = document.createElement('tr');
210 210 if (hide){
211 211 tr.setAttribute('style','display:none');
212 212 tr.setAttribute('class','stats_hidden');
213 213 }
214 214 var percentage = Math.round((data[k]/total*100),2);
215 215 var value = data[k];
216 216 var td1 = document.createElement('td');
217 217 td1.width=150;
218 218 var trending_language_label = document.createElement('div');
219 219 trending_language_label.innerHTML = k;
220 220 td1.appendChild(trending_language_label);
221 221
222 222 var td2 = document.createElement('td');
223 223 td2.setAttribute('style','padding-right:14px !important');
224 224 var trending_language = document.createElement('div');
225 225 var nr_files = value+" ${_('files')}";
226 226
227 227 trending_language.title = k+" "+nr_files;
228 228
229 229 if (percentage>20){
230 230 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
231 231 }
232 232 else{
233 233 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
234 234 }
235 235
236 236 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
237 237 trending_language.style.width=percentage+"%";
238 238 td2.appendChild(trending_language);
239 239
240 240 tr.appendChild(td1);
241 241 tr.appendChild(td2);
242 242 tbl.appendChild(tr);
243 243 if(cnt == 2){
244 244 var show_more = document.createElement('tr');
245 245 var td=document.createElement('td');
246 246 lnk = document.createElement('a');
247 247 lnk.href='#';
248 248 lnk.innerHTML = "${_("show more")}";
249 249 lnk.id='code_stats_show_more';
250 250 td.appendChild(lnk);
251 251 show_more.appendChild(td);
252 252 show_more.appendChild(document.createElement('td'));
253 253 tbl.appendChild(show_more);
254 254 }
255 255
256 256 }
257 257 if(no_data){
258 258 var tr = document.createElement('tr');
259 259 var td1 = document.createElement('td');
260 260 td1.innerHTML = "${c.no_data_msg}";
261 261 tr.appendChild(td1);
262 262 tbl.appendChild(tr);
263 263 }
264 264 YUD.get('lang_stats').appendChild(tbl);
265 265 YUE.on('code_stats_show_more','click',function(){
266 266 l = YUD.getElementsByClassName('stats_hidden')
267 267 for (e in l){
268 268 YUD.setStyle(l[e],'display','');
269 269 };
270 270 YUD.setStyle(YUD.get('code_stats_show_more'),
271 271 'display','none');
272 272 })
273 273
274 274
275 275 YUE.on('download_options','change',function(e){
276 276 var new_cs = e.target.options[e.target.selectedIndex];
277 277 var tmpl_links = {}
278 278 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
279 279 tmpl_links['${archive['type']}'] = '${h.link_to(archive['type'],
280 280 h.url('files_archive_home',repo_name=c.dbrepo.repo_name,
281 281 fname='__CS__'+archive['extension']),class_="archive_icon")}';
282 282 %endfor
283 283
284 284
285 285 for(k in tmpl_links){
286 286 var s = YUD.get(k+'_link')
287 title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__',archive['type'])}";
288 s.title = title_tmpl.replace('__CS_NAME__',new_cs.text)
287 title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
288 s.title = title_tmpl.replace('__CS_NAME__',new_cs.text);
289 s.title = s.title.replace('__CS_EXT__',k);
289 290 s.innerHTML = tmpl_links[k].replace('__CS__',new_cs.value);
290 291 }
291 292
292 293 })
293 294
294 295 </script>
295 296 </div>
296 297
297 298 <div class="box box-right" style="min-height:455px">
298 299 <!-- box / title -->
299 300 <div class="title">
300 301 <h5>${_('Commit activity by day / author')}</h5>
301 302 </div>
302 303
303 304 <div class="table">
304 305 <div style="padding:0 10px 10px 15px;font-size: 1.2em;">
305 306 %if c.no_data:
306 307 ${c.no_data_msg}
307 308 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
308 309 [${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name))}]
309 310 %endif
310 311
311 312 %else:
312 313 ${_('Loaded in')} ${c.stats_percentage} %
313 314 %endif
314 315 </div>
315 316 <div id="commit_history" style="width:460px;height:300px;float:left"></div>
316 317 <div style="clear: both;height: 10px"></div>
317 318 <div id="overview" style="width:460px;height:100px;float:left"></div>
318 319
319 320 <div id="legend_data" style="clear:both;margin-top:10px;">
320 321 <div id="legend_container"></div>
321 322 <div id="legend_choices">
322 323 <table id="legend_choices_tables" style="font-size:smaller;color:#545454"></table>
323 324 </div>
324 325 </div>
325 326 <script type="text/javascript">
326 327 /**
327 328 * Plots summary graph
328 329 *
329 330 * @class SummaryPlot
330 331 * @param {from} initial from for detailed graph
331 332 * @param {to} initial to for detailed graph
332 333 * @param {dataset}
333 334 * @param {overview_dataset}
334 335 */
335 336 function SummaryPlot(from,to,dataset,overview_dataset) {
336 337 var initial_ranges = {
337 338 "xaxis":{
338 339 "from":from,
339 340 "to":to,
340 341 },
341 342 };
342 343 var dataset = dataset;
343 344 var overview_dataset = [overview_dataset];
344 345 var choiceContainer = YUD.get("legend_choices");
345 346 var choiceContainerTable = YUD.get("legend_choices_tables");
346 347 var plotContainer = YUD.get('commit_history');
347 348 var overviewContainer = YUD.get('overview');
348 349
349 350 var plot_options = {
350 351 bars: {show:true,align:'center',lineWidth:4},
351 352 legend: {show:true, container:"legend_container"},
352 353 points: {show:true,radius:0,fill:false},
353 354 yaxis: {tickDecimals:0,},
354 355 xaxis: {
355 356 mode: "time",
356 357 timeformat: "%d/%m",
357 358 min:from,
358 359 max:to,
359 360 },
360 361 grid: {
361 362 hoverable: true,
362 363 clickable: true,
363 364 autoHighlight:true,
364 365 color: "#999"
365 366 },
366 367 //selection: {mode: "x"}
367 368 };
368 369 var overview_options = {
369 370 legend:{show:false},
370 371 bars: {show:true,barWidth: 2,},
371 372 shadowSize: 0,
372 373 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
373 374 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
374 375 grid: {color: "#999",},
375 376 selection: {mode: "x"}
376 377 };
377 378
378 379 /**
379 380 *get dummy data needed in few places
380 381 */
381 382 function getDummyData(label){
382 383 return {"label":label,
383 384 "data":[{"time":0,
384 385 "commits":0,
385 386 "added":0,
386 387 "changed":0,
387 388 "removed":0,
388 389 }],
389 390 "schema":["commits"],
390 391 "color":'#ffffff',
391 392 }
392 393 }
393 394
394 395 /**
395 396 * generate checkboxes accordindly to data
396 397 * @param keys
397 398 * @returns
398 399 */
399 400 function generateCheckboxes(data) {
400 401 //append checkboxes
401 402 var i = 0;
402 403 choiceContainerTable.innerHTML = '';
403 404 for(var pos in data) {
404 405
405 406 data[pos].color = i;
406 407 i++;
407 408 if(data[pos].label != ''){
408 409 choiceContainerTable.innerHTML += '<tr><td>'+
409 410 '<input type="checkbox" name="' + data[pos].label +'" checked="checked" />'
410 411 +data[pos].label+
411 412 '</td></tr>';
412 413 }
413 414 }
414 415 }
415 416
416 417 /**
417 418 * ToolTip show
418 419 */
419 420 function showTooltip(x, y, contents) {
420 421 var div=document.getElementById('tooltip');
421 422 if(!div) {
422 423 div = document.createElement('div');
423 424 div.id="tooltip";
424 425 div.style.position="absolute";
425 426 div.style.border='1px solid #fdd';
426 427 div.style.padding='2px';
427 428 div.style.backgroundColor='#fee';
428 429 document.body.appendChild(div);
429 430 }
430 431 YUD.setStyle(div, 'opacity', 0);
431 432 div.innerHTML = contents;
432 433 div.style.top=(y + 5) + "px";
433 434 div.style.left=(x + 5) + "px";
434 435
435 436 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
436 437 anim.animate();
437 438 }
438 439
439 440 /**
440 441 * This function will detect if selected period has some changesets
441 442 for this user if it does this data is then pushed for displaying
442 443 Additionally it will only display users that are selected by the checkbox
443 444 */
444 445 function getDataAccordingToRanges(ranges) {
445 446
446 447 var data = [];
447 448 var keys = [];
448 449 for(var key in dataset){
449 450 var push = false;
450 451
451 452 //method1 slow !!
452 453 //*
453 454 for(var ds in dataset[key].data){
454 455 commit_data = dataset[key].data[ds];
455 456 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
456 457 push = true;
457 458 break;
458 459 }
459 460 }
460 461 //*/
461 462
462 463 /*//method2 sorted commit data !!!
463 464
464 465 var first_commit = dataset[key].data[0].time;
465 466 var last_commit = dataset[key].data[dataset[key].data.length-1].time;
466 467
467 468 if (first_commit >= ranges.xaxis.from && last_commit <= ranges.xaxis.to){
468 469 push = true;
469 470 }
470 471 //*/
471 472
472 473 if(push){
473 474 data.push(dataset[key]);
474 475 }
475 476 }
476 477 if(data.length >= 1){
477 478 return data;
478 479 }
479 480 else{
480 481 //just return dummy data for graph to plot itself
481 482 return [getDummyData('')];
482 483 }
483 484
484 485 }
485 486
486 487 /**
487 488 * redraw using new checkbox data
488 489 */
489 490 function plotchoiced(e,args){
490 491 var cur_data = args[0];
491 492 var cur_ranges = args[1];
492 493
493 494 var new_data = [];
494 495 var inputs = choiceContainer.getElementsByTagName("input");
495 496
496 497 //show only checked labels
497 498 for(var i=0; i<inputs.length; i++) {
498 499 var checkbox_key = inputs[i].name;
499 500
500 501 if(inputs[i].checked){
501 502 for(var d in cur_data){
502 503 if(cur_data[d].label == checkbox_key){
503 504 new_data.push(cur_data[d]);
504 505 }
505 506 }
506 507 }
507 508 else{
508 509 //push dummy data to not hide the label
509 510 new_data.push(getDummyData(checkbox_key));
510 511 }
511 512 }
512 513
513 514 var new_options = YAHOO.lang.merge(plot_options, {
514 515 xaxis: {
515 516 min: cur_ranges.xaxis.from,
516 517 max: cur_ranges.xaxis.to,
517 518 mode:"time",
518 519 timeformat: "%d/%m",
519 520 },
520 521 });
521 522 if (!new_data){
522 523 new_data = [[0,1]];
523 524 }
524 525 // do the zooming
525 526 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
526 527
527 528 plot.subscribe("plotselected", plotselected);
528 529
529 530 //resubscribe plothover
530 531 plot.subscribe("plothover", plothover);
531 532
532 533 // don't fire event on the overview to prevent eternal loop
533 534 overview.setSelection(cur_ranges, true);
534 535
535 536 }
536 537
537 538 /**
538 539 * plot only selected items from overview
539 540 * @param ranges
540 541 * @returns
541 542 */
542 543 function plotselected(ranges,cur_data) {
543 544 //updates the data for new plot
544 545 data = getDataAccordingToRanges(ranges);
545 546 generateCheckboxes(data);
546 547
547 548 var new_options = YAHOO.lang.merge(plot_options, {
548 549 xaxis: {
549 550 min: ranges.xaxis.from,
550 551 max: ranges.xaxis.to,
551 552 mode:"time",
552 553 timeformat: "%d/%m",
553 554 },
554 555 yaxis: {
555 556 min: ranges.yaxis.from,
556 557 max: ranges.yaxis.to,
557 558 },
558 559
559 560 });
560 561 // do the zooming
561 562 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
562 563
563 564 plot.subscribe("plotselected", plotselected);
564 565
565 566 //resubscribe plothover
566 567 plot.subscribe("plothover", plothover);
567 568
568 569 // don't fire event on the overview to prevent eternal loop
569 570 overview.setSelection(ranges, true);
570 571
571 572 //resubscribe choiced
572 573 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
573 574 }
574 575
575 576 var previousPoint = null;
576 577
577 578 function plothover(o) {
578 579 var pos = o.pos;
579 580 var item = o.item;
580 581
581 582 //YUD.get("x").innerHTML = pos.x.toFixed(2);
582 583 //YUD.get("y").innerHTML = pos.y.toFixed(2);
583 584 if (item) {
584 585 if (previousPoint != item.datapoint) {
585 586 previousPoint = item.datapoint;
586 587
587 588 var tooltip = YUD.get("tooltip");
588 589 if(tooltip) {
589 590 tooltip.parentNode.removeChild(tooltip);
590 591 }
591 592 var x = item.datapoint.x.toFixed(2);
592 593 var y = item.datapoint.y.toFixed(2);
593 594
594 595 if (!item.series.label){
595 596 item.series.label = 'commits';
596 597 }
597 598 var d = new Date(x*1000);
598 599 var fd = d.toDateString()
599 600 var nr_commits = parseInt(y);
600 601
601 602 var cur_data = dataset[item.series.label].data[item.dataIndex];
602 603 var added = cur_data.added;
603 604 var changed = cur_data.changed;
604 605 var removed = cur_data.removed;
605 606
606 607 var nr_commits_suffix = " ${_('commits')} ";
607 608 var added_suffix = " ${_('files added')} ";
608 609 var changed_suffix = " ${_('files changed')} ";
609 610 var removed_suffix = " ${_('files removed')} ";
610 611
611 612
612 613 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
613 614 if(added==1){added_suffix=" ${_('file added')} ";}
614 615 if(changed==1){changed_suffix=" ${_('file changed')} ";}
615 616 if(removed==1){removed_suffix=" ${_('file removed')} ";}
616 617
617 618 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
618 619 +'<br/>'+
619 620 nr_commits + nr_commits_suffix+'<br/>'+
620 621 added + added_suffix +'<br/>'+
621 622 changed + changed_suffix + '<br/>'+
622 623 removed + removed_suffix + '<br/>');
623 624 }
624 625 }
625 626 else {
626 627 var tooltip = YUD.get("tooltip");
627 628
628 629 if(tooltip) {
629 630 tooltip.parentNode.removeChild(tooltip);
630 631 }
631 632 previousPoint = null;
632 633 }
633 634 }
634 635
635 636 /**
636 637 * MAIN EXECUTION
637 638 */
638 639
639 640 var data = getDataAccordingToRanges(initial_ranges);
640 641 generateCheckboxes(data);
641 642
642 643 //main plot
643 644 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
644 645
645 646 //overview
646 647 var overview = YAHOO.widget.Flot(overviewContainer, overview_dataset, overview_options);
647 648
648 649 //show initial selection on overview
649 650 overview.setSelection(initial_ranges);
650 651
651 652 plot.subscribe("plotselected", plotselected);
652 653
653 654 overview.subscribe("plotselected", function (ranges) {
654 655 plot.setSelection(ranges);
655 656 });
656 657
657 658 plot.subscribe("plothover", plothover);
658 659
659 660 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
660 661 }
661 662 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
662 663 </script>
663 664
664 665 </div>
665 666 </div>
666 667
667 668 <div class="box">
668 669 <div class="title">
669 670 <div class="breadcrumbs">${h.link_to(_('Shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</div>
670 671 </div>
671 672 <div class="table">
672 673 <div id="shortlog_data">
673 674 <%include file='../shortlog/shortlog_data.html'/>
674 675 </div>
675 676 ##%if c.repo_changesets:
676 677 ## ${h.link_to(_('show more'),h.url('changelog_home',repo_name=c.repo_name))}
677 678 ##%endif
678 679 </div>
679 680 </div>
680 681 <div class="box">
681 682 <div class="title">
682 683 <div class="breadcrumbs">${h.link_to(_('Tags'),h.url('tags_home',repo_name=c.repo_name))}</div>
683 684 </div>
684 685 <div class="table">
685 686 <%include file='../tags/tags_data.html'/>
686 687 %if c.repo_changesets:
687 688 ${h.link_to(_('show more'),h.url('tags_home',repo_name=c.repo_name))}
688 689 %endif
689 690 </div>
690 691 </div>
691 692 <div class="box">
692 693 <div class="title">
693 694 <div class="breadcrumbs">${h.link_to(_('Branches'),h.url('branches_home',repo_name=c.repo_name))}</div>
694 695 </div>
695 696 <div class="table">
696 697 <%include file='../branches/branches_data.html'/>
697 698 %if c.repo_changesets:
698 699 ${h.link_to(_('show more'),h.url('branches_home',repo_name=c.repo_name))}
699 700 %endif
700 701 </div>
701 702 </div>
702 703
703 704 </%def>
General Comments 0
You need to be logged in to leave comments. Login now