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