Show More
@@ -1132,6 +1132,9 b' table.cb {' | |||
|
1132 | 1132 | .icon-comment { |
|
1133 | 1133 | cursor: pointer; |
|
1134 | 1134 | } |
|
1135 | &.cb-line-selected { | |
|
1136 | background: @comment-highlight-color !important; | |
|
1137 | } | |
|
1135 | 1138 | &.cb-line-selected > div { |
|
1136 | 1139 | display: block; |
|
1137 | 1140 | background: @comment-highlight-color !important; |
@@ -1154,7 +1157,7 b' table.cb {' | |||
|
1154 | 1157 | a::before { |
|
1155 | 1158 | content: attr(data-line-no); |
|
1156 | 1159 | } |
|
1157 |
&.cb-line-selected |
|
|
1160 | &.cb-line-selected { | |
|
1158 | 1161 | background: @comment-highlight-color !important; |
|
1159 | 1162 | } |
|
1160 | 1163 |
@@ -295,24 +295,25 b' function scrollToElement(element, percen' | |||
|
295 | 295 | }); |
|
296 | 296 | |
|
297 | 297 | $('body').on('click', '.cb-lineno a', function(event) { |
|
298 | ||
|
299 | 298 |
|
|
300 | 299 |
|
|
301 | 300 |
|
|
302 | 301 | |
|
303 | 302 |
|
|
303 | var lineName = $(this).attr('name'); | |
|
304 | ||
|
304 | 305 |
|
|
306 | var prevLine = $('.cb-line-selected a').data('lineNo'); | |
|
305 | 307 | |
|
306 | 308 |
|
|
307 | var prevLine = $('.cb-line-selected a').data('lineNo'); | |
|
308 | 309 |
|
|
309 | 310 |
|
|
310 | 311 |
|
|
311 | 312 |
|
|
312 | 313 |
|
|
313 | 314 | |
|
315 | // single click | |
|
314 | 316 |
|
|
315 | ||
|
316 | 317 |
|
|
317 | 318 |
|
|
318 | 319 |
|
@@ -323,11 +324,12 b' function scrollToElement(element, percen' | |||
|
323 | 324 |
|
|
324 | 325 |
|
|
325 | 326 |
|
|
326 |
|
|
|
327 | // clear old selected lines | |
|
327 | 328 |
|
|
328 | 329 | |
|
329 | 330 |
|
|
330 | 331 |
|
|
332 | ||
|
331 | 333 |
|
|
332 | 334 |
|
|
333 | 335 |
|
@@ -335,15 +337,20 b' function scrollToElement(element, percen' | |||
|
335 | 337 |
|
|
336 | 338 |
|
|
337 | 339 | |
|
338 | ||
|
339 | } else { | |
|
340 | if ($(this).attr('name') !== undefined) { | |
|
341 | // clear selection | |
|
340 | } else if (lineName !== undefined) { // lineName only occurs in diffs | |
|
341 | // clear old selected lines | |
|
342 | 342 |
|
|
343 | var aEl = $(this).closest('td'); | |
|
344 | aEl.addClass('cb-line-selected'); | |
|
345 | aEl.next('td').addClass('cb-line-selected'); | |
|
343 | var anchor = '#{0}'.format(lineName); | |
|
344 | var diffmode = templateContext.session_attrs.diffmode || "sideside"; | |
|
345 | ||
|
346 | if (diffmode === "unified") { | |
|
347 | $(this).closest('tr').find('td').addClass('cb-line-selected'); | |
|
348 | } else { | |
|
349 | var activeTd = $(this).closest('td'); | |
|
350 | activeTd.addClass('cb-line-selected'); | |
|
351 | activeTd.next('td').addClass('cb-line-selected'); | |
|
346 | 352 |
|
|
353 | ||
|
347 | 354 |
|
|
348 | 355 | |
|
349 | 356 |
|
@@ -364,7 +371,6 b' function scrollToElement(element, percen' | |||
|
364 | 371 | |
|
365 | 372 |
|
|
366 | 373 | |
|
367 | ||
|
368 | 374 | $('.collapse_file').on('click', function(e) { |
|
369 | 375 | e.stopPropagation(); |
|
370 | 376 | if ($(e.target).is('a')) { return; } |
General Comments 0
You need to be logged in to leave comments.
Login now