diff --git a/src/main/resources/mappers/WebPopupSqlMap.xml b/src/main/resources/mappers/WebPopupSqlMap.xml
index 0544e91..b73e8c0 100644
--- a/src/main/resources/mappers/WebPopupSqlMap.xml
+++ b/src/main/resources/mappers/WebPopupSqlMap.xml
@@ -48,12 +48,15 @@
AND MWP.TITLE LIKE CONCAT('%',TRIM(#{webPopupSearchKeywordParam}),'%')
+
+ AND MWP.HOMEPAGE_DIV_CD = #{homepageDivCd}
+
ORDER BY ${webPopupSort}
- ORDER BY MWP.WRITE_DATE DESC
+ ORDER BY MWP.HOMEPAGE_DIV_CD, MWP.WRITE_DATE DESC
LIMIT 18446744073709551615
diff --git a/src/main/resources/static/css/web/webPopupSelectList.css b/src/main/resources/static/css/web/webPopupSelectList.css
index 3f279ca..000f582 100644
--- a/src/main/resources/static/css/web/webPopupSelectList.css
+++ b/src/main/resources/static/css/web/webPopupSelectList.css
@@ -1,5 +1,11 @@
.project_wrap {width:100%; min-width:1080px; margin:0 auto;}
-
+#homepageDivCd{
+ float:left;
+ font-size:18px;
+ padding: 5px;
+ border-radius: 5px;
+ border-color: #ddd;
+}
/*오른쪽영역*/
.project_wrap .content_section {margin-top:50px; width:100%; min-width:1080px; display:table;}
.project_wrap .content_section .hospital_wrap {width: calc(100% - 72px); min-width:calc(1080px - 72px); height:calc(100vh - 50px); float:left; position:relative;}
@@ -19,8 +25,8 @@
.project_wrap .content_section .hospital_wrap .center_box {width:calc(100% - 240px); height:calc(100vh - 50px); position:absolute; left:240px; padding:10px 10px 10px 0;}
.project_wrap .content_section .hospital_wrap .center_box .page_title {min-width:90px; padding-left:10px; font-size:18px; font-weight:700; line-height:50px; float:left;}
.project_wrap .content_section .hospital_wrap .center_box .filter_box {display:table; width:100%; padding:20px 0;}
-.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box {width:140px; height:36px; margin-left:10px; border:1px solid #E9ECF0; border-radius:5px; background:url(/image/web/select_arrow.svg) no-repeat 95% 55%/20px auto #fff; float:left; }
-.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.first { width:100px; margin-left:0; float:left; }
+.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box {width:120px; height:36px; margin-left:10px; border:1px solid #E9ECF0; border-radius:5px; background:url(/image/web/select_arrow.svg) no-repeat 95% 55%/20px auto #fff; float:left; }
+.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.first { margin-left:0; float:left; }
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .slash {width:6px; font-size:14px; font-weight:400; color:#000; line-height:36px; margin:0 12px; display:block; float:left;}
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .search_list_box { margin-left:10px; }
.project_wrap .content_section .hospital_wrap .center_box .filter_box .form_box .select_box.active {z-index:10;}
diff --git a/src/main/resources/static/js/web/webpopup/webPopupSelectList.js b/src/main/resources/static/js/web/webpopup/webPopupSelectList.js
index e6b3898..eba2014 100644
--- a/src/main/resources/static/js/web/webpopup/webPopupSelectList.js
+++ b/src/main/resources/static/js/web/webpopup/webPopupSelectList.js
@@ -7,189 +7,6 @@ let webPopupAgGridData = [];
let webPopupSelectId = "";
-/****************************************************************************
- * 검색 날짜 설정
- //(A:오늘, B:3일, C:7일, D:최근30일, E:최근90일, F:이번달, G:올해, H:지난주, I:지난달)
- ****************************************************************************/
-function fn_webPopupSetDate(param){
- if("A"==param){
- // 오늘
- let toDate = new Date();
- let year = toDate.getFullYear();
- let month = toDate.getMonth() + 1;
- let day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- webPopupSearchStartDate = year+'-'+month+'-'+day;
- webPopupSearchEndDate = year+'-'+month+'-'+day;
- }
- else if("B"==param){
- // 3일
- // 검색 종료일자
- let toDate = new Date();
- let year = toDate.getFullYear();
- let month = toDate.getMonth() + 1;
- let day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- webPopupSearchEndDate = year+'-'+month+'-'+day;
-
- // 검색 시작일자
- toDate.setDate(toDate.getDate() - 3);
- year = toDate.getFullYear();
- month = toDate.getMonth() + 1;
- day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- webPopupSearchStartDate = year+'-'+month+'-'+day;
- }
- else if("C"==param){
- // 이번주
- // 검색 종료일자
- let toDate = new Date();
- let year = toDate.getFullYear();
- let month = toDate.getMonth() + 1;
- let day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- webPopupSearchEndDate = year+'-'+month+'-'+day;
-
- // 검색 시작일자
- toDate.setDate(toDate.getDate() - 7);
- year = toDate.getFullYear();
- month = toDate.getMonth() + 1;
- day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- webPopupSearchStartDate = year+'-'+month+'-'+day;
- }
- else if("D"==param){
- // 최근30일
- let toDate = new Date();
- let year = toDate.getFullYear();
- let month = toDate.getMonth() + 1;
- let day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- //최근30일
- toDate.setDate(toDate.getDate() - 30);
- startYear = toDate.getFullYear();
- startMonth = toDate.getMonth() + 1;
- startDay = toDate.getDate();
-
- if(startMonth < 10) startMonth = "0" + startMonth;
- if(startDay < 10) startDay = "0" + startDay;
-
- webPopupSearchStartDate = startYear+'-'+startMonth+'-'+startDay;
- webPopupSearchEndDate = year+'-'+month+'-'+day;
-
- }
- else if("E"==param){
- // 최근90일
- // 검색 종료일자
- let toDate = new Date();
- let year = toDate.getFullYear();
- let month = toDate.getMonth() + 1;
- let day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- webPopupSearchEndDate = year+'-'+month+'-'+day;
-
- // 검색 시작일자
- toDate.setDate(toDate.getDate() - 90);
- year = toDate.getFullYear();
- month = toDate.getMonth() + 1;
- day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- webPopupSearchStartDate = year+'-'+month+'-'+day;
- }
- else if("F"==param){
- //F:이번달
- // 검색 종료일자
- let toDate = new Date();
- let year = toDate.getFullYear();
- let month = toDate.getMonth() + 1;
- let day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- webPopupSearchEndDate = year+'-'+month+'-'+day;
-
- // 검색 시작일자
- webPopupSearchStartDate = year+'-'+month+'-01';
- }
- else if("G"==param){
- // G:올해
- // 검색 종료일자
- let toDate = new Date();
- let year = toDate.getFullYear();
- let month = toDate.getMonth() + 1;
- let day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- webPopupSearchEndDate = year+'-'+month+'-'+day;
-
- // 검색 시작일자
- webPopupSearchStartDate = year+'-01-01';
- }
- else if("H"==param){
- // H:지난주, I:지난달
- // 검색 종료일자
- let toDate = new Date();
- let year = toDate.getFullYear();
- let month = toDate.getMonth() + 1;
- let day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- webPopupSearchEndDate = year+'-'+month+'-'+day;
-
- // 검색 시작일자
- webPopupSearchStartDate = year+'-01-01';
- }
- else if("I"==param){
- // I:지난달
- // 검색 종료일자
- let toDate = new Date();
- let year = toDate.getFullYear();
- let month = toDate.getMonth() + 1;
- let day = toDate.getDate();
-
- if(month < 10) month = "0" + month;
- if(day < 10) day = "0" + day;
-
- webPopupSearchEndDate = year+'-'+month+'-'+day;
-
- // 검색 시작일자
- webPopupSearchStartDate = year+'-01-01';
- }
-
- $("#webPopupSearchStartDate").val(webPopupSearchStartDate).trigger("change");
- $("#webPopupSearchEndDate").val(webPopupSearchEndDate).trigger("change");
-}
-
-
/****************************************************************************
* 콘텐츠 정보 리스트 조회
****************************************************************************/
@@ -202,9 +19,10 @@ function fn_selectListWebPopupJson(){
formData.append("webPopupDir", webPopupDir);
formData.append("webPopupStart", webPopupStart);
formData.append("webPopupLimit", webPopupLimit);
- formData.append("webPopupSearchStartDate", webPopupSearchStartDate);
- formData.append("webPopupSearchEndDate", webPopupSearchEndDate);
- formData.append("webPopupSearchDateType", webPopupSearchDateType);
+ formData.append("homepageDivCd", $("#homepageDivCd").val());
+ //formData.append("webPopupSearchStartDate", webPopupSearchStartDate);
+ //formData.append("webPopupSearchEndDate", webPopupSearchEndDate);
+ //formData.append("webPopupSearchDateType", webPopupSearchDateType);
$.ajax({
url: encodeURI('/webpopup/selectListWebPopup.do'),
@@ -285,9 +103,9 @@ function fn_webPopupSearch(param){
webPopupCategoryName = $("#webPopupCategoryName").val();
- webPopupSearchDateType = $("#webPopupSearchDateType").val();
- webPopupSearchStartDate = $("#webPopupSearchStartDate").val();
- webPopupSearchEndDate = $("#webPopupSearchEndDate").val();
+ //webPopupSearchDateType = $("#webPopupSearchDateType").val();
+ //webPopupSearchStartDate = $("#webPopupSearchStartDate").val();
+ //webPopupSearchEndDate = $("#webPopupSearchEndDate").val();
fn_selectListWebPopupJson();
}
@@ -297,9 +115,6 @@ function fn_webPopupSearch(param){
* 초기화하기
****************************************************************************/
function fn_webPopupReset(){
- fn_webPopupSetDate('D');
- $("#webPopupSearchDateType option:eq(0)").prop("selected", true);
-
$("#webPopupSearchKeyword").val("");
fn_webPopupSearch();
@@ -401,59 +216,6 @@ function fn_webPopupEnter(e){
}
}
-/****************************************************************************
- * 정렬 이벤트
- ****************************************************************************/
-function fn_alignContent(param, param2){
- let align = "";
-
- if("A"==param){
- align = "오늘";
-
- fn_webPopupSetDate('A');
- }
- else if("B"==param){
- align = "최근30일";
-
- fn_webPopupSetDate('D');
- }
- else if("C"==param){
- align = "최근90일";
-
- fn_webPopupSetDate('E');
- }
- else if("D"==param){
- align = "이번주";
-
- fn_webPopupSetDate('C');
- }
- else if("E"==param){
- align = "이번달";
-
- fn_webPopupSetDate('F');
- }
- else if("F"==param){
- align = "올해";
-
- fn_webPopupSetDate('G');
- }
- else if("G"==param){
- align = "지난주";
-
- fn_webPopupSetDate('H');
- }
- else if("H"==param){
- align = "지난달";
-
- fn_webPopupSetDate('I');
- }
- else{
- align = "";
- }
- $("#webPopupSearchDateType").val(param);
- $("#webPopupSearchDateType").siblings("button").text(align);
-}
-
/****************************************************************************
* 완료
****************************************************************************/
@@ -510,7 +272,6 @@ let webPopupColumnDefs = [
if (params.value === "02") return "쁘띠";
return params.value;
}},
- // {field: "webPopupCategoryName", headerName:"카테고리", minWidth:200},
{field: "filePath", headerName:"이미지", minWidth:100, cellRenderer: thumbnailCellRenderer},
{field: "title", headerName:"제목", minWidth:250, cellStyle:{cursor: 'pointer', color:'#3985EA'}},
// {field: "content", headerName:"내용",minWidth:500},
@@ -526,7 +287,7 @@ let webPopupGridOptions = {
flex: 1,
sortable: true, //정렬 여부
resizable: true, //리사이즈
- editable: true, // 그리드에서 데이터 수정
+ editable: false, // 그리드에서 데이터 수정
cellStyle:{textAlign:'left',fontSize:'14px',padding:'0'},
//suppressSizeToFit:true, //자동 맞춤
//enableRowGroup: true, // 그룹 묶음
@@ -608,16 +369,6 @@ new agGrid.Grid(webPopupGridDiv, webPopupGridOptions);
* 페이지 init
****************************************************************************/
function fn_pageInit(){
- // 날짜 datepicker
- fn_searchDatePicker("#divWebPopupSearchStartDate", "#divWebPopupSearchEndDate");
-
- if(!webPopupSearchStartDate&&!webPopupSearchEndDate){
- // 검색 오늘날짜 셋팅
- fn_webPopupSetDate('D');
- }else{
- $("#webPopupSearchStartDate").val(webPopupSearchStartDate).trigger("change");
- $("#webPopupSearchEndDate").val(webPopupSearchEndDate).trigger("change");
- }
// 초기 페이징 처리
$("#webPopupSearchKeyword").val(webPopupSearchKeywordParam);
@@ -648,19 +399,6 @@ function fn_pageEvent(){
$("#btnDeleteWebPopup").click(function () {
fn_deleteWebPopup();
});
-
- // 기간 선택 콤보 이벤트
- const target = $("#webPopupSearchDateType").siblings("ul.select_option_list");
- target.find("li.option_list_item").click(function () {
- let selectIdArr = $(this).prop("id").split('_');
- let selectId = selectIdArr[1];
- let selectName = $(this).text();
-
- $(this).parent().siblings("button").text(selectName);
- $(this).parent().siblings("input").val(selectId);
-
- fn_alignContent(selectId);
- });
}
$(function(){
diff --git a/src/main/resources/templates/web/webpopup/webPopupSelectList.html b/src/main/resources/templates/web/webpopup/webPopupSelectList.html
index 99930b0..f85ac53 100644
--- a/src/main/resources/templates/web/webpopup/webPopupSelectList.html
+++ b/src/main/resources/templates/web/webpopup/webPopupSelectList.html
@@ -40,23 +40,14 @@