Bug 9521 - Move common jQuery assets to koha-tmpl/intranet-tmpl/lib
Summary: Move common jQuery assets to koha-tmpl/intranet-tmpl/lib
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-31 19:52 UTC by Owen Leonard
Modified: 2014-05-26 21:04 UTC (History)
2 users (show)

See Also:
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 9521 - Move common jQuery assets to koha-tmpl/intranet-tmpl/lib (12.58 KB, patch)
2013-01-31 20:00 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9521 - Move common jQuery assets to koha-tmpl/intranet-tmpl/lib (12.60 KB, patch)
2013-02-01 13:41 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 9521 [Revised] Move common jQuery assets to koha-tmpl/intranet-tmpl/lib (15.32 KB, patch)
2013-02-05 20:12 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 9521 [Revised] Move common jQuery assets to koha-tmpl/intranet-tmpl/lib (15.33 KB, patch)
2013-02-06 13:18 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 9521 [Revised] Move common jQuery assets to koha-tmpl/intranet-tmpl/lib (15.56 KB, patch)
2013-02-06 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2013-01-31 19:52:55 UTC
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.
Comment 1 Owen Leonard 2013-01-31 20:00:25 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall (khall) 2013-02-01 13:41:46 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-02-01 15:46:57 UTC
Why don't you place the lib directory at the root (koha-tmpl) in order to share libs with opac?
Comment 4 Jared Camins-Esakov 2013-02-01 15:49:53 UTC
Because intranet and OPAC do not share a common web-accessible directory in standard installations.
Comment 5 Jonathan Druart 2013-02-05 11:12:09 UTC
(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.
Comment 6 Owen Leonard 2013-02-05 20:12:05 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall (khall) 2013-02-06 13:18:27 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2013-02-06 13:30:29 UTC
Looks good to me now.
Marked as Passed QA.
Comment 9 Jonathan Druart 2013-02-06 13:30:54 UTC
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>
Comment 10 Jared Camins-Esakov 2013-02-07 05:38:26 UTC
This patch has been pushed to master.