[Bug 34871] New: Highlight scanned item in holdings table when searching
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34871 Bug ID: 34871 Summary: Highlight scanned item in holdings table when searching Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: andrewfh@dubcolib.org QA Contact: testopia@bugs.koha-community.org When one has an item in-hand and scans the barcode into search to find the bib record, it can be hard to find the specific item scanned within the holdings table. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34871 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org, | |lucas@bywatersolutions.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34871 --- Comment #1 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- We're currently accomplishing this with the following jquery: $(document).ready(function () { if ( $('#catalog_detail').length && window.location.href.indexOf("found1=1") > -1 ) { setTimeout(function() { let search_value = $('#search-form').val().trim(); let barcode_index = $('th:contains("Barcode")').index() +1; //add one for nth-child $('#holdings_table tbody tr td:nth-child('+barcode_index+')').each( function() { if ( $(this).text() === search_value ) { $(this).parent().addClass('found_bc'); $(this).parent().children('td').css('background' , 'khaki'); } }) //now clear the search form if ( $('#cat-search-block').length ) { $('#search-form').val(''); localStorage.setItem('searchbox_value', ''); $('#search-form').focus(); } }, 100); } }); -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34871 --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Andrew Fuerste-Henry from comment #1)
We're currently accomplishing this with the following jquery: $(document).ready(function () { if ( $('#catalog_detail').length && window.location.href.indexOf("found1=1") > -1 ) { setTimeout(function() { let search_value = $('#search-form').val().trim(); let barcode_index = $('th:contains("Barcode")').index() +1; //add one for nth-child $('#holdings_table tbody tr td:nth-child('+barcode_index+')').each( function() { if ( $(this).text() === search_value ) { $(this).parent().addClass('found_bc'); $(this).parent().children('td').css('background' , 'khaki'); } }) //now clear the search form if ( $('#cat-search-block').length ) { $('#search-form').val(''); localStorage.setItem('searchbox_value', ''); $('#search-form').focus(); } }, 100); } });
This jQuery no longer works as of Koha 24.05, due to a change in how the page is constructed. It's my understanding that this highlighting is no longer possible via jQuery. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34871 --- Comment #3 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- A couple ideas here: 1. A separate table/tab much like the other_holdings table that will only included your searched barcode in the event of an exact match. ( found1 param ) 2. A hidden column which would be sorted on if the found1 param is there. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org