manager: open in new tab on ctrl/middle-click on row (#45339)
This commit is contained in:
parent
b64232ff54
commit
292f990953
|
@ -172,8 +172,15 @@
|
|||
}
|
||||
});
|
||||
$(document).on('click.manager', 'table tr[data-url][rel=popup]', displayPopup);
|
||||
$(document).on('click.manager', 'table tr[data-url]:not([rel=popup])', function (e) {
|
||||
$(document).on('mouseup.manager', 'table tr[data-url]:not([rel=popup])', function (e) {
|
||||
var $target = $(event.target);
|
||||
if ($target.is('a')) return false;
|
||||
if (e.which == 2 || e.ctrlKey) {
|
||||
window.open($(this).data('url'), '_blank');
|
||||
} else {
|
||||
window.location.href = $(this).data('url');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
/* Prepopulate slug fields */
|
||||
$('#id_slug').data('_changed', false);
|
||||
|
|
Loading…
Reference in New Issue