##// END OF EJS Templates
js: offsetScroll to elements that are found
ergo -
r794:6ce205ff default
parent child Browse files
Show More
@@ -375,8 +375,10 b''
375 if (location.hash) {
375 if (location.hash) {
376 var result = splitDelimitedHash(location.hash);
376 var result = splitDelimitedHash(location.hash);
377 var line = $('html').find(result.loc);
377 var line = $('html').find(result.loc);
378 if (line.length > 0){
378 offsetScroll(line, 70);
379 offsetScroll(line, 70);
379 }
380 }
381 }
380
382
381 // browse tree @ revision
383 // browse tree @ revision
382 $('#files_link').on('click', function(e){
384 $('#files_link').on('click', function(e){
@@ -177,10 +177,12 b''
177 var _first_line = $('#L' + h_lines[0]).get(0);
177 var _first_line = $('#L' + h_lines[0]).get(0);
178 if (_first_line) {
178 if (_first_line) {
179 var line = $('#L' + h_lines[0]);
179 var line = $('#L' + h_lines[0]);
180 if (line.length > 0){
180 offsetScroll(line, 70);
181 offsetScroll(line, 70);
181 }
182 }
182 }
183 }
183 }
184 }
185 }
184
186
185 // select code link event
187 // select code link event
186 $("#hlcode").mouseup(getSelectionLink);
188 $("#hlcode").mouseup(getSelectionLink);
@@ -415,8 +415,10 b''
415 if (location.hash) {
415 if (location.hash) {
416 var result = splitDelimitedHash(location.hash);
416 var result = splitDelimitedHash(location.hash);
417 var line = $('html').find(result.loc);
417 var line = $('html').find(result.loc);
418 if (line.length > 0){
418 offsetScroll(line, 70);
419 offsetScroll(line, 70);
419 }
420 }
421 }
420 $(function(){
422 $(function(){
421 ReviewerAutoComplete('user');
423 ReviewerAutoComplete('user');
422 // custom code mirror
424 // custom code mirror
General Comments 0
You need to be logged in to leave comments. Login now