TemplatePop.jsp 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <%--
  2. - FileName : prepayRequestList.jsp
  3. - Author(s) : chs
  4. - Date : 2021.03.17
  5. - Copyright : Copyright (c) 2014 www.udapsoft.co.kr, Inc.
  6. - Description: 전자조달 템플릿 팝업
  7. --%>
  8. <%@ page contentType="text/html; charset=utf-8" %>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  10. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  11. <%@ page import="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="kr.co.hsnc.common.sql.*" %>
  13. <%@ page import="kr.co.hsnc.common.util.Formatter"%>
  14. <%@ include file="/jsp/work/taglib.jsp" %>
  15. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  16. <%
  17. ctx.init(request, response);
  18. HandlerStorage storage = ctx.getHandlerStorage();
  19. ValueObject params = storage.getParams();
  20. ValueObject user = storage.getUser();
  21. String event = storage.getEvent();
  22. ValueObject vo = storage.getValueObject("templateVo");
  23. String templateHtml = vo.get("TEMPLATE_HTML").replace("</textarea>","</mod_textarea>");
  24. templateHtml = templateHtml.replace("&","&amp;");
  25. //String pageDiv = params.get("pageDiv"); //1:조달 2:포탈
  26. String template_cd = params.get("p_template_cd");
  27. String seq = params.get("p_seq");
  28. String job_div = params.get("p_job_div");
  29. %>
  30. <SCRIPT language="JavaScript">
  31. function _onReady(){
  32. jQuery("#btnSave").click(function(){
  33. submitXmlRequest("/test/ModStatusList_form.screen", "FORM_UPDATE", document.form1);
  34. });
  35. jQuery("#btnClose").click(function(){
  36. parent.SubetemplateClose();
  37. });
  38. $("textarea").keydown(function(e) {
  39. if(e.keyCode === 9) { // tab was pressed
  40. // get caret position/selection
  41. var start = this.selectionStart;
  42. var end = this.selectionEnd;
  43. var $this = $(this);
  44. var value = $this.val();
  45. // set textarea value to: text before caret + tab + text after caret
  46. $this.val(value.substring(0, start)
  47. + "\t"
  48. + value.substring(end));
  49. // put caret at right position again (add one for the tab)
  50. this.selectionStart = this.selectionEnd = start + 1;
  51. // prevent the focus lose
  52. e.preventDefault();
  53. }
  54. });
  55. }
  56. function pageinit(){
  57. }
  58. function doResult(resultObj) {
  59. try {
  60. if( resultObj.getRequestEvent() == "FORM_UPDATE") {
  61. if( resultObj.getSuccess() ) {
  62. alert("저장되었습니다.");
  63. }
  64. else {
  65. dlgErrorMsg(resultObj);
  66. }
  67. document.form1.isSubmit = false;
  68. }
  69. }
  70. catch(errorObject) {
  71. showErrorDlg("doResult()", errorObject);
  72. }
  73. }
  74. </SCRIPT>
  75. <modular:search id="form1">
  76. <modular:key id="fevent" />
  77. </modular:search>
  78. <BODY>
  79. <form id="form1" name="form1" method="post" modular:type="search">
  80. <INPUT type="hidden" name="fevent" id="fevent" value="">
  81. <%-- <INPUT type="hidden" name="pageDiv" id="pageDiv" value="<%=params.get("pageDiv")%>"> <!-- //1:조달 2:포탈 --> --%>
  82. <INPUT type="hidden" name="p_template_cd" id="template_cd" value="<%=params.get("p_template_cd")%>">
  83. <INPUT type="hidden" name="p_seq" id="seq" value="<%=params.get("p_seq")%>">
  84. <INPUT type="hidden" name="p_job_div" id="job_div" value="<%=params.get("p_job_div")%>">
  85. <INPUT type="hidden" name="userCorpId" id="userCorpId" value="<%=user.get("CORP_ID")%>">
  86. <!-- 검색조건 영역 : 시작 -->
  87. <table class="search-form-table" style="width: 100%">
  88. <col width="10%">
  89. <col width="70%">
  90. <col width="20%">
  91. <TR height="25">
  92. <th>제목</th>
  93. <TD>
  94. <input type="text" name="p_title" id="p_title" style="width: 86%;" class="input byteChk ctrlTarget" value="<%=vo.get("TEMPLATE_NAME")%>"/>
  95. </TD>
  96. <TD class="button" style="text-align: right;">
  97. <!-- 검색버튼 영역 : 시작 -->
  98. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSave">저장</a></span>
  99. <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span>
  100. &nbsp;&nbsp;&nbsp;
  101. </TD>
  102. </TR>
  103. <TR height="300">
  104. <TD colspan="3">
  105. <!-- vo.get("TEMPLATE_HTML").replace("</textarea>","</mod_textarea>") 로 문자를 변경 후 저장시에 java단에서 다시 변경하여 저장한다-->
  106. <textarea name="template" id="template" style="width:98%; height:450px; overflow-y:auto" class="input byteChk ctrlTarget"><%= templateHtml %></textarea>
  107. </TD>
  108. </TR>
  109. </TABLE>
  110. </FORM>
  111. </body>