Advertisement
Guest User

Untitled

a guest
Jul 17th, 2012
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.03 KB | None | 0 0
  1. <%@ include file="/WEB-INF/template/include.jsp"%>
  2. <openmrs:require privilege="Edit Observations" otherwise="/login.htm" />
  3.  
  4.  
  5. <openmrs:htmlInclude file="/moduleResources/drawing/paint.js"/>
  6. <openmrs:htmlInclude file="/moduleResources/drawing/resize.js"/>
  7. <openmrs:htmlInclude file="/moduleResources/drawing/paint.css"/>
  8. <openmrs:htmlInclude file="/moduleResources/drawing/colorpicker.js"/>
  9. <openmrs:htmlInclude file="/moduleResources/drawing/colorpicker.css"/>
  10. <openmrs:htmlInclude file="/scripts/calendar/calendar.js" />
  11. <openmrs:htmlInclude file="/scripts/timepicker/timepicker.js" />
  12.  
  13. <script type="text/javascript">
  14. $j(document).ready(function(){
  15. var v=new DrawingEditor('');
  16. v.prepareCanvas();
  17.  
  18. <c:if test="${not empty obsId}">
  19. <c:if test="${not empty encodedImage}">
  20. v.loadExistingImage('${encodedImage}');
  21. </c:if>
  22.  
  23.  
  24. <c:forEach items="${annotations}" var="annotation">
  25. v.createMarker(${annotation.id},${annotation.location.x},${annotation.location.y},'${annotation.text}','${annotation.status}');
  26. </c:forEach>
  27. </c:if>
  28.  
  29. });
  30.  
  31.  
  32.  
  33. </script>
  34.  
  35. ${ obsId == null }
  36.  
  37. <c:choose>
  38. <c:when test="${ obsId == null} ">
  39. <div id="drawingObsform" >
  40. <form method="post" id="saveImageForm" action="<openmrs:contextPath/>/module/drawing/saveDrawing.form">
  41.  
  42. <table>
  43. <c:choose>
  44. <c:when test="${model.patientId == null}">
  45. <tr>
  46. <td><spring:message code="drawing.patient"/></td>
  47. <td><openmrs_tag:personField formFieldName="patientId" formFieldId="drawingPatientId" searchLabelCode="Person.findBy" linkUrl="" callback="" /></td>
  48. </tr>
  49. </c:when>
  50. <c:otherwise>
  51. <input type="hidden" name="patientId" value='${model.patientId}' />
  52. </c:otherwise>
  53. </c:choose>
  54. <tr>
  55. <td><spring:message code="drawing.questionConcept"/></td>
  56. <td>
  57. <openmrs:globalProperty var="questionConcepts" key="drawing.questionConcepts" listSeparator=","/>
  58.  
  59. <c:choose>
  60. <c:when test="${ empty questionConcepts}">
  61. <openmrs_tag:conceptField formFieldName="conceptId" formFieldId="drawingConceptId" includeDatatypes="Complex" includeClasses="Drawing"/>
  62. </c:when>
  63. <c:otherwise>
  64. <select id="drawingConceptId" name="conceptId">
  65. <c:forEach var="conceptId" items="${questionConcepts}">
  66. <option value="${conceptId}"><openmrs:format conceptId="${conceptId}"/></option>
  67. </c:forEach>
  68. </select>
  69. </c:otherwise>
  70. </c:choose>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td><spring:message code="drawing.encounter"/></td>
  75. <td><openmrs_tag:encounterField formFieldName="encounterId" formFieldId="drawingEncounterId" /> </td>
  76. </tr>
  77. <tr>
  78. <td><spring:message code="drawing.date"/></td>
  79. <td><input type="text" name="date" size="10" onfocus="showCalendar(this)" id="drawingDate" />(<spring:message code="general.format"/>: <openmrs:datePattern />)</td>
  80. </tr>
  81.  
  82. </table>
  83. <input type="hidden" id="encodedImage" name="encodedImage"/>
  84. </form>
  85. </div>
  86. </c:when>
  87. <c:otherwise>
  88. <form method="post" id="saveImageForm" action="<openmrs:contextPath/>/module/drawing/updateDrawing.form">
  89. <input type="hidden" id="encodedImage" name="encodedImage"/>
  90. <input type="hidden" id="obsId" name="obsId" value="${obsId} "/>
  91. </form>
  92. </c:otherwise>
  93. </c:choose>
  94.  
  95.  
  96.  
  97. <div id="drawingheader">
  98. <div id="pencilDiv" class="iconDiv"><img id="pencil" src="<openmrs:contextPath/>/moduleResources/drawing/images/pencil_icon.png" alt="pencil" class="imageprop" /></div>
  99. <div id="eraserDiv" class="iconDiv"><img id="eraser" src="<openmrs:contextPath/>/moduleResources/drawing/images/eraser_icon.png" alt="eraser" class="imageprop" /></div>
  100. <div id="textDiv" class="iconDiv"><img id="text" src="<openmrs:contextPath/>/moduleResources/drawing/images/text_icon.png" alt="text" class="imageprop" /></div>
  101. <div id='fontpropertiesDiv' style="display: none;float: left;margin-left: 5px" >
  102. <div id='boldDiv' class="iconDiv"><img src="<openmrs:contextPath/>/moduleResources/drawing/images/bold_icon.png" alt="bold" class="imageprop" /></div>
  103. <div id='italicDiv' class="iconDiv"><img src="<openmrs:contextPath/>/moduleResources/drawing/images/italic_icon.png" alt="italic" class="imageprop"/></div>
  104. Font Size:
  105. <select id="fontSize">
  106. <option>24</option>
  107. <option>28</option>
  108. <option>32</option>
  109. <option>38</option>
  110. </select>
  111. </div>
  112. <div id='thicknessDiv' style="display: none;float: left;margin-left: 5px" >
  113. Thickness:
  114. <select id="thickness">
  115. <option>2</option>
  116. <option>4</option>
  117. <option>6</option>
  118. <option>8</option>
  119. </select>
  120. </div>
  121. <div id="colorSelector" style="float: left" class="colorselector">
  122. <div class="colorselector_innerdiv"></div>
  123. </div>
  124. <div style="clear:both;"></div>
  125.  
  126. </div>
  127. <div id="canvasDiv" class="canvasdiv">
  128.  
  129. </div>
  130. <div id='textAreaPopUp' style='position:absolute;display:none;z-index:1;'>
  131. <textarea id='writableTextarea' style='width:100px;height:50px;'></textarea>
  132. <input type='button' value='save' id='saveText'/>
  133. </div>
  134. <!-- <div id="sidepane">
  135.  
  136. </div>-->
  137. <div id="drawingfooter">
  138.  
  139. <input type='button' id='clearCanvas' value="Clear Canvas" />
  140. <input type='button' id='saveImage' value="Save" />
  141. <input type="file" id="imageupload" value="Open Image" />
  142.  
  143.  
  144. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement