changeset 6343:62d949b4c0a3

templates: use data-f_path instead of div with fake full_f_path attribute
author domruf <dominikruf@gmail.com>
date Wed, 21 Sep 2016 22:32:12 +0200
parents 8e3137064ab6
children d44d5bb8b454
files kallithea/public/js/base.js kallithea/templates/changeset/diff_block.html
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/public/js/base.js	Tue Nov 22 09:04:45 2016 +0100
+++ b/kallithea/public/js/base.js	Wed Sep 21 22:32:12 2016 +0200
@@ -633,7 +633,7 @@
     var children = $bubble.closest('tr.line').children('[id]');
     var line_td_id = children[children.length - 1].id;
     var $comment_div = _get_add_comment_div(line_td_id);
-    var f_path = $bubble.closest('div.full_f_path').data('f_path');
+    var f_path = $bubble.closest('[data-f_path]').data('f_path');
     var parts = line_td_id.split('_');
     var line_no = parts[parts.length-1];
     comment_div_state($comment_div, f_path, line_no, true);
--- a/kallithea/templates/changeset/diff_block.html	Tue Nov 22 09:04:45 2016 +0100
+++ b/kallithea/templates/changeset/diff_block.html	Wed Sep 21 22:32:12 2016 +0200
@@ -78,7 +78,7 @@
                 </span>
             </div>
         </div>
-        <div class="code-body full_f_path" data-f_path="${h.safe_unicode(cs_filename)}">
+        <div class="code-body" data-f_path="${h.safe_unicode(cs_filename)}">
             ${diff|n}
             %if cs_filename.rsplit('.')[-1] in ['png', 'gif', 'jpg', 'bmp']:
               <div class="btn btn-image-diff-show">Show images</div>