From 5d41ea5fa7cbe845226e9b99a06e37de63e1715c Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Mon, 21 Nov 2022 11:58:15 +0100 Subject: [PATCH] Disable instead of hide edit button when selected items not on page [SCI-7460] --- app/assets/javascripts/repositories/repository_datatable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/repositories/repository_datatable.js b/app/assets/javascripts/repositories/repository_datatable.js index 1378a7dc3..c937493af 100644 --- a/app/assets/javascripts/repositories/repository_datatable.js +++ b/app/assets/javascripts/repositories/repository_datatable.js @@ -572,9 +572,9 @@ var RepositoryDatatable = (function(global) { ).toArray().map((r) => parseInt(r.id, 10)); if (rowsSelected.every(r => visibleRowIds.includes(r))) { - $('#editRepositoryRecord').show(); + $('#editRepositoryRecord').prop('disabled', false); } else { - $('#editRepositoryRecord').hide(); + $('#editRepositoryRecord').prop('disabled', true); } if ($('.repository-show').hasClass('archived')) {