Uploaded image for project: 'Reference Application'
  1. Reference Application
  2. RA-1340

Make the openmrsRest component aware of the openmrs base path

    XMLWordPrintable

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

      Gliffy Diagrams

        Attachments

          Activity

            People

              Unassigned Unassigned
              cioan Cosmin Ioan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: