Mercurial > kallithea
annotate rhodecode/templates/journal/journal.html @ 2977:cff9d4e1d821 beta
Fixed issue when node didn't exists at 'tip' and we tried calculate history based on that assumption.
Now fallback to the changeset the node exists in for history calculation
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 04 Nov 2012 13:08:27 +0100 |
parents | 9937afa7f093 |
children | cc7eedb5323c |
rev | line source |
---|---|
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
995
d14723711d17
fixes for journal, added paging now it's possible to view whole journal
Marcin Kuzminski <marcin@python-works.com>
parents:
994
diff
changeset
|
2 <%inherit file="/base/base.html"/> |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 <%def name="title()"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 ${_('Journal')} - ${c.rhodecode_name} |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 </%def> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 <%def name="breadcrumbs()"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 ${c.rhodecode_name} |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 </%def> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 <%def name="page_nav()"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 ${self.menu('home')} |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 </%def> |
2413
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2412
diff
changeset
|
12 <%def name="head_extra()"> |
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2412
diff
changeset
|
13 <link href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" /> |
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2412
diff
changeset
|
14 <link href="${h.url('journal_rss', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" /> |
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2412
diff
changeset
|
15 </%def> |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
16 <%def name="main()"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
17 |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 <div class="box box-left"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
19 <!-- box / title --> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 <div class="title"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 <h5>${_('Journal')}</h5> |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
22 <ul class="links"> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
23 <li> |
2397
d815d617eb5e
added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
24 <span><a id="refresh" href="${h.url('journal')}"><img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/></a></span> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
25 </li> |
2397
d815d617eb5e
added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
26 <li> |
2412
708f70d4f8ef
fix feed icon mistake
Marcin Kuzminski <marcin@python-works.com>
parents:
2410
diff
changeset
|
27 <span><a href="${h.url('journal_rss', api_key=c.rhodecode_user.api_key)}"><img class="icon" title="${_('RSS feed')}" alt="${_('RSS feed')}" src="${h.url('/images/icons/rss_16.png')}"/></a></span> |
2397
d815d617eb5e
added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
28 </li> |
d815d617eb5e
added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
29 <li> |
2413
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2412
diff
changeset
|
30 <span><a href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}"><img class="icon" title="${_('ATOM feed')}" alt="${_('ATOM feed')}" src="${h.url('/images/icons/atom.png')}"/></a></span> |
2409
761e00380370
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2397
diff
changeset
|
31 </li> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
32 </ul> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
33 </div> |
995
d14723711d17
fixes for journal, added paging now it's possible to view whole journal
Marcin Kuzminski <marcin@python-works.com>
parents:
994
diff
changeset
|
34 <div id="journal">${c.journal_data}</div> |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 </div> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
36 <div class="box box-right"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
37 <!-- box / title --> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
38 <div class="title"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
39 <h5> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
40 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
41 <a id="show_watched" class="link-white" href="#watched">${_('Watched')}</a> / <a id="show_my" class="link-white" href="#my">${_('My repos')}</a> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
42 </h5> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
43 %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
44 <ul class="links"> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
45 <li> |
1770
184557472f5c
Implements #304
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
46 <span>${h.link_to(_('ADD'),h.url('admin_settings_create_repository'))}</span> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
47 </li> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
48 </ul> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
49 %endif |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
50 </div> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
51 <!-- end box / title --> |
2951
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
52 <div id="my" class="table" style="display:none"> |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
53 ## loaded via AJAX |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
54 ${_('Loading...')} |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
55 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
56 |
2951
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
57 <div id="watched" class="table"> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
58 %if c.following: |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
59 <table> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
60 <thead> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
61 <tr> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
62 <th class="left">${_('Name')}</th> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
63 </thead> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
64 <tbody> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
65 %for entry in c.following: |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
66 <tr> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
67 <td> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
68 %if entry.follows_user_id: |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
69 <img title="${_('following user')}" alt="${_('user')}" src="${h.url('/images/icons/user.png')}"/> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
70 ${entry.follows_user.full_contact} |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
71 %endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
72 |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
73 %if entry.follows_repo_id: |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
74 <div style="float:right;padding-right:5px"> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
75 <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}" |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
76 onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
77 </span> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
78 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
79 |
1959
7a7ffe24b82c
optimized speed for browsing git changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
80 %if h.is_hg(entry.follows_repository): |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
81 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
1959
7a7ffe24b82c
optimized speed for browsing git changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
82 %elif h.is_git(entry.follows_repository): |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
83 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
84 %endif |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
85 |
2674
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2598
diff
changeset
|
86 %if entry.follows_repository.private and c.visual.show_private_icon: |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
87 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> |
2674
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2598
diff
changeset
|
88 %elif not entry.follows_repository.private and c.visual.show_public_icon: |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
89 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
90 %endif |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
91 <span class="watched_repo"> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
92 ${h.link_to(entry.follows_repository.repo_name,h.url('summary_home',repo_name=entry.follows_repository.repo_name))} |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
93 </span> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
94 %endif |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
95 </td> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
96 </tr> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
97 %endfor |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
98 </tbody> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
99 </table> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
100 %else: |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
101 <div style="padding:5px 0px 10px 0px;"> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
102 ${_('You are not following any users or repositories')} |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
103 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
104 %endif |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
105 </div> |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
106 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
107 |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
108 <script type="text/javascript"> |
2951
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
109 var show_my = function(e){ |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
110 YUD.setStyle('watched','display','none'); |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
111 YUD.setStyle('my','display',''); |
2951
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
112 |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
113 var url = "${h.url('admin_settings_my_repos')}"; |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
114 ypjax(url, 'my', function(){ |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
115 tooltip_activate(); |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
116 quick_repo_menu(); |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
117 var nodes = YUQ('#my tr td a.repo_name'); |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
118 var func = function(node){ |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
119 return node.parentNode.parentNode.parentNode; |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
120 } |
2951
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
121 q_filter('q_filter',nodes,func); |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
122 }); |
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
123 |
2951
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
124 } |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
125 YUE.on('show_my','click',function(e){ |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
126 show_my(e); |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
127 }) |
2951
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
128 var show_watched = function(e){ |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
129 YUD.setStyle('my','display','none'); |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
130 YUD.setStyle('watched','display',''); |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
131 var nodes = YUQ('#watched .watched_repo a'); |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
132 var target = 'q_filter'; |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
133 var func = function(node){ |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
134 return node.parentNode.parentNode; |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
135 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
136 q_filter(target,nodes,func); |
2951
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
137 } |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
138 YUE.on('show_watched','click',function(e){ |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
139 show_watched(e); |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
140 }) |
2951
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
141 //init watched |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
142 show_watched(); |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
143 |
2951
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
144 var tabs = { |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
145 'watched': show_watched, |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
146 'my': show_my, |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
147 } |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
148 var url = location.href.split('#'); |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
149 if (url[1]) { |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
150 //We have a hash |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
151 var tabHash = url[1]; |
301773d07012
Lazy loading on my journal page
Marcin Kuzminski <marcin@python-works.com>
parents:
2944
diff
changeset
|
152 tabs[tabHash](); |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
153 } |
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
154 |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
155 YUE.on('refresh','click',function(e){ |
2971
2bfcec6a3985
new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
2951
diff
changeset
|
156 ypjax(e.currentTarget.href,"journal",function(){ |
2bfcec6a3985
new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
2951
diff
changeset
|
157 show_more_event(); |
2bfcec6a3985
new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
2951
diff
changeset
|
158 tooltip_activate(); |
2bfcec6a3985
new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
2951
diff
changeset
|
159 show_changeset_tooltip(); |
2bfcec6a3985
new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
2951
diff
changeset
|
160 }); |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
161 YUE.preventDefault(e); |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
162 }); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
163 |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
164 |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
165 // main table sorting |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
166 var myColumnDefs = [ |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
167 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
168 {key:"name",label:"${_('Name')}",sortable:true, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
169 sortOptions: { sortFunction: nameSort }}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
170 {key:"tip",label:"${_('Tip')}",sortable:true, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
171 sortOptions: { sortFunction: revisionSort }}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
172 {key:"action1",label:"",sortable:false}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
173 {key:"action2",label:"",sortable:false}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
174 ]; |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
175 |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
176 var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
177 |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
178 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
179 |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
180 myDataSource.responseSchema = { |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
181 fields: [ |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
182 {key:"menu"}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
183 {key:"name"}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
184 {key:"tip"}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
185 {key:"action1"}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
186 {key:"action2"} |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
187 ] |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
188 }; |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
189 |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
190 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
191 { |
1780
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
192 sortedBy:{key:"name",dir:"asc"}, |
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
193 MSG_SORTASC:"${_('Click to sort ascending')}", |
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
194 MSG_SORTDESC:"${_('Click to sort descending')}", |
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
195 MSG_EMPTY:"${_('No records found.')}", |
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
196 MSG_ERROR:"${_('Data error.')}", |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
197 MSG_LOADING:"${_('Loading...')}", |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
198 } |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
199 ); |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
200 myDataTable.subscribe('postRenderEvent',function(oArgs) { |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
201 tooltip_activate(); |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
202 quick_repo_menu(); |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
203 var func = function(node){ |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
204 return node.parentNode.parentNode.parentNode.parentNode; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
205 } |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
206 q_filter('q_filter',YUQ('#my tr td a.repo_name'),func); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
207 }); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
208 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
209 </script> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
210 </%def> |