Koha/koha-tmpl/intranet-tmpl/prog/en/js
Lari Taskula d8c0b836d6 Bug 14880: Keyboard shortcuts don't work after setting CircAutocompl to "Don't try"
The issue is that CircAutocompl loads a script element under #header_search
element. When this element is missing, it also messes up the indexing,
because we were calculating the indexing of the found element by subtracting
one from the found element's index (to eliminate the <script> element).

Thats why the shortcut key problem in this bug takes you one too to the left,
because we are still subtracting one from the index even though there is no
<script> element anymore.

This patches selects only the div elements and gets the index from them.
No subtractions needed.

To test keys:
1. Set CircAutocompl system preference to Don't try.
2. Try the shortcut keys. They will work incorrectly like this:
   Alt+U = Search catalogue
   Alt+R = Check out
   Alt+Q = Check in
3. Set CircAutocompl system preference to Try.
4. Try the shortcut keys. They will work correctly like this:
   Alt+U = Check out
   Alt+R = Check in
   ALt+Q = Search catalogue
5. Apply patch
6. Repeat step 1 and 4.
7. Repeat step 3 and 4.
8. Observe that regardless of CircAutocompl, shortcut keys worked correctly.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-02 15:07:30 -03:00
..
pages Bug 14389: Editing a syspref in a textarea does not enable the Save button 2015-07-07 12:34:41 -03:00
acq.js
additem.js Bug 14327: Fix js error "TypeError: events is null" in additem.js 2015-06-07 18:40:12 -03:00
ajax.js
background-job-progressbar.js
basket.js Bug 14661: space needed in added to staff side cart message, if items added are already in cart 2015-08-21 09:56:37 -03:00
basketgroup.js
cataloging.js Bug 10299: authority plugin - authority field are reversed 2015-05-19 11:46:24 -03:00
checkouts.js Bug 14710: Make the export checkout list export only the checked out item infos 2015-09-25 15:36:00 -03:00
datatables.js Bug 13419: Add filters on the list table 2015-04-22 14:59:05 -03:00
file-upload.js Bug 14321: Integrate Upload.pm into Koha 2015-09-25 12:02:52 -03:00
holds.js Bug 9528: Add delivery branch to the place hold display 2015-04-30 16:45:26 -03:00
localcovers.js Bug 11982 - Images now display properly in the details section. 2015-03-30 13:45:38 -03:00
members.js Bug 14509: Reject invalid passwords 2015-09-28 11:51:08 -03:00
merge-record.js
offlinecirc.js
prevent_submit.js
staff-global.js Bug 14880: Keyboard shortcuts don't work after setting CircAutocompl to "Don't try" 2015-10-02 15:07:30 -03:00
xmlControlfield.js