annotate rhodecode/templates/summary/summary.html @ 1171:2ab211e0aecd beta

changes for #56
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 23 Mar 2011 20:38:51 +0100
parents c52de8aa10e0
children c5e330c4ed65
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">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
27 <div class="fields">
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:
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
45 %if c.dbrepo.repo_type =='hg':
1051
90eadff2c2a8 changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents: 1038
diff changeset
46 <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
47 %endif
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
48 %if c.dbrepo.repo_type =='git':
1051
90eadff2c2a8 changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents: 1038
diff changeset
49 <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
50 %endif
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 635
diff changeset
51
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
52 %if c.dbrepo.private:
1051
90eadff2c2a8 changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents: 1038
diff changeset
53 <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
54 %else:
1051
90eadff2c2a8 changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents: 1038
diff changeset
55 <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
56 %endif
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
57 <span style="font-size: 1.6em;font-weight: bold;vertical-align: baseline;">${h.repo_link(c.dbrepo.groups_and_repo)}</span>
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
58
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
59 %if c.dbrepo.fork:
531
6fc59ac322ca added info about forked repository in few places
Marcin Kuzminski <marcin@python-works.com>
parents: 524
diff changeset
60 <span style="margin-top:5px">
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
61 <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}">
531
6fc59ac322ca added info about forked repository in few places
Marcin Kuzminski <marcin@python-works.com>
parents: 524
diff changeset
62 <img class="icon" alt="${_('public')}"
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
63 title="${_('Fork of')} ${c.dbrepo.fork.repo_name}"
1051
90eadff2c2a8 changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents: 1038
diff changeset
64 src="${h.url("/images/icons/arrow_divide.png")}"/>
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
65 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
531
6fc59ac322ca added info about forked repository in few places
Marcin Kuzminski <marcin@python-works.com>
parents: 524
diff changeset
66 </a>
6fc59ac322ca added info about forked repository in few places
Marcin Kuzminski <marcin@python-works.com>
parents: 524
diff changeset
67 </span>
1112
6d0a7284949d #109, added optional clone uri when creating repo.
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
68 %endif
6d0a7284949d #109, added optional clone uri when creating repo.
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
69 %if c.dbrepo.clone_uri:
6d0a7284949d #109, added optional clone uri when creating repo.
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
70 <span style="margin-top:5px">
6d0a7284949d #109, added optional clone uri when creating repo.
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
71 <a href="${h.url(str(c.dbrepo.clone_uri))}">
6d0a7284949d #109, added optional clone uri when creating repo.
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
72 <img class="icon" alt="${_('remote clone')}"
6d0a7284949d #109, added optional clone uri when creating repo.
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
73 title="${_('Clone from')} ${c.dbrepo.clone_uri}"
6d0a7284949d #109, added optional clone uri when creating repo.
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
74 src="${h.url("/images/icons/connect.png")}"/>
6d0a7284949d #109, added optional clone uri when creating repo.
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
75 ${_('Clone from')} ${c.dbrepo.clone_uri}
6d0a7284949d #109, added optional clone uri when creating repo.
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
76 </a>
6d0a7284949d #109, added optional clone uri when creating repo.
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
77 </span>
6d0a7284949d #109, added optional clone uri when creating repo.
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
78 %endif
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
79 </div>
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
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>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
87 <div class="input-short">
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
88 ${c.dbrepo.description}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
89 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
90 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
91
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
92
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
93 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
94 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
95 <label>${_('Contact')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
96 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
97 <div class="input-short">
400
7eba3d1e4227 webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents: 390
diff changeset
98 <div class="gravatar">
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
99 <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
100 </div>
1038
5554aa9c2480 another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents: 999
diff changeset
101 ${_('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
102 ${_('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
103 ${_('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
104 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
105 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
106
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
107 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
108 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
109 <label>${_('Last change')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
110 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
111 <div class="input-short">
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
112 <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
113 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
114 <span class="tooltip" title="${c.rhodecode_repo.last_change}">
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
115 ${h.age(c.rhodecode_repo.last_change)}</span><br/>
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
116 ${_('by')} ${h.get_changeset_safe(c.rhodecode_repo,'tip').author}
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
117
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
118 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
119 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
120
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
121 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
122 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
123 <label>${_('Clone url')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
124 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
125 <div class="input-short">
409
9b6c1de4ce9e some small template fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 405
diff changeset
126 <input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
127 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
128 </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
129
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="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
131 <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
132 <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
133 </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
134 <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
135 <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
136 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
137 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
138
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
139 <div class="field">
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
140 <div class="label">
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
141 <label>${_('Download')}:</label>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
142 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
143 <div class="input-short">
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
144 %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
145 ${_('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
146 %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
147 ${_('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
148 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
72f008ed9b18 implemented #84 downloads can be enabled/disabled per each repository from now.
Marcin Kuzminski <marcin@python-works.com>
parents: 945
diff changeset
149 [${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name))}]
72f008ed9b18 implemented #84 downloads can be enabled/disabled per each repository from now.
Marcin Kuzminski <marcin@python-works.com>
parents: 945
diff changeset
150 %endif
945
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
151 %else:
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
152 ${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
153 %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
154 %if cnt >=1:
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
155 |
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
156 %endif
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
157 <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
158 id="${archive['type']+'_link'}">${h.link_to(archive['type'],
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
159 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
160 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
161 %endfor
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
162 %endif
942
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 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
165
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
166 <div class="field">
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
167 <div class="label">
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
168 <label>${_('Feeds')}:</label>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
169 </div>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
170 <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
171 %if c.rhodecode_user.username != 'default':
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
172 ${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
173 ${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
174 %else:
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
175 ${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
176 ${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
177 %endif
942
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>
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
181 </div>
943
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
182 <script type="text/javascript">
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
183 YUE.onDOMReady(function(e){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
184 id = 'clone_url';
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
185 YUE.on(id,'click',function(e){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
186 YUD.get('clone_url').select();
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
187 })
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
188 })
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
189 var data = ${c.trending_languages|n};
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
190 var total = 0;
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
191 var no_data = true;
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
192 for (k in data){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
193 total += data[k];
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
194 no_data = false;
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
195 }
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
196 var tbl = document.createElement('table');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
197 tbl.setAttribute('class','trending_language_tbl');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
198 var cnt =0;
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
199 for (k in data){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
200 cnt+=1;
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
201 var hide = cnt>2;
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
202 var tr = document.createElement('tr');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
203 if (hide){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
204 tr.setAttribute('style','display:none');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
205 tr.setAttribute('class','stats_hidden');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
206 }
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
207 var percentage = Math.round((data[k]/total*100),2);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
208 var value = data[k];
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
209 var td1 = document.createElement('td');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
210 td1.width=150;
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
211 var trending_language_label = document.createElement('div');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
212 trending_language_label.innerHTML = k;
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
213 td1.appendChild(trending_language_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
214
943
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
215 var td2 = document.createElement('td');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
216 td2.setAttribute('style','padding-right:14px !important');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
217 var trending_language = document.createElement('div');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
218 var nr_files = value+" ${_('files')}";
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
219
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
220 trending_language.title = k+" "+nr_files;
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
221
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
222 if (percentage>20){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
223 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
224 }
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
225 else{
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
226 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
227 }
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
228
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
229 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
230 trending_language.style.width=percentage+"%";
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
231 td2.appendChild(trending_language);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
232
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
233 tr.appendChild(td1);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
234 tr.appendChild(td2);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
235 tbl.appendChild(tr);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
236 if(cnt == 2){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
237 var show_more = document.createElement('tr');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
238 var td=document.createElement('td');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
239 lnk = document.createElement('a');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
240 lnk.href='#';
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
241 lnk.innerHTML = "${_("show more")}";
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
242 lnk.id='code_stats_show_more';
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
243 td.appendChild(lnk);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
244 show_more.appendChild(td);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
245 show_more.appendChild(document.createElement('td'));
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
246 tbl.appendChild(show_more);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
247 }
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
248
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
249 }
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
250 if(no_data){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
251 var tr = document.createElement('tr');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
252 var td1 = document.createElement('td');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
253 td1.innerHTML = "${c.no_data_msg}";
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
254 tr.appendChild(td1);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
255 tbl.appendChild(tr);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
256 }
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
257 YUD.get('lang_stats').appendChild(tbl);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
258 YUE.on('code_stats_show_more','click',function(){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
259 l = YUD.getElementsByClassName('stats_hidden')
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
260 for (e in l){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
261 YUD.setStyle(l[e],'display','');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
262 };
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
263 YUD.setStyle(YUD.get('code_stats_show_more'),
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
264 'display','none');
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
265 })
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
266
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
267
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
268 YUE.on('download_options','change',function(e){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
269 var new_cs = e.target.options[e.target.selectedIndex];
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
270 var tmpl_links = {}
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
271 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
943
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
272 tmpl_links['${archive['type']}'] = '${h.link_to(archive['type'],
1171
2ab211e0aecd changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents: 1124
diff changeset
273 h.url('files_archive_home',repo_name=c.dbrepo.repo_name,
943
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
274 fname='__CS__'+archive['extension']),class_="archive_icon")}';
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
275 %endfor
942
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
276
943
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
277
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
278 for(k in tmpl_links){
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
279 var s = YUD.get(k+'_link')
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
280 title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__',archive['type'])}";
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
281 s.title = title_tmpl.replace('__CS_NAME__',new_cs.text)
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
282 s.innerHTML = tmpl_links[k].replace('__CS__',new_cs.value);
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
283 }
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
284
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
285 })
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
286
1f28cf5384bf Implemented dynamic download links in summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 942
diff changeset
287 </script>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
288 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
289
410
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 409
diff changeset
290 <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
291 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
292 <div class="title">
493
2256c78afe53 implemented basic autoupdating statistics fetched from database
Marcin Kuzminski <marcin@python-works.com>
parents: 489
diff changeset
293 <h5>${_('Commit activity by day / author')}</h5>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
294 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
295
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
296 <div class="table">
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
297 %if c.no_data:
917
de8b95f461f6 enabled quick link to enabling statistics in admin page, for admins
Marcin Kuzminski <marcin@python-works.com>
parents: 872
diff changeset
298 <div style="padding:0 10px 10px 15px;font-size: 1.2em;">${c.no_data_msg}
de8b95f461f6 enabled quick link to enabling statistics in admin page, for admins
Marcin Kuzminski <marcin@python-works.com>
parents: 872
diff changeset
299 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
de8b95f461f6 enabled quick link to enabling statistics in admin page, for admins
Marcin Kuzminski <marcin@python-works.com>
parents: 872
diff changeset
300 [${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name))}]
945
05b59c48556f fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents: 944
diff changeset
301 %endif
917
de8b95f461f6 enabled quick link to enabling statistics in admin page, for admins
Marcin Kuzminski <marcin@python-works.com>
parents: 872
diff changeset
302 </div>
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
303 %endif:
663
6199b34d349b fixed html templates, fixed overal rhodecode width to 1024pixels
Marcin Kuzminski <marcin@python-works.com>
parents: 637
diff changeset
304 <div id="commit_history" style="width:460px;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
305 <div style="clear: both;height: 10px"></div>
663
6199b34d349b fixed html templates, fixed overal rhodecode width to 1024pixels
Marcin Kuzminski <marcin@python-works.com>
parents: 637
diff changeset
306 <div id="overview" style="width:460px;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
307
5c376ac2d4c9 rewrote graph plotting, added zooming and json dump insted of stupid string formating.
Marcin Kuzminski <marcin@python-works.com>
parents: 480
diff changeset
308 <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
309 <div id="legend_container"></div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
310 <div id="legend_choices">
379
86a25ad59766 fixed min width set.
Marcin Kuzminski <marcin@python-works.com>
parents: 372
diff changeset
311 <table id="legend_choices_tables" style="font-size:smaller;color:#545454"></table>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
312 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
313 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
314 <script type="text/javascript">
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
315 /**
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
316 * Plots summary graph
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
317 *
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
318 * @class SummaryPlot
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
319 * @param {from} initial from for detailed graph
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
320 * @param {to} initial to for detailed graph
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
321 * @param {dataset}
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
322 * @param {overview_dataset}
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
323 */
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
324 function SummaryPlot(from,to,dataset,overview_dataset) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
325 var initial_ranges = {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
326 "xaxis":{
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
327 "from":from,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
328 "to":to,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
329 },
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
330 };
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
331 var dataset = dataset;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
332 var overview_dataset = [overview_dataset];
763
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
333 var choiceContainer = YUD.get("legend_choices");
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
334 var choiceContainerTable = YUD.get("legend_choices_tables");
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
335 var plotContainer = YUD.get('commit_history');
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
336 var overviewContainer = YUD.get('overview');
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
337
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
338 var plot_options = {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
339 bars: {show:true,align:'center',lineWidth:4},
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
340 legend: {show:true, container:"legend_container"},
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
341 points: {show:true,radius:0,fill:false},
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
342 yaxis: {tickDecimals:0,},
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
343 xaxis: {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
344 mode: "time",
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
345 timeformat: "%d/%m",
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
346 min:from,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
347 max:to,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
348 },
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
349 grid: {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
350 hoverable: true,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
351 clickable: true,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
352 autoHighlight:true,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
353 color: "#999"
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
354 },
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
355 //selection: {mode: "x"}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
356 };
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
357 var overview_options = {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
358 legend:{show:false},
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
359 bars: {show:true,barWidth: 2,},
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
360 shadowSize: 0,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
361 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
801
a81bd2a8cdd4 fixed decimal tick on overview of commit data
Marcin Kuzminski <marcin@python-works.com>
parents: 800
diff changeset
362 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
363 grid: {color: "#999",},
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
364 selection: {mode: "x"}
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
365 };
410
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 409
diff changeset
366
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
367 /**
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
368 *get dummy data needed in few places
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
369 */
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
370 function getDummyData(label){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
371 return {"label":label,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
372 "data":[{"time":0,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
373 "commits":0,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
374 "added":0,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
375 "changed":0,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
376 "removed":0,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
377 }],
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
378 "schema":["commits"],
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
379 "color":'#ffffff',
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
380 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
381 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
382
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
383 /**
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
384 * generate checkboxes accordindly to data
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
385 * @param keys
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
386 * @returns
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
387 */
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
388 function generateCheckboxes(data) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
389 //append checkboxes
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
390 var i = 0;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
391 choiceContainerTable.innerHTML = '';
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
392 for(var pos in data) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
393
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
394 data[pos].color = i;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
395 i++;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
396 if(data[pos].label != ''){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
397 choiceContainerTable.innerHTML += '<tr><td>'+
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
398 '<input type="checkbox" name="' + data[pos].label +'" checked="checked" />'
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
399 +data[pos].label+
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
400 '</td></tr>';
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
401 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
402 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
403 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
404
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
405 /**
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
406 * ToolTip show
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
407 */
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
408 function showTooltip(x, y, contents) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
409 var div=document.getElementById('tooltip');
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
410 if(!div) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
411 div = document.createElement('div');
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
412 div.id="tooltip";
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
413 div.style.position="absolute";
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
414 div.style.border='1px solid #fdd';
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
415 div.style.padding='2px';
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
416 div.style.backgroundColor='#fee';
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
417 document.body.appendChild(div);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
418 }
763
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
419 YUD.setStyle(div, 'opacity', 0);
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
420 div.innerHTML = contents;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
421 div.style.top=(y + 5) + "px";
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
422 div.style.left=(x + 5) + "px";
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
423
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
424 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
425 anim.animate();
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
426 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
427
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
428 /**
730
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
429 * This function will detect if selected period has some changesets
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
430 for this user if it does this data is then pushed for displaying
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
431 Additionally it will only display users that are selected by the checkbox
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
432 */
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
433 function getDataAccordingToRanges(ranges) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
434
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
435 var data = [];
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
436 var keys = [];
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
437 for(var key in dataset){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
438 var push = false;
730
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
439
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
440 //method1 slow !!
730
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
441 //*
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
442 for(var ds in dataset[key].data){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
443 commit_data = dataset[key].data[ds];
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
444 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
445 push = true;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
446 break;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
447 }
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
448 }
730
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
449 //*/
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
450
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
451 /*//method2 sorted commit data !!!
730
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
452
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
453 var first_commit = dataset[key].data[0].time;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
454 var last_commit = dataset[key].data[dataset[key].data.length-1].time;
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
455
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
456 if (first_commit >= ranges.xaxis.from && last_commit <= ranges.xaxis.to){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
457 push = true;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
458 }
730
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
459 //*/
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
460
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
461 if(push){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
462 data.push(dataset[key]);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
463 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
464 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
465 if(data.length >= 1){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
466 return data;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
467 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
468 else{
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
469 //just return dummy data for graph to plot itself
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
470 return [getDummyData('')];
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
471 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
472
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
473 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
474
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
475 /**
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
476 * redraw using new checkbox data
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
477 */
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
478 function plotchoiced(e,args){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
479 var cur_data = args[0];
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
480 var cur_ranges = args[1];
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
481
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
482 var new_data = [];
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
483 var inputs = choiceContainer.getElementsByTagName("input");
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
484
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
485 //show only checked labels
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
486 for(var i=0; i<inputs.length; i++) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
487 var checkbox_key = inputs[i].name;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
488
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
489 if(inputs[i].checked){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
490 for(var d in cur_data){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
491 if(cur_data[d].label == checkbox_key){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
492 new_data.push(cur_data[d]);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
493 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
494 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
495 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
496 else{
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
497 //push dummy data to not hide the label
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
498 new_data.push(getDummyData(checkbox_key));
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
499 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
500 }
730
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
501
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
502 var new_options = YAHOO.lang.merge(plot_options, {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
503 xaxis: {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
504 min: cur_ranges.xaxis.from,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
505 max: cur_ranges.xaxis.to,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
506 mode:"time",
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
507 timeformat: "%d/%m",
730
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
508 },
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
509 });
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
510 if (!new_data){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
511 new_data = [[0,1]];
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
512 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
513 // do the zooming
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
514 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
515
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
516 plot.subscribe("plotselected", plotselected);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
517
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
518 //resubscribe plothover
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
519 plot.subscribe("plothover", plothover);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
520
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
521 // don't fire event on the overview to prevent eternal loop
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
522 overview.setSelection(cur_ranges, true);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
523
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
524 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
525
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
526 /**
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
527 * plot only selected items from overview
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
528 * @param ranges
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
529 * @returns
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
530 */
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
531 function plotselected(ranges,cur_data) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
532 //updates the data for new plot
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
533 data = getDataAccordingToRanges(ranges);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
534 generateCheckboxes(data);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
535
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
536 var new_options = YAHOO.lang.merge(plot_options, {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
537 xaxis: {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
538 min: ranges.xaxis.from,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
539 max: ranges.xaxis.to,
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
540 mode:"time",
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
541 timeformat: "%d/%m",
730
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
542 },
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
543 yaxis: {
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
544 min: ranges.yaxis.from,
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
545 max: ranges.yaxis.to,
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
546 },
6f05265eab14 small template fix
Marcin Kuzminski <marcin@python-works.com>
parents: 696
diff changeset
547
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
548 });
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
549 // do the zooming
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
550 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
551
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
552 plot.subscribe("plotselected", plotselected);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
553
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
554 //resubscribe plothover
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
555 plot.subscribe("plothover", plothover);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
556
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
557 // don't fire event on the overview to prevent eternal loop
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
558 overview.setSelection(ranges, true);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
559
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
560 //resubscribe choiced
763
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
561 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
562 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
563
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
564 var previousPoint = null;
410
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 409
diff changeset
565
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
566 function plothover(o) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
567 var pos = o.pos;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
568 var item = o.item;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
569
763
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
570 //YUD.get("x").innerHTML = pos.x.toFixed(2);
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
571 //YUD.get("y").innerHTML = pos.y.toFixed(2);
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
572 if (item) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
573 if (previousPoint != item.datapoint) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
574 previousPoint = item.datapoint;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
575
763
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
576 var tooltip = YUD.get("tooltip");
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
577 if(tooltip) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
578 tooltip.parentNode.removeChild(tooltip);
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
579 }
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
580 var x = item.datapoint.x.toFixed(2);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
581 var y = item.datapoint.y.toFixed(2);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
582
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
583 if (!item.series.label){
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
584 item.series.label = 'commits';
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
585 }
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
586 var d = new Date(x*1000);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
587 var fd = d.toDateString()
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
588 var nr_commits = parseInt(y);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
589
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
590 var cur_data = dataset[item.series.label].data[item.dataIndex];
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
591 var added = cur_data.added;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
592 var changed = cur_data.changed;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
593 var removed = cur_data.removed;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
594
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
595 var nr_commits_suffix = " ${_('commits')} ";
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
596 var added_suffix = " ${_('files added')} ";
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
597 var changed_suffix = " ${_('files changed')} ";
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
598 var removed_suffix = " ${_('files removed')} ";
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
599
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
600
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
601 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
602 if(added==1){added_suffix=" ${_('file added')} ";}
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
603 if(changed==1){changed_suffix=" ${_('file changed')} ";}
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
604 if(removed==1){removed_suffix=" ${_('file removed')} ";}
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
605
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
606 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
607 +'<br/>'+
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
608 nr_commits + nr_commits_suffix+'<br/>'+
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
609 added + added_suffix +'<br/>'+
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
610 changed + changed_suffix + '<br/>'+
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
611 removed + removed_suffix + '<br/>');
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
612 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
613 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
614 else {
763
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
615 var tooltip = YUD.get("tooltip");
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
616
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
617 if(tooltip) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
618 tooltip.parentNode.removeChild(tooltip);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
619 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
620 previousPoint = null;
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
621 }
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
622 }
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
623
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
624 /**
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
625 * MAIN EXECUTION
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
626 */
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
627
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
628 var data = getDataAccordingToRanges(initial_ranges);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
629 generateCheckboxes(data);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
630
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
631 //main plot
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
632 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
633
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
634 //overview
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
635 var overview = YAHOO.widget.Flot(overviewContainer, overview_dataset, overview_options);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
636
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
637 //show initial selection on overview
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
638 overview.setSelection(initial_ranges);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
639
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
640 plot.subscribe("plotselected", plotselected);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
641
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
642 overview.subscribe("plotselected", function (ranges) {
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
643 plot.setSelection(ranges);
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
644 });
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
645
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
646 plot.subscribe("plothover", plothover);
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
647
763
0dad296d2a57 extended trending languages to more entries, implemented new faster and "fancy"
Marcin Kuzminski <marcin@python-works.com>
parents: 739
diff changeset
648 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
487
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
649 }
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
650 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
b12ea84fb906 Some fixes to summary, and total rewrite of summary graphs implemented more interactive graph.
Marcin Kuzminski <marcin@python-works.com>
parents: 486
diff changeset
651 </script>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
652
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
653 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
654 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
655
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
656 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
657 <div class="title">
739
554ed64953ff fixes #76 added confirmation dialog for user removal.
Marcin Kuzminski <marcin@python-works.com>
parents: 734
diff changeset
658 <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
659 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
660 <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
661 <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
662 <%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
663 </div>
b04d5214fd3c removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
664 ##%if c.repo_changesets:
b04d5214fd3c removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
665 ## ${h.link_to(_('show more'),h.url('changelog_home',repo_name=c.repo_name))}
b04d5214fd3c removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
666 ##%endif
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
667 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
668 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
669 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
670 <div class="title">
820
de5d9de45146 fixed message about disabled stats, template fixes for summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 810
diff changeset
671 <div class="breadcrumbs">${h.link_to(_('Tags'),h.url('tags_home',repo_name=c.repo_name))}</div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
672 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
673 <div class="table">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
674 <%include file='../tags/tags_data.html'/>
509
b50e79b4257a fixes to pidlock, to not raise unneded execptions
Marcin Kuzminski <marcin@python-works.com>
parents: 506
diff changeset
675 %if c.repo_changesets:
b50e79b4257a fixes to pidlock, to not raise unneded execptions
Marcin Kuzminski <marcin@python-works.com>
parents: 506
diff changeset
676 ${h.link_to(_('show more'),h.url('tags_home',repo_name=c.repo_name))}
b50e79b4257a fixes to pidlock, to not raise unneded execptions
Marcin Kuzminski <marcin@python-works.com>
parents: 506
diff changeset
677 %endif
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
678 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
679 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
680 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
681 <div class="title">
820
de5d9de45146 fixed message about disabled stats, template fixes for summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 810
diff changeset
682 <div class="breadcrumbs">${h.link_to(_('Branches'),h.url('branches_home',repo_name=c.repo_name))}</div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
683 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
684 <div class="table">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
685 <%include file='../branches/branches_data.html'/>
509
b50e79b4257a fixes to pidlock, to not raise unneded execptions
Marcin Kuzminski <marcin@python-works.com>
parents: 506
diff changeset
686 %if c.repo_changesets:
b50e79b4257a fixes to pidlock, to not raise unneded execptions
Marcin Kuzminski <marcin@python-works.com>
parents: 506
diff changeset
687 ${h.link_to(_('show more'),h.url('branches_home',repo_name=c.repo_name))}
b50e79b4257a fixes to pidlock, to not raise unneded execptions
Marcin Kuzminski <marcin@python-works.com>
parents: 506
diff changeset
688 %endif
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
689 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
690 </div>
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
691
942
32318ec7bfc1 added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents: 917
diff changeset
692 </%def>