changeset 5603:720339c9f81c stable

diff: get collapse target via .attr instead of .prop Commit 3f017db297c4 was not fully tested and broke collapse/expand of diffs on changesets. $button is not a link with a target and the target can thus not be retrieved with .prop('target'); $button is just a span that happens to have a custom attribute with the name 'target'. We thus revert back to the old way of retrieving it with .attr('target'). (It would perhaps be even better to use data attributes and name it data-target and use .data('target') ...)
author Jan Heylen <heyleke@gmail.com>
date Thu, 24 Dec 2015 21:28:19 +0100
parents 1666c8c7d925
children 74e669d8a479
files kallithea/public/js/base.js
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/public/js/base.js	Fri Nov 27 01:34:47 2015 +0100
+++ b/kallithea/public/js/base.js	Thu Dec 24 21:28:19 2015 +0100
@@ -1886,7 +1886,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("&uarr; {0} &uarr;".format(_TM['Collapse Diff']));