0001-js-make-.clickable-rows-works-with-relative-href-612.patch
gadjo/static/js/gadjo.js | ||
---|---|---|
407 | 407 |
if ($target.is('input, button, a')) { |
408 | 408 |
return true; |
409 | 409 |
} |
410 |
var data_link = $(this).find('a[href]').attr('href'); |
|
411 |
if (data_link) { |
|
412 |
if (data_link.indexOf('http://') == -1 && data_link.indexOf('https://') == -1) { |
|
413 |
data_link = window.location.pathname + data_link; |
|
414 |
} |
|
410 |
var $anchor = $(this).find('a[href]'); |
|
411 |
if ($anchor.length) { |
|
412 |
var href = $anchor[0].href; |
|
415 | 413 |
if (event.which == 2 || event.ctrlKey) { |
416 |
window.open(data_link, '_blank');
|
|
414 |
window.open(href, '_blank');
|
|
417 | 415 |
} else { |
418 |
window.location = data_link;
|
|
416 |
window.location = href;
|
|
419 | 417 |
} |
420 | 418 |
return false; |
421 |
}
|
|
419 |
} |
|
422 | 420 |
}); |
423 | 421 |
}); |
424 | 422 |
$(function() { |
425 |
- |