In order to conform to best practices for performance, staff client template JavaScript should be in the footer instead of the header. This patch will do so for the Elasticsearch mappings template.
Created attachment 113262 [details] [review] Bug 26958: Move Elasticsearch mapping template JS to the footer This patch moves inclusion of JavaScript to the footer of the Elasticsearch mapping template. It also moves the JS into a separate file. To test you should have SearchEngine system preference set to "Elasticsearch." - Apply the patch and go to Administration -> Search engine configuration (Elasticsearch). - Confirm that JavaScript dependent interactions work correctly: - Tabs - Under the bibliographic records and authorities tabs, table row drag-and-drop - Under the bibliographic records and authorities tabs, test the "Add" line at the bottom of the table. - Under the bibliographic records and authorities tabs, test the "Delete" button.
Created attachment 113299 [details] [review] Bug 26958: Move Elasticsearch mapping template JS to the footer This patch moves inclusion of JavaScript to the footer of the Elasticsearch mapping template. It also moves the JS into a separate file. To test you should have SearchEngine system preference set to "Elasticsearch." - Apply the patch and go to Administration -> Search engine configuration (Elasticsearch). - Confirm that JavaScript dependent interactions work correctly: - Tabs - Under the bibliographic records and authorities tabs, table row drag-and-drop - Under the bibliographic records and authorities tabs, test the "Add" line at the bottom of the table. - Under the bibliographic records and authorities tabs, test the "Delete" button. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Everything looks good. I've also checked : translated strings in elasticsearch-mappings.js are with __()
Created attachment 113301 [details] [review] Bug 26970: Add row highlight on drag in Elasticsearch mapping template In Elasticsearch mapping tables : In order to better see which row is currently in drag-an-drop, add an highlight color like in circulation and fine rules when editing a row. Test plan : 1) Go to Administration > Search engine configuration (Elasticsearch) 2) In each table : biblio, authorities, facets 3) Clik on a row to start a drag => See row turning orange 4) Release to drop => See row turning back to original color
Comment on attachment 113301 [details] [review] Bug 26970: Add row highlight on drag in Elasticsearch mapping template Oups wrong number in git bz attach
Created attachment 116759 [details] [review] Bug 26958: Move Elasticsearch mapping template JS to the footer This patch moves inclusion of JavaScript to the footer of the Elasticsearch mapping template. It also moves the JS into a separate file. To test you should have SearchEngine system preference set to "Elasticsearch." - Apply the patch and go to Administration -> Search engine configuration (Elasticsearch). - Confirm that JavaScript dependent interactions work correctly: - Tabs - Under the bibliographic records and authorities tabs, table row drag-and-drop - Under the bibliographic records and authorities tabs, test the "Add" line at the bottom of the table. - Under the bibliographic records and authorities tabs, test the "Delete" button. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 21.05, thanks to everybody involved!
I choose to backport to be able to backport any change of JS in this page. Pushed to 20.11.x for 20.11.03
Pushed to 20.05.x for 20.05.09
Backported: Pushed to 19.11.x branch for 19.11.15