There are several common jQuery-related files which can be moved easily to koha-tmpl/intranet-tmpl/lib so that they can be potentially shared by multiple themes without duplication.
Created attachment 14984 [details] [review] Bug 9521 - Move common jQuery assets to koha-tmpl/intranet-tmpl/lib Assets which are not theme-specific can now be placed in koha-tmpl/intranet-tmpl/lib. This patch moves jQuery assets referenced by doc-head-close.inc to this location and corrects the path in the include. To test, load any page in the staff client which uses jQuery and confirm that there are no JavaScript errors. Test keyboard shortcuts (Alt-r, Alt-u, Alt-q), Search to hold functionality, and search term highlighting to confirm that jQuery plugins are working correctly.
Created attachment 15005 [details] [review] [SIGNED-OFF] Bug 9521 - Move common jQuery assets to koha-tmpl/intranet-tmpl/lib Assets which are not theme-specific can now be placed in koha-tmpl/intranet-tmpl/lib. This patch moves jQuery assets referenced by doc-head-close.inc to this location and corrects the path in the include. To test, load any page in the staff client which uses jQuery and confirm that there are no JavaScript errors. Test keyboard shortcuts (Alt-r, Alt-u, Alt-q), Search to hold functionality, and search term highlighting to confirm that jQuery plugins are working correctly. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Why don't you place the lib directory at the root (koha-tmpl) in order to share libs with opac?
Because intranet and OPAC do not share a common web-accessible directory in standard installations.
(In reply to comment #4) > Because intranet and OPAC do not share a common web-accessible directory in > standard installations. Thanks Jared, I didn't know this special feature. Owen, I think 3 occurrences has to be replaced too: $ grep -R jquery.js | grep themelang includes/help-top.inc:<script type="text/javascript" src="[% themelang %]/lib/jquery/jquery.js"></script> $ grep -R highlight | grep themelang modules/admin/preferences.tt:<script src="[% themelang %]/lib/jquery/plugins/jquery.highlight-3.js" type="text/javascript"></script> $ grep -R hotkeys | grep themelang includes/help-top.inc:<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.hotkeys.min.js"></script> It seems that the first one is useless and can be removed. Marked as Failed QA.
Created attachment 15072 [details] [review] Bug 9521 [Revised] Move common jQuery assets to koha-tmpl/intranet-tmpl/lib Assets which are not theme-specific can now be placed in koha-tmpl/intranet-tmpl/lib. This patch moves jQuery assets referenced by doc-head-close.inc to this location and corrects the path in the include. To test, load any page in the staff client which uses jQuery and confirm that there are no JavaScript errors. Test keyboard shortcuts (Alt-r, Alt-u, Alt-q), Search to hold functionality, and search term highlighting to confirm that jQuery plugins are working correctly. Revision corrects some additional instances in help-top.inc and removes a redundant call to the highlight script in preferences.tt
Created attachment 15091 [details] [review] Bug 9521 [Revised] Move common jQuery assets to koha-tmpl/intranet-tmpl/lib Assets which are not theme-specific can now be placed in koha-tmpl/intranet-tmpl/lib. This patch moves jQuery assets referenced by doc-head-close.inc to this location and corrects the path in the include. To test, load any page in the staff client which uses jQuery and confirm that there are no JavaScript errors. Test keyboard shortcuts (Alt-r, Alt-u, Alt-q), Search to hold functionality, and search term highlighting to confirm that jQuery plugins are working correctly. Revision corrects some additional instances in help-top.inc and removes a redundant call to the highlight script in preferences.tt Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Looks good to me now. Marked as Passed QA.
Created attachment 15092 [details] [review] Bug 9521 [Revised] Move common jQuery assets to koha-tmpl/intranet-tmpl/lib Assets which are not theme-specific can now be placed in koha-tmpl/intranet-tmpl/lib. This patch moves jQuery assets referenced by doc-head-close.inc to this location and corrects the path in the include. To test, load any page in the staff client which uses jQuery and confirm that there are no JavaScript errors. Test keyboard shortcuts (Alt-r, Alt-u, Alt-q), Search to hold functionality, and search term highlighting to confirm that jQuery plugins are working correctly. Revision corrects some additional instances in help-top.inc and removes a redundant call to the highlight script in preferences.tt Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This patch has been pushed to master.