From 9b3140377e1ddce7d62d853919fd4c20c9fde31e Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Mon, 23 Jan 2023 13:08:41 +0100 Subject: [PATCH 1/7] Add custom pointer on hover for all dataTables [SCI-7562] --- app/assets/images/icon_small/cursor-hover.svg | 20 +++++++++++++++++++ app/assets/stylesheets/extend/datatable.scss | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 app/assets/images/icon_small/cursor-hover.svg diff --git a/app/assets/images/icon_small/cursor-hover.svg b/app/assets/images/icon_small/cursor-hover.svg new file mode 100644 index 000000000..cbb926a61 --- /dev/null +++ b/app/assets/images/icon_small/cursor-hover.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/stylesheets/extend/datatable.scss b/app/assets/stylesheets/extend/datatable.scss index a0be66cc0..0d8bcca46 100644 --- a/app/assets/stylesheets/extend/datatable.scss +++ b/app/assets/stylesheets/extend/datatable.scss @@ -17,6 +17,10 @@ overflow: hidden; white-space: nowrap; + &:not(#select-all){ + cursor: url(image-path('icon_small/cursor-hover.svg')), pointer; + } + .modal-tooltiptext { margin-left: -10px; margin-top: 10px; From e387e920f3833b79c8b831fddc405b1acf391326 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Wed, 25 Jan 2023 14:31:43 +0100 Subject: [PATCH 2/7] Set the default sotring of label template datatable to desc on name [SCI-7562] --- .../javascripts/label_templates/label_templates_datatable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/label_templates/label_templates_datatable.js b/app/assets/javascripts/label_templates/label_templates_datatable.js index 4ae3cba47..83d395b76 100644 --- a/app/assets/javascripts/label_templates/label_templates_datatable.js +++ b/app/assets/javascripts/label_templates/label_templates_datatable.js @@ -236,7 +236,7 @@ var $table = $('#label-templates-table'); LABEL_TEMPLATE_TABLE = $table.DataTable({ dom: "R<'label-toolbar'<'label-buttons-container'><'label-search-container'f>>t<'pagination-row hidden'<'pagination-info'li><'pagination-actions'p>>", - order: [[1, 'desc']], + order: [[2, 'desc']], sScrollX: '100%', sScrollXInner: '100%', processing: true, From 9cb52d6b5ab30d9781892f732c7f1c9ec9a00a26 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Wed, 25 Jan 2023 14:58:17 +0100 Subject: [PATCH 3/7] Set the default sotring of team users datatable to asc on name [SCI-7562] --- app/assets/javascripts/users/settings/teams/show.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/users/settings/teams/show.js b/app/assets/javascripts/users/settings/teams/show.js index 037f34f11..aa650a4fd 100644 --- a/app/assets/javascripts/users/settings/teams/show.js +++ b/app/assets/javascripts/users/settings/teams/show.js @@ -25,7 +25,7 @@ <'page-info'i> <'page-selector'p> >`, - order: [[1, 'asc']], + order: [[0, 'asc']], stateSave: true, buttons: [], processing: true, From 217561e809f8a4fc200a97c889fdc635efe0f177 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Wed, 25 Jan 2023 16:11:33 +0100 Subject: [PATCH 4/7] Set the default sotring of inventory items datatable to asc on name [SCI-7562] --- config/initializers/constants.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/constants.rb b/config/initializers/constants.rb index 32c4831e6..ef008e501 100644 --- a/config/initializers/constants.rb +++ b/config/initializers/constants.rb @@ -988,7 +988,7 @@ class Constants 'time' => 0, 'start' => 0, 'length' => REPOSITORY_DEFAULT_PAGE_SIZE, - 'order' => [[2, 'asc']], # Default sorting by 'ID' column + 'order' => [[3, 'asc']], # Default sorting by 'name' column 'columns' => [], 'assigned' => 'assigned', 'ColReorder' => [*0..7] From 0896d8bd2eabc2a97314953cd4e6d176b84df46f Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Wed, 25 Jan 2023 16:54:15 +0100 Subject: [PATCH 5/7] Fix Hound issues [SCI-7562] --- app/assets/stylesheets/extend/datatable.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/extend/datatable.scss b/app/assets/stylesheets/extend/datatable.scss index 0d8bcca46..2882880d5 100644 --- a/app/assets/stylesheets/extend/datatable.scss +++ b/app/assets/stylesheets/extend/datatable.scss @@ -17,8 +17,8 @@ overflow: hidden; white-space: nowrap; - &:not(#select-all){ - cursor: url(image-path('icon_small/cursor-hover.svg')), pointer; + &:not(#select-all) { + cursor: url(image-path("icon_small/cursor-hover.svg")), pointer; } .modal-tooltiptext { From f6ce634d1c01b9842033c99b37fc82fb8dc67f4f Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Fri, 3 Mar 2023 16:17:23 +0100 Subject: [PATCH 6/7] Use ordinary cursor [SCI-7562] --- app/assets/images/icon_small/cursor-hover.svg | 20 ------------------- app/assets/stylesheets/extend/datatable.scss | 5 +---- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 app/assets/images/icon_small/cursor-hover.svg diff --git a/app/assets/images/icon_small/cursor-hover.svg b/app/assets/images/icon_small/cursor-hover.svg deleted file mode 100644 index cbb926a61..000000000 --- a/app/assets/images/icon_small/cursor-hover.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/app/assets/stylesheets/extend/datatable.scss b/app/assets/stylesheets/extend/datatable.scss index 2882880d5..f2cee02fb 100644 --- a/app/assets/stylesheets/extend/datatable.scss +++ b/app/assets/stylesheets/extend/datatable.scss @@ -16,10 +16,7 @@ font-weight: bold; overflow: hidden; white-space: nowrap; - - &:not(#select-all) { - cursor: url(image-path("icon_small/cursor-hover.svg")), pointer; - } + cursor: pointer; .modal-tooltiptext { margin-left: -10px; From 678e54bdc47adbadecbd4581d6fa51e41d685273 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Fri, 3 Mar 2023 16:27:54 +0100 Subject: [PATCH 7/7] Add hover effect on datatable head [SCI-7562] --- app/assets/stylesheets/extend/datatable.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/assets/stylesheets/extend/datatable.scss b/app/assets/stylesheets/extend/datatable.scss index f2cee02fb..e54d9b326 100644 --- a/app/assets/stylesheets/extend/datatable.scss +++ b/app/assets/stylesheets/extend/datatable.scss @@ -29,6 +29,16 @@ opacity: 1; } + &.sorting::after { + opacity: 0; + } + + &.sorting:hover { + &::after { + opacity: 1; + } + } + &:first-child { border-left: 0; border-top-left-radius: $border-radius-default;