From 97a9cc4fefe33305467d5363903fdd34759ebce4 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Mon, 20 Feb 2023 13:15:29 +0100 Subject: [PATCH 1/5] Align the label and the checkbox [SCI-7745] --- app/assets/stylesheets/repository_columns/date_type.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/repository_columns/date_type.scss b/app/assets/stylesheets/repository_columns/date_type.scss index 174db5592..52d41a591 100644 --- a/app/assets/stylesheets/repository_columns/date_type.scss +++ b/app/assets/stylesheets/repository_columns/date_type.scss @@ -24,4 +24,10 @@ margin: 0 .5em; } } -} \ No newline at end of file +} + +#manage-repository-column .column-type.time-column-type { + .range-label { + top: 2px; + } +} From b7f71eafcb0ca706ae88ec5448031293ecd410ca Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Mon, 20 Feb 2023 13:23:48 +0100 Subject: [PATCH 2/5] Add form label [SCI-7783] --- .../repository_columns/manage_column_partials/_time.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/repository_columns/manage_column_partials/_time.html.erb b/app/views/repository_columns/manage_column_partials/_time.html.erb index edef194d0..fd419802e 100644 --- a/app/views/repository_columns/manage_column_partials/_time.html.erb +++ b/app/views/repository_columns/manage_column_partials/_time.html.erb @@ -1,5 +1,7 @@
-
+
<%= check_box_tag 'range', '', column&.repository_time_range_value?, { id: 'time-range', class: 'sci-checkbox', disabled: !column.new_record? } %> From 65b75d0d55a80d444868e8951ec95d5c822c80a5 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Tue, 21 Feb 2023 09:11:59 +0100 Subject: [PATCH 3/5] Show a pagination active page button when the items datatable is empty [SCI-7783] --- .../javascripts/repositories/repository_datatable.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/assets/javascripts/repositories/repository_datatable.js b/app/assets/javascripts/repositories/repository_datatable.js index 5939c6097..349a35317 100644 --- a/app/assets/javascripts/repositories/repository_datatable.js +++ b/app/assets/javascripts/repositories/repository_datatable.js @@ -585,6 +585,17 @@ var RepositoryDatatable = (function(global) { $('#editRepositoryRecord').prop('disabled', !allSelectedRowsAreOnPage()); TABLE.columns([archivedOnIndex, archivedByIndex]).visible(archived); + + // Show the current pagination page as "1" when the table is empty + if (this.api().page() < 1 && $('.paginate_button.active').length === 0) { + $('.dataTables_paginate .paginate_button.previous').after( + ` +
  • + 1 +
  • + ` + ); + } }, preDrawCallback: function() { var archived = $('.repository-show').hasClass('archived'); From 65468ea1ea4f40ecfc0a993b016330d2922ebebd Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Tue, 21 Feb 2023 09:41:45 +0100 Subject: [PATCH 4/5] Fix hound issues [SCI-7783] --- app/assets/javascripts/repositories/repository_datatable.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/repositories/repository_datatable.js b/app/assets/javascripts/repositories/repository_datatable.js index 349a35317..16329dfb2 100644 --- a/app/assets/javascripts/repositories/repository_datatable.js +++ b/app/assets/javascripts/repositories/repository_datatable.js @@ -588,13 +588,11 @@ var RepositoryDatatable = (function(global) { // Show the current pagination page as "1" when the table is empty if (this.api().page() < 1 && $('.paginate_button.active').length === 0) { - $('.dataTables_paginate .paginate_button.previous').after( - ` + $('.dataTables_paginate .paginate_button.previous').after(`
  • 1
  • - ` - ); + `); } }, preDrawCallback: function() { From 2e76fb3788a98e6e956012545647f69bc59ec083 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Tue, 21 Feb 2023 15:57:06 +0100 Subject: [PATCH 5/5] Revert "Show a pagination active page button when the items datatable is empty [SCI-7783]" This reverts commit 65b75d0d55a80d444868e8951ec95d5c822c80a5. After Daily discussion, this is no longer regarded as an issue. --- .../javascripts/repositories/repository_datatable.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/assets/javascripts/repositories/repository_datatable.js b/app/assets/javascripts/repositories/repository_datatable.js index 16329dfb2..5939c6097 100644 --- a/app/assets/javascripts/repositories/repository_datatable.js +++ b/app/assets/javascripts/repositories/repository_datatable.js @@ -585,15 +585,6 @@ var RepositoryDatatable = (function(global) { $('#editRepositoryRecord').prop('disabled', !allSelectedRowsAreOnPage()); TABLE.columns([archivedOnIndex, archivedByIndex]).visible(archived); - - // Show the current pagination page as "1" when the table is empty - if (this.api().page() < 1 && $('.paginate_button.active').length === 0) { - $('.dataTables_paginate .paginate_button.previous').after(` -
  • - 1 -
  • - `); - } }, preDrawCallback: function() { var archived = $('.repository-show').hasClass('archived');