Mercurial > kallithea
annotate rhodecode/templates/changelog/changelog.html @ 1872:6300364efc35 beta
changelog: expand clipped messages on click (graph part todo)
author | Aras Pranckevicius <aras@unity3d.com> |
---|---|
date | Mon, 09 Jan 2012 09:01:37 +0200 |
parents | 2a159aa3ed2d |
children | 303ef179f750 |
rev | line source |
---|---|
421
cbfb853a0a4c
fixed bug when author had " in name, thus breaking the javascript data format
Marcin Kuzminski <marcin@python-works.com>
parents:
401
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
cbfb853a0a4c
fixed bug when author had " in name, thus breaking the javascript data format
Marcin Kuzminski <marcin@python-works.com>
parents:
401
diff
changeset
|
2 |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 <%inherit file="/base/base.html"/> |
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 |
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 <%def name="title()"> |
619
a1ec653f5f95
#38 updated RhodeCode titles
Marcin Kuzminski <marcin@python-works.com>
parents:
566
diff
changeset
|
6 ${c.repo_name} ${_('Changelog')} - ${c.rhodecode_name} |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
8 |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
9 <%def name="breadcrumbs_links()"> |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 ${h.link_to(u'Home',h.url('/'))} |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
11 » |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
13 » |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
14 ${_('Changelog')} - ${_('showing ')} ${c.size if c.size <= c.total_cs else c.total_cs} ${_('out of')} ${c.total_cs} ${_('revisions')} |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
15 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
16 |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
17 <%def name="page_nav()"> |
193
50a39f923f31
Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
143
diff
changeset
|
18 ${self.menu('changelog')} |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
19 </%def> |
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 |
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 <%def name="main()"> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
22 <div class="box"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
23 <!-- box / title --> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
24 <div class="title"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
25 ${self.breadcrumbs()} |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
26 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
27 <div class="table"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
28 % if c.pagination: |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
29 <div id="graph"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
30 <div id="graph_nodes"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
31 <canvas id="graph_canvas"></canvas> |
193
50a39f923f31
Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
143
diff
changeset
|
32 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
33 <div id="graph_content"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
34 <div class="container_header"> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
35 ${h.form(h.url.current(),method='get')} |
1656
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
36 <div class="info_box" style="float:left"> |
1756 | 37 ${h.submit('set',_('Show'),class_="ui-btn")} |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
38 ${h.text('size',size=1,value=c.size)} |
1850
c4ff52b0d112
changelog: more commits by default; tweak top header layout
Aras Pranckevicius <aras@unity3d.com>
parents:
1849
diff
changeset
|
39 ${_('revisions')} |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
40 </div> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
41 ${h.end_form()} |
1850
c4ff52b0d112
changelog: more commits by default; tweak top header layout
Aras Pranckevicius <aras@unity3d.com>
parents:
1849
diff
changeset
|
42 <div id="rev_range_container" style="display:none"></div> |
1656
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
43 <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
44 </div> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
45 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
46 %for cnt,cs in enumerate(c.pagination): |
1853
8fe1a141de02
changelog: more polish
Aras Pranckevicius <aras@unity3d.com>
parents:
1850
diff
changeset
|
47 <div id="chg_${cnt+1}" class="container ${'tablerow1' if cnt%2==0 else 'tablerow2'}"> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
48 <div class="left"> |
1853
8fe1a141de02
changelog: more polish
Aras Pranckevicius <aras@unity3d.com>
parents:
1850
diff
changeset
|
49 <div> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
50 ${h.checkbox(cs.short_id,class_="changeset_range")} |
1861 | 51 <span class="tooltip" title="${cs.date}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
52 </div> |
401
b1debb6c5a09
implemented gravatars to changesets, updated styling for changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
362
diff
changeset
|
53 <div class="author"> |
b1debb6c5a09
implemented gravatars to changesets, updated styling for changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
362
diff
changeset
|
54 <div class="gravatar"> |
1463
51063deaceb9
fixed chrome DAG graph rendering issue
Marcin Kuzminski <marcin@python-works.com>
parents:
1436
diff
changeset
|
55 <img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),16)}"/> |
401
b1debb6c5a09
implemented gravatars to changesets, updated styling for changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
362
diff
changeset
|
56 </div> |
1764
39b49c999efb
fixes issue #320.
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
57 <div title="${cs.author}" class="user">${h.person(cs.author)}</div> |
401
b1debb6c5a09
implemented gravatars to changesets, updated styling for changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
362
diff
changeset
|
58 </div> |
1849
162300a90342
changelog: making less noisy
Aras Pranckevicius <aras@unity3d.com>
parents:
1764
diff
changeset
|
59 </div> |
162300a90342
changelog: making less noisy
Aras Pranckevicius <aras@unity3d.com>
parents:
1764
diff
changeset
|
60 <div class="mid"> |
636
ffd07396d315
Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents:
619
diff
changeset
|
61 <div class="message">${h.link_to(h.wrap_paragraphs(cs.message),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
62 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
63 <div class="right"> |
1431
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
64 <div id="${cs.raw_id}_changes_info" class="changes"> |
1436
88d13c1c6a55
removed users_group controller in replace for model methods,
Marcin Kuzminski <marcin@python-works.com>
parents:
1431
diff
changeset
|
65 <span id="${cs.raw_id}" class="changed_total tooltip" title="${_('Affected number of files, click to show more details')}">${len(cs.affected_files)}</span> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
66 </div> |
1856
0855c64c571f
css: merge/branch/tag blurbs
Aras Pranckevicius <aras@unity3d.com>
parents:
1853
diff
changeset
|
67 %if cs.parents: |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
68 %for p_cs in reversed(cs.parents): |
1853
8fe1a141de02
changelog: more polish
Aras Pranckevicius <aras@unity3d.com>
parents:
1850
diff
changeset
|
69 <div class="parent">${_('Parent')} |
8fe1a141de02
changelog: more polish
Aras Pranckevicius <aras@unity3d.com>
parents:
1850
diff
changeset
|
70 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), |
8fe1a141de02
changelog: more polish
Aras Pranckevicius <aras@unity3d.com>
parents:
1850
diff
changeset
|
71 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
72 </div> |
526
804a14e086dc
added tags/branches icons in changelog and moved them to right to save some space
Marcin Kuzminski <marcin@python-works.com>
parents:
512
diff
changeset
|
73 %endfor |
566
7fcc539e20b1
large initial commits fixup
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
74 %else: |
7fcc539e20b1
large initial commits fixup
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
75 <div class="parent">${_('No parents')}</div> |
7fcc539e20b1
large initial commits fixup
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
76 %endif |
7fcc539e20b1
large initial commits fixup
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
77 |
526
804a14e086dc
added tags/branches icons in changelog and moved them to right to save some space
Marcin Kuzminski <marcin@python-works.com>
parents:
512
diff
changeset
|
78 <span class="logtags"> |
1856
0855c64c571f
css: merge/branch/tag blurbs
Aras Pranckevicius <aras@unity3d.com>
parents:
1853
diff
changeset
|
79 %if len(cs.parents)>1: |
0855c64c571f
css: merge/branch/tag blurbs
Aras Pranckevicius <aras@unity3d.com>
parents:
1853
diff
changeset
|
80 <span class="merge">${_('merge')}</span> |
0855c64c571f
css: merge/branch/tag blurbs
Aras Pranckevicius <aras@unity3d.com>
parents:
1853
diff
changeset
|
81 %endif |
699
52da7cba88a6
Code refactor for auth func, preparing for ldap support
Marcin Kuzminski <marcin@python-works.com>
parents:
687
diff
changeset
|
82 %if cs.branch: |
527
6d44d3862ec4
fixes #36, removed username, name, lastname, minimal length restrictions,
Marcin Kuzminski <marcin@python-works.com>
parents:
526
diff
changeset
|
83 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
699
52da7cba88a6
Code refactor for auth func, preparing for ldap support
Marcin Kuzminski <marcin@python-works.com>
parents:
687
diff
changeset
|
84 ${h.link_to(cs.branch,h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
52da7cba88a6
Code refactor for auth func, preparing for ldap support
Marcin Kuzminski <marcin@python-works.com>
parents:
687
diff
changeset
|
85 %endif |
526
804a14e086dc
added tags/branches icons in changelog and moved them to right to save some space
Marcin Kuzminski <marcin@python-works.com>
parents:
512
diff
changeset
|
86 %for tag in cs.tags: |
527
6d44d3862ec4
fixes #36, removed username, name, lastname, minimal length restrictions,
Marcin Kuzminski <marcin@python-works.com>
parents:
526
diff
changeset
|
87 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
636
ffd07396d315
Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents:
619
diff
changeset
|
88 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
526
804a14e086dc
added tags/branches icons in changelog and moved them to right to save some space
Marcin Kuzminski <marcin@python-works.com>
parents:
512
diff
changeset
|
89 %endfor |
804a14e086dc
added tags/branches icons in changelog and moved them to right to save some space
Marcin Kuzminski <marcin@python-works.com>
parents:
512
diff
changeset
|
90 </span> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
91 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
92 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
93 |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
94 %endfor |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
95 <div class="pagination-wh pagination-left"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
96 ${c.pagination.pager('$link_previous ~2~ $link_next')} |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
97 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
98 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
99 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
100 |
1050
cabe887a9829
removed obsolete _static flag from url, and fixed urls in webhelpers
Marcin Kuzminski <marcin@python-works.com>
parents:
1048
diff
changeset
|
101 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
102 <script type="text/javascript"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
103 YAHOO.util.Event.onDOMReady(function(){ |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
104 |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
105 //Monitor range checkboxes and build a link to changesets |
1431
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
106 //ranges |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
107 var checkboxes = YUD.getElementsByClassName('changeset_range'); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
108 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
109 YUE.on(checkboxes,'click',function(e){ |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
110 var checked_checkboxes = []; |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
111 for (pos in checkboxes){ |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
112 if(checkboxes[pos].checked){ |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
113 checked_checkboxes.push(checkboxes[pos]); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
114 } |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
115 } |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
116 if(checked_checkboxes.length>1){ |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
117 var rev_end = checked_checkboxes[0].name; |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
118 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
119 |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
120 var url = url_tmpl.replace('__REVRANGE__', |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
121 rev_start+'...'+rev_end); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
122 |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
123 var link = "<a href="+url+">${_('Show selected changes __S -> __E')}</a>" |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
124 link = link.replace('__S',rev_start); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
125 link = link.replace('__E',rev_end); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
126 YUD.get('rev_range_container').innerHTML = link; |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
127 YUD.setStyle('rev_range_container','display',''); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
128 } |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
129 else{ |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
130 YUD.setStyle('rev_range_container','display','none'); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
131 |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
132 } |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
133 }); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
134 |
1656
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
135 // Fetch changeset details |
1431
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
136 YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ |
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
137 var id = e.currentTarget.id |
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
138 var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}" |
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
139 var url = url.replace('__CS__',id); |
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
140 ypjax(url,id+'_changes_info',function(){tooltip_activate()}); |
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
141 }); |
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
142 |
1656
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
143 // change branch filter |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
144 YUE.on(YUD.get('branch_filter'),'change',function(e){ |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
145 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
146 console.log(selected_branch); |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
147 var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
148 var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
149 var url = url.replace('__BRANCH__',selected_branch); |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
150 if(selected_branch != ''){ |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
151 window.location = url; |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
152 }else{ |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
153 window.location = url_main; |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
154 } |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
155 |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
156 }); |
1431
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
157 |
1872
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
158 // Expand long messages on click |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
159 var messages = YUD.getElementsByClassName('message'); |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
160 for (idx in messages) { |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
161 var msg = messages[idx]; |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
162 // would the message be clipped? |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
163 if (msg.scrollHeight > msg.parentNode.parentNode.offsetHeight) |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
164 { |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
165 msg.style.cursor = 's-resize'; |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
166 msg.onclick = function() { |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
167 this.parentNode.parentNode.style.height = 'auto'; |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
168 } |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
169 } |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
170 } |
6300364efc35
changelog: expand clipped messages on click (graph part todo)
Aras Pranckevicius <aras@unity3d.com>
parents:
1862
diff
changeset
|
171 |
1429
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
172 function set_canvas(heads) { |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
173 var c = document.getElementById('graph_nodes'); |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
174 var t = document.getElementById('graph_content'); |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
175 canvas = document.getElementById('graph_canvas'); |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
176 var div_h = t.clientHeight; |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
177 c.style.height=div_h+'px'; |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
178 canvas.setAttribute('height',div_h); |
1429
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
179 c.style.height=max_w+'px'; |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
180 canvas.setAttribute('width',max_w); |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
181 }; |
1429
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
182 var heads = 1; |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
183 var max_heads = 0; |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
184 var jsdata = ${c.jsdata|n}; |
1429
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
185 |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
186 for( var i=0;i<jsdata.length;i++){ |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
187 var m = Math.max.apply(Math, jsdata[i][1]); |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
188 if (m>max_heads){ |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
189 max_heads = m; |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
190 } |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
191 } |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
192 var max_w = Math.max(100,max_heads*25); |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
193 set_canvas(max_w); |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
194 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
195 var r = new BranchRenderer(); |
1429
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
196 r.render(jsdata,max_w); |
1656
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
197 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
198 }); |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
199 </script> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
200 %else: |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
201 ${_('There are no changes yet')} |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
202 %endif |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
203 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
204 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
205 </%def> |