Bug#835033: debsources: [PATCH] Retain line context on 404s by appending the hash for specific links

2016-08-21 Thread Chris Lamb
submitter 835033 !
retitle 835033 debsources: Retain line context on 404s by appending the hash 
for specific links
tags 835033 + patch
thanks

> Forwarding to the BTS for record keeping.

(Ah, didn't think to check this package; thanks.)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#835033: debsources: [PATCH] Retain line context on 404s by appending the hash for specific links

2016-08-21 Thread Stefano Zacchiroli
Package: qa.debian.org
Severity: minor
User: qa.debian@packages.debian.org
Usertags: debsources

Forwarding to the BTS for record keeping.

- Forwarded message from Chris Lamb  -

Date: Sun, 21 Aug 2016 11:41:27 +0100
From: Chris Lamb 
To: debian...@lists.debian.org
Cc: i...@sources.debian.net
Subject: debsources: [PATCH] Retain line context on 404s by appending the hash 
for specific links
Message-Id: <1471776087.3092845.701483073.410a5...@webmail.messagingengine.com>

Hi,

Attached is the following:

  commit a0a47c965d364fb41d1b0fde2480252a9c328479
  Author: Chris Lamb 
  Date:   Sun Aug 21 11:39:25 2016 +0100
  
  Retain line context on 404s by appending the hash for specific links
  
  Signed-off-by: Chris Lamb 
  
   debsources/app/sources/templates/sources/404_suggestions.html | 2 +-
   debsources/app/templates/footer.inc.html  | 8 
   2 files changed, 9 insertions(+), 1 deletion(-)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-

>From a0a47c965d364fb41d1b0fde2480252a9c328479 Mon Sep 17 00:00:00 2001
From: Chris Lamb 
Date: Sun, 21 Aug 2016 11:39:25 +0100
Subject: [PATCH] Retain line context on 404s by appending the hash for
 specific links

Signed-off-by: Chris Lamb 
---
 debsources/app/sources/templates/sources/404_suggestions.html | 2 +-
 debsources/app/templates/footer.inc.html  | 8 
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/debsources/app/sources/templates/sources/404_suggestions.html 
b/debsources/app/sources/templates/sources/404_suggestions.html
index bf4609e..f1127f7 100644
--- a/debsources/app/sources/templates/sources/404_suggestions.html
+++ b/debsources/app/sources/templates/sources/404_suggestions.html
@@ -11,7 +11,7 @@ The file you are looking for might exist in one of the 
following
 versions:
 
 {% for s in suggestions %}
-  {{ s }}
+  {{ s }}
 {% endfor %}
 
 
diff --git a/debsources/app/templates/footer.inc.html 
b/debsources/app/templates/footer.inc.html
index 29d1d14..8636672 100644
--- a/debsources/app/templates/footer.inc.html
+++ b/debsources/app/templates/footer.inc.html
@@ -32,3 +32,11 @@
   Last update: {{ last_update }}.
 
 
+
+
+var elems = document.querySelectorAll('.js-append-window-location-hash');
+
+for (var i = 0; i < elems.length; ++i) {
+  elems[i].setAttribute('href', elems[i].getAttribute('href') + 
window.location.hash);
+}
+
-- 
2.9.3



- End forwarded message -

-- 
Stefano Zacchiroli . z...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader . OSI Board Director  . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »