Show More
@@ -42,6 +42,37 b'' | |||
|
42 | 42 | ${_('File is to big to display')} ${h.link_to(_('show as raw'), |
|
43 | 43 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
|
44 | 44 | %endif |
|
45 | ||
|
46 | <script type="text/javascript"> | |
|
47 | function highlight_lines(lines){ | |
|
48 | for(pos in lines){ | |
|
49 | console.log('L'+lines[pos]); | |
|
50 | YUD.setStyle('L'+lines[pos],'background-color','#FFFFBE'); | |
|
51 | } | |
|
52 | } | |
|
53 | page_highlights = location.href.substring(location.href.indexOf('#')+1).split('L'); | |
|
54 | if (page_highlights.length == 2){ | |
|
55 | highlight_ranges = page_highlights[1].split(","); | |
|
56 | ||
|
57 | var h_lines = []; | |
|
58 | for (pos in highlight_ranges){ | |
|
59 | var _range = highlight_ranges[pos].split('-'); | |
|
60 | if(_range.length == 2){ | |
|
61 | var start = parseInt(_range[0]); | |
|
62 | var end = parseInt(_range[1]); | |
|
63 | if (start < end){ | |
|
64 | for(var i=start;i<=end;i++){ | |
|
65 | h_lines.push(i); | |
|
66 | } | |
|
67 | } | |
|
68 | } | |
|
69 | else{ | |
|
70 | h_lines.push(parseInt(highlight_ranges[pos])); | |
|
71 | } | |
|
72 | } | |
|
73 | highlight_lines(h_lines); | |
|
74 | } | |
|
75 | </script> | |
|
45 | 76 | </div> |
|
46 | 77 | </div> |
|
47 | 78 |
General Comments 0
You need to be logged in to leave comments.
Login now