Просмотр исходного кода

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.admin.git into develop

eskim 5 лет назад
Родитель
Сommit
427e6afd4e

+ 6 - 1
src/main/webapp/WEB-INF/views/display/GoodsDispOrdChangePopupForm.html

@@ -150,7 +150,7 @@
 				html += '<li><span>재고 :</span><em>'+resultList[i].currStockQty+'</em></li>';
 				html += '<li>';
 				html += '<span>전시순서 :</span>';
-				html += '<input type="text" name="dispOrdEdit" value="" />';
+				html += '<input type="text" name="dispOrdEdit" value="'+resultList[i].dispOrd+'" />';
 				html += '<input type="hidden" name="setDispOrd" value="'+resultList[i].dispOrd+'"/>';
 				html += '</li>';
 				html += '</ul>';
@@ -166,6 +166,8 @@
 					$(".item").eq(ind-1).before($(".item").eq(ind));
 					$(".item").eq(ind).find("input[name=setDispOrd]").val(Number($(".item").eq(ind).find("input[name=setDispOrd]").val())+1);
 					$(".item").eq(ind-1).find("input[name=setDispOrd]").val(Number($(".item").eq(ind-1).find("input[name=setDispOrd]").val())-1);
+					$(".item").eq(ind).find("input[name=dispOrdEdit]").val(Number($(".item").eq(ind).find("input[name=dispOrdEdit]").val())+1);
+					$(".item").eq(ind-1).find("input[name=dispOrdEdit]").val(Number($(".item").eq(ind-1).find("input[name=dispOrdEdit]").val())-1);
 				}
 			});
 			$(".fa-arrow-down").off('click');
@@ -175,6 +177,8 @@
 					$(".item").eq(ind+1).after($(".item").eq(ind));
 					$(".item").eq(ind).find("input[name=setDispOrd]").val(Number($(".item").eq(ind).find("input[name=setDispOrd]").val())-1);
 					$(".item").eq(ind+1).find("input[name=setDispOrd]").val(Number($(".item").eq(ind+1).find("input[name=setDispOrd]").val())+1);
+					$(".item").eq(ind).find("input[name=dispOrdEdit]").val(Number($(".item").eq(ind).find("input[name=dispOrdEdit]").val())-1);
+					$(".item").eq(ind+1).find("input[name=dispOrdEdit]").val(Number($(".item").eq(ind+1).find("input[name=dispOrdEdit]").val())+1);
 				}
 			});
 			fnViewInit();
@@ -360,6 +364,7 @@
 					firstOrd = Number(firstOrd);
 				}
 				$(".item").each(function(i){
+					$(this).find("input[name=dispOrdEdit]").val(i+firstOrd);
 					$(this).find("input[name=setDispOrd]").val(i+firstOrd);
 				});
 			}

+ 92 - 41
src/main/webapp/WEB-INF/views/display/MainContentsPopupForm.html

@@ -207,18 +207,18 @@
 				html += '>';
 				html += '	<th>띠배너<br>이미지</th>';
 				html += '	<td><div class="uFile w300">';
-				html += '			<input id="filePop_0" name="file" type="file" class="uFileInput w300" onchange="fnPopFileUpload(this, 0)"/>';
-				html += '			<label for="filePop_0" class="uFileLabel">파일선택</label>';
+				html += '			<input id="filePop_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnGnbFileUpload(this, '+i+', 0)"/>';
+				html += '			<label for="filePop_'+i+'" class="uFileLabel">파일선택</label>';
 				html += '			<input type="hidden" name="imgPath" value="'+result[i].imgPath1+'"/>';
 				html += '			<input type="hidden" name="newImgFile" value="" />';
 				html += '		</div>';
-				html += '	<div id="imgViewPop_0" class=';
+				html += '	<div id="imgViewPop_'+i+'" class=';
 				if(src!=''){
 					html += '"on">';
 				}else{
 					html += '"off">';
 				}
-				html += '		<img id="bannerPreViewUrlPop_0" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
+				html += '		<img id="bannerPreViewUrlPop_'+i+'" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
 				html += '	</div></td>';
 				html += '</tr>';
 
@@ -240,24 +240,29 @@
 				html += '</tr>';
 
 				html += '<tr name="imgPopRow" id="openBanner1" ';
