Details
-
Story
-
Status: Closed
-
TBD
-
Resolution: Won't Fix
-
None
-
None
-
None
-
Undetermined
Description
Based on a discussion we had on Talk, raff suggested we use HTML base path to make the widget aware of the openmrs web app url.
https://talk.openmrs.org/t/relationships-widget/10864
raff: The change needs to happen around line https://github.com/openmrs/openmrs-contrib-uicommons/blob/master/angular/openmrs-rest/openmrs-rest.js#L91
Actually using base path may not be a good idea after reading http://stackoverflow.com/questions/1889076/is-it-recommended-to-use-the-base-html-tag
Probably using
<script>var contextPath = "${pageContext.request.contextPath}"</script>
would be a safer option i.e. a global variable as concluded here: http://stackoverflow.com/questions/6615641/how-do-you-get-the-contextpath-from-javascript-the-right-way