##// END OF EJS Templates
Journal refresh button
marcink -
r1746:753aeb4a beta
parent child Browse files
Show More
@@ -15,16 +15,13 b''
15 <!-- box / title -->
15 <!-- box / title -->
16 <div class="title">
16 <div class="title">
17 <h5>${_('Journal')}</h5>
17 <h5>${_('Journal')}</h5>
18 <ul class="links">
19 <li>
20 <span><a href="#"><img id="refresh" class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/>
21 </a></span>
22 </li>
23 </ul>
18 </div>
24 </div>
19 <script type="text/javascript">
20 function show_more_event(){
21 YUE.on(YUD.getElementsByClassName('show_more'),'click',function(e){
22 var el = e.target;
23 YUD.setStyle(YUD.get(el.id.substring(1)),'display','');
24 YUD.setStyle(el.parentNode,'display','none');
25 });
26 }
27 </script>
28 <div id="journal">${c.journal_data}</div>
25 <div id="journal">${c.journal_data}</div>
29 </div>
26 </div>
30 <div class="box box-right">
27 <div class="box box-right">
@@ -44,6 +41,7 b''
44 </div>
41 </div>
45 <!-- end box / title -->
42 <!-- end box / title -->
46 <div id="my" class="table">
43 <div id="my" class="table">
44 %if c.user_repos:
47 <table>
45 <table>
48 <thead>
46 <thead>
49 <tr>
47 <tr>
@@ -52,7 +50,6 b''
52 <th colspan="2" class="left">${_('action')}</th>
50 <th colspan="2" class="left">${_('action')}</th>
53 </thead>
51 </thead>
54 <tbody>
52 <tbody>
55 %if c.user_repos:
56 %for repo in c.user_repos:
53 %for repo in c.user_repos:
57 <tr>
54 <tr>
58 <td>
55 <td>
@@ -86,6 +83,8 b''
86 </td>
83 </td>
87 </tr>
84 </tr>
88 %endfor
85 %endfor
86 </tbody>
87 </table>
89 %else:
88 %else:
90 <div style="padding:5px 0px 10px 0px;">
89 <div style="padding:5px 0px 10px 0px;">
91 ${_('No repositories yet')}
90 ${_('No repositories yet')}
@@ -94,18 +93,16 b''
94 %endif
93 %endif
95 </div>
94 </div>
96 %endif
95 %endif
97 </tbody>
98 </table>
99 </div>
96 </div>
100
97
101 <div id="watched" class="table" style="display:none">
98 <div id="watched" class="table" style="display:none">
99 %if c.following:
102 <table>
100 <table>
103 <thead>
101 <thead>
104 <tr>
102 <tr>
105 <th class="left">${_('Name')}</th>
103 <th class="left">${_('Name')}</th>
106 </thead>
104 </thead>
107 <tbody>
105 <tbody>
108 %if c.following:
109 %for entry in c.following:
106 %for entry in c.following:
110 <tr>
107 <tr>
111 <td>
108 <td>
@@ -115,7 +112,6 b''
115 %endif
112 %endif
116
113
117 %if entry.follows_repo_id:
114 %if entry.follows_repo_id:
118
119 <div style="float:right;padding-right:5px">
115 <div style="float:right;padding-right:5px">
120 <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}"
116 <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}"
121 onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')">
117 onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')">
@@ -140,12 +136,16 b''
140 </td>
136 </td>
141 </tr>
137 </tr>
142 %endfor
138 %endfor
139 </tbody>
140 </table>
143 %else:
141 %else:
144 </tbody>
142 <div style="padding:5px 0px 10px 0px;">
145 ${_('You are not following any users or repositories')}
143 ${_('You are not following any users or repositories')}
144 </div>
146 %endif
145 %endif
147 </table>
146 </div>
148 </div>
147 </div>
148
149 <script type="text/javascript">
149 <script type="text/javascript">
150 YUE.on('show_my','click',function(e){
150 YUE.on('show_my','click',function(e){
151 YUD.setStyle('watched','display','none');
151 YUD.setStyle('watched','display','none');
@@ -169,5 +169,9 b''
169 q_filter(target,nodes,func);
169 q_filter(target,nodes,func);
170 YUE.preventDefault(e);
170 YUE.preventDefault(e);
171 })
171 })
172 YUE.on('refresh','click',function(e){
173 ypjax(e.target.href,"journal",function(){show_more_event();tooltip_activate();});
174 YUE.preventDefault(e);
175 })
172 </script>
176 </script>
173 </%def>
177 </%def>
@@ -43,5 +43,7 b' YUE.onDOMReady(function(){'
43 ${c.journal_pager.pager('$link_previous ~2~ $link_next')}
43 ${c.journal_pager.pager('$link_previous ~2~ $link_next')}
44 </div>
44 </div>
45 %else:
45 %else:
46 <div style="padding:5px 0px 10px 10px;">
46 ${_('No entries yet')}
47 ${_('No entries yet')}
48 </div>
47 %endif No newline at end of file
49 %endif
General Comments 0
You need to be logged in to leave comments. Login now