Bug 8217 - Focus on search box in Detail page (staff search)
Summary: Focus on search box in Detail page (staff search)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-09 10:37 UTC by Adrien SAURAT
Modified: 2013-12-05 19:57 UTC (History)
7 users (show)

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


Attachments
proposed patch (927 bytes, patch)
2012-06-09 10:47 UTC, Adrien SAURAT
Details | Diff | Splinter Review
Bug 8217:[SIGNED-OFF] Focus on search box in staff detail page (1.10 KB, patch)
2012-06-09 12:56 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 8217: Followup: move code to the document.ready function (1.17 KB, patch)
2012-06-11 09:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 8217: Followup: move code to the document.ready function (1.17 KB, patch)
2012-06-18 08:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 8217: Followup: move code to the document.ready function (1.25 KB, patch)
2012-06-23 19:02 UTC, Mirko Tietgen
Details | Diff | Splinter Review
Bug 8217: Followup: move code to the document.ready function [patch for 3.8] (1.19 KB, patch)
2012-07-02 09:37 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien SAURAT 2012-06-09 10:37:40 UTC
Koha Team Lyon3 proposal/patch:
When accessing a detail page after a search, it would be useful to have the focus on the search box.
Comment 1 Adrien SAURAT 2012-06-09 10:47:28 UTC Comment hidden (obsolete)
Comment 2 Adrien SAURAT 2012-06-09 10:48:14 UTC
TEST PLAN :
In staff interface, search for a biblio, then access its detail page. Once the page is loaded the focus should be on the search box.
Comment 3 Marc Véron 2012-06-09 12:56:44 UTC Comment hidden (obsolete)
Comment 4 Paul Poulain 2012-06-10 10:50:28 UTC
QA comment: tiny patch nothing specific to say from QA pov
Comment 5 Paul Poulain 2012-06-10 10:51:15 UTC
This tiny ENH could be ported to 3.8 safely & would be useful I think.
Comment 6 Owen Leonard 2012-06-10 12:49:25 UTC
It should be put in the coding guidelines that using <body onload> is not the best way to add load events to a page. Generally the event should be added to the jQuery $document(ready)() function. That lets jQuery handle all the onload events and helps prevent conflicts. I think a follow-up for this should be submitted to change this and ask that this not be pushed to 3.8.
Comment 7 Jonathan Druart 2012-06-11 09:24:47 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2012-06-11 09:31:37 UTC
Sorry, Monday morning, I have troubles with my grammar...
I reformulate : "Could you test this patch and verify that it does the same thing as previous please ?"
Comment 9 Chris Cormack 2012-06-12 07:38:37 UTC
Pushed the first patch, the follow up looks fine to me, will push that to 3.8.x when it is pushed to master
Comment 10 Paul Poulain 2012-06-14 13:17:11 UTC
(In reply to comment #6)
> It should be put in the coding guidelines that using <body onload> is not
> the best way to add load events to a page. Generally the event should be
> added to the jQuery $document(ready)() function. That lets jQuery handle all
> the onload events and helps prevent conflicts. I think a follow-up for this
> should be submitted to change this and ask that this not be pushed to 3.8.

Done: http://wiki.koha-community.org/wiki/Coding_Guidelines#don.27t_use_js_in_.3Cbody_onload.3D....3E
Comment 11 Katrin Fischer 2012-06-17 07:57:09 UTC
Testing shows, that after applying the second patch, the focus is not in the search box. On current HEAD it's ok.
Comment 12 Jonathan Druart 2012-06-18 08:47:30 UTC Comment hidden (obsolete)
Comment 13 Mirko Tietgen 2012-06-23 19:02:57 UTC
Created attachment 10443 [details] [review]
Bug 8217: Followup: move code to the document.ready function

Signed-off-by: Mirko Tietgen <5p4m@gmx.de>
Comment 14 Marcel de Rooy 2012-06-28 10:07:08 UTC
Followup: Passed QA
Comment 15 Paul Poulain 2012-06-29 14:50:03 UTC
Follow-up pushed on master branch directly, does not apply on new/bug_8217
Comment 16 Chris Cormack 2012-06-29 22:16:57 UTC
Follow up does not apply to 3.8.x

<<<<<<< HEAD                      
        $('#bibliodetails > ul').tabs(); 
=======                                                                                                         
        $('#bibliodetails').tabs();  
        $('#search-form').focus();    
>>>>>>> a4d2a99... Bug 8217: Followup: move code to the document.ready function   

Please
Comment 17 Jonathan Druart 2012-07-02 09:37:15 UTC
Created attachment 10596 [details] [review]
Bug 8217: Followup: move code to the document.ready function [patch for 3.8]

Hi Chris,
Here is the patch for 3.8
Comment 18 Chris Cormack 2012-07-02 09:41:48 UTC
Thanks Jonathan.

Pushed to stable, will be in 3.8.3