annotate rhodecode/templates/summary/summary.html @ 1605:df59c0503636 beta

implements #215 Repository view uses a README (text/markdown + rst)
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 27 Oct 2011 03:26:02 +0200
parents 6ff50754d22d
children 4a28aff31a15
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
127
20dc7a5eb748 Html changes and cleanups, made folders for html templates, implemented tags and branches pages
Marcin Kuzminski <marcin@python-works.com>
parents: 126
diff changeset
1 <%inherit file="/base/base.html"/>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
2
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
3 <%def name="title()">
619
a1ec653f5f95 #38 updated RhodeCode titles
Marcin Kuzminski <marcin@python-works.com>
parents: 611
diff changeset
4 ${c.repo_name} ${_('Summary')} - ${c.rhodecode_name}
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
5 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
6
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
7 <%def name="breadcrumbs_links()">
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
8 ${h.link_to(u'Home',h.url('/'))}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
9 &raquo;
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
10 ${h.link_to(c.dbrepo.just_name,h.url('summary_home',repo_name=c.repo_name))}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
11 &raquo;
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
12 ${_('summary')}
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
13 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
14
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
15 <%def name="page_nav()">
189
410101210923 removed search field from templates
Marcin Kuzminski <marcin@python-works.com>
parents: 183
diff changeset
16 ${self.menu('summary')}
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
17 </%def>
219
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
18
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
19 <%def name="main()">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
20 <div class="box box-left">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
21 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
22 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
23 ${self.breadcrumbs()}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
24 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
25 <!-- end box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
26 <div class="form">
1310
4d37c3f2a410 fixed white-space formatting for description in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1281
diff changeset
27 <div id="summary" class="fields">
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
28
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
29 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
30 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
31 <label>${_('Name')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
32 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
33 <div class="input-short">
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
34 %if c.rhodecode_user.username != 'default':
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
35 %if c.following:
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
36 <span id="follow_toggle" class="following" title="${_('Stop following this repository')}"
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
37 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
38 </span>
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
39 %else:
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
40 <span id="follow_toggle" class="follow" title="${_('Start following this repository')}"
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
41 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')">
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
42 </span>
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
43 %endif
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
44 %endif:
1180
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
45
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
46 ##REPO TYPE
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
47 %if c.dbrepo.repo_type =='hg':
1547
fbc762ae3496 unified generation of repo groups choices
Marcin Kuzminski <marcin@python-works.com>
parents: 1450
diff changeset
48 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
637
b04d5214fd3c removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
49 %endif
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
50 %if c.dbrepo.repo_type =='git':
1547
fbc762ae3496 unified generation of repo groups choices
Marcin Kuzminski <marcin@python-works.com>
parents: 1450
diff changeset
51 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
637
b04d5214fd3c removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
52 %endif
1180
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
53
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
54 ##PUBLIC/PRIVATE
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
55 %if c.dbrepo.private:
1547
fbc762ae3496 unified generation of repo groups choices
Marcin Kuzminski <marcin@python-works.com>
parents: 1450
diff changeset
56 <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
532
946ed2955f48 template updates, added icon to repo name showing private/public
Marcin Kuzminski <marcin@python-works.com>
parents: 531
diff changeset
57 %else:
1547
fbc762ae3496 unified generation of repo groups choices
Marcin Kuzminski <marcin@python-works.com>
parents: 1450
diff changeset
58 <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
532
946ed2955f48 template updates, added icon to repo name showing private/public
Marcin Kuzminski <marcin@python-works.com>
parents: 531
diff changeset
59 %endif
1180
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
60
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
61 ##REPO NAME
1310
4d37c3f2a410 fixed white-space formatting for description in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1281
diff changeset
62 <span class="repo_name">${h.repo_link(c.dbrepo.groups_and_repo)}</span>
1180
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
63
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
64 ##FORK
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
65 %if c.dbrepo.fork:
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
66 <div style="margin-top:5px;clear:both"">
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
67 <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}"><img class="icon" alt="${_('public')}" title="${_('Fork of')} ${c.dbrepo.fork.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/>
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
68 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
1180
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
69 </a>
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
70 </div>
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
71 %endif
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
72 ##REMOTE
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
73 %if c.dbrepo.clone_uri:
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
74 <div style="margin-top:5px;clear:both">
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
75 <a href="${h.url(str(h.hide_credentials(c.dbrepo.clone_uri)))}"><img class="icon" alt="${_('remote clone')}" title="${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}" src="${h.url('/images/icons/connect.png')}"/>
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
76 ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}
1180
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
77 </a>
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
78 </div>
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
79 %endif
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
80 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
81 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
82
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
83 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
84 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
85 <label>${_('Description')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
86 </div>
1438
002f4f465b58 Links in summary page are now active
Marcin Kuzminski <marcin@python-works.com>
parents: 1430
diff changeset
87 <div class="input-short desc">${h.urlify_text(c.dbrepo.description)}</div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
88 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
89
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
90 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
91 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
92 <label>${_('Contact')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
93 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
94 <div class="input-short">
400
7eba3d1e4227 webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents: 390
diff changeset
95 <div class="gravatar">
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
96 <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/>
400
7eba3d1e4227 webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents: 390
diff changeset
97 </div>
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
98 ${_('Username')}: ${c.dbrepo.user.username}<br/>
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
99 ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/>
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
100 ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
101 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
102 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
103
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
104 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
105 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
106 <label>${_('Last change')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
107 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
108 <div class="input-short">
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
109 <b>${'r%s:%s' % (h.get_changeset_safe(c.rhodecode_repo,'tip').revision,
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
110 h.get_changeset_safe(c.rhodecode_repo,'tip').short_id)}</b> -
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
111 <span class="tooltip" title="${c.rhodecode_repo.last_change}">
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
112 ${h.age(c.rhodecode_repo.last_change)}</span><br/>
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
113 ${_('by')} ${h.get_changeset_safe(c.rhodecode_repo,'tip').author}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
114 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
115 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
116
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
117 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
118 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
119 <label>${_('Clone url')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
120 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
121 <div class="input-short">
1281
0d3706ccf129 small fixes for git support
Marcin Kuzminski <marcin@python-works.com>
parents: 1247
diff changeset
122 <input type="text" id="clone_url" readonly="readonly" value="${c.rhodecode_repo.alias} clone ${c.clone_repo_url}" size="70"/>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
123 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
124 </div>
506
d5efb83590ef fixed lock decorator bug which didn't release the lock after func execution and rewrote the pidlock a little with Ask Solem suggestions!
Marcin Kuzminski <marcin@python-works.com>
parents: 493
diff changeset
125
d5efb83590ef fixed lock decorator bug which didn't release the lock after func execution and rewrote the pidlock a little with Ask Solem suggestions!
Marcin Kuzminski <marcin@python-works.com>
parents: 493
diff changeset
126 <div class="field">
d5efb83590ef fixed lock decorator bug which didn't release the lock after func execution and rewrote the pidlock a little with Ask Solem suggestions!
Marcin Kuzminski <marcin@python-works.com>
parents: 493
diff changeset
127 <div class="label">
763
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
128 <label>${_('Trending source files')}:</label>
506
d5efb83590ef fixed lock decorator bug which didn't release the lock after func execution and rewrote the pidlock a little with Ask Solem suggestions!
Marcin Kuzminski <marcin@python-works.com>
parents: 493
diff changeset
129 </div>
d5efb83590ef fixed lock decorator bug which didn't release the lock after func execution and rewrote the pidlock a little with Ask Solem suggestions!
Marcin Kuzminski <marcin@python-works.com>
parents: 493
diff changeset
130 <div class="input-short">
942
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
131 <div id="lang_stats"></div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
132 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
133 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
134
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
135 <div class="field">
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
136 <div class="label">
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
137 <label>${_('Download')}:</label>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
138 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
139 <div class="input-short">
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
140 %if len(c.rhodecode_repo.revisions) == 0:
945
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
141 ${_('There are no downloads yet')}
962
72f008ed9b18 implemented #84 downloads can be enabled/disabled per each repository from now.
Marcin Kuzminski <marcin@python-works.com>
parents: 945
diff changeset
142 %elif c.enable_downloads is False:
72f008ed9b18 implemented #84 downloads can be enabled/disabled per each repository from now.
Marcin Kuzminski <marcin@python-works.com>
parents: 945
diff changeset
143 ${_('Downloads are disabled for this repository')}
72f008ed9b18 implemented #84 downloads can be enabled/disabled per each repository from now.
Marcin Kuzminski <marcin@python-works.com>
parents: 945
diff changeset
144 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
1553
6ff50754d22d UX improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1547
diff changeset
145 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-button-small")}
962
72f008ed9b18 implemented #84 downloads can be enabled/disabled per each repository from now.
Marcin Kuzminski <marcin@python-works.com>
parents: 945
diff changeset
146 %endif
945
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
147 %else:
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
148 ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)}
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
149 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
945
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
150 %if cnt >=1:
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
151 |
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
152 %endif
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
153 <span class="tooltip" title="${_('Download %s as %s') %('tip',archive['type'])}"
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
154 id="${archive['type']+'_link'}">${h.link_to(archive['type'],
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
155 h.url('files_archive_home',repo_name=c.dbrepo.repo_name,
945
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
156 fname='tip'+archive['extension']),class_="archive_icon")}</span>
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
157 %endfor
1450
2a8bf2a3da98 fixes #214 added support for downloading subrepos in download menu.
Marcin Kuzminski <marcin@python-works.com>
parents: 1438
diff changeset
158 <span style="vertical-align: bottom">
2a8bf2a3da98 fixes #214 added support for downloading subrepos in download menu.
Marcin Kuzminski <marcin@python-works.com>
parents: 1438
diff changeset
159 <input id="archive_subrepos" type="checkbox" name="subrepos"/> <span class="tooltip" title="${_('Check this to download archive with subrepos')}" >${_('with subrepos')}</span>
2a8bf2a3da98 fixes #214 added support for downloading subrepos in download menu.
Marcin Kuzminski <marcin@python-works.com>
parents: 1438
diff changeset
160 </span>
945
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
161 %endif
942
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
162 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
163 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
164
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
165 <div class="field">
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
166 <div class="label">
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
167 <label>${_('Feeds')}:</label>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
168 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
169 <div class="input-short">
1122
31e82d872631 disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents: 1112
diff changeset
170 %if c.rhodecode_user.username != 'default':
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
171 ${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')}
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
172 ${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')}
1122
31e82d872631 disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents: 1112
diff changeset
173 %else:
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
174 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name),class_='rss_icon')}
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
175 ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')}
1122
31e82d872631 disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents: 1112
diff changeset
176 %endif
942
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
177 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
178 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
179 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
180 </div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
181 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
182
410
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 409
diff changeset
183 <div class="box box-right" style="min-height:455px">
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
184 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
185 <div class="title">
493
2256c78afe53 implemented basic autoupdating statistics fetched from database
Marcin Kuzminski <marcin@python-works.com>
parents: 489
diff changeset
186 <h5>${_('Commit activity by day / author')}</h5>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
187 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
188
1247
4d195ad0ff03 made rhodecode compatible with 1024px displays
Marcin Kuzminski <marcin@python-works.com>
parents: 1244
diff changeset
189 <div class="graph">
1181
36b12336cb7f added percentage of progress of gathered commit activity statistics
Marcin Kuzminski <marcin@python-works.com>
parents: 1180
diff changeset
190 <div style="padding:0 10px 10px 15px;font-size: 1.2em;">
800
e41aacb6aa18 small fixes for summary graph, added message about no data for the graph, when empty
Marcin Kuzminski <marcin@python-works.com>
parents: 793
diff changeset
191 %if c.no_data:
1181
36b12336cb7f added percentage of progress of gathered commit activity statistics
Marcin Kuzminski <marcin@python-works.com>
parents: 1180
diff changeset
192 ${c.no_data_msg}
917
de8b95f461f6 enabled quick link to enabling statistics in admin page, for admins
Marcin Kuzminski <marcin@python-works.com>
parents: 872
diff changeset
193 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
1553
6ff50754d22d UX improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1547
diff changeset
194 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-button-small")}
945
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
195 %endif
1181
36b12336cb7f added percentage of progress of gathered commit activity statistics
Marcin Kuzminski <marcin@python-works.com>
parents: 1180
diff changeset
196 %else:
36b12336cb7f added percentage of progress of gathered commit activity statistics
Marcin Kuzminski <marcin@python-works.com>
parents: 1180
diff changeset
197 ${_('Loaded in')} ${c.stats_percentage} %
36b12336cb7f added percentage of progress of gathered commit activity statistics
Marcin Kuzminski <marcin@python-works.com>
parents: 1180
diff changeset
198 %endif
36b12336cb7f added percentage of progress of gathered commit activity statistics
Marcin Kuzminski <marcin@python-works.com>
parents: 1180
diff changeset
199 </div>
1247
4d195ad0ff03 made rhodecode compatible with 1024px displays
Marcin Kuzminski <marcin@python-works.com>
parents: 1244
diff changeset
200 <div id="commit_history" style="width:450px;height:300px;float:left"></div>
486
5c376ac2d4c9 rewrote graph plotting, added zooming and json dump insted of stupid string formating.
Marcin Kuzminski <marcin@python-works.com>
parents: 480
diff changeset
201 <div style="clear: both;height: 10px"></div>
1247
4d195ad0ff03 made rhodecode compatible with 1024px displays
Marcin Kuzminski <marcin@python-works.com>
parents: 1244
diff changeset
202 <div id="overview" style="width:450px;height:100px;float:left"></div>
486
5c376ac2d4c9 rewrote graph plotting, added zooming and json dump insted of stupid string formating.
Marcin Kuzminski <marcin@python-works.com>
parents: 480
diff changeset
203
5c376ac2d4c9 rewrote graph plotting, added zooming and json dump insted of stupid string formating.
Marcin Kuzminski <marcin@python-works.com>
parents: 480
diff changeset
204 <div id="legend_data" style="clear:both;margin-top:10px;">
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
205 <div id="legend_container"></div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
206 <div id="legend_choices">
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
207 <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
208 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
209 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
210 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
211 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
212
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
213 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
214 <div class="title">
739
554ed64953ff fixes #76 added confirmation dialog for user removal.
Marcin Kuzminski <marcin@python-works.com>
parents: 734
diff changeset
215 <div class="breadcrumbs">${h.link_to(_('Shortlog'),h.url('shortlog_home',repo_name=c.repo_name))}</div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
216 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
217 <div class="table">
637
b04d5214fd3c removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
218 <div id="shortlog_data">
b04d5214fd3c removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
219 <%include file='../shortlog/shortlog_data.html'/>
b04d5214fd3c removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
220 </div>
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
221 </div>
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
222 </div>
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
223
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
224 %if c.readme_data:
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
225 <div class="box" style="background-color: #FAFAFA">
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
226 <div class="title">
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
227 <div class="breadcrumbs"><a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a></div>
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
228 </div>
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
229 <div class="readme">
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
230 <div class="readme_box">
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
231 ${c.readme_data|n}
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
232 </div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
233 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
234 </div>
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
235 %endif
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
236
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
237 <script type="text/javascript">
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
238 YUE.onDOMReady(function(e){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
239 id = 'clone_url';
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
240 YUE.on(id,'click',function(e){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
241 if(YUD.hasClass(id,'selected')){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
242 return
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
243 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
244 else{
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
245 YUD.addClass(id,'selected');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
246 YUD.get(id).select();
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
247 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
248
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
249 })
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
250 })
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
251 var data = ${c.trending_languages|n};
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
252 var total = 0;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
253 var no_data = true;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
254 for (k in data){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
255 total += data[k].count;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
256 no_data = false;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
257 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
258 var tbl = document.createElement('table');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
259 tbl.setAttribute('class','trending_language_tbl');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
260 var cnt = 0;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
261 for (k in data){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
262 cnt += 1;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
263 var hide = cnt>2;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
264 var tr = document.createElement('tr');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
265 if (hide){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
266 tr.setAttribute('style','display:none');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
267 tr.setAttribute('class','stats_hidden');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
268 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
269 var percentage = Math.round((data[k].count/total*100),2);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
270 var value = data[k].count;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
271 var td1 = document.createElement('td');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
272 td1.width = 150;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
273 var trending_language_label = document.createElement('div');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
274 trending_language_label.innerHTML = data[k].desc+" ("+k+")";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
275 td1.appendChild(trending_language_label);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
276
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
277 var td2 = document.createElement('td');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
278 td2.setAttribute('style','padding-right:14px !important');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
279 var trending_language = document.createElement('div');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
280 var nr_files = value+" ${_('files')}";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
281
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
282 trending_language.title = k+" "+nr_files;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
283
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
284 if (percentage>22){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
285 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
286 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
287 else{
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
288 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
289 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
290
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
291 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
292 trending_language.style.width=percentage+"%";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
293 td2.appendChild(trending_language);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
294
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
295 tr.appendChild(td1);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
296 tr.appendChild(td2);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
297 tbl.appendChild(tr);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
298 if(cnt == 3){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
299 var show_more = document.createElement('tr');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
300 var td = document.createElement('td');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
301 lnk = document.createElement('a');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
302
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
303 lnk.href='#';
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
304 lnk.innerHTML = "${_('show more')}";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
305 lnk.id='code_stats_show_more';
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
306 td.appendChild(lnk);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
307
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
308 show_more.appendChild(td);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
309 show_more.appendChild(document.createElement('td'));
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
310 tbl.appendChild(show_more);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
311 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
312
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
313 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
314 if(no_data){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
315 var tr = document.createElement('tr');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
316 var td1 = document.createElement('td');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
317 td1.innerHTML = "${c.no_data_msg}";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
318 tr.appendChild(td1);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
319 tbl.appendChild(tr);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
320 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
321 YUD.get('lang_stats').appendChild(tbl);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
322 YUE.on('code_stats_show_more','click',function(){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
323 l = YUD.getElementsByClassName('stats_hidden')
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
324 for (e in l){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
325 YUD.setStyle(l[e],'display','');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
326 };
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
327 YUD.setStyle(YUD.get('code_stats_show_more'),
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
328 'display','none');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
329 })
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
330
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
331 var tmpl_links = {}
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
332 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
333 tmpl_links['${archive['type']}'] = '${h.link_to(archive['type'],
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
334 h.url('files_archive_home',repo_name=c.dbrepo.repo_name,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
335 fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_="archive_icon")}';
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
336 %endfor
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
337
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
338 YUE.on(['download_options','archive_subrepos'],'change',function(e){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
339 var sm = YUD.get('download_options');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
340 var new_cs = sm.options[sm.selectedIndex];
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
341
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
342 for(k in tmpl_links){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
343 var s = YUD.get(k+'_link');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
344 title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
345 s.title = title_tmpl.replace('__CS_NAME__',new_cs.text);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
346 s.title = s.title.replace('__CS_EXT__',k);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
347 var url = tmpl_links[k].replace('__CS__',new_cs.value);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
348 var subrepos = YUD.get('archive_subrepos').checked
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
349 url = url.replace('__SUB__',subrepos);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
350 s.innerHTML = url
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
351 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
352 });
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
353 </script>
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
354 <script type="text/javascript">
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
355 /**
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
356 * Plots summary graph
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
357 *
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
358 * @class SummaryPlot
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
359 * @param {from} initial from for detailed graph
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
360 * @param {to} initial to for detailed graph
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
361 * @param {dataset}
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
362 * @param {overview_dataset}
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
363 */
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
364 function SummaryPlot(from,to,dataset,overview_dataset) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
365 var initial_ranges = {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
366 "xaxis":{
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
367 "from":from,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
368 "to":to,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
369 },
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
370 };
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
371 var dataset = dataset;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
372 var overview_dataset = [overview_dataset];
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
373 var choiceContainer = YUD.get("legend_choices");
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
374 var choiceContainerTable = YUD.get("legend_choices_tables");
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
375 var plotContainer = YUD.get('commit_history');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
376 var overviewContainer = YUD.get('overview');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
377
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
378 var plot_options = {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
379 bars: {show:true,align:'center',lineWidth:4},
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
380 legend: {show:true, container:"legend_container"},
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
381 points: {show:true,radius:0,fill:false},
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
382 yaxis: {tickDecimals:0,},
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
383 xaxis: {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
384 mode: "time",
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
385 timeformat: "%d/%m",
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
386 min:from,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
387 max:to,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
388 },
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
389 grid: {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
390 hoverable: true,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
391 clickable: true,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
392 autoHighlight:true,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
393 color: "#999"
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
394 },
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
395 //selection: {mode: "x"}
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
396 };
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
397 var overview_options = {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
398 legend:{show:false},
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
399 bars: {show:true,barWidth: 2,},
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
400 shadowSize: 0,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
401 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
402 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
403 grid: {color: "#999",},
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
404 selection: {mode: "x"}
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
405 };
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
406
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
407 /**
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
408 *get dummy data needed in few places
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
409 */
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
410 function getDummyData(label){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
411 return {"label":label,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
412 "data":[{"time":0,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
413 "commits":0,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
414 "added":0,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
415 "changed":0,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
416 "removed":0,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
417 }],
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
418 "schema":["commits"],
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
419 "color":'#ffffff',
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
420 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
421 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
422
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
423 /**
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
424 * generate checkboxes accordindly to data
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
425 * @param keys
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
426 * @returns
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
427 */
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
428 function generateCheckboxes(data) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
429 //append checkboxes
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
430 var i = 0;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
431 choiceContainerTable.innerHTML = '';
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
432 for(var pos in data) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
433
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
434 data[pos].color = i;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
435 i++;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
436 if(data[pos].label != ''){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
437 choiceContainerTable.innerHTML += '<tr><td>'+
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
438 '<input type="checkbox" name="' + data[pos].label +'" checked="checked" />'
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
439 +data[pos].label+
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
440 '</td></tr>';
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
441 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
442 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
443 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
444
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
445 /**
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
446 * ToolTip show
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
447 */
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
448 function showTooltip(x, y, contents) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
449 var div=document.getElementById('tooltip');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
450 if(!div) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
451 div = document.createElement('div');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
452 div.id="tooltip";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
453 div.style.position="absolute";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
454 div.style.border='1px solid #fdd';
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
455 div.style.padding='2px';
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
456 div.style.backgroundColor='#fee';
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
457 document.body.appendChild(div);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
458 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
459 YUD.setStyle(div, 'opacity', 0);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
460 div.innerHTML = contents;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
461 div.style.top=(y + 5) + "px";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
462 div.style.left=(x + 5) + "px";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
463
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
464 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
465 anim.animate();
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
466 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
467
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
468 /**
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
469 * This function will detect if selected period has some changesets
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
470 for this user if it does this data is then pushed for displaying
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
471 Additionally it will only display users that are selected by the checkbox
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
472 */
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
473 function getDataAccordingToRanges(ranges) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
474
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
475 var data = [];
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
476 var new_dataset = {};
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
477 var keys = [];
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
478 var max_commits = 0;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
479 for(var key in dataset){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
480
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
481 for(var ds in dataset[key].data){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
482 commit_data = dataset[key].data[ds];
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
483 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
484
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
485 if(new_dataset[key] === undefined){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
486 new_dataset[key] = {data:[],schema:["commits"],label:key};
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
487 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
488 new_dataset[key].data.push(commit_data);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
489 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
490 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
491 if (new_dataset[key] !== undefined){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
492 data.push(new_dataset[key]);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
493 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
494 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
495
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
496 if (data.length > 0){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
497 return data;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
498 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
499 else{
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
500 //just return dummy data for graph to plot itself
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
501 return [getDummyData('')];
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
502 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
503 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
504
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
505 /**
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
506 * redraw using new checkbox data
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
507 */
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
508 function plotchoiced(e,args){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
509 var cur_data = args[0];
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
510 var cur_ranges = args[1];
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
511
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
512 var new_data = [];
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
513 var inputs = choiceContainer.getElementsByTagName("input");
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
514
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
515 //show only checked labels
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
516 for(var i=0; i<inputs.length; i++) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
517 var checkbox_key = inputs[i].name;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
518
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
519 if(inputs[i].checked){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
520 for(var d in cur_data){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
521 if(cur_data[d].label == checkbox_key){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
522 new_data.push(cur_data[d]);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
523 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
524 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
525 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
526 else{
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
527 //push dummy data to not hide the label
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
528 new_data.push(getDummyData(checkbox_key));
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
529 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
530 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
531
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
532 var new_options = YAHOO.lang.merge(plot_options, {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
533 xaxis: {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
534 min: cur_ranges.xaxis.from,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
535 max: cur_ranges.xaxis.to,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
536 mode:"time",
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
537 timeformat: "%d/%m",
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
538 },
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
539 });
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
540 if (!new_data){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
541 new_data = [[0,1]];
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
542 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
543 // do the zooming
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
544 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
545
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
546 plot.subscribe("plotselected", plotselected);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
547
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
548 //resubscribe plothover
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
549 plot.subscribe("plothover", plothover);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
550
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
551 // don't fire event on the overview to prevent eternal loop
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
552 overview.setSelection(cur_ranges, true);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
553
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
554 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
555
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
556 /**
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
557 * plot only selected items from overview
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
558 * @param ranges
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
559 * @returns
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
560 */
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
561 function plotselected(ranges,cur_data) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
562 //updates the data for new plot
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
563 var data = getDataAccordingToRanges(ranges);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
564 generateCheckboxes(data);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
565
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
566 var new_options = YAHOO.lang.merge(plot_options, {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
567 xaxis: {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
568 min: ranges.xaxis.from,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
569 max: ranges.xaxis.to,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
570 mode:"time",
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
571 timeformat: "%d/%m",
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
572 },
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
573 });
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
574 // do the zooming
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
575 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
576
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
577 plot.subscribe("plotselected", plotselected);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
578
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
579 //resubscribe plothover
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
580 plot.subscribe("plothover", plothover);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
581
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
582 // don't fire event on the overview to prevent eternal loop
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
583 overview.setSelection(ranges, true);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
584
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
585 //resubscribe choiced
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
586 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
587 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
588
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
589 var previousPoint = null;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
590
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
591 function plothover(o) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
592 var pos = o.pos;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
593 var item = o.item;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
594
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
595 //YUD.get("x").innerHTML = pos.x.toFixed(2);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
596 //YUD.get("y").innerHTML = pos.y.toFixed(2);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
597 if (item) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
598 if (previousPoint != item.datapoint) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
599 previousPoint = item.datapoint;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
600
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
601 var tooltip = YUD.get("tooltip");
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
602 if(tooltip) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
603 tooltip.parentNode.removeChild(tooltip);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
604 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
605 var x = item.datapoint.x.toFixed(2);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
606 var y = item.datapoint.y.toFixed(2);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
607
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
608 if (!item.series.label){
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
609 item.series.label = 'commits';
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
610 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
611 var d = new Date(x*1000);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
612 var fd = d.toDateString()
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
613 var nr_commits = parseInt(y);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
614
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
615 var cur_data = dataset[item.series.label].data[item.dataIndex];
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
616 var added = cur_data.added;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
617 var changed = cur_data.changed;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
618 var removed = cur_data.removed;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
619
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
620 var nr_commits_suffix = " ${_('commits')} ";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
621 var added_suffix = " ${_('files added')} ";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
622 var changed_suffix = " ${_('files changed')} ";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
623 var removed_suffix = " ${_('files removed')} ";
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
624
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
625
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
626 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
627 if(added==1){added_suffix=" ${_('file added')} ";}
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
628 if(changed==1){changed_suffix=" ${_('file changed')} ";}
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
629 if(removed==1){removed_suffix=" ${_('file removed')} ";}
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
630
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
631 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
632 +'<br/>'+
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
633 nr_commits + nr_commits_suffix+'<br/>'+
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
634 added + added_suffix +'<br/>'+
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
635 changed + changed_suffix + '<br/>'+
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
636 removed + removed_suffix + '<br/>');
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
637 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
638 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
639 else {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
640 var tooltip = YUD.get("tooltip");
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
641
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
642 if(tooltip) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
643 tooltip.parentNode.removeChild(tooltip);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
644 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
645 previousPoint = null;
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
646 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
647 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
648
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
649 /**
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
650 * MAIN EXECUTION
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
651 */
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
652
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
653 var data = getDataAccordingToRanges(initial_ranges);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
654 generateCheckboxes(data);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
655
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
656 //main plot
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
657 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
658
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
659 //overview
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
660 var overview = YAHOO.widget.Flot(overviewContainer,
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
661 overview_dataset, overview_options);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
662
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
663 //show initial selection on overview
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
664 overview.setSelection(initial_ranges);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
665
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
666 plot.subscribe("plotselected", plotselected);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
667 plot.subscribe("plothover", plothover)
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
668
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
669 overview.subscribe("plotselected", function (ranges) {
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
670 plot.setSelection(ranges);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
671 });
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
672
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
673 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
674 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
675 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
676 </script>
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
677
942
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
678 </%def>