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

342 lines
11 KiB
Plaintext

<%--
Class Name : EgovPopupList.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="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires",0);
if (request.getProtocol().equals("HTTP/1.1")) response.setHeader("Cache-Control", "no-cache");
%>
<c:set var="ImgUrl" value="${pageContext.request.contextPath}/images/egovframework/com/cmm/" />
<c:set var="CssUrl" value="${pageContext.request.contextPath}/css/egovframework/com/" />
<c:set var="JsUrl" value="${pageContext.request.contextPath}/js/egovframework/com/uss/ion/pwm/"/>
<!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='/js/EgovMultiFile.js'/>"></script>
<script type="text/javaScript" language="javascript">
$( document ).ready(function(){
$(function () {
$('#filebutton').click(function (e) {
e.preventDefault();
$('#file_temp').click();
});
});
});
/* pagination 페이지 링크 function */
function goList(){
document.searchForm.submit();
}
/* 등록시 값 확인 */
function fn_checkForm() {
frm = document.writeForm;
if(frm.mazNm.value=="") {
alert("비주얼명을 입력해 주십시오");
frm.mazNm.focus();
return false;
}
if(frm.content.value=="") {
alert("대체텍스트를 입력해 주십시오");
frm.content.focus();
return false;
}
if(frm.sort.value=="") {
alert("노출순서를 입력해 주십시오");
frm.sort.focus();
return false;
}else{
var regexp = /^[0-9]*$/
if( !regexp.test(frm.sort.value) ) {
alert("노출순서에는 숫자만 입력하세요");
frm.sort.focus();
return false;
}
}
return true;
}
/* 글 등록 function */
function fn_mainzone_insert() {
frm = document.writeForm;
frm.action = "<c:url value='/uss/ion/pwm/mainzoneInsert.do'/>";
if(fn_checkForm())
frm.submit();
}
/* 배너 삭제 function */
function fn_mainzone_delete() {
var msg;
msg = "해당 메인이미지를 삭제하시겠습니까?";
if (confirm(msg)) {
frm = document.writeForm;
frm.del.value = frm.mazId.value ;
frm.action = "<c:url value='/uss/ion/pwm/mainzoneListDelete.do'/>";
frm.submit();
}
}
function validate(method_parm) {
frm = document.writeForm;
if(frm.mazNm.value=="") {
alert("비주얼명을 입력해 주십시오");
frm.mazNm.focus();
return false;
}
if(frm.content.value=="") {
alert("대체텍스트를 입력해 주십시오");
frm.content.focus();
return false;
}
if(frm.sort.value=="") {
alert("노출순서를 입력해 주십시오");
frm.sort.focus();
return false;
}else{
var regexp = /^[0-9]*$/
if( !regexp.test(frm.sort.value) ) {
alert("노출순서에는 숫자만 입력하세요");
frm.sort.focus();
return false;
}
}
goSave(method_parm);
}
function fn_egov_downFile(atchFileId, fileSn){
window.open("<c:url value='/cmm/fms/FileDown.do?atchFileId="+atchFileId+"&fileSn="+fileSn+"'/>");
}
</script>
<style>
.del_file_btn{border: none;background-color: transparent;background-image: url(/direct/img/upload_delect_img.png);background-repeat: no-repeat;background-position: center center;vertical-align: middle;margin-top: -4px;margin-right: 15px;}
.file_size{color: #0388d2;font-weight: bold;}
.uploaded_obj{width: 100%;}
</style>
</head>
<body>
<form:form commandName="mainzoneVO" name="writeForm" enctype="multipart/form-data" method="post">
<input type="hidden" name="deviceType" id="deviceType" value="P"/>
<input type="hidden" name="selectedId" />
<form:input path="mazId" type="hidden" />
<form:input path="del" type="hidden" />
<form:input path="upfile" type="hidden" />
<form:input path="mainzoneImageFile" type="hidden" />
<input type="hidden" name="beSort" value="${mainzoneVO.beSort}" />
<!-- 드래그앤 드롭 파라미터 -->
<input type="hidden" name="menuName" value="mainzone" />
<input type="hidden" name="fmsId" value="${mainzoneVO.mazId}" />
<input type="hidden" name="limitcount" value="1" /><!-- 최대 업로드 파일갯수 -->
<!-- cont -->
<div class="cont_wrap">
<div class="box">
<!-- cont_tit -->
<div class="cont_tit">
<h2>메인비주얼 등록/수정</h2>
<ul class="cont_nav">
<li class="home"><a href="/"><i></i></a></li>
<li><p>메인관리</p></li>
<li><p>메인비주얼관리</p></li>
<li><span class="cur_nav">메인비주얼 등록/수정</span></li>
</ul>
</div>
<!-- //cont_tit -->
<div class="cont">
<!-- list_상세 -->
<div class="col-table data-table">
<table class="w100per">
<colgroup>
<col style="width: 20%">
<col style="width: 80%">
</colgroup>
<tbody>
<tr>
<th style="vertical-align:middle;"><span class="reqArea">원본이미지</span></th>
<td>
<c:if test="${mainzoneVO.mazId == ''}">
<div class="imgBox"></div>
</c:if>
<c:if test="${mainzoneVO.mazId != ''}">
<img alt="${mainzoneVO.content}" onerror="this.src='/img/no_img.jpg'" src='<c:url value='/uss/ion/pwm/getImage.do'/>?atchFileId=<c:out value="${mainzoneVO.mainzoneImageFile}"/>' style="max-width:300px;padding: 10px;" />
</c:if>
</td>
</tr>
<tr>
<th>비주얼명</th>
<td>
<form:input path="mazNm" class="w80per" maxlength="30" />
</td>
</tr>
<tr>
<th>대체텍스트</th>
<td>
<form:input path="content" class="w80per" maxlength="300" />
</td>
</tr>
<tr>
<th>사용여부</th>
<td>
<div class="radio_wrap">
<span><input type="radio" name="useYn" id="useY" value="Y" ${mainzoneVO.useYn eq 'Y' or mainzoneVO.useYn eq '' ? 'checked="checked"' : ''}><label for="useY">예</label></span>
<span><input type="radio" name="useYn" id="useN" value="N" ${mainzoneVO.useYn eq 'N' ? 'checked="checked"' : ''}><label for="useN">아니오</label></span>
</div>
</td>
</tr>
<tr>
<th>노출순서</th>
<td>
<form:input path="sort" maxlength="10" onkeyup="this.value=this.value.replace(/[^-\.0-9]/g,'')"/>
</td>
</tr>
<tr>
<th style="vertical-align:middle;"><span class="reqArea">파일 첨부</span></th>
<td class="upload_area">
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display:none"/>
<button type="button" id="filebutton" class="btn btn_text btn_36 blue_border">파일 첨부하기</button>
<div class="file_wrap file_upload_box no_img_box">
<table>
<colgroup>
<col style="width: 60%;">
<col style="width: auto;">
<col style="width: 20%;">
<col style="width: 10%;">
</colgroup>
<thead>
<th>파일 명</th>
<th>종류</th>
<th>크기</th>
<th>삭제</th>
</thead>
<tbody class="tb_file_before">
<tr>
<td colspan="4">
<p>첨부하실 파일을 <span>마우스로 끌어서</span> 넣어주세요.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="file_wrap fileAfter file_list_div">
<table class="tbType02">
<colgroup>
<col style="width: 60%">
<col style="width: 10%">
<col style="width: 20%">
<col style="width: 10%">
</colgroup>
<thead>
<th>파일 명</th>
<th>종류</th>
<th>크기</th>
<th>삭제</th>
</thead>
<tbody id="tbody_fiielist" class="tb_file_after">
<c:forEach var="fileList" items="${fileList}" varStatus="status">
<tr class="item_${fileList.atchFileId}_${fileList.fileSn} uploaded_obj">
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileSize}">
<td class="td_filename">
<!-- <img src="/direct/img/upload_hwp_img.png" alt="" /> -->
<a href="javascript:fn_egov_downFile('${fileList.atchFileId}','${fileList.fileSn}')">
<span class="file_name_text">${fileList.orignlFileNm}</span>
</a>
</td>
<td class="td_filesort">
<span class="file_filesort_text" value="<c:out value="${fileList.fileExtsn}"/>"><c:out value="${fileList.fileExtsn}"/></span>
</td>
<td class="td_filesize">
<span class="file_size_text" value="<c:out value="${fileList.fileMg}"/>"><c:out value="${fileList.fileMg}"/></span>
</td>
<td>
<button type="button" class="btn btn_text red_border btn_del" onclick="delAtchFile('${fileList.atchFileId}', '${fileList.fileSn}'); return false;">삭제</button>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</td>
</tr>
<c:if test="${!empty mainzoneVO.mazId}">
<tr>
<th><span class="reqArea">최종수정일</span></th>
<td>
${mainzoneVO.moddt}
</td>
</tr>
<tr>
<th><span class="reqArea">작성자</span></th>
<td>
${mainzoneVO.registerId}
</td>
</tr>
</c:if>
</tbody>
</table>
</div>
<!-- //list_상세 -->
<!-- btn_wrap -->
<div class="btn_wrap">
<div class="area_left">
<c:if test="${!empty mainzoneVO.mazId }">
<button type="button" class="btn btn_text btn_46 red_border" onclick="fn_mainzone_delete(); return false;" >삭제</button>
</c:if>
</div>
<div class="area_right">
<c:if test="${!empty mainzoneVO.mazId }">
<button type="button" class="btn btn_text btn_46 blue_fill" onclick="validate('mainzone_U'); return false;">수정</button>
</c:if>
<c:if test="${empty mainzoneVO.mazId }">
<button type="button" class="btn btn_text btn_46 blue_fill" onclick="validate('mainzone_I'); return false;">저장</button>
</c:if>
<button type="button" class="btn btn_text btn_46 gray_fill" onclick="goList(); return false;">목록</button>
</div>
</div>
<!-- //btn_wrap -->
</div>
</div>
</div>
</form:form>
<form name="searchForm" id="searchForm" method="get" action="<c:url value='/uss/ion/pwm/mainzoneList.do'/>" ></form>
</body>
</html>