I'm trying to run some JS in the module I'm developing (Converting Nepali to Gregorian Dates) and I managed to get my JS file into OpenMRS with the
org.openmrs.headerFullIncludeExt
extension point defined in /openmrs-core/webapp/src/main/webapp/WEB-INF/template/headerFull.jsp
My JS file is always loaded in the <head> tag. And in most of the pages jQuery and other JS files are loaded before. That how I expected it and how I need it to be.
But when I start the HTML Form Entry Module (creating or executing a form)
/openmrs/dwr/engine.js
/openmrs/dwr/interface/DWRAlertService.js
and my file is loaded in the <head> tag but the rest, including jQuery (seems to be an own version of the HTML Form Entry Module) later in the <body> tag.
I suppose this has to do with:
<c:if test="${empty DO_NOT_INCLUDE_JQUERY}">
So what is the advised way to deal with it? Should I bring an own version of jQuery for my module? That seems to be odd, if we already have at least two versions in the system. Or do I have to change DO_NOT_INCLUDE_JQUERY? Would that bring the Form Entry Module into trouble?
An advice for an OpenMRS beginner would be very appreciated.