Fix revision redirect to index page

The revision view had a bug that clicking on a list entry would redirect
the user back to the index page instead of providing the revision diff.

This was cased by the baseurl which is now used as reference for hrefs.
Therefore when clicking on the `href="#"` this was actually pointing at
`<baseurl>#` which is usually the index page.

This patch simply removes the href from the list items and therefore the
link functionality. This fixes the whole problem by removing 9
characters from our source code.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
Sheogorath 2020-02-10 17:41:47 +01:00
parent 2a28c832fc
commit 45cc1325fb
No known key found for this signature in database
GPG key ID: C9B1C80737B9CE18

View file

@ -1103,7 +1103,7 @@ function parseRevisions (_revisions) {
revisionList.html('')
for (var i = 0; i < revisions.length; i++) {
var revision = revisions[i]
var item = $('<a href="#" class="list-group-item"></a>')
var item = $('<a class="list-group-item"></a>')
item.attr('data-revision-time', revision.time)
if (lastRevision === revision.time) item.addClass('active')
var itemHeading = $('<h5 class="list-group-item-heading"></h5>')