Mercurial > kallithea
diff rhodecode/templates/changeset/changeset.html @ 2489:a0adf8db1416 beta
Enabled inline comments in pull-requests
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 19 Jun 2012 23:07:23 +0200 |
parents | ad19dfcdb1cc |
children | 79818f546538 |
line wrap: on
line diff
--- a/rhodecode/templates/changeset/changeset.html Tue Jun 19 22:28:44 2012 +0200 +++ b/rhodecode/templates/changeset/changeset.html Tue Jun 19 23:07:23 2012 +0200 @@ -125,6 +125,8 @@ <script> var _USERS_AC_DATA = ${c.users_array|n}; var _GROUPS_AC_DATA = ${c.users_groups_array|n}; + AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; + AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; </script> ## diff block <%namespace name="diff_block" file="/changeset/diff_block.html"/> @@ -132,16 +134,15 @@ ## template for inline comment form <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> - ${comment.comment_inline_form(c.changeset)} + ${comment.comment_inline_form()} ## render comments main comments form and it status ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} + ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS <script type="text/javascript"> YUE.onDOMReady(function(){ - AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; - AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}" YUE.on(YUQ('.show-inline-comments'),'change',function(e){ var show = 'none'; var target = e.currentTarget; @@ -167,7 +168,6 @@ // inject comments into they proper positions var file_comments = YUQ('.inline-comment-placeholder'); renderInlineComments(file_comments); - }) </script>