Summary: | Keeping typed values when searching for authorities | ||
---|---|---|---|
Product: | Koha | Reporter: | Adrien SAURAT <adrien.saurat> |
Component: | Templates | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | fridolin.somers, gitbot, gmcharlt, jonathan.druart, paola.rossi, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 7484 - Keeping typed values when searching for authorities
Keeping typed values when searching for authorities Bug 7484 - Keeping typed values when searching for authorities [PASSED QA] Bug 7484 - Keeping typed values when searching for authorities |
Description
Adrien SAURAT
2012-01-31 16:28:11 UTC
Is there any reason to use tabs here ? The content is the same for each tab. Couldn't we make just one form, with a radiobutton to select the type of search? Something like: o Search Authorities o Search Main Heading o Search All Headings Created attachment 19731 [details] [review] Bug 7484 - Keeping typed values when searching for authorities See commit message. Patch applied cleanly, go forth and signoff Page "Home › Authorities" 1) I'm on the "Search authorities" tab. I select an authority type, then change the active tab. The type change is lost. The type seemes to be lost only if the "second" tab is empty, as it initially is. If a selection would have been previously made for that "second" tab, it would not be lost. Now a user can make a selection for a tab, and a different selection for a another tab, and they would be both kept. All the 4 parts (name/term, verb, data, sort) of a condition set in one of the 3 tab ("main headings" or "all headings" or "keyword" search) are kept exactly the same after moving from this tab to another one, and then coming back to the first tab. If the user would choose different selections in the 3 tabs, the patch would loose this information. (In reply to Paola Rossi from comment #4) > Page "Home › Authorities" > 1) I'm on the "Search authorities" tab. You mean : I'm on the "Search main heading" tab ? > I select an authority type, then change the active tab. The type change is lost. I do not reproduce this. Please test with flush of browser JS cache (Ctrl+F5) after applying the patch. > If the user would choose different selections in the 3 tabs, the patch would > loose this information. Ok but if a user starts in "Search main heading" (1st tab), enters authority type/order/terms/sort and performs a search. No results. He wants to perform a search on "Keyword search" (3rd tab), he must all redo. Patch applied cleanly, go forth and signoff I apply the patch. In spite of comment 1: >Is there any reason to use tabs here ? >The content is the same for each tab. >Couldn't we make just one form, with a radiobutton to select the type of search? >Something like: >o Search Authorities o Search Main Heading o Search All Headings no radiobutton appears. There are still tabs. So I pass the patch to "In discussion" status. (In reply to Paola Rossi from comment #7) > no radiobutton appears. > There are still tabs. Using radiobuttons was an idea of Adrien SAURAT, but the patch does not use them. See test plan. Created attachment 23034 [details] [review] Keeping typed values when searching for authorities I sign off the patch. I always believed it was not a bug but a feature :) The patch works as described. I will amend the patch in order to explicitly declare the 2 new variables. Created attachment 23068 [details] [review] Bug 7484 - Keeping typed values when searching for authorities 1) I'm on the "Search authorities" tab. I select an authority type, then change the active tab. The type change is lost. 2) I'm on a tab and type a search pattern, then change tab, the string is lost. This behaviour is logical, given the fact that we're using tabs, but it would be more practical to keep the typed informations when the user changes the search mode. This patch add a few JQuery code to synchronise inputs between all tabbed authorities search forms. Test plan : - Go to Authorities home page : cgi-bin/koha/authorities/authorities-home.pl - In toolbar, "Search main heading" is selected - Change all inputs : authotity type, operator, term, and sort order - Click on "Search all headings" tab => Inputs are the same has previous tab - Click on "Keyword search" tab => Inputs are the same has previous tab Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Amended patch: Explicitly declare 2 new variables used. Created attachment 23118 [details] [review] [PASSED QA] Bug 7484 - Keeping typed values when searching for authorities 1) I'm on the "Search authorities" tab. I select an authority type, then change the active tab. The type change is lost. 2) I'm on a tab and type a search pattern, then change tab, the string is lost. This behaviour is logical, given the fact that we're using tabs, but it would be more practical to keep the typed informations when the user changes the search mode. This patch add a few JQuery code to synchronise inputs between all tabbed authorities search forms. Test plan : - Go to Authorities home page : cgi-bin/koha/authorities/authorities-home.pl - In toolbar, "Search main heading" is selected - Change all inputs : authotity type, operator, term, and sort order - Click on "Search all headings" tab => Inputs are the same has previous tab - Click on "Keyword search" tab => Inputs are the same has previous tab Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Amended patch: Explicitly declare 2 new variables used. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. Works as described, Firebug doesn't show any problems with the Javascript. Could be useful for other tabbed searches like the start page as well. Pushed to master. Thanks, Fridolin! However, I agree with Adrien that it would be better to use a set of radio buttons for the search type rather than tabs -- it is not quite idiomatic for a tabbed interface to preserve state when switching tabs like this. This patch has been pushed to 3.14.x, will be in 3.14.1 This patch has been pushed to 3.12.x, will be in 3.12.8. Thanks Fridolin! |