Summary: | Pending suggestions table width is wrong | ||
---|---|---|---|
Product: | Koha | Reporter: | Christopher Brannon <cbrannon> |
Component: | Circulation | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chris, gmcharlt, jonathan.druart, kyle.m.hall, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 12135: Fix suggestions table width
[SIGNED OFF] Bug 12135: Fix suggestions table width [PASSED QA] Bug 12135: Fix suggestions table width |
Description
Christopher Brannon
2014-04-24 18:07:01 UTC
There is code in the template which is supposed to fix this which stopped working when we upgraded jQueryUI. The width of tables which are hidden in non-visible tabs cannot be correctly calculated until they are shown--hidden elements have no width. This code fixed it before the jQueryUI upgrade: $('#suggestiontabs').tabs({ // Correct table sizing for tables hidden in tabs // http://www.datatables.net/examples/api/tabs_and_scrolling.html "show": function(event, ui) { var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable(); if ( oTable.length > 0 ) { oTable.fnAdjustColumnSizing(); } } }); The jQueryUI API has changed, so this needs to be corrected on this page and others. Created attachment 38567 [details] [review] Bug 12135: Fix suggestions table width The trick to update the suggestions table width is outdated since jQuery UI has been updated. Test plan: 0/ Don't apply this patch 1/ Go on the suggestions page (suggestion/suggestion.pl), change tabs: the table width is wrong 2/ Apply this patch 4/ Repeat 1 and confirm the width is now updated. I think this patch is working. I definitely see differences. The problem is that with the table width being dynamic and not fixed to the width of the screen, it is very difficult to tell. Created attachment 38612 [details] [review] [SIGNED OFF] Bug 12135: Fix suggestions table width The trick to update the suggestions table width is outdated since jQuery UI has been updated. Test plan: 0/ Don't apply this patch 1/ Go on the suggestions page (suggestion/suggestion.pl), change tabs: the table width is wrong 2/ Apply this patch 4/ Repeat 1 and confirm the width is now updated. Signed-off-by: Christopher Brannon <cbrannon@cdalibary.org> Created attachment 38617 [details] [review] [PASSED QA] Bug 12135: Fix suggestions table width The trick to update the suggestions table width is outdated since jQuery UI has been updated. Test plan: 0/ Don't apply this patch 1/ Go on the suggestions page (suggestion/suggestion.pl), change tabs: the table width is wrong 2/ Apply this patch 4/ Repeat 1 and confirm the width is now updated. Signed-off-by: Christopher Brannon <cbrannon@cdalibary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> The table sizes still vary slightly, but this is an improvement. (In reply to Christopher Brannon from comment #3) > I think this patch is working. I definitely see differences. The problem > is that with the table width being dynamic and not fixed to the width of the > screen, it is very difficult to tell. (In reply to Katrin Fischer from comment #5) > Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > The table sizes still vary slightly, but this is an improvement. Yes, it's how it is supposed to behave. Patch pushed to master. Thanks Jonathan! Pushed to 3.18.x will be 3.18.7 |