fairnet/src/main/webapp/WEB-INF/jsp/uss/ion/pwm/EgovPopupRegist.jsp

303 lines
12 KiB
Plaintext

<%--
Class Name : EgovPopupRegist.jsp
Description : 팝업창관리 등록 페이지
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2009.09.16 장동한 최초 생성
author : 공통서비스 개발팀 장동한
since : 2009.09.16
Copyright (C) 2009 by MOPAS All right reserved.
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="ckeditor" uri="http://ckeditor.com" %>
<c:set var="ImgUrl" value="${pageContext.request.contextPath}/images/egovframework/com/cmm/" />
<c:set var="CssUrl" value="${pageContext.request.contextPath}/css/egovframework/com/" />
<!DOCTYPE html>
<html lang="ko">
<head>
<title>팝업창관리 관리</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="<c:url value="/validator.do"/>"></script>
<script type="text/javascript" src="<c:url value='/js/EgovCalPopup.js' />"></script>
<validator:javascript formName="popupManageVO" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javaScript" language="javascript">
/* ********************************************************
* 저장처리화면
******************************************************** */
function fn_egov_save_PopupManage(){
var varFrom = document.popupManageVO;
/* 에디터값 체크 */
/* if(CKEDITOR.instances.nttCn.getData()==""){
alert("내용은 필수입력값입니다.");
return;
} */
CKEDITOR.instances.nttCn.updateElement();
if(confirm("<spring:message code="common.save.msg" />")){
varFrom.action = "<c:url value='/uss/ion/pwm/egovPopupRegist.do' />";
if(!validatePopupManageVO(varFrom)){
return;
}else{
var ntceBgndeYYYMMDD = document.getElementById('ntceBgndeYYYMMDD').value;
var ntceEnddeYYYMMDD = document.getElementById('ntceEnddeYYYMMDD').value;
var iChkBeginDe = Number( ntceBgndeYYYMMDD.replaceAll("-","") );
var iChkEndDe = Number( ntceEnddeYYYMMDD.replaceAll("-","") );
if(iChkBeginDe > iChkEndDe || iChkEndDe < iChkBeginDe ){
alert("게시시작일자는 게시종료일자 보다 클수 없고,\n게시종료일자는 게시시작일자 보다 작을수 없습니다. ");
return;
}
varFrom.ntceBgnde.value = ntceBgndeYYYMMDD.replaceAll('-','') + fn_egov_SelectBoxValue('ntceBgndeHH') + fn_egov_SelectBoxValue('ntceBgndeMM');
varFrom.ntceEndde.value = ntceEnddeYYYMMDD.replaceAll('-','') + fn_egov_SelectBoxValue('ntceEnddeHH') + fn_egov_SelectBoxValue('ntceEnddeMM');
varFrom.submit();
}
}
}
/* ********************************************************
* RADIO BOX VALUE FUNCTION
******************************************************** */
function fn_egov_RadioBoxValue(sbName)
{
var FLength = document.getElementsByName(sbName).length;
var FValue = "";
for(var i=0; i < FLength; i++)
{
if(document.getElementsByName(sbName)[i].checked == true){
FValue = document.getElementsByName(sbName)[i].value;
}
}
return FValue;
}
/* ********************************************************
* SELECT BOX VALUE FUNCTION
******************************************************** */
function fn_egov_SelectBoxValue(sbName)
{
var FValue = "";
for(var i=0; i < document.getElementById(sbName).length; i++)
{
if(document.getElementById(sbName).options[i].selected == true){
FValue=document.getElementById(sbName).options[i].value;
}
}
return FValue;
}
/* ********************************************************
* PROTOTYPE JS FUNCTION
******************************************************** */
String.prototype.trim = function(){
return this.replace(/^\s+|\s+$/g, "");
}
String.prototype.replaceAll = function(src, repl){
var str = this;
if(src == repl){return str;}
while(str.indexOf(src) != -1) {
str = str.replace(src, repl);
}
return str;
}
function fnList() {
document.searchForm.submit();
}
</script>
<style>
.date_format{width:91px !important;}
.main1_table input{
width: unset;
}
</style>
</head>
<body>
<form:form commandName="popupManageVO" name="popupManageVO" action="${pageContext.request.contextPath}/uss/ion/pwm/egovPopupRegist.do" method="post">
<form:hidden path="ntceBgnde" />
<form:hidden path="ntceEndde" />
<input name="cmd" type="hidden" value="<c:out value='save'/>"/>
<input name="popupType" type="hidden" value="<c:out value='L'/>"/>
<!-- cont -->
<div class="cont_wrap">
<div class="box">
<!-- cont_tit -->
<div class="cont_tit">
<h2>팝업 등록</h2>
</div>
<!-- //cont_tit -->
<div class="cont">
<!-- list_상세 -->
<div class="tbType02 col-table data-table">
<table>
<colgroup>
<col style="width: 20%">
<col style="width: 80%">
</colgroup>
<tbody>
<tr>
<th><span class="reqArea">팝업명</span></th>
<td>
<form:input path="popupTitleNm" size="50" title="팝업명" maxlength="255"/>
<form:errors path="popupTitleNm" />
</td>
</tr>
<tr>
<th><span class="reqArea">게시기간</span></th>
<td>
<%-- <input type="hidden" name="cal_url" id="cal_url" value="<c:url value='/sym/cmm/EgovNormalCalPopup.do'/>" >
<input type="text" class="date_format" name="ntceBgndeYYYMMDD" id="ntceBgndeYYYMMDD" size="10" maxlength="10" class="readOnlyClass" readonly>
<a href="#" onClick="javascript:fn_egov_NormalCalendar(document.forms.popupManageVO, document.forms.popupManageVO.ntceBgndeYYYMMDD);">
<input type="button" class="calBtn">
<img src="<c:url value='/images/egovframework/com/cmm/icon/bu_icon_carlendar.gif' />" align="middle" style="border:0px" alt="달력창팝업버튼이미지">
</a>
<form:select path="ntceBgndeHH" class="date_format">
<form:options items="${ntceBgndeHH}" itemValue="code" itemLabel="codeNm"/>
</form:select>시
<form:select path="ntceBgndeMM" class="date_format">
<form:options items="${ntceBgndeMM}" itemValue="code" itemLabel="codeNm"/>
</form:select>분
&nbsp&nbsp~&nbsp&nbsp
<input type="text" class="date_format" name="ntceEnddeYYYMMDD" id="ntceEnddeYYYMMDD" size="10" maxlength="10" class="readOnlyClass" readonly>
<a href="#" onClick="javascript:fn_egov_NormalCalendar(document.forms.popupManageVO, document.forms.popupManageVO.ntceEnddeYYYMMDD);">
<input type="button" class="calBtn">
<img src="<c:url value='/images/egovframework/com/cmm/icon/bu_icon_carlendar.gif' />" align="middle" style="border:0px" alt="달력창팝업버튼이미지">
</a>
<form:select path="ntceEnddeHH" class="date_format">
<form:options items="${ntceEnddeHH}" itemValue="code" itemLabel="codeNm"/>
</form:select>시
<form:select path="ntceEnddeMM" class="date_format">
<form:options items="${ntceEnddeMM}" itemValue="code" itemLabel="codeNm"/>
</form:select>분 --%>
<div id="sel_date" class="sel_date calendar">
<input type="hidden" name="cal_url" id="cal_url" value="<c:url value='/sym/cmm/EgovNormalCalPopup.do'/>" >
<input type="text" class="date_format" name="ntceBgndeYYYMMDD" id="ntceBgndeYYYMMDD" maxlength="10" title="게시시작일" readonly>
<div class="calendar_in" id="calendarName_startDate" style="z-index: 9;">
<a href="#" onClick="javascript:fn_egov_NormalCalendar(document.forms.popupManageVO, document.forms.popupManageVO.ntceBgndeYYYMMDD);">
<input type="button" class="calBtn">
<%-- <img src="<c:url value='/images/egovframework/com/cmm/icon/bu_icon_carlendar.gif' />" align="middle" style="border:0px" alt="달력창팝업버튼이미지"> --%>
</a>
</div>
<form:select path="ntceBgndeHH" class="date_format">
<form:options items="${ntceBgndeHH}" itemValue="code" itemLabel="codeNm"/>
</form:select> 시
<form:select path="ntceBgndeMM" class="date_format">
<form:options items="${ntceBgndeMM}" itemValue="code" itemLabel="codeNm"/>
</form:select> 분
~
<input type="text" class="date_format" name="ntceEnddeYYYMMDD" id="ntceEnddeYYYMMDD" maxlength="10" title="게시종료일" readonly>
<div class="calendar_in" id="calendarName_endDate" style="z-index: 9;">
<a href="#" onClick="javascript:fn_egov_NormalCalendar(document.forms.popupManageVO, document.forms.popupManageVO.ntceEnddeYYYMMDD);">
<input type="button" class="calBtn">
<%-- <img src="<c:url value='/images/egovframework/com/cmm/icon/bu_icon_carlendar.gif' />" align="middle" style="border:0px" alt="달력창팝업버튼이미지"> --%>
</a>
</div>
<form:select path="ntceEnddeHH" class="date_format">
<form:options items="${ntceEnddeHH}" itemValue="code" itemLabel="codeNm"/>
</form:select> 시
<form:select path="ntceEnddeMM" class="date_format">
<form:options items="${ntceEnddeMM}" itemValue="code" itemLabel="codeNm"/>
</form:select> 분
</div>
</td>
</tr>
<tr>
<th>링크 URL</th>
<td>
<form:input path="fileUrl" size="50" title="링크 URL" maxlength="255"/>
<form:errors path="fileUrl" />
</td>
</tr>
<tr style="display:none;">
<th>팝업사이즈</th>
<td>
가로<form:input path="popupWSize" class="dateInput" maxlength="10" value="100"/>px 세로<form:input path="popupHSize" class="dateInput" maxlength="10" value="100"/>px
<form:errors path="popupWSize" />
<form:errors path="popupHSize" />
</td>
</tr>
<tr>
<th>위치</th>
<td class="td_position">
<p>왼쪽 <form:input path="popupWlc" class="dateInput" maxlength="10"/> px</p>
<p>상단 <form:input path="popupHlc" class="dateInput" maxlength="10"/> px</p>
<form:errors path="popupWlc" />
<form:errors path="popupHlc" />
</td>
</tr>
<tr>
<th>내용</th>
<td>
<form:textarea path="nttCn" title="${title} ${inputTxt}" cols="300" rows="20" />
<ckeditor:replace replace="nttCn" basePath="${pageContext.request.contextPath}/html/egovframework/com/cmm/utl/ckeditor/" />
</td>
</tr>
<tr>
<th>게시 상태</th>
<td>
<div class="radio_wrap">
<span><input type="radio" name="ntceAt" id="Y2" value="Y" checked><label for="Y2">예</label></span>
<span><input type="radio" name="ntceAt" id="N2" value="N"><label for="N2">아니오</label></span>
</div>
</td>
</tr>
<tr>
<th>그만보기 설정 여부</th>
<td>
<div class="radio_wrap">
<span><input type="radio" name="stopVewAt" id="Y3" value="Y" checked><label for="Y3">예</label></span>
<span><input type="radio" name="stopVewAt" id="N3" value="N"><label for="N3">아니오</label></span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- //list_상세 -->
<!-- btn_wrap -->
<div class="btn_wrap btn_layout01">
<div class="area_left">
</div>
<div class="area_right">
<button type="button" class="btnType06 btn btn_text btn_46 blue_fill" onclick="fn_egov_save_PopupManage(); return false;">저 장</button>
<button type="button" class="btnType04 btn btn_text btn_46 gray_fill" onclick="fnList(); return false;">목 록</button>
</div>
</div>
<!-- //btn_wrap -->
</div>
</div>
</div>
<!-- //cont -->
</form:form>
<form name="searchForm" id="searchForm" method="get" action="<c:url value='/uss/ion/pwm/listPopup.do'/>" ></form>
</body>
</html>