From cb2790e82277c6c11c5b8da8b4e634161bc2dbdd Mon Sep 17 00:00:00 2001 From: Marcin Lulek Date: Tue, 29 Nov 2016 13:33:06 +0100 Subject: [PATCH] js: fixes for new diff structure --- rhodecode/public/js/src/rhodecode.js | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/rhodecode/public/js/src/rhodecode.js b/rhodecode/public/js/src/rhodecode.js index b0e5d510..b1884ec7 100644 --- a/rhodecode/public/js/src/rhodecode.js +++ b/rhodecode/public/js/src/rhodecode.js @@ -413,27 +413,7 @@ $(document).ready(function() { // At the time of development, Chrome didn't seem to support jquery's :target // element, so I had to scroll manually - if (location.hash) { /* TODO: dan: remove this and replace with code block - below when new diffs are ready */ - var result = splitDelimitedHash(location.hash); - var loc = result.loc; - if (loc.length > 1){ - var lineno = $(loc+'.lineno'); - if (lineno.length > 0){ - var tr = lineno.parents('tr.line'); - tr.addClass('selected'); - - tr[0].scrollIntoView(); - - $.Topic('/ui/plugins/code/anchor_focus').prepareOrPublish({ - tr: tr, - remainder: result.remainder}); - } - } - } - - if (location.hash) { /* TODO: dan: use this to replace the code block above - when new diffs are ready */ + if (location.hash) { var result = splitDelimitedHash(location.hash); var loc = result.loc; if (loc.length > 1) { @@ -484,7 +464,7 @@ $(document).ready(function() { var $first_line_td = highlightable_line_tds[0]; scrollToElement($first_line_td); $.Topic('/ui/plugins/code/anchor_focus').prepareOrPublish({ - lineno: $first_line_td, + td: $first_line_td, remainder: result.remainder }); }