Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: test/org/openmrs/module/formentry/test/PublishInfoPathTest.java
- ===================================================================
- --- test/org/openmrs/module/formentry/test/PublishInfoPathTest.java (revision 20657)
- +++ test/org/openmrs/module/formentry/test/PublishInfoPathTest.java (working copy)
- @@ -199,10 +199,16 @@
- }
- + /**
- + * Requires that the host system know how to compile/publish xsn files.
- + * If on linux, install cabextract and lcab.
- + * @throws Exception
- + */
- @Test
- - public void shouldUpdateXslFile() throws Exception {
- - executeDataSet("org/openmrs/module/formentry/test/include/standardTestDataset.xml");
- - InputStream xslFileInputStream = this.getClass().getClassLoader().getResourceAsStream("org/openmrs/module/formentry/test/include/pre1.4.xsn");
- + public void shouldUpdateXslFileButKeepNamesAsTriplets() throws Exception {
- + executeDataSet("org/openmrs/include/standardTestDataset.xml");
- + executeDataSet("org/openmrs/module/formentry/test/include/extraConcepts.xml");
- + InputStream xslFileInputStream = getClass().getClassLoader().getResourceAsStream("org/openmrs/module/formentry/test/include/pre1.4.xsn");
- Form form = PublishInfoPath.publishXSN(xslFileInputStream);
- FormEntryService formEntryService = (FormEntryService)Context.getService(FormEntryService.class);
- @@ -214,8 +220,8 @@
- String xslString = OpenmrsUtil.getFileAsString(xsl);
- // the concept names should have been inserted into the xsl file
- - assertFalse(xslString.contains("xd:onValue=\"1142^MTCT STAFF^99DCT\""));
- - assertFalse(xslString.contains("\"obs/pay_category/value="1142^MTCT STAFF^99DCT"\""));
- + assertTrue(xslString.contains("xd:onValue=\"1142^MTCT STAFF^99DCT\""));
- + assertTrue(xslString.contains("\"obs/pay_category/value="1142^MTCT STAFF^99DCT"\""));
- tempDir.delete();
- }
- }
- Index: test/org/openmrs/module/formentry/test/FormEntryUtilTest.java
- ===================================================================
- --- test/org/openmrs/module/formentry/test/FormEntryUtilTest.java (revision 20657)
- +++ test/org/openmrs/module/formentry/test/FormEntryUtilTest.java (working copy)
- @@ -9,6 +9,6 @@
- @Test
- public void shouldEncodeUtf8() throws Exception {
- - Assert.assertEquals("HEIGHT a\\u00c2a\\u00c2a (CM)^", FormEntryUtil.encodeUTF8String("HEIGHT aÃaÃa (CM)^"));
- + Assert.assertEquals("HEIGHT - \\u00d0 - (CM)^", FormEntryUtil.encodeUTF8String("HEIGHT - Ð - (CM)^"));
- }
- }
- Index: web/module/taskpane/concept.jsp
- ===================================================================
- --- web/module/taskpane/concept.jsp (revision 20657)
- +++ web/module/taskpane/concept.jsp (working copy)
- @@ -30,29 +30,29 @@
- function miniConcept(n) {
- this.conceptId = "<%= org.openmrs.util.OpenmrsConstants.PROPOSED_CONCEPT_IDENTIFIER %>";
- if (n == null)
- - this.name = $('proposedText').innerHTML;
- + this.name = $j('#proposedText').html();
- else
- this.name = n;
- }
- function showProposeConceptForm() {
- - $('searchForm').style.display = "none";
- - $('proposeConceptForm').style.display = "block";
- - txt = $('proposedText');
- + $j('#searchForm').hide();
- + $j('#proposeConceptForm').show();
- + txt = document.getElementById('proposedText');
- txt.value = "";
- insertContent(txt, searchWidget.lastPhraseSearched);
- return false;
- }
- function proposeConcept() {
- - var box = $('proposedText');
- + var box = document.getElementById('proposedText');
- if (box.text == '') {
- alert("Proposed Concept text must be entered");
- box.focus();
- }
- else {
- - $('proposeConceptForm').style.display = "none";
- - $('searchForm').style.display = "";
- + $j('#proposeConceptForm').hide();
- + $j('#searchForm').show();
- DWRConceptService.findProposedConcepts(box.value, preProposedConcepts);
- }
- }
- @@ -63,8 +63,8 @@
- }
- else {
- //display a box telling them to pick a preposed concept:
- - $("preProposedAlert").style.display = "block";
- - $('searchForm').style.display = "";
- + $j('#preProposedAlert').show();
- + $j('#searchForm').show();
- searchWidget.doObjectsFound(concepts);
- }
- }
- @@ -168,7 +168,7 @@
- function(msg) {
- <%-- Do not allow proposed concepts if there is 'extra' information --%>
- <c:if test="${empty param.extraNodePath}">
- - if ($("preProposedAlert").style.display != "block")
- + if (document.getElementById("preProposedAlert").style.display != "block")
- msg.objs.push("<a href='#proposeConcept' onclick='javascript:return showProposeConceptForm();'><spring:message code="ConceptProposal.propose.new"/></a>");
- </c:if>
- }
- Index: web/module/taskpane/user.jsp
- ===================================================================
- --- web/module/taskpane/user.jsp (revision 20657)
- +++ web/module/taskpane/user.jsp (working copy)
- @@ -7,7 +7,9 @@
- <c:set var="nodePath" value="${param.nodePath}"/>
- </c:when>
- <c:otherwise>
- - alert("You must provide the nodePath query parameter with the node to fill in (e.g. nodePath=//encounter.provider_id)");
- + <script type="text/javascript">
- + alert("You must provide the nodePath query parameter with the node to fill in (e.g. nodePath='//encounter.provider_id)')");
- + </script>
- </c:otherwise>
- </c:choose>
- Index: web/module/taskpane/taskpaneHeader.jsp
- ===================================================================
- --- web/module/taskpane/taskpaneHeader.jsp (revision 20657)
- +++ web/module/taskpane/taskpaneHeader.jsp (working copy)
- @@ -10,21 +10,32 @@
- <head>
- <openmrs:htmlInclude file="/openmrs.js" />
- <openmrs:htmlInclude file="/scripts/openmrsmessages.js" /> <%-- appendLocale=true is not on here for backwards compatibility --%>
- +
- <openmrs:htmlInclude file="/openmrs.css" />
- <openmrs:htmlInclude file="/style.css" />
- - <c:if test="${empty DO_NOT_INCLUDE_JQUERY}">
- - <openmrs:htmlInclude file="/scripts/jquery/jquery.min.js" />
- - <openmrs:htmlInclude file="/scripts/jquery-ui/js/jquery-ui.custom.min.js" />
- - <openmrs:htmlInclude file="/scripts/jquery-ui/js/jquery-ui-datepicker-i18n.js" />
- - <openmrs:htmlInclude file="/scripts/jquery-ui/css/redmond/jquery-ui.custom.css" />
- - </c:if>
- + <openmrs:htmlInclude file="/moduleResources/formentry/taskpane.css" />
- +
- + <openmrs:htmlInclude file="/scripts/jquery/jquery.min.js" />
- + <openmrs:htmlInclude file="/scripts/jquery-ui/js/jquery-ui.custom.min.js" />
- + <openmrs:htmlInclude file="/scripts/jquery-ui/js/jquery-ui-datepicker-i18n.js" />
- + <openmrs:htmlInclude file="/scripts/jquery-ui/css/redmond/jquery-ui.custom.css" />
- + <openmrs:htmlInclude file="/scripts/jquery/dataTables/css/dataTables_jui.css"/>
- + <openmrs:htmlInclude file="/scripts/jquery/dataTables/js/jquery.dataTables.min.js"/>
- + <openmrs:htmlInclude file="/scripts/jquery-ui/js/openmrsSearch.js" />
- + <%-- These are imported here because IE doesn't like our import js from js and dwr doesn't get loaded properly --%>
- + <openmrs:htmlInclude file="/scripts/dojoConfig.js" />
- + <openmrs:htmlInclude file="/scripts/dojo/dojo.js" />
- + <openmrs:htmlInclude file="/dwr/engine.js" />
- + <openmrs:htmlInclude file="/dwr/util.js" />
- +
- + <openmrs:htmlInclude file="/moduleResources/formentry/taskpane.js" />
- +
- <title><spring:message code="openmrs.title"/></title>
- <script type="text/javascript">
- - <c:if test="${empty DO_NOT_INCLUDE_JQUERY}">
- var $j = jQuery.noConflict();
- - </c:if>
- +
- /* variable used in js to know the context path */
- var openmrsContextPath = '${pageContext.request.contextPath}';
- var dwrLoadingMessage = '<spring:message code="general.loading" />';
- @@ -37,33 +48,30 @@
- var handler = function(msg, ex) {
- if (!pageIsExiting) {
- - var div = document.getElementById("openmrs_dwr_error");
- - div.style.display = ""; // show the error div
- - var msgDiv = document.getElementById("openmrs_dwr_error_msg");
- - msgDiv.innerHTML = '<spring:message code="error.dwr"/>' + " <b>" + msg + "</b>";
- + $j("#openmrs_dwr_error_msg").html('<spring:message code="error.dwr"/> <b>' + msg + '</b>');
- + $j("#openmrs_dwr_error").show();
- }
- -
- };
- +
- dwr.engine.setErrorHandler(handler);
- dwr.engine.setWarningHandler(handler);
- </script>
- - <openmrs:htmlInclude file="/moduleResources/formentry/taskpane.css" />
- - <openmrs:htmlInclude file="/moduleResources/formentry/taskpane.js" />
- -
- - <%-- These are imported here because IE doesn't like our import js from js and dwr doesn't get loaded properly --%>
- - <openmrs:htmlInclude file="/scripts/dojoConfig.js" />
- - <openmrs:htmlInclude file="/scripts/dojo/dojo.js" />
- - <openmrs:htmlInclude file="/dwr/engine.js" />
- - <openmrs:htmlInclude file="/dwr/util.js" />
- -
- <meta http-equiv="msthemecompatible" content="yes" />
- <meta http-equiv="pragma" content="no-cache" />
- <meta http-equiv="expires" content="-1" />
- +
- <%@ include file="keepalive.jsp" %>
- </head>
- <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
- + <div id="openmrs_dwr_error" style="display:none" class="error">
- + <div id="openmrs_dwr_error_msg"></div>
- + <div id="openmrs_dwr_error_close" class="smallMessage">
- + <i><spring:message code="error.dwr.stacktrace"/></i>
- + <a href="#" onclick="this.parentNode.parentNode.style.display='none'"><spring:message code="error.dwr.hide"/></a>
- + </div>
- + </div>
- <div id="pageBody">
- <div id="contentMinimal">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement