Bug 28821 - OPAC Advanced search: Improve operation of button plus/less
Summary: OPAC Advanced search: Improve operation of button plus/less
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on: 28784
Blocks:
  Show dependency treegraph
 
Reported: 2021-08-06 09:07 UTC by Marcel de Rooy
Modified: 2021-10-08 15:05 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
21.11.00


Attachments
Bug 28821: (follow-up) Improve operation of button plus/less (4.32 KB, patch)
2021-08-06 09:10 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28821: (follow-up) Improve operation of button plus/less (4.34 KB, patch)
2021-09-11 07:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28821: (follow-up) Improve operation of button plus/less (4.40 KB, patch)
2021-09-26 13:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28821: (QA follow-up) Adjust javascript test (1.18 KB, patch)
2021-09-29 12:48 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2021-08-06 09:07:06 UTC
This is just an enhancement but while its base is on security, this is security too
Comment 1 Marcel de Rooy 2021-08-06 09:10:14 UTC
Created attachment 123563 [details] [review]
Bug 28821: (follow-up) Improve operation of button plus/less

Follow-up for bug 28784.

Do not remove the op select on the first row.
Allow plus/less on all lines. Allow less until we have one line left.
Make sure that first op is disabled and hidden with plus/less.

Test plan:
Search on multiple indexes on advanced search.
Verify that plus/minus works as expected.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2021-08-26 09:11:51 UTC
Moving to regular Koha product now
Comment 3 Fridolin Somers 2021-09-11 07:43:25 UTC
Created attachment 124790 [details] [review]
Bug 28821: (follow-up) Improve operation of button plus/less

Follow-up for bug 28784.

Do not remove the op select on the first row.
Allow plus/less on all lines. Allow less until we have one line left.
Make sure that first op is disabled and hidden with plus/less.

Test plan:
Search on multiple indexes on advanced search.
Verify that plus/minus works as expected.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 4 Fridolin Somers 2021-09-11 07:44:42 UTC
Works fine.

Maybe we should also review staff interface search page.
There is actually no less button :-O
Comment 5 Katrin Fischer 2021-09-26 13:16:54 UTC
Created attachment 125331 [details] [review]
Bug 28821: (follow-up) Improve operation of button plus/less

Follow-up for bug 28784.

Do not remove the op select on the first row.
Allow plus/less on all lines. Allow less until we have one line left.
Make sure that first op is disabled and hidden with plus/less.

Test plan:
Search on multiple indexes on advanced search.
Verify that plus/minus works as expected.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2021-09-29 10:19:17 UTC
I can remove the 3 lines. That's why it was done that way. You certainly need JS code to prevent that.
Comment 7 Marcel de Rooy 2021-09-29 11:10:34 UTC
(In reply to Jonathan Druart from comment #6)
> I can remove the 3 lines. That's why it was done that way. You certainly
> need JS code to prevent that.

+        if($(this).parent().parent().siblings().length < 2 ) {
            $('.ButtonLess').hide();

Please explain how to reproduce.
Or refresh browser cache etc ?
Comment 8 Jonathan Druart 2021-09-29 12:31:27 UTC
From IRC:
14:29 < Joubu> marcelr: ok, got it. I am using ES and I am seeing a " Apply field weights to search " checkox
14:29 < Joubu> it's a sibling
14:30 < Joubu> it indeed works correctly with searchengine=zebra
Comment 9 Marcel de Rooy 2021-09-29 12:48:17 UTC
Created attachment 125452 [details] [review]
Bug 28821: (QA follow-up) Adjust javascript test

The test did not work when SearchEngine == Elasticsearch.

Test plan:
Verify if it works now for Elasticsearch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Jonathan Druart 2021-10-07 09:20:44 UTC
Pushed to master for 21.11, thanks to everybody involved!