Mercurial > kallithea
changeset 6667:8dd57541a2f7
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 .
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 11 Jun 2017 15:02:08 +0200 |
parents | 5efcfe4dd259 |
children | b99cd2bc7540 |
files | kallithea/templates/compare/compare_cs.html kallithea/templates/pullrequests/pullrequest.html |
diffstat | 2 files changed, 0 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/templates/compare/compare_cs.html Sun Jun 04 16:28:00 2017 +0200 +++ b/kallithea/templates/compare/compare_cs.html Sun Jun 11 15:02:08 2017 +0200 @@ -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');
--- a/kallithea/templates/pullrequests/pullrequest.html Sun Jun 04 16:28:00 2017 +0200 +++ b/kallithea/templates/pullrequests/pullrequest.html Sun Jun 11 15:02:08 2017 +0200 @@ -176,9 +176,6 @@ } 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); }); }