annotate rhodecode/templates/changelog/changelog.html @ 3520:bd7c217003cf beta

changelog: let 'Open new pull request' use the currently topmost changeset
author Mads Kiilerich <madski@unity3d.com>
date Fri, 08 Mar 2013 00:51:25 +0100
parents d249fec283ae
children 6e8027c2f49c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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()">
2417
76d156bef5a2 Better i18n for page titles.
Vincent Duvert <vincent@duvert.net>
parents: 2416
diff changeset
6 ${_('%s Changelog') % c.repo_name} - ${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()">
2492
79818f546538 i18n 'Home' in breadcrumbs
Takumi IINO <trot.thunder@gmail.com>
parents: 2443
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 &raquo;
3392
f74be3359044 unified breadcrumbs display
Marcin Kuzminski <marcin@python-works.com>
parents: 3322
diff changeset
12 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
13 &raquo;
2312
f6d57d055d1e Improved i18n on changelog and user group administration pages.
Vincent Duvert <vincent@duvert.net>
parents: 2269
diff changeset
14 <% size = c.size if c.size <= c.total_cs else c.total_cs %>
3392
f74be3359044 unified breadcrumbs display
Marcin Kuzminski <marcin@python-works.com>
parents: 3322
diff changeset
15 ${_('changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)}
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
17
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 <%def name="page_nav()">
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
19 ${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
20 </%def>
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 <%def name="main()">
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
23 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
24 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
25 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
26 ${self.breadcrumbs()}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
27 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
28 <div class="table">
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
29 % if c.pagination:
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
30 <div id="graph">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
31 <div id="graph_nodes">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
32 <canvas id="graph_canvas"></canvas>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
33 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
34 <div id="graph_content">
3485
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
35 <div class="info_box" style="clear: both;padding: 10px 6px;min-height: 12px;text-align: right;">
2885
28d742d71d4e made compare button nicer on changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2773
diff changeset
36 <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a>
2927
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
37 <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
2973
9937afa7f093 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2934
diff changeset
38
2363
745dda7817ed Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
Marcin Kuzminski <marcin@python-works.com>
parents: 2346
diff changeset
39 %if c.rhodecode_db_repo.fork:
3486
2053053e0882 compare/pullrequest: introduce merge parameter
Mads Kiilerich <madski@unity3d.com>
parents: 3485
diff changeset
40 <a id="compare_fork" title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default',merge=1)}" class="ui-btn small">${_('Compare fork with parent')}</a>
2363
745dda7817ed Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
Marcin Kuzminski <marcin@python-works.com>
parents: 2346
diff changeset
41 %endif
2773
1e5996308363 hide open pull request for git repos
Marcin Kuzminski <marcin@python-works.com>
parents: 2744
diff changeset
42 %if h.is_hg(c.rhodecode_repo):
3463
81ea5f73963f changelog: fix invalid url name left over from cherry picking
Mads Kiilerich <madski@unity3d.com>
parents: 3449
diff changeset
43 <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a>
2773
1e5996308363 hide open pull request for git repos
Marcin Kuzminski <marcin@python-works.com>
parents: 2744
diff changeset
44 %endif
2363
745dda7817ed Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
Marcin Kuzminski <marcin@python-works.com>
parents: 2346
diff changeset
45 </div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
46 <div class="container_header">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
47 ${h.form(h.url.current(),method='get')}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
48 <div class="info_box" style="float:left">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
49 ${h.submit('set',_('Show'),class_="ui-btn")}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
50 ${h.text('size',size=1,value=c.size)}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
51 ${_('revisions')}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
52 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
53 ${h.end_form()}
1656
833f9dec0a06 implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents: 1463
diff changeset
54 <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
55 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
56
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
57 %for cnt,cs in enumerate(c.pagination):
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
58 <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
59 <div class="left">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
60 <div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
61 ${h.checkbox(cs.raw_id,class_="changeset_range")}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
62 <span class="tooltip" title="${h.tooltip(h.age(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>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
63 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
64 <div class="author">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
65 <div class="gravatar">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
66 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
67 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
68 <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
69 </div>
2416
44f328d6f209 Added a translatable date formatter for every date displayed.
Vincent Duvert <vincent@duvert.net>
parents: 2342
diff changeset
70 <div class="date">${h.fmt_date(cs.date)}</div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
71 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
72 <div class="mid">
2426
b80c2f617d44 removed wrap paragraphs from commit messages as it broke formatting.
Marcin Kuzminski <marcin@python-works.com>
parents: 2417
diff changeset
73 <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
3445
246ab6d8a0f3 changelog: improve texts and functionality regarding selecting changesets
Mads Kiilerich <madski@unity3d.com>
parents: 3434
diff changeset
74 <div class="expand"><span class="expandtext">&darr; ${_('Show more')} &darr;</span></div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
75 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
76 <div class="right">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
77 <div class="changes">
2744
94886e8432a2 fixed changed details helper
Marcin Kuzminski <marcin@python-works.com>
parents: 2732
diff changeset
78 <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}">${len(cs.affected_files)}</div>
1884
0614862a20ec Added number of comments in changelog for each changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 1882
diff changeset
79 <div class="comments-container">
0614862a20ec Added number of comments in changelog for each changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 1882
diff changeset
80 %if len(c.comments.get(cs.raw_id,[])) > 0:
1885
350d95dece6f ui touch ups
Marcin Kuzminski <marcin@python-works.com>
parents: 1884
diff changeset
81 <div class="comments-cnt" title="${('comments')}">
350d95dece6f ui touch ups
Marcin Kuzminski <marcin@python-works.com>
parents: 1884
diff changeset
82 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}">
350d95dece6f ui touch ups
Marcin Kuzminski <marcin@python-works.com>
parents: 1884
diff changeset
83 <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div>
350d95dece6f ui touch ups
Marcin Kuzminski <marcin@python-works.com>
parents: 1884
diff changeset
84 <img src="${h.url('/images/icons/comments.png')}">
350d95dece6f ui touch ups
Marcin Kuzminski <marcin@python-works.com>
parents: 1884
diff changeset
85 </a>
350d95dece6f ui touch ups
Marcin Kuzminski <marcin@python-works.com>
parents: 1884
diff changeset
86 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
87 %endif
1884
0614862a20ec Added number of comments in changelog for each changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 1882
diff changeset
88 </div>
2217
76947224bf27 Implemented initial code-review status of changesets
Marcin Kuzminski <marcin@python-works.com>
parents: 2215
diff changeset
89 <div class="changeset-status-container">
76947224bf27 Implemented initial code-review status of changesets
Marcin Kuzminski <marcin@python-works.com>
parents: 2215
diff changeset
90 %if c.statuses.get(cs.raw_id):
2239
493e03a4d268 added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2227
diff changeset
91 <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div>
2443
fd0a822481ec - added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
92 <div class="changeset-status-ico">
fd0a822481ec - added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
93 %if c.statuses.get(cs.raw_id)[2]:
3214
54a596abfa65 Show pull request id in tooltip of associated pull request
Marcin Kuzminski <marcin@python-works.com>
parents: 3197
diff changeset
94 <a class="tooltip" title="${_('Click to open associated pull request #%s' % c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a>
2443
fd0a822481ec - added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
95 %else:
fd0a822481ec - added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
96 <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" />
fd0a822481ec - added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
97 %endif
fd0a822481ec - added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
98 </div>
2217
76947224bf27 Implemented initial code-review status of changesets
Marcin Kuzminski <marcin@python-works.com>
parents: 2215
diff changeset
99 %endif
76947224bf27 Implemented initial code-review status of changesets
Marcin Kuzminski <marcin@python-works.com>
parents: 2215
diff changeset
100 </div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
101 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
102 %if cs.parents:
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
103 %for p_cs in reversed(cs.parents):
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
104 <div class="parent">${_('Parent')}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
105 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id),
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
106 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
107 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
108 %endfor
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
109 %else:
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
110 <div class="parent">${_('No parents')}</div>
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
111 %endif
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
112
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
113 <span class="logtags">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
114 %if len(cs.parents)>1:
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
115 <span class="merge">${_('merge')}</span>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
116 %endif
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
117 %if cs.branch:
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
118 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
119 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
2247
99536f257644 #421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2219
diff changeset
120 </span>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
121 %endif
2247
99536f257644 #421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2219
diff changeset
122 %if h.is_hg(c.rhodecode_repo):
99536f257644 #421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2219
diff changeset
123 %for book in cs.bookmarks:
99536f257644 #421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2219
diff changeset
124 <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
99536f257644 #421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2219
diff changeset
125 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
2269
f1467dfcf093 small issue fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2247
diff changeset
126 </span>
f1467dfcf093 small issue fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2247
diff changeset
127 %endfor
2247
99536f257644 #421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2219
diff changeset
128 %endif
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
129 %for tag in cs.tags:
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
130 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
131 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
132 %endfor
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
133 </span>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
134 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
135 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
136
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
137 %endfor
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
138 <div class="pagination-wh pagination-left">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
139 ${c.pagination.pager('$link_previous ~2~ $link_next')}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
140 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
141 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
142 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
143
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
144 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
145 <script type="text/javascript">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
146 YAHOO.util.Event.onDOMReady(function(){
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
147
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
148 //Monitor range checkboxes and build a link to changesets
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
149 //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
150 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
151 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}";
3116
bd8ef7119688 Recreate the pull request URL each time a checkbox is checked
Dan Sheridan <djs@adelard.com>
parents: 3076
diff changeset
152 var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}";
3464
d253f1b530c8 Bugfix: On the changelog page, its possible that some changeset is already checked out by the browser. So we check for that on page load.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3463
diff changeset
153
d253f1b530c8 Bugfix: On the changelog page, its possible that some changeset is already checked out by the browser. So we check for that on page load.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3463
diff changeset
154 var checkbox_checker = function(e){
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
155 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
156 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
157 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
158 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
159 }
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
160 }
2996
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2973
diff changeset
161 if(YUD.get('open_new_pr')){
3519
d249fec283ae changelog: fix page state after clearing selection
Mads Kiilerich <madski@unity3d.com>
parents: 3486
diff changeset
162 if(checked_checkboxes.length>1){
3485
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
163 YUD.setStyle('open_new_pr','display','none');
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
164 } else {
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
165 YUD.setStyle('open_new_pr','display','');
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
166 if(checked_checkboxes.length>0){
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
167 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets'];
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
168 }else{
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
169 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request'];
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
170 }
2996
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2973
diff changeset
171 }
2927
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
172 }
2973
9937afa7f093 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2934
diff changeset
173
3076
5deb16cd2802 fixes #668 cherry picking of changeset should also work now on picking single changesets, and the ones from top
Marcin Kuzminski <marcin@python-works.com>
parents: 3029
diff changeset
174 if(checked_checkboxes.length>0){
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
175 var rev_end = checked_checkboxes[0].name;
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
176 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
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
177 var url = url_tmpl.replace('__REVRANGE__',
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
178 rev_start+'...'+rev_end);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
179
3445
246ab6d8a0f3 changelog: improve texts and functionality regarding selecting changesets
Mads Kiilerich <madski@unity3d.com>
parents: 3434
diff changeset
180 var link = (rev_start == rev_end)
3449
95a226b35b91 codecleaner, fix tabs -> spaces
Marcin Kuzminski <marcin@python-works.com>
parents: 3447
diff changeset
181 ? _TM['Show selected change __S']
95a226b35b91 codecleaner, fix tabs -> spaces
Marcin Kuzminski <marcin@python-works.com>
parents: 3447
diff changeset
182 : _TM['Show selected changes __S -> __E'];
3447
e74557f57f76 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3446
diff changeset
183
2927
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
184 link = link.replace('__S',rev_start.substr(0,6));
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
185 link = link.replace('__E',rev_end.substr(0,6));
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
186 YUD.get('rev_range_container').href = url;
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
187 YUD.get('rev_range_container').innerHTML = link;
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
188 YUD.setStyle('rev_range_container','display','');
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
189 YUD.setStyle('rev_range_clear','display','');
2973
9937afa7f093 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2934
diff changeset
190
3116
bd8ef7119688 Recreate the pull request URL each time a checkbox is checked
Dan Sheridan <djs@adelard.com>
parents: 3076
diff changeset
191 YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end);
3465
df05806e8a2d changelog: "compare fork with parent" should only be shown when no changesets selected
Mads Kiilerich <madski@unity3d.com>
parents: 3464
diff changeset
192 YUD.setStyle('compare_fork','display','none');
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
193 }
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
194 else{
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
195 YUD.setStyle('rev_range_container','display','none');
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
196 YUD.setStyle('rev_range_clear','display','none');
3520
bd7c217003cf changelog: let 'Open new pull request' use the currently topmost changeset
Mads Kiilerich <madski@unity3d.com>
parents: 3519
diff changeset
197 if (checkboxes){
bd7c217003cf changelog: let 'Open new pull request' use the currently topmost changeset
Mads Kiilerich <madski@unity3d.com>
parents: 3519
diff changeset
198 YUD.get('open_new_pr').href = pr_tmpl + '?rev_end={0}'.format(checkboxes[0].name);
bd7c217003cf changelog: let 'Open new pull request' use the currently topmost changeset
Mads Kiilerich <madski@unity3d.com>
parents: 3519
diff changeset
199 }
3465
df05806e8a2d changelog: "compare fork with parent" should only be shown when no changesets selected
Mads Kiilerich <madski@unity3d.com>
parents: 3464
diff changeset
200 YUD.setStyle('compare_fork','display','');
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
201 }
3464
d253f1b530c8 Bugfix: On the changelog page, its possible that some changeset is already checked out by the browser. So we check for that on page load.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3463
diff changeset
202 };
d253f1b530c8 Bugfix: On the changelog page, its possible that some changeset is already checked out by the browser. So we check for that on page load.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3463
diff changeset
203 YUE.onDOMReady(checkbox_checker);
d253f1b530c8 Bugfix: On the changelog page, its possible that some changeset is already checked out by the browser. So we check for that on page load.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3463
diff changeset
204 YUE.on(checkboxes,'click', checkbox_checker);
d253f1b530c8 Bugfix: On the changelog page, its possible that some changeset is already checked out by the browser. So we check for that on page load.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3463
diff changeset
205
2927
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
206 YUE.on('rev_range_clear','click',function(e){
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
207 for (var i=0; i<checkboxes.length; i++){
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
208 var cb = checkboxes[i];
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
209 cb.checked = false;
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
210 }
3519
d249fec283ae changelog: fix page state after clearing selection
Mads Kiilerich <madski@unity3d.com>
parents: 3486
diff changeset
211 checkbox_checker();
2927
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
212 YUE.preventDefault(e);
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
213 })
3519
d249fec283ae changelog: fix page state after clearing selection
Mads Kiilerich <madski@unity3d.com>
parents: 3486
diff changeset
214
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1862
diff changeset
215 var msgs = YUQ('.message');
1879
395dfc93fe73 changelog: simplify row expansion and fix for Firefox (parentElement->parentNode)
Aras Pranckevicius <aras@unity3d.com>
parents: 1878
diff changeset
216 // get first element height
1934
af1fafcd5927 fixes expand button on changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 1888
diff changeset
217 var el = YUQ('#graph_content .container')[0];
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1862
diff changeset
218 var row_h = el.clientHeight;
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1862
diff changeset
219 for(var i=0;i<msgs.length;i++){
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
220 var m = msgs[i];
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1862
diff changeset
221
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
222 var h = m.clientHeight;
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
223 var pad = YUD.getStyle(m,'padding');
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
224 if(h > row_h){
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
225 var offset = row_h - (h+12);
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
226 YUD.setStyle(m.nextElementSibling,'display','block');
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
227 YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
228 };
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1862
diff changeset
229 }
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1862
diff changeset
230 YUE.on(YUQ('.expand'),'click',function(e){
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
231 var elem = e.currentTarget.parentNode.parentNode;
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
232 YUD.setStyle(e.currentTarget,'display','none');
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
233 YUD.setStyle(elem,'height','auto');
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
234
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
235 //redraw the graph, line_count and jsdata are global vars
2924
fcbcef60be02 graph: fix counting of "heads" for graph, condense graph into more narrow lines instead of trying to increase its width (past certain width produces really bad html layout)
Aras Pranckevicius <aras@unity3d.com>
parents: 2885
diff changeset
236 set_canvas(100);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
237
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1862
diff changeset
238 var r = new BranchRenderer();
2924
fcbcef60be02 graph: fix counting of "heads" for graph, condense graph into more narrow lines instead of trying to increase its width (past certain width produces really bad html layout)
Aras Pranckevicius <aras@unity3d.com>
parents: 2885
diff changeset
239 r.render(jsdata,100,line_count);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
240
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1862
diff changeset
241 })
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
242
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
243 // 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
244 YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
245 var id = e.currentTarget.id;
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
246 var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}";
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
247 var url = url.replace('__CS__',id.replace('changed_total_',''));
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
248 ypjax(url,id,function(){tooltip_activate()});
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
249 });
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
250
1656
833f9dec0a06 implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents: 1463
diff changeset
251 // change branch filter
833f9dec0a06 implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents: 1463
diff changeset
252 YUE.on(YUD.get('branch_filter'),'change',function(e){
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
253 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value;
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
254 var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}";
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
255 var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}";
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
256 var url = url.replace('__BRANCH__',selected_branch);
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
257 if(selected_branch != ''){
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
258 window.location = url;
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
259 }else{
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
260 window.location = url_main;
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
261 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
262
1656
833f9dec0a06 implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents: 1463
diff changeset
263 });
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
264
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
265 function set_canvas(width) {
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
266 var c = document.getElementById('graph_nodes');
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
267 var t = document.getElementById('graph_content');
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
268 canvas = document.getElementById('graph_canvas');
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
269 var div_h = t.clientHeight;
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
270 c.style.height=div_h+'px';
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
271 canvas.setAttribute('height',div_h);
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
272 c.style.height=width+'px';
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
273 canvas.setAttribute('width',width);
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
274 };
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
275 var heads = 1;
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
276 var line_count = 0;
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
277 var jsdata = ${c.jsdata|n};
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
278
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
279 for (var i=0;i<jsdata.length;i++) {
2924
fcbcef60be02 graph: fix counting of "heads" for graph, condense graph into more narrow lines instead of trying to increase its width (past certain width produces really bad html layout)
Aras Pranckevicius <aras@unity3d.com>
parents: 2885
diff changeset
280 var in_l = jsdata[i][2];
fcbcef60be02 graph: fix counting of "heads" for graph, condense graph into more narrow lines instead of trying to increase its width (past certain width produces really bad html layout)
Aras Pranckevicius <aras@unity3d.com>
parents: 2885
diff changeset
281 for (var j in in_l) {
fcbcef60be02 graph: fix counting of "heads" for graph, condense graph into more narrow lines instead of trying to increase its width (past certain width produces really bad html layout)
Aras Pranckevicius <aras@unity3d.com>
parents: 2885
diff changeset
282 var m = in_l[j][1];
fcbcef60be02 graph: fix counting of "heads" for graph, condense graph into more narrow lines instead of trying to increase its width (past certain width produces really bad html layout)
Aras Pranckevicius <aras@unity3d.com>
parents: 2885
diff changeset
283 if (m > line_count)
fcbcef60be02 graph: fix counting of "heads" for graph, condense graph into more narrow lines instead of trying to increase its width (past certain width produces really bad html layout)
Aras Pranckevicius <aras@unity3d.com>
parents: 2885
diff changeset
284 line_count = m;
fcbcef60be02 graph: fix counting of "heads" for graph, condense graph into more narrow lines instead of trying to increase its width (past certain width produces really bad html layout)
Aras Pranckevicius <aras@unity3d.com>
parents: 2885
diff changeset
285 }
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
286 }
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
287 set_canvas(100);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
288
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
289 var r = new BranchRenderer();
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
290 r.render(jsdata,100,line_count);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
291
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
292 });
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
293 </script>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
294 %else:
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
295 ${_('There are no changes yet')}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
296 %endif
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
297 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
298 </div>
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1862
diff changeset
299 </%def>