##// END OF EJS Templates
js: fixes for new diff structure
ergo -
r1166:6a7cea5d default
parent child Browse files
Show More
@@ -413,27 +413,7 b' function scrollToElement(element, percen'
413 413 // At the time of development, Chrome didn't seem to support jquery's :target
414 414 // element, so I had to scroll manually
415 415
416 if (location.hash) { /* TODO: dan: remove this and replace with code block
417 below when new diffs are ready */
418 var result = splitDelimitedHash(location.hash);
419 var loc = result.loc;
420 if (loc.length > 1){
421 var lineno = $(loc+'.lineno');
422 if (lineno.length > 0){
423 var tr = lineno.parents('tr.line');
424 tr.addClass('selected');
425
426 tr[0].scrollIntoView();
427
428 $.Topic('/ui/plugins/code/anchor_focus').prepareOrPublish({
429 tr: tr,
430 remainder: result.remainder});
431 }
432 }
433 }
434
435 if (location.hash) { /* TODO: dan: use this to replace the code block above
436 when new diffs are ready */
416 if (location.hash) {
437 417 var result = splitDelimitedHash(location.hash);
438 418 var loc = result.loc;
439 419 if (loc.length > 1) {
@@ -484,7 +464,7 b' function scrollToElement(element, percen'
484 464 var $first_line_td = highlightable_line_tds[0];
485 465 scrollToElement($first_line_td);
486 466 $.Topic('/ui/plugins/code/anchor_focus').prepareOrPublish({
487 lineno: $first_line_td,
467 td: $first_line_td,
488 468 remainder: result.remainder
489 469 });
490 470 }
General Comments 0
You need to be logged in to leave comments. Login now