ContTemplatePop.jsp 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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("contTemplateVo");
  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 gubun = params.get("p_gubun");
  27. String cont_mod_id = params.get("p_cont_mod_id");
  28. String seq = params.get("p_seq");
  29. %>
  30. <SCRIPT language="JavaScript">
  31. function _onReady(){
  32. jQuery("#btnSave").click(function(){
  33. submitXmlRequest("/test/ModStatusList_form.screen", "FORM_CONT_UPDATE", document.form1);
  34. });
  35. jQuery("#btnClose").click(function(){
  36. if("<%=gubun%>" == "P") parent.SubContPurTemplateClose();
  37. else parent.SubContSubTemplateClose();
  38. });
  39. $("textarea").keydown(function(e) {
  40. if(e.keyCode === 9) { // tab was pressed
  41. // get caret position/selection
  42. var start = this.selectionStart;
  43. var end = this.selectionEnd;
  44. var $this = $(this);
  45. var value = $this.val();
  46. // set textarea value to: text before caret + tab + text after caret
  47. $this.val(value.substring(0, start)
  48. + "\t"
  49. + value.substring(end));
  50. // put caret at right position again (add one for the tab)
  51. this.selectionStart = this.selectionEnd = start + 1;
  52. // prevent the focus lose
  53. e.preventDefault();
  54. }
  55. });
  56. }
  57. function pageinit(){
  58. }
  59. function doResult(resultObj) {
  60. try {
  61. if( resultObj.getRequestEvent() == "FORM_CONT_UPDATE") {
  62. if( resultObj.getSuccess() ) {
  63. alert("저장되었습니다.");
  64. }
  65. else {
  66. dlgErrorMsg(resultObj);
  67. }
  68. document.form1.isSubmit = false;
  69. }
  70. }
  71. catch(errorObject) {
  72. showErrorDlg("doResult()", errorObject);
  73. }
  74. }
  75. </SCRIPT>
  76. <modular:search id="form1">
  77. <modular:key id="fevent" />
  78. </modular:search>
  79. <BODY>
  80. <form id="form1" name="form1" method="post" modular:type="search">
  81. <INPUT type="hidden" name="fevent" id="fevent" value="">
  82. <%-- <INPUT type="hidden" name="pageDiv" id="pageDiv" value="<%=params.get("pageDiv")%>"> <!-- //1:조달 2:포탈 --> --%>
  83. <INPUT type="hidden" name="p_gubun" id="gubun" value="<%=params.get("p_gubun")%>">
  84. <INPUT type="hidden" name="p_seq" id="seq" value="<%=params.get("p_seq")%>">
  85. <INPUT type="hidden" name="p_cont_mod_id" id=cont_mod_id value="<%=params.get("p_cont_mod_id")%>">
  86. <!-- 검색조건 영역 : 시작 -->
  87. <table class="search-form-table" style="width: 100%">
  88. <col width="10%">
  89. <col width="40%">
  90. <col width="10%">
  91. <col width="40%">
  92. <TR height="25">
  93. <th>제목</th>
  94. <TD>
  95. <input type="text" name="p_title" id="p_title" style="width: 86%;" class="input byteChk ctrlTarget" value="<%=vo.get("TEMPLATE_NAME")%>" colspan="2"/>
  96. </TD>
  97. <TD class="button" style="text-align: right;" colspan="2">
  98. <!-- 검색버튼 영역 : 시작 -->
  99. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSave">저장</a></span>
  100. <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span>
  101. &nbsp;&nbsp;&nbsp;
  102. </TD>
  103. </TR>
  104. <TR height="25">
  105. <th>CHECK_YN</th>
  106. <TD>
  107. <input type="text" name="p_check_yn" id="p_check_yn" style="width: 86%;" class="input byteChk ctrlTarget" value="<%=vo.get("CHECK_YN")%>"/>
  108. </TD>
  109. <th>OPTION_YN</th>
  110. <TD>
  111. <input type="text" name="p_option_yn" id="p_option_yn" style="width: 86%;" class="input byteChk ctrlTarget" value="<%=vo.get("OPTION_YN")%>"/>
  112. </TD>
  113. </TR>
  114. <TR height="300">
  115. <TD colspan="4">
  116. <!-- vo.get("TEMPLATE_HTML").replace("</textarea>","</mod_textarea>") 로 문자를 변경 후 저장시에 java단에서 다시 변경하여 저장한다-->
  117. <textarea name="template" id="template" style="width:98%; height:450px; overflow-y:auto" class="input byteChk ctrlTarget"><%= templateHtml %></textarea>
  118. </TD>
  119. </TR>
  120. </TABLE>
  121. </FORM>
  122. </body>