Mercurial > kallithea
changeset 8579:6f1e25144958
diff: fix "Show inline comments"
jQuery has weak "friendly" semantics for data attributes and do for example
interpret the data attribute name 'id_for' as 'idFor'. We could thus not
retrieve it as 'id_for'.
Instead, avoid the special semantics of '_' by just naming the data attribute
'for'.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 18 Jun 2020 16:08:36 +0200 |
parents | ff8651b2f14f |
children | 4bf9d7f18253 |
files | kallithea/templates/changeset/diff_block.html |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/templates/changeset/diff_block.html Fri Jun 19 18:24:38 2020 +0200 +++ b/kallithea/templates/changeset/diff_block.html Thu Jun 18 16:08:36 2020 +0200 @@ -70,7 +70,7 @@ </div> <div class="pull-right"> ${_('Show inline comments')} - ${h.checkbox('checkbox-show-inline-' + id_fid, checked="checked",class_="show-inline-comments",**{'data-id_for':id_fid})} + ${h.checkbox('checkbox-show-inline-' + id_fid, checked="checked",class_="show-inline-comments",**{'data-for':id_fid})} </div> </div> <div class="no-padding panel-body" data-f_path="${cs_filename}"> @@ -137,7 +137,7 @@ if(target == null){ target = this; } - var boxid = $(target).data('id_for'); + var boxid = $(target).data('for'); if(target.checked){ $('#{0} .inline-comments'.format(boxid)).show(); }else{