Changeset - 8dd57541a2f7
[Not reviewed]
default
0 2 0
Mads Kiilerich (mads) - 9 years ago 2017-06-11 15:02:08
mads@kiilerich.com
pullrequests: fix graph re-drawing on 'expand' of changeset description while creating PR

Expanding would fail with
TypeError: r.render is not a function

To fix this, do all the graph drawing in compare_cs.html .
2 files changed with 0 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/compare/compare_cs.html
Show inline comments
 
@@ -129,11 +129,9 @@
 
<script type="text/javascript">
 

	
 
    $(document).ready(function(){
 
%if not c.is_ajax_preview:
 
        var jsdata = ${h.js(c.jsdata)};
 
        var r = new BranchRenderer('graph_canvas', 'graph_content_pr', 'chg_');
 
        r.render(jsdata);
 
%endif
 

	
 
        $('.expand_commit').click(function(e){
 
            var cid = $(this).data('commit_id');
kallithea/templates/pullrequests/pullrequest.html
Show inline comments
 
@@ -176,9 +176,6 @@ ${self.repo_context_bar('showpullrequest
 
      }
 
      pendingajax = asynchtml(url, $('#pull_request_overview'), function(o){
 
          pendingajax = undefined;
 
          var jsdata = eval('('+$('#jsdata').html()+')'); // TODO: just get json
 
          var r = new BranchRenderer('graph_canvas', 'graph_content_pr', 'chg_');
 
          r.render(jsdata);
 
      });
 
  }
 

	
0 comments (0 inline, 0 general)