[PATCH 3 of 3 v2] collapse: getting target via .attr instead of .prop

Jan Heylen heyleke at gmail.com
Thu Dec 24 20:32:36 UTC 2015


# HG changeset patch
# User Jan Heylen <jan.heylen at alcatel-lucent.com>
# Date 1450988899 -3600
#      Thu Dec 24 21:28:19 2015 +0100
# Node ID f306d394f56a447d11521596df6ed730fbca9709
# Parent  8bc8366a6874640c73c20ce8ecfb596c0b4134db
collapse: getting target via .attr instead of .prop

commit 3f017db297c4 has broken standard collapse/expand diff feature:
for some unknown reason, the target attribute cannot be retreived like this
with the .prop jquery function, so reverting it back to something that was
working (.attr). Apparently the original change was untested ;-)

diff -r 8bc8366a6874 -r f306d394f56a kallithea/public/js/base.js
--- a/kallithea/public/js/base.js	Fri Nov 27 01:48:09 2015 +0100
+++ b/kallithea/public/js/base.js	Thu Dec 24 21:28:19 2015 +0100
@@ -1918,7 +1918,7 @@
 $(document).ready(function(){
     $('.diff-collapse-button').click(function(e) {
         var $button = $(e.currentTarget);
-        var $target = $('#' + $button.prop('target'));
+        var $target = $('#' + $button.attr('target'));
         if($target.hasClass('hidden')){
             $target.removeClass('hidden');
             $button.html("↑ {0} ↑".format(_TM['Collapse Diff']));


More information about the kallithea-general mailing list