퍼블 수정에 따른 보완 처리
This commit is contained in:
parent
0c6b56f51b
commit
a3cd82e1c6
@ -172,6 +172,10 @@ public class ArticleVO extends PagingVO {
|
|||||||
public String getRegNm() {
|
public String getRegNm() {
|
||||||
return regNm;
|
return regNm;
|
||||||
}
|
}
|
||||||
|
public String getRegNmSec() {
|
||||||
|
if(StringUtil.isEmpty(regNm)) return null;
|
||||||
|
return StringUtil.maskName(regNm);
|
||||||
|
}
|
||||||
public void setRegNm(String regNm) {
|
public void setRegNm(String regNm) {
|
||||||
this.regNm = regNm;
|
this.regNm = regNm;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -325,7 +325,9 @@ public class StringUtil extends StringUtils {
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name.length() == 2) {
|
if (name.length() == 1) {
|
||||||
|
return "*";
|
||||||
|
} else if (name.length() == 2) {
|
||||||
return name.substring(0, 1) + "*";
|
return name.substring(0, 1) + "*";
|
||||||
} else if (name.length() > 2) {
|
} else if (name.length() > 2) {
|
||||||
String str = "";
|
String str = "";
|
||||||
|
|||||||
@ -48,6 +48,7 @@
|
|||||||
$("#btnSearch").on("click", function(e) {
|
$("#btnSearch").on("click", function(e) {
|
||||||
fn_searchArticle(1);
|
fn_searchArticle(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#searchKeyword").on("keydown", function(e) {
|
$("#searchKeyword").on("keydown", function(e) {
|
||||||
if(e.keyCode == 13) {
|
if(e.keyCode == 13) {
|
||||||
fn_searchArticle(1);
|
fn_searchArticle(1);
|
||||||
@ -127,16 +128,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 기존 데이터 CLEAR
|
// 기존 데이터 CLEAR
|
||||||
$( ".list-notice thead").not('.t-tit-line').not('.no-result').remove();
|
$(".list-notice tbody tr").filter('.tableTrData').remove();
|
||||||
|
|
||||||
if(!jsonObj.data || jsonObj.data.length <= 0 ) {
|
if(!jsonObj.data || jsonObj.data.length <= 0 ) {
|
||||||
$(".list-notice li.no-result").show();
|
$(".list-notice tbody tr.no-result").show();
|
||||||
} else {
|
} else {
|
||||||
$(".list-notice li.no-result").hide();
|
$(".list-notice tbody tr.no-result").hide();
|
||||||
|
|
||||||
// 출력
|
// 출력
|
||||||
$.each(jsonObj.data,function(key,obj) {
|
$.each(jsonObj.data,function(key,obj) {
|
||||||
var li = $(document.createElement('tr'));
|
var li = $('<tr class="tableTrData" />');
|
||||||
li.append($('<td />').attr('class', 't-num').html(obj.rno));
|
li.append($('<td />').attr('class', 't-num').html(obj.rno));
|
||||||
li.append($('<td />').attr('class', 't-tit').html("<a href=\"javascript:void(0)\" onclick=\"fn_viewDetail('" + obj.articleId + "')\">" +
|
li.append($('<td />').attr('class', 't-tit').html("<a href=\"javascript:void(0)\" onclick=\"fn_viewDetail('" + obj.articleId + "')\">" +
|
||||||
(obj.notiYn == "Y" ? '<span>공지</span>' : '') +
|
(obj.notiYn == "Y" ? '<span>공지</span>' : '') +
|
||||||
@ -157,6 +158,13 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fn_checkEnter() {
|
||||||
|
if (window.event.keyCode == 13) {
|
||||||
|
fn_searchArticle(1);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@ -210,7 +218,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="list-input">
|
<div class="list-input">
|
||||||
|
|
||||||
<input type="text" id="searchKeyword" name="searchKeyword" placeholder="검색어를 입력하세요" title="검색어" value="${searchArticle.searchKeyword }" maxlength="20" >
|
<input type="text" id="searchKeyword" name="searchKeyword" placeholder="검색어를 입력하세요" title="검색어" value="${searchArticle.searchKeyword }" onkeydown="fn_checkEnter()" maxlength="20" >
|
||||||
<label for="searchKeyword" style="display:none">검색어</label>
|
<label for="searchKeyword" style="display:none">검색어</label>
|
||||||
<label for="btnSearch">
|
<label for="btnSearch">
|
||||||
<button name="btnSearch" id="btnSearch" type="button" title="검색">검색</button>
|
<button name="btnSearch" id="btnSearch" type="button" title="검색">검색</button>
|
||||||
@ -225,7 +233,7 @@
|
|||||||
<table class="list-notice">
|
<table class="list-notice">
|
||||||
<caption>공지사항 목록 표 – NO, 제목, 등록자, 등록일, 첨부로 구성</caption>
|
<caption>공지사항 목록 표 – NO, 제목, 등록자, 등록일, 첨부로 구성</caption>
|
||||||
<thead class="t-tit-line">
|
<thead class="t-tit-line">
|
||||||
<tr>
|
<tr class="tableHeader">
|
||||||
<th class="t-num">NO</th>
|
<th class="t-num">NO</th>
|
||||||
<th class="t-tit">제목</th>
|
<th class="t-tit">제목</th>
|
||||||
<th class="t-writer">등록자</th>
|
<th class="t-writer">등록자</th>
|
||||||
@ -235,7 +243,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="no-result" style="display:none;">
|
<tr class="no-result" style="display:none;">
|
||||||
<td>검색결과가 없습니다.</td>
|
<td colspan="5">검색결과가 없습니다.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -48,6 +48,7 @@ $( document ).ready(function() {
|
|||||||
$("#btnSearch").on("click", function(e) {
|
$("#btnSearch").on("click", function(e) {
|
||||||
fn_searchArticle(1);
|
fn_searchArticle(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#searchKeyword").on("keydown", function(e) {
|
$("#searchKeyword").on("keydown", function(e) {
|
||||||
if(e.keyCode == 13) {
|
if(e.keyCode == 13) {
|
||||||
fn_searchArticle(1);
|
fn_searchArticle(1);
|
||||||
|
|||||||
@ -50,9 +50,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//초기 자료 조회
|
|
||||||
fn_searchArticle(1);
|
|
||||||
|
|
||||||
// 메시지 표출
|
// 메시지 표출
|
||||||
if(!gfn_isEmpty('${message}')) {
|
if(!gfn_isEmpty('${message}')) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
@ -60,6 +57,9 @@
|
|||||||
}, 1000); // 화면 표출되도록 딜레이 줌
|
}, 1000); // 화면 표출되도록 딜레이 줌
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//초기 자료 조회
|
||||||
|
fn_searchArticle();
|
||||||
|
|
||||||
}); // document ready
|
}); // document ready
|
||||||
|
|
||||||
|
|
||||||
@ -140,23 +140,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 기존 데이터 CLEAR
|
// 기존 데이터 CLEAR
|
||||||
$( ".list-notice thead").not('.t-tit-line').not('.no-result').remove();
|
$(".list-notice tbody tr").filter('.tableTrData').remove();
|
||||||
|
|
||||||
|
|
||||||
if(!jsonObj.data || jsonObj.data.length <= 0 ) {
|
if(!jsonObj.data || jsonObj.data.length <= 0 ) {
|
||||||
$(".list-notice .no-result").show();
|
$(".list-notice tbody tr.no-result").show();
|
||||||
} else {
|
} else {
|
||||||
$(".list-notice .no-result").hide();
|
$(".list-notice tbody tr.no-result").hide();
|
||||||
|
|
||||||
// 출력
|
// 출력
|
||||||
$.each(jsonObj.data,function(key,obj) {
|
$.each(jsonObj.data,function(key,obj) {
|
||||||
var li = $(document.createElement('tr'));
|
var li = $('<tr class="tableTrData" />');
|
||||||
li.append($('<td />').attr('class', 't-num').html(obj.rno));
|
li.append($('<td />').attr('class', 't-num').html(obj.rno));
|
||||||
li.append($('<td />').attr('class', 't-tit').html("<a href=\"javascript:void(0)\" onclick=\"fn_viewDetail('" + obj.articleId + "','" + obj.secretYn + "','" + obj.myQnaYn + "')\">" +
|
li.append($('<td />').attr('class', 't-tit').html("<a href=\"javascript:void(0)\" onclick=\"fn_viewDetail('" + obj.articleId + "','" + obj.secretYn + "','" + obj.myQnaYn + "')\">" +
|
||||||
obj.title +
|
obj.title +
|
||||||
(obj.secretYn == "Y" ? '<img src="/images/icon/icon-password.png" alt="자물쇠 아이콘"> ' : '') +
|
(obj.secretYn == "Y" ? '<img src="/images/icon/icon-password.png" alt="자물쇠 아이콘"> ' : '') +
|
||||||
"</a>"));
|
"</a>"));
|
||||||
li.append($('<td />').attr('class', 't-writer').html(obj.regNm));
|
li.append($('<td />').attr('class', 't-writer').html(obj.regNmSec));
|
||||||
li.append($('<td />').attr('class', 't-date').html(obj.regDd));
|
li.append($('<td />').attr('class', 't-date').html(obj.regDd));
|
||||||
li.append($('<td />').attr('class', 't-answer').html((obj.answerYn == "Y" ? '<span class="compl">답변완료</span>' : '<span class="wait">답변대기</span>')));
|
li.append($('<td />').attr('class', 't-answer').html((obj.answerYn == "Y" ? '<span class="compl">답변완료</span>' : '<span class="wait">답변대기</span>')));
|
||||||
|
|
||||||
@ -201,17 +200,10 @@
|
|||||||
//게시글 작성으로 이동
|
//게시글 작성으로 이동
|
||||||
function fn_newArticle() {
|
function fn_newArticle() {
|
||||||
|
|
||||||
<sec:authorize access="not isAuthenticated()">
|
|
||||||
alert("로그인 후, 이용하여 주시기 바랍니다.");
|
|
||||||
return false;
|
|
||||||
</sec:authorize>
|
|
||||||
|
|
||||||
<sec:authorize access="isAuthenticated()">
|
|
||||||
$("#articleNo").val("");
|
$("#articleNo").val("");
|
||||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/bbs/insertQnaForm.do");
|
$("#articleForm").attr("action", "${pageContext.request.contextPath}/bbs/insertQnaForm.do");
|
||||||
$('#articleForm').removeAttr('onsubmit');
|
$('#articleForm').removeAttr('onsubmit');
|
||||||
$("#articleForm").submit();
|
$("#articleForm").submit();
|
||||||
</sec:authorize>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -297,7 +289,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="no-result" style="display:none;">
|
<tr class="no-result" style="display:none;">
|
||||||
<td>검색결과가 없습니다.</td>
|
<td colspan="5">검색결과가 없습니다.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -46,6 +46,12 @@ $( document ).ready(function() {
|
|||||||
|
|
||||||
//목록으로 이동
|
//목록으로 이동
|
||||||
function fn_list() {
|
function fn_list() {
|
||||||
|
if($("#searchQuestionType").val() == "USER") {
|
||||||
|
$("#articleForm").attr("action", "${pageContext.request.contextPath}/bbs/listMyQnas.do");
|
||||||
|
} else {
|
||||||
|
$("#articleForm").attr("action", "${pageContext.request.contextPath}/bbs/listQnas.do");
|
||||||
|
}
|
||||||
|
|
||||||
$("#articleForm").submit();
|
$("#articleForm").submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,6 +193,8 @@ function fn_downloadFile(attachFileId, fileSn) {
|
|||||||
<input type="hidden" name="searchType" id="searchType" title="검색구분" value="${searchArticle.searchType}" />
|
<input type="hidden" name="searchType" id="searchType" title="검색구분" value="${searchArticle.searchType}" />
|
||||||
<input type="hidden" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchArticle.searchKeyword}" />
|
<input type="hidden" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchArticle.searchKeyword}" />
|
||||||
<input type="hidden" name="articleId" id="articleId" title="선택글번호" value="${searchArticle.articleId}" />
|
<input type="hidden" name="articleId" id="articleId" title="선택글번호" value="${searchArticle.articleId}" />
|
||||||
|
<input type="hidden" name="searchQuestionType" id="searchQuestionType" value="${searchArticle.searchQuestionType}" />
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- 첨부파일 다운로드용 폼 -->
|
<!-- 첨부파일 다운로드용 폼 -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user