##// END OF EJS Templates
changelog: re-render branch graph on page resize...
domruf -
r6622:d5ec8035 default
parent child Browse files
Show More
@@ -182,6 +182,9 b''
182
182
183 <script type="text/javascript" src="${h.url('/js/graph.js', ver=c.kallithea_version)}"></script>
183 <script type="text/javascript" src="${h.url('/js/graph.js', ver=c.kallithea_version)}"></script>
184 <script type="text/javascript">
184 <script type="text/javascript">
185 var jsdata = ${h.js(c.jsdata)};
186 var graph = new BranchRenderer('graph_canvas', 'graph_content', 'chg_');
187
185 $(document).ready(function(){
188 $(document).ready(function(){
186 var $checkboxes = $('.changeset_range');
189 var $checkboxes = $('.changeset_range');
187
190
@@ -264,14 +267,14 b''
264 checkbox_checker();
267 checkbox_checker();
265 $checkboxes.click(function() {
268 $checkboxes.click(function() {
266 checkbox_checker();
269 checkbox_checker();
267 r.render(jsdata);
270 graph.render(jsdata);
268 });
271 });
269 $('#singlerange').click(checkbox_checker);
272 $('#singlerange').click(checkbox_checker);
270
273
271 $('#rev_range_clear').click(function(e){
274 $('#rev_range_clear').click(function(e){
272 $checkboxes.prop('checked', false);
275 $checkboxes.prop('checked', false);
273 checkbox_checker();
276 checkbox_checker();
274 r.render(jsdata);
277 graph.render(jsdata);
275 });
278 });
276
279
277 var $msgs = $('.message');
280 var $msgs = $('.message');
@@ -294,7 +297,7 b''
294 $('#C-'+cid).toggleClass('expanded');
297 $('#C-'+cid).toggleClass('expanded');
295
298
296 //redraw the graph, r and jsdata are bound outside function
299 //redraw the graph, r and jsdata are bound outside function
297 r.render(jsdata);
300 graph.render(jsdata);
298 });
301 });
299
302
300 // change branch filter
303 // change branch filter
@@ -315,11 +318,12 b''
315 $("#changelog").hide();
318 $("#changelog").hide();
316 });
319 });
317
320
318 var jsdata = ${h.js(c.jsdata)};
321 graph.render(jsdata);
319 var r = new BranchRenderer('graph_canvas', 'graph_content', 'chg_');
320 r.render(jsdata);
321 });
322 });
322
323
324 $(window).resize(function(){
325 graph.render(jsdata);
326 });
323 </script>
327 </script>
324 %else:
328 %else:
325 ${_('There are no changes yet')}
329 ${_('There are no changes yet')}
General Comments 0
You need to be logged in to leave comments. Login now