-				if((result[i].contentsType!='IMG') || result[i].contentsType!='OPEN' && result[i].strVar7!='IMG'){
+				if(result[i].contentsType=='OPEN' && result[i].strVar7=='IMG'){
+					html += '	style="display:table-row;"';
+				}else{
 					html += '	style="display:none;"';
 				}
+				// if((result[i].contentsType!='IMG') || result[i].contentsType!='OPEN' && result[i].strVar7!='IMG'){
+				// 	html += '	style="display:none;"';
+				// }
 				html +='>';
 				html += '	<th>오픈배너<br>이미지</th>';
 				html += '	<td><div class="uFile w300">';
-				html += '			<input id="filePop_1" name="file" type="file" class="uFileInput w300" onchange="fnPopFileUpload(this, 1)"/>';
-				html += '			<label for="filePop_1" class="uFileLabel">파일선택</label>';
+				html += '			<input id="filePop_100'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnGnbFileUpload(this, 100'+i+', 1)"/>';
+				html += '			<label for="filePop_100'+i+'" class="uFileLabel">파일선택</label>';
 				html += '			<input type="hidden" name="imgPath" value="'+result[i].imgPath2+'"/>';
 				html += '			<input type="hidden" name="newImgFile" value="" />';
 				html += '		</div>';
-				html += '	<div id="imgViewPop_1" class=';
+				html += '	<div id="imgViewPop_100'+i+'" class=';
 				if(src!='' && result[i].imgPath2 != ''){
 					html += '"on">';
 				}else{
 					html += '"off">';
 				}
-				html += '		<img id="bannerPreViewUrlPop_1" src="'+src2+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src2\'));"/>';
+				html += '		<img id="bannerPreViewUrlPop_100'+i+'" src="'+src2+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src2\'));"/>';
 				html += '	</div></td>';
 				html += '</tr>';
 
@@ -496,17 +501,24 @@
 			$(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").show();
 			$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").show();
 			$(obj).closest("table").find("[name=openBannerTypeTr"+idx+"]").show();
-			$(obj).closest("table").find("input:radio[name=openBannerType"+idx+"]:input[value=IMG]").prop('checked',true);
+			console.log($(obj).closest("table").find("input:radio[name=openBannerType"+idx+"]:checked").val());
+			if($(obj).closest("table").find("input:radio[name=openBannerType"+idx+"]:checked").val()=='HTML'){
+				$(obj).closest("table").find("input:radio[name=openBannerType"+idx+"]:input[value=HTML]").prop('checked',true);
+				$(obj).closest("table").find("[id=openBanner2]").show();
+			}else{
+				$(obj).closest("table").find("input:radio[name=openBannerType"+idx+"]:input[value=IMG]").prop('checked',true);
+				$(obj).closest("table").find("[id=openBanner2]").hide();
+			}
 			$(obj).closest("table").find("[id=openBanner0]").show();
 			$(obj).closest("table").find("[id=openBanner1]").show();
-			$(obj).closest("table").find("[id=openBanner2]").hide();
-			$(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
-			$(obj).closest("table").find("[name=imgPath]").val('');
-			$(obj).closest("table").find("[name=newImgFile]").val('');
-			$("#bannerPreViewUrlPop_0").attr('src', '');
-			$("#imgViewPop_0").removeClass("on").addClass("off");
-			$("#bannerPreViewUrlPop_1").attr('src', '');
-			$("#imgViewPop_1").removeClass("on").addClass("off");
+
+			// $(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
+			// $(obj).closest("table").find("[name=imgPath]").val('');
+			// $(obj).closest("table").find("[name=newImgFile]").val('');
+			// $("#bannerPreViewUrlPop_0").attr('src', '');
+			// $("#imgViewPop_0").removeClass("on").addClass("off");
+			// $("#bannerPreViewUrlPop_1").attr('src', '');
+			// $("#imgViewPop_1").removeClass("on").addClass("off");
 		}else if(cateType=='IMG'){
 			$(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").show();
 			$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").hide();
@@ -515,13 +527,13 @@
 			$(obj).closest("table").find("[id=openBanner0]").show();
 			$(obj).closest("table").find("[id=openBanner1]").hide();
 			$(obj).closest("table").find("[id=openBanner2]").hide();
-			$(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
-			$(obj).closest("table").find("[name=imgPath]").val('');
-			$(obj).closest("table").find("[name=newImgFile]").val('');
-			$("#bannerPreViewUrlPop_0").attr('src', '');
-			$("#imgViewPop_0").removeClass("on").addClass("off");
-			$("#bannerPreViewUrlPop_1").attr('src', '');
-			$("#imgViewPop_1").removeClass("on").addClass("off");
+			// $(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
+			// $(obj).closest("table").find("[name=imgPath]").val('');
+			// $(obj).closest("table").find("[name=newImgFile]").val('');
+			// $("#bannerPreViewUrlPop_0").attr('src', '');
+			// $("#imgViewPop_0").removeClass("on").addClass("off");
+			// $("#bannerPreViewUrlPop_1").attr('src', '');
+			// $("#imgViewPop_1").removeClass("on").addClass("off");
 		}else if(cateType=='TEXT'){
 			$(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").hide();
 			$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").hide();
@@ -530,13 +542,19 @@
 			$(obj).closest("table").find("[id=openBanner0]").hide();
 			$(obj).closest("table").find("[id=openBanner1]").hide();
 			$(obj).closest("table").find("[id=openBanner2]").hide();
-			$(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
-			$(obj).closest("table").find("[name=imgPath]").val('');
-			$(obj).closest("table").find("[name=newImgFile]").val('');
-			$("#bannerPreViewUrlPop_0").attr('src', '');
-			$("#imgViewPop_0").removeClass("on").addClass("off");
-			$("#bannerPreViewUrlPop_1").attr('src', '');
-			$("#imgViewPop_1").removeClass("on").addClass("off");
+			// $(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
+			// $(obj).closest("table").find("[name=imgPath]").val('');
+			// $(obj).closest("table").find("[name=newImgFile]").val('');
+			// $("#bannerPreViewUrlPop_0").attr('src', '');
+			// $("#imgViewPop_0").removeClass("on").addClass("off");
+			// $("#bannerPreViewUrlPop_1").attr('src', '');
+			// $("#imgViewPop_1").removeClass("on").addClass("off");
+			if($(obj).closest("table").find("[name=title]").length < 1){
+				fnAddTitlePopRow($(obj));
+			}
+			if($(obj).closest("table").find("[name=link]").length < 1){
+				fnAddLinkPopRow($(obj));
+			}
 		}
 	}
 
@@ -669,18 +687,18 @@
 			html += '<tr name="imgPopRow" id="openBanner0">';
 			html += '	<th>띠배너<br>이미지</th>';
 			html += '	<td><div class="uFile w300">';
-			html += '			<input id="filePop_0" name="file" type="file" class="uFileInput w300" onchange="fnPopFileUpload(this, 0)"/>';
-			html += '			<label for="filePop_0" class="uFileLabel">파일선택</label>';
+			html += '			<input id="filePop_'+dataIdx+'" name="file" type="file" class="uFileInput w300" onchange="fnGnbFileUpload(this, '+dataIdx+', 0)"/>';
+			html += '			<label for="filePop_'+dataIdx+'" class="uFileLabel">파일선택</label>';
 			html += '			<input type="hidden" name="imgPath" value=""/>';
 			html += '			<input type="hidden" name="newImgFile" value="" />';
 			html += '		</div>';
-			html += '	<div id="imgViewPop_0" class=';
+			html += '	<div id="imgViewPop_'+dataIdx+'" class=';
 			if(src!=''){
 				html += '"on">';
 			}else{
 				html += '"off">';
 			}
-			html += '		<img id="bannerPreViewUrlPop_0" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
+			html += '		<img id="bannerPreViewUrlPop_'+dataIdx+'" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
 			html += '	</div></td>';
 			html += '</tr>';
 
@@ -695,18 +713,18 @@
 			html += '<tr name="imgPopRow" id="openBanner1">';
 			html += '	<th>오픈배너<br>이미지</th>';
 			html += '	<td><div class="uFile w300">';
-			html += '			<input id="filePop_1" name="file" type="file" class="uFileInput w300" onchange="fnPopFileUpload(this, 1)"/>';
-			html += '			<label for="filePop_1" class="uFileLabel">파일선택</label>';
+			html += '			<input id="filePop_100'+dataIdx+'" name="file" type="file" class="uFileInput w300" onchange="fnGnbFileUpload(this, 100'+dataIdx+', 1)"/>';
+			html += '			<label for="filePop_100'+dataIdx+'" class="uFileLabel">파일선택</label>';
 			html += '			<input type="hidden" name="imgPath" value=""/>';
 			html += '			<input type="hidden" name="newImgFile" value="" />';
 			html += '		</div>';
-			html += '	<div id="imgViewPop_1" class=';
+			html += '	<div id="imgViewPop_100'+dataIdx+'" class=';
 			if(src!=''){
 				html += '"on">';
 			}else{
 				html += '"off">';
 			}
-			html += '		<img id="bannerPreViewUrlPop_1" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
+			html += '		<img id="bannerPreViewUrlPop_100'+dataIdx+'" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
 			html += '	</div></td>';
 			html += '</tr>';
 
@@ -803,6 +821,10 @@
 				$("#addMobImg"+dataIdx).click();
 			}
 		}
+		if(contentsLoc=='SGNB002'){
+			$("#addTitle"+dataIdx).click();
+			$("#addLink"+dataIdx).click();
+		}
 
 		if(contentsLoc=='SGNB001'){
 			gagaSn.setContents('#openBannerDesc'+dataIdx, '');
@@ -1078,7 +1100,11 @@
 				strVar5 = $(this).find("input[name=gnbBgColor"+thisIdx+"]").val();
 				strVar6 = $(this).find("input[name=gnbTextColor"+thisIdx+"]").val();
 				strVar8 = $(this).find("input:radio[name=todayYn"+thisIdx+"]:checked").val();
-				strVar7 = $(this).find("input:radio[name=openBannerType"+thisIdx+"]:checked").val();
+				if(contentsType=='OPEN'){
+					strVar7 = $(this).find("input:radio[name=openBannerType"+thisIdx+"]:checked").val();
+				}else{
+					strVar7 = '';
+				}
 				if($(this).find("input:radio[name=openBannerType"+thisIdx+"]:checked").val() == 'HTML'){
 					html = $(this).find("textarea[name=openBannerDesc"+thisIdx+"]").val();
 				}
@@ -1204,6 +1230,31 @@
 		if (typeof(file) == 'undefined'){
 			return;
 		}
+		console.log('ind>>>>'+ind);
+		// 파일 업로드
+		gagajf.ajaxFileUpload('/common/file/upload?subDir=/contents'
+				, file
+				, function(result) {
+					$(obj).closest('div').find('input:hidden[name=newImgFile]').val(result.newFileName);
+					$("#bannerPreViewUrlPop_"+ind).attr('src', $("#uploadDefaultUrlPop").val()+result.newFileName);
+					$("#imgViewPop_"+ind).removeClass("off").addClass("on");
+				}
+				, 'image'
+		);
+	}
+
+	/**
+	 * GNB배너 파일 첨부
+	 */
+	var fnGnbFileUpload = function (obj, ind, num){
+		var file = obj.files[0];
+		file.name = 'test';
+		if (typeof(file) == 'undefined'){
+			return;
+		}
+		var $obj = $(obj);
+		console.log('data-id::'+$("#mcTable"+ind).find('input[name=tableIdx]').val());
+
 		// 파일 업로드
 		gagajf.ajaxFileUpload('/common/file/upload?subDir=/contents'
 				, file

+ 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>';

+ 3 - 3
src/main/webapp/WEB-INF/views/display/MainMultiContentsPopupForm.html

@@ -175,7 +175,7 @@ console.log('brandGroupNo:'+brandGroupNo);
 				}
 			}
 			if(!gagajf.isNull(result[i].contentsGoodsList)){
-				console.log(fnAddGoodsRow(result[i].contentsGoodsList));
+				// console.log(fnAddGoodsRow(result[i].contentsGoodsList));
 				html += fnAddGoodsRow(result[i].contentsGoodsList);
 			}
 			html += '</tbody></table>';
@@ -789,7 +789,7 @@ console.log('brandGroupNo:'+brandGroupNo);
 		html += '<td colspan="3">';
 		html += '<div class="sortableWrap" data-unit="7" style="overflow-y:scroll;">';
 		html += '<div class="itemWrap" id="goodsListTd'+goodsIdx+'">';
-		if(typeof param!='object'){
+		// if(typeof param!='object'){
 			var imgPath = _goodsUrl;
 			for(let i=0; i<param.length; i++){
 				html += '<ul id="goodsUl'+i+'" class="item ui-state-default goodsClass" style="min-height:140px;"> ';
@@ -809,7 +809,7 @@ console.log('brandGroupNo:'+brandGroupNo);
 				html += '</ul>';
 				html += '</ul>';
 			}
-		}
+		// }
 		html += '</div>';
 		html += '</div>';
 		html += '</td>';

+ 1 - 1
src/main/webapp/WEB-INF/views/marketing/MailTemplateDetailForm.html

@@ -831,7 +831,7 @@
 	
 	$(document).ready(function() {
 		// Create a summernote
-		let snOptions = gagaSn.getToolbarOptions();
+		let snOptions = gagaSn.getToolbarOptions('media');
 		gagaSn.createSummernote(snOptions, '#mailContent');
 		
 		gagaAgGrid.createGrid("mtcgGridList1", mtcgGridOptions1);