[diffoscope] 01/01: html-dir: show/hide diff comments, which can be very large

Ximin Luo infinity0 at debian.org
Wed Jun 14 14:50:39 CEST 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch experimental
in repository diffoscope.

commit bbfbe91bb9479003e78b2007484264379a452b17
Author: Ximin Luo <infinity0 at debian.org>
Date:   Wed Jun 14 14:50:14 2017 +0200

    html-dir: show/hide diff comments, which can be very large
---
 diffoscope/presenters/html/templates.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/diffoscope/presenters/html/templates.py b/diffoscope/presenters/html/templates.py
index 207ae5c..713718a 100644
--- a/diffoscope/presenters/html/templates.py
+++ b/diffoscope/presenters/html/templates.py
@@ -173,12 +173,13 @@ $(function() {
   var diffcontrols = $(".diffcontrol");
   diffcontrols.on('click', function(evt) {
     var control = $(this);
-    var target = control.parent().siblings('table.diff, div.difference');
+    var parent = control.parent();
+    var target = $.merge(parent.siblings('table.diff, div.difference'), parent.find('div.comment'));
     var orig = target;
     if (evt.shiftKey) {
-        var parent = control.parent().parent();
-        control = parent.find('.diffcontrol');
-        target = parent.find('table.diff, div.difference');
+        var gparent = parent.parent();
+        control = gparent.find('.diffcontrol');
+        target = gparent.find('table.diff, div.difference, div.comment');
     }
     if (orig.is(":visible")) {
         target.hide();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list