Bugzilla – Attachment 136457 Details for
Bug 27113
Elasticsearch: Autocomplete in search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27113: (follow-up) Move new CSS to main SCSS files
Bug-27113-follow-up-Move-new-CSS-to-main-SCSS-file.patch (text/plain), 7.79 KB, created by
Shi Yao Wang
on 2022-06-23 18:07:00 UTC
(
hide
)
Description:
Bug 27113: (follow-up) Move new CSS to main SCSS files
Filename:
MIME Type:
Creator:
Shi Yao Wang
Created:
2022-06-23 18:07:00 UTC
Size:
7.79 KB
patch
obsolete
>From b1f36d7444217c4553545077310710bb8467de2b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 23 Apr 2021 12:01:57 +0000 >Subject: [PATCH] Bug 27113: (follow-up) Move new CSS to main SCSS files > >This patch removes the separate CSS files added for the autocomplete >feature and puts them into the "main" SCSS files. I think a separate >file isn't necessary because the amount of CSS it adds is so small. > >I've also tweaked the style of the autocomplete menu shown when you use >the arrow keys to navigate through the autocomplete choices. I think the >previous white-on-light-green didn't have enough contrast. > >To test you must rebuild the OPAC and staff client CSS: >https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client > >Follow the previous test plan, being careful to observe how it >works when the autocomplete menu has been triggered and you use the >arrow keys to navigate through the results. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../prog/css/elasticsearch/autocomplete.css | 28 --------------- > .../prog/css/src/staff-global.scss | 33 ++++++++++++++++++ > .../prog/en/includes/doc-head-close.inc | 5 --- > .../opac-elasticsearch/opac-autocomplete.css | 29 ---------------- > .../opac-tmpl/bootstrap/css/src/opac.scss | 34 +++++++++++++++++++ > .../bootstrap/en/includes/doc-head-close.inc | 5 --- > 6 files changed, 67 insertions(+), 67 deletions(-) > delete mode 100644 koha-tmpl/intranet-tmpl/prog/css/elasticsearch/autocomplete.css > delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/css/opac-elasticsearch/opac-autocomplete.css > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/elasticsearch/autocomplete.css b/koha-tmpl/intranet-tmpl/prog/css/elasticsearch/autocomplete.css >deleted file mode 100644 >index 40dfefb0d6..0000000000 >--- a/koha-tmpl/intranet-tmpl/prog/css/elasticsearch/autocomplete.css >+++ /dev/null >@@ -1,28 +0,0 @@ >-.autocomplete { >- /*the container must be positioned relative:*/ >- position: relative; >- display: inline-block; >-} >-.autocomplete-items { >- position: absolute; >- border: 1px solid #d4d4d4; >- border-bottom: none; >- border-top: none; >- z-index: 99; >- /*position the autocomplete items to be the same width as the container:*/ >- } >- .autocomplete-items div { >- padding: 10px; >- cursor: pointer; >- background-color: #fff; >- border-bottom: 1px solid #d4d4d4; >- } >- .autocomplete-items div:hover { >- /*when hovering an item:*/ >- background-color: #e9e9e9; >- } >- .autocomplete-active { >- /*when navigating through the items using the arrow keys:*/ >- background-color: #cedfb1 !important; >- color: #ffffff; >- } >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index 49a5ce8767..ad1e61e48a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -4646,6 +4646,39 @@ div .suggestion_note { > white-space:nowrap > } > } >+/* Elasticsearch autocomplete menu */ >+.autocomplete { >+ /*the container must be positioned relative:*/ >+ position: relative; >+ display: inline-block; >+} >+ >+.autocomplete-items { >+ position: absolute; >+ border: 1px solid #d4d4d4; >+ border-bottom: none; >+ border-top: none; >+ z-index: 99; >+ /*position the autocomplete items to be the same width as the container:*/ >+ >+ div { >+ padding: 10px; >+ cursor: pointer; >+ background-color: #fff; >+ border-bottom: 1px solid #d4d4d4; >+ >+ &:hover { >+ /*when hovering an item:*/ >+ background-color: #e9e9e9; >+ } >+ >+ &.autocomplete-active { >+ /*when navigating through the items using the arrow keys:*/ >+ background-color: lighten(#85CA11, 45%); >+ } >+ } >+} >+/* /Elasticsearch autocomplete menu */ > > #camera, #output { > border: 8px solid #EDF4F6; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >index 78a497eab4..b35c001820 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >@@ -26,11 +26,6 @@ > [% Asset.css("css/print.css", { media = "print" }) | $raw %] > [% INCLUDE intranetstylesheet.inc %] > [% IF ( bidi ) %][% Asset.css("css/right-to-left.css") | $raw %][% END %] >-<!-- Intranet inc CSS IntranetAutocompleteElasticSearch --> >-[% IF ( Koha.Preference('IntranetAutocompleteElasticSearch') ) %] >- [% SET Optylesheet = 'elasticsearch/autocomplete.css' %] >- <link rel="stylesheet" type="text/css" href="[% interface | url %]/[% theme | url %]/css/[% Optylesheet | url %]" /> >-[% END %] > > <script> > var Koha = {}; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/opac-elasticsearch/opac-autocomplete.css b/koha-tmpl/opac-tmpl/bootstrap/css/opac-elasticsearch/opac-autocomplete.css >deleted file mode 100644 >index 2b8a566568..0000000000 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/opac-elasticsearch/opac-autocomplete.css >+++ /dev/null >@@ -1,29 +0,0 @@ >-/* CSS file OPACAutocompleteElasticSearch */ >-.autocomplete { >- /*the container must be positioned relative:*/ >- position: relative; >- display: inline-block; >- width: 100%; >-} >-.autocomplete-items { >- position: absolute; >- border: 1px solid #d4d4d4; >- border-bottom: none; >- border-top: none; >- z-index: 99; >- } >- .autocomplete-items div { >- padding: 10px; >- cursor: pointer; >- background-color: #fff; >- border-bottom: 1px solid #d4d4d4; >- } >- .autocomplete-items div:hover { >- /*when hovering an item:*/ >- background-color: #e9e9e9; >- } >- .autocomplete-active { >- /*when navigating through the items using the arrow keys:*/ >- background-color: #cedfb1 !important; >- color: #ffffff; >- } >\ No newline at end of file >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index 747251450f..e75fa9a3d8 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -2872,4 +2872,38 @@ $star-selected: #EDB867; > } > } > >+/* Elasticsearch autocomplete menu */ >+.autocomplete { >+ /*the container must be positioned relative:*/ >+ position: relative; >+ width: 100%; >+} >+ >+.autocomplete-items { >+ position: absolute; >+ border: 1px solid #d4d4d4; >+ border-bottom: none; >+ border-top: none; >+ z-index: 9999; >+ >+ div { >+ padding: 10px; >+ cursor: pointer; >+ background-color: #fff; >+ border-bottom: 1px solid #d4d4d4; >+ >+ &:hover { >+ /*when hovering an item:*/ >+ background-color: #e9e9e9; >+ } >+ >+ &.autocomplete-active { >+ /*when navigating through the items using the arrow keys:*/ >+ background-color: lighten( $input-btn-focus-color, 45% ); >+ } >+ } >+} >+ >+/* /Elasticsearch autocomplete menu */ >+ > @import "responsive"; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc >index b6b363fba6..e29568d76f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc >@@ -23,11 +23,6 @@ > [% SET opaclayoutstylesheet = 'opac.css' %] > [% END %] > [% END %] >-<!-- OPAC inc CSS OPACAutocompleteElasticSearch --> >-[% IF ( Koha.Preference('OPACAutocompleteElasticSearch') ) %] >- [% SET Optylesheet = 'opac-elasticsearch/opac-autocomplete.css' %] >- <link rel="stylesheet" type="text/css" href="[% interface | url %]/[% theme | url %]/css/[% Optylesheet | url %]" /> >-[% END %] > [% IF (opaclayoutstylesheet.match('^https?:|^\/')) %] > <link rel="stylesheet" type="text/css" href="[% opaclayoutstylesheet | url %]" /> > [% ELSE %] >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27113
:
114168
|
114169
|
114945
|
115117
|
116293
|
119979
|
120028
|
120029
|
120084
|
120088
|
120109
|
120140
|
120141
|
120806
|
121497
|
121498
|
121555
|
121556
|
121557
|
121558
|
131207
|
131208
|
131209
|
131210
|
131211
|
132360
|
132361
|
132362
|
132363
|
132364
|
132808
|
132945
|
132946
|
133042
|
133045
|
133407
|
133409
|
133410
|
136312
|
136456
|
136457
|
136464
|
136465
|
136653
|
136657
|
136658
|
136659
|
136660
|
137436
|
137437
|
137438
|
137439
|
137780
|
137781
|
137782
|
137783
|
139624
|
141466
|
145167
|
146015
|
159769
|
159770
|
159771
|
159772
|
159773
|
159774
|
159775
|
160134
|
160135
|
160136
|
160137
|
160138
|
160139
|
160140
|
160141
|
160142
|
161076
|
161077
|
163826
|
165895
|
165896
|
165897
|
165898
|
165899
|
165900
|
165901
|
165902
|
165903
|
165904
|
165913
|
165922