فهرست منبع

메인전시 이미지등록 권한 수정

bin2107 5 سال پیش
والد
کامیت
9e5cbc132e
1فایلهای تغییر یافته به همراه76 افزوده شده و 63 حذف شده
  1. 76 63
      src/main/webapp/WEB-INF/views/display/MainListForm.html

+ 76 - 63
src/main/webapp/WEB-INF/views/display/MainListForm.html

@@ -115,7 +115,8 @@
 								</li>
 								<th:block th:if="${sessionInfo.roleCd == 'G001_0000'}">
 									<li class="right">
-										<span class="cRed">* 레이아웃 저장 버튼 클릭 시 수정 및 삭제 된 레이아웃이 즉시 적용 됩니다.</span>
+										<span class="cRed">* 레이아웃 저장 버튼 클릭 시 수정 및 삭제 된 레이아웃이 즉시 적용 됩니다.</span><br/>
+										<span class="cRed">* 화면 캡처파일 관리는 SUPER관리자, 어드민관리자만 가능합니다.</span>
 									</li>
 								</th:block>
 							</ul>
@@ -252,9 +253,9 @@
 			}
 
 			if(colCnt==1 || colNo==1){
-				html += '<tbody><tr style="height:170px;">';
+				html += '<tbody><tr style="height:170px;">\n';
 			}else if(colNo==tdSize){
-				html += '<tr style="height:170px;">';
+				html += '<tr style="height:170px;">\n';
 			}
 
 			if(colNo>=tdSize){
@@ -275,28 +276,28 @@
 			// if(colCnt>5){
 			// 	maxWidth = parseInt(tdWidth/(Number(colCnt)/tdSize), 10);
 			// }
-			html += '" style="text-align:center; max-width:'+maxWidth+'px;">';
-			html += '<div><span style="font-weight:bold">'+result[i].contentsLoc+'</span></div><div><span>[ '+gagaAgGrid.lookupValue(contentsLocArr, result[i].contentsLoc)+' ]</span></div>';
-			html += '<input type="text" class="w200" name="contentsTitle" placeholder="메인타이틀" value="'+result[i].contentsTitle+'"/>';
-			html += '<br/>';
+			html += '" style="text-align:center; max-width:'+maxWidth+'px;">\n';
+			html += '<div><span style="font-weight:bold">'+result[i].contentsLoc+'</span></div><div><span>[ '+gagaAgGrid.lookupValue(contentsLocArr, result[i].contentsLoc)+' ]</span></div>\n';
+			html += '<input type="text" class="w200" name="contentsTitle" placeholder="메인타이틀" value="'+result[i].contentsTitle+'"/>\n';
+			html += '<br/>\n';
 			if(result[i].contentsYn=='C' || result[i].contentsYn=='A'){
-				html += '<button type="button" class="btn btn-success btn-lg" onclick="fnChangeContents(this);">수정</button>';
-				html += '<button type="button" class="btn btn-default btn-lg" onclick="fnUpdateContents(\''+result[i].contentsLoc+'\');">적용</button>';
+				html += '<button type="button" class="btn btn-success btn-lg" onclick="fnChangeContents(this);">수정</button>\n';
+				html += '<button type="button" class="btn btn-default btn-lg" onclick="fnUpdateContents(\''+result[i].contentsLoc+'\');">적용</button>\n';
 			}else if(result[i].contentsYn=='G'){
 				// if(result[i].contentsYn=='A'){
 				// 	html += '<button type="button" class="btn btn-success btn-lg" onclick="fnChangeContents(this);">수정</button>';
 				// 	html += '<button type="button" class="btn btn-default btn-lg" onclick="fnUpdateContents(\''+result[i].contentsLoc+'\');">적용</button>';
 				// 	html += '<br/>';
 				// }
-					html += '<button type="button" class="btn btn-success btn-lg" onclick="fnSearchCategory(\''+result[i].contentsLoc+'\');">상품관리</button>';
+					html += '<button type="button" class="btn btn-success btn-lg" onclick="fnSearchCategory(\''+result[i].contentsLoc+'\');">상품관리</button>\n';
 			}else{
-				html += '<li>위치설정</li>';
+				html += '<li>위치설정</li>\n';
 			}
-			html += '<input type="hidden" name="contentsLoc" value="'+result[i].contentsLoc+'"/>';
-			html += '<input type="hidden" name="colCnt" value="'+result[i].colCnt+'"/>';
-			html += '<input type="hidden" name="colNo" value="'+result[i].colNo+'"/>';
-			html += '<input type="hidden" name="contentsYn" value="'+result[i].contentsYn+'"/>';
-			html += '</td>';
+			html += '<input type="hidden" name="contentsLoc" value="'+result[i].contentsLoc+'"/>\n';
+			html += '<input type="hidden" name="colCnt" value="'+result[i].colCnt+'"/>\n';
+			html += '<input type="hidden" name="colNo" value="'+result[i].colNo+'"/>\n';
+			html += '<input type="hidden" name="contentsYn" value="'+result[i].contentsYn+'"/>\n';
+			html += '</td>\n';
 
 			if(colNo=='1'){
 				if(result[i].orgFileNm!=null && result[i].orgFileNm!='null' && result[i].orgFileNm!="" ){
@@ -313,45 +314,51 @@
 			}
 			if(tdSize==10){
 				if(colCnt==1 || colNo==colCnt){
-					html += '<td name="imgTd" style="width:300px;">';
-					html += '<div id="imgView_'+i+'" class="'+onOff+'">';
-					html += '<img id="bannerPreViewUrl_'+i+'" src="'+imgSrc+'" style="width:300px; height:120px"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',\''+imgSrc+'\');"/>';
-					html += '</div>';
-					html += '<div class="uFile w300">';
-					html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
-					html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
-					html += '<input type="hidden" name="orgFileNm" value="'+orgFileNm+'"/>';
-					html += '<input type="hidden" name="sysFileNm" value="'+sysFileNm+'"/>';
-					html += '<input type="hidden" name="newSysFileNm" value=""/>';
-					html += '</div>';
-					html += '</td>';
-					html += '<td name="deleteTd" style="max-width:50px;">';
+					html += '<td name="imgTd" style="width:300px;">\n';
+					html += '<div id="imgView_'+i+'" class="'+onOff+'">\n';
+					html += '<img id="bannerPreViewUrl_'+i+'" src="'+imgSrc+'" style="width:300px; height:120px"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',\''+imgSrc+'\');"/>\n';
+					html += '</div>\n';
+					// SUPER관리자,어드민관리자만 파일관리 가능
+					if(roleCd=='G001_0000' || roleCd=='G001_A000'){
+						html += '<div class="uFile w300">\n';
+						html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>\n';
+						html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>\n';
+						html += '<input type="hidden" name="orgFileNm" value="'+orgFileNm+'"/>\n';
+						html += '<input type="hidden" name="sysFileNm" value="'+sysFileNm+'"/>\n';
+						html += '<input type="hidden" name="newSysFileNm" value=""/>\n';
+						html += '</div>\n';
+					}
+					html += '</td>\n';
+					html += '<td name="deleteTd" style="max-width:50px;">\n';
 					if(roleCd=='G001_0000'){
-						html += '<button type="button" class="btn icn" onclick="fnDeleteRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button>';
+						html += '<button type="button" class="btn icn" onclick="fnDeleteRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button>\n';
 					}
-					html += '</td></tr></tbody>';
+					html += '</td></tr></tbody>\n';
 				}
 			}else{
 				if(colNo==(tdSize-1)){
-					html += '<td name="imgTd" rowspan="2" style="width:300px;">';
-					html += '<div id="imgView_'+i+'" class="'+onOff+'">';
-					html += '<img id="bannerPreViewUrl_'+i+'" src="'+imgSrc+'" style="width:300px; height:120px"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',\''+imgSrc+'\');"/>';
-					html += '</div>';
-					html += '<div class="uFile w300">';
-					html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
-					html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
-					html += '<input type="hidden" name="orgFileNm" value="'+orgFileNm+'"/>';
-					html += '<input type="hidden" name="sysFileNm" value="'+sysFileNm+'"/>';
-					html += '<input type="hidden" name="newSysFileNm" value=""/>';
-					html += '</div>';
-					html += '</td>';
-					html += '<td name="deleteTd" rowspan="2" style="max-width:50px;">';
+					html += '<td name="imgTd" rowspan="2" style="width:300px;">\n';
+					html += '<div id="imgView_'+i+'" class="'+onOff+'">\n';
+					html += '<img id="bannerPreViewUrl_'+i+'" src="'+imgSrc+'" style="width:300px; height:120px"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',\''+imgSrc+'\');"/>\n';
+					html += '</div>\n';
+					// SUPER관리자,어드민관리자만 파일관리 가능
+					if(roleCd=='G001_0000' || roleCd=='G001_A000'){
+						html += '<div class="uFile w300">\n';
+						html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>\n';
+						html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>\n';
+						html += '<input type="hidden" name="orgFileNm" value="'+orgFileNm+'"/>\n';
+						html += '<input type="hidden" name="sysFileNm" value="'+sysFileNm+'"/>\n';
+						html += '<input type="hidden" name="newSysFileNm" value=""/>\n';
+						html += '</div>\n';
+					}
+					html += '</td>\n';
+					html += '<td name="deleteTd" rowspan="2" style="max-width:50px;">\n';
 					if(roleCd=='G001_0000'){
-						html += '<button type="button" class="btn icn" onclick="fnDeleteRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button>';
+						html += '<button type="button" class="btn icn" onclick="fnDeleteRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button>\n';
 					}
-					html += '</td></tr>';
+					html += '</td></tr>\n';
 				}else if(colNo==colCnt){
-					html += '</tr></tbody>';
+					html += '</tr></tbody>\n';
 				}
 			}
 		}
@@ -366,9 +373,9 @@
 	 * 중분류 리스트
 	 */
 	var fnCate2NoCallBack = function (result){
-		var html = '<option value="">[선택]</option>';
+		var html = '<option value="">[선택]</option>\n';
 		for (var i=0; i<result.length; i++){
-			html += '<option value="'+result[i].cateNo+','+result[i].leafYn+'">['+result[i].cateNo+']'+result[i].cateNm+'</option>';
+			html += '<option value="'+result[i].cateNo+','+result[i].leafYn+'">['+result[i].cateNo+']'+result[i].cateNm+'</option>\n';
 		}
 		$("#searchForm select[name=cate2No]").html(html);
 		// grid 높이 조절
@@ -495,13 +502,16 @@
 			if(tdSize==10){
 				if(colCnt==1 || colNo==colCnt){
 					html += '<td name="imgTd" style="width:300px;">';
-					html += '<div class="uFile w300">';
-					html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
-					html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
-					html += '<input type="hidden" name="orgFileNm"/>';
-					html += '<input type="hidden" name="sysFileNm"/>';
-					html += '<input type="hidden" name="newSysFileNm"/>';
-					html += '</div>';
+					// SUPER관리자,어드민관리자만 파일관리 가능
+					if(roleCd=='G001_0000' || roleCd=='G001_A000'){
+						html += '<div class="uFile w300">';
+						html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
+						html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
+						html += '<input type="hidden" name="orgFileNm"/>';
+						html += '<input type="hidden" name="sysFileNm"/>';
+						html += '<input type="hidden" name="newSysFileNm"/>';
+						html += '</div>';
+					}
 					html += '<div id="imgView_'+i+'" class="off">';
 					html += '<img id="bannerPreViewUrl_'+i+'" src="" style="width:300px; height:120px"/>';
 					html += '</div>';
@@ -515,13 +525,16 @@
 			}else{
 				if(colNo==(tdSize-1)){
 					html += '<td name="imgTd" rowspan="2" style="width:300px;">';
-					html += '<div class="uFile w300">';
-					html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
-					html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
-					html += '<input type="hidden" name="orgFileNm"/>';
-					html += '<input type="hidden" name="sysFileNm"/>';
-					html += '<input type="hidden" name="newSysFileNm" value=""/>';
-					html += '</div>';
+					// SUPER관리자,어드민관리자만 파일관리 가능
+					if(roleCd=='G001_0000' || roleCd=='G001_A000'){
+						html += '<div class="uFile w300">';
+						html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
+						html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
+						html += '<input type="hidden" name="orgFileNm"/>';
+						html += '<input type="hidden" name="sysFileNm"/>';
+						html += '<input type="hidden" name="newSysFileNm" value=""/>';
+						html += '</div>';
+					}
 					html += '<div id="imgView_'+i+'" class="off">';
 					html += '<img id="bannerPreViewUrl_'+i+'" src="" style="width:300px; height:120px"/>';
 					html += '</div>';