|
|
@@ -27,7 +27,7 @@
|
|
|
</li>
|
|
|
<li class="aR">
|
|
|
<button type="button" class="btn btn btn-base btn-sm" th:if="${contentsLoc == 'SMM007'}" onclick="fnAddBrand(this);">브랜드 추가</button> <!--id="btnBrandAddRow"-->
|
|
|
- <button type="button" class="btn btn btn-base btn-sm" th:if="${contentsLoc == 'SMM010'}" id="btnContentsAddRow">컨텐츠 추가</button>
|
|
|
+ <button type="button" class="btn btn btn-base btn-sm" th:if="${contentsLoc == 'SMM010'}" onclick="fnAddBrand(this);">MD 탭 추가</button>
|
|
|
<button type="button" class="btn btn btn-dark btn-sm" id="btnMultiPopSave">임시저장</button>
|
|
|
<input type="hidden" name="uploadDefaultUrlMultiPop" id="uploadDefaultUrlMultiPop" th:value="${@environment.getProperty('upload.image.view') + '/display/contents/'}"/>
|
|
|
<input type="hidden" name="uploadDefaultBrandUrlPop" id="uploadDefaultBrandUrlPop" th:value="${@environment.getProperty('upload.image.view') + '/display/contents/brand/'}"/>
|
|
|
@@ -82,6 +82,7 @@
|
|
|
var dispStdt = result[i].dispStdt.split(" ");
|
|
|
var dispEddt = result[i].dispEddt.split(" ");
|
|
|
var brandGroupImg = result[i].brandGroupImg;
|
|
|
+ var linkUrl = '#';
|
|
|
html += '<table class="frmStyle" style="margin-bottom:30px">';
|
|
|
html += '<colgroup>';
|
|
|
html += '<col style="width:10%;"/>';
|
|
|
@@ -105,40 +106,36 @@
|
|
|
html += '</select>';
|
|
|
html += '<input name="dispOrd" type="text" class="w80"placeholder="전시순서" style="margin-left:5px; text-align:center"/>';
|
|
|
html += '</td>';
|
|
|
- html += '<td class="aL"><button type="button" class="btn btn-base btn-lg" onclick="fnAddPlanRow(this);">기획전/배너추가</button>';
|
|
|
+ html += '<td class="aL">';
|
|
|
+ if(contentsLoc=='SMM007') {
|
|
|
+ html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddPlanRow(\'#\',this);">기획전/배너추가</button>';
|
|
|
+ }
|
|
|
//html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddGoodsRow(this);">상품추가</button>';
|
|
|
html += '<button type="button" class="btn btn-danger btn-lg" onclick="fnDeleteBrandRow(this);">삭제</button></td>';
|
|
|
html += '</tr>';
|
|
|
- html += '<tr>';
|
|
|
- html += '<th>브랜드코드</th>';
|
|
|
- html += '<td colspan="3"><input type="text" name="brandGroupNo" style="width:30%;" value="'+result[i].brandGroupNo+'">';
|
|
|
- html += '<button type="button" class="btn btnRight btn-success btn-lg" onclick="fnGetBrandGroup();">브랜드조회</button>';
|
|
|
- html += '</td>';
|
|
|
- html += '</tr>';
|
|
|
- html += '<tr name="brandImgRow">';
|
|
|
- html += '<th>브랜드이미지</th>';
|
|
|
- html += '<td colspan="3">';
|
|
|
- html += ' <div class="uFile w300">';
|
|
|
- html += ' <input id="brandFile_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnBrandImgFileUpload(this, '+i+')">';
|
|
|
- html += ' <label for="brandFile_'+i+'" class="uFileLabel">파일선택</label>';
|
|
|
- html += ' <input type="hidden" name="brandImgPath" value="'+result[i].brandGroupImg+'">';
|
|
|
- html += ' <input type="hidden" name="brandNewImgFile" value="">';
|
|
|
- html += ' </div>';
|
|
|
- html += ' <div id="brandImgViewPop_'+i+'" class=';
|
|
|
- if (brandGroupImg != '') {
|
|
|
- html += '"on">';
|
|
|
- } else {
|
|
|
- html += '"off">';
|
|
|
+ if(contentsLoc=='SMM010'){
|
|
|
+ html += '<tr>';
|
|
|
+ html += '<th>MD탭문구</th>';
|
|
|
+ html += '<td colspan="3"><input type="text" name="mdTitle" id="mdTitle" style="width:30%;" value="' + result[i].mdTitle + '"></td>';
|
|
|
+ html += '</tr>';
|
|
|
}
|
|
|
- html += ' <img id="brandPreViewUrlPop_'+i+'" src="" style="height:100px; max-width:500px;" onclick="cfnOpenImagePreViewPopup(\'brandPreViewUrlPop\',$(this).attr(\'src\'));"/>';
|
|
|
- html += ' </div>';
|
|
|
- html += '</td>';
|
|
|
- html += '</tr>';
|
|
|
- html += '</thead><tbody></tbody>';
|
|
|
- for(var j=1; j<8; j++){
|
|
|
- var imgPath = eval("result["+i+"].imgPath" + j);
|
|
|
- if(imgPath!=null && imgPath!='null' && imgPath!='' ){
|
|
|
- html += fnAddPlanRow(imgPath);
|
|
|
+ if(contentsLoc=='SMM007') {
|
|
|
+ html += '<tr>';
|
|
|
+ html += '<th>브랜드코드</th>';
|
|
|
+ html += '<td colspan="3"><input type="text" name="brandGroupNo" style="width:30%;" value="' + result[i].brandGroupNo + '">';
|
|
|
+ html += '<button type="button" class="btn btnRight btn-success btn-lg" onclick="fnGetBrandGroup();">브랜드조회</button>';
|
|
|
+ html += '</td>';
|
|
|
+ html += '</tr>';
|
|
|
+ html += fnAddBrandImgRow(result[i].brandGroupImg);
|
|
|
+ }
|
|
|
+ html += '</thead><tbody>';
|
|
|
+ if(contentsLoc=='SMM007') {
|
|
|
+ for (var j = 1; j < 8; j++) {
|
|
|
+ var imgPath = eval("result[" + i + "].imgPath" + j);
|
|
|
+ var strVar = eval("result[" + i + "].strVar" + j);
|
|
|
+ if (!gagajf.isNull(strVar) || !gagajf.isNull(imgPath)) {
|
|
|
+ html += fnAddPlanRow(strVar, imgPath);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
html += '</tbody></table>';
|
|
|
@@ -153,6 +150,40 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 브랜드이미지 불러오기
|
|
|
+ */
|
|
|
+ var brandImgIdx = 0;
|
|
|
+ var fnAddBrandImgRow = function (param){
|
|
|
+ var src = '';
|
|
|
+ var imgPath = '';
|
|
|
+ if(typeof param!='object'){
|
|
|
+ src = $("#uploadDefaultBrandUrlPop").val().replace('/contents/brand/', '')+param;
|
|
|
+ imgPath = param;
|
|
|
+ }
|
|
|
+ var html = '<tr name="brandImgRow">';
|
|
|
+ html += '<th>브랜드이미지</th>';
|
|
|
+ html += '<td colspan="3">';
|
|
|
+ html += ' <div class="uFile w300">';
|
|
|
+ html += ' <input id="brandFile_'+brandImgIdx+'" name="file" type="file" class="uFileInput w300" onchange="fnBrandImgFileUpload(this, '+brandImgIdx+')">';
|
|
|
+ html += ' <label for="brandFile_'+brandImgIdx+'" class="uFileLabel">파일선택</label>';
|
|
|
+ html += ' <input type="hidden" name="brandImgPath" value="'+imgPath+'">';
|
|
|
+ html += ' <input type="hidden" name="brandNewImgFile" value="">';
|
|
|
+ html += ' </div>';
|
|
|
+ html += ' <div id="brandImgViewPop_'+brandImgIdx+'" class=';
|
|
|
+ if (src != '') {
|
|
|
+ html += '"on">';
|
|
|
+ } else {
|
|
|
+ html += '"off">';
|
|
|
+ }
|
|
|
+ html += ' <img id="brandPreViewUrlPop_'+brandImgIdx+'" src="'+src+'" style="height:100px; max-width:500px;" onclick="cfnOpenImagePreViewPopup(\'brandPreViewUrlPop\',$(this).attr(\'src\'));"/>';
|
|
|
+ html += ' </div>';
|
|
|
+ html += '</td>';
|
|
|
+ html += '</tr>';
|
|
|
+
|
|
|
+ return html;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 브랜드 추가 버튼
|
|
|
*/
|
|
|
@@ -164,7 +195,7 @@
|
|
|
src = $("#uploadDefaultBrandUrlPop").val().replace('/contents/brand', '') + param;
|
|
|
imgPath = param;
|
|
|
}
|
|
|
-
|
|
|
+ var linkUrl = '#';
|
|
|
var html = '<table class="frmStyle" style="margin-bottom:30px">';
|
|
|
html += '<colgroup>';
|
|
|
html += '<col style="width:10%;"/>';
|
|
|
@@ -188,35 +219,46 @@
|
|
|
html += '</select>';
|
|
|
html += '<input name="dispOrd" type="text" class="w80" placeholder="전시순서" style="margin-left:5px; text-align:center"/>';
|
|
|
html += '</td>';
|
|
|
- html += '<td class="aL"><button type="button" class="btn btn-base btn-lg" onclick="fnAddPlanRow(this);">기획전/배너추가</button>';
|
|
|
+ html += '<td class="aL">';
|
|
|
+ if(contentsLoc=='SMM007') {
|
|
|
+ html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddPlanRow(\'#\',this);">기획전/배너추가</button>';
|
|
|
+ }
|
|
|
//html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddGoodsRow(this);">상품추가</button>';
|
|
|
html += '<button type="button" class="btn btn-danger btn-lg" onclick="fnDeleteBrandRow(this);">삭제</button></td>';
|
|
|
html += '</tr>';
|
|
|
- html += '<tr>';
|
|
|
- html += '<th>브랜드코드</th>';
|
|
|
- html += '<td colspan="3"><input type="text" name="brandGroupNo" style="width:30%;">';
|
|
|
- html += '<button type="button" class="btn btnRight btn-success btn-lg" onclick="fnGetBrandGroup();">브랜드조회</button>';
|
|
|
- html += '</td>';
|
|
|
- html += '</tr>';
|
|
|
- html += '<tr name="brandImgRow">';
|
|
|
- html += '<th>브랜드이미지</th>';
|
|
|
- html += '<td colspan="3">';
|
|
|
- html += ' <div class="uFile w300">';
|
|
|
- html += ' <input id="brandFile_' + brandIdx + '" name="file" type="file" class="uFileInput w300" onchange="fnBrandImgFileUpload(this, ' + brandIdx + ')">';
|
|
|
- html += ' <label for="brandFile_' + brandIdx + '" class="uFileLabel">파일선택</label>';
|
|
|
- html += ' <input type="hidden" name="brandImgPath" value="' + imgPath + '">';
|
|
|
- html += ' <input type="hidden" name="brandNewImgFile" value="">';
|
|
|
- html += ' </div>';
|
|
|
- html += ' <div id="brandImgViewPop_' + brandIdx + '" class=';
|
|
|
- if (src != '') {
|
|
|
- html += '"on">';
|
|
|
- } else {
|
|
|
- html += '"off">';
|
|
|
+ if(contentsLoc=='SMM010'){
|
|
|
+ html += '<tr>';
|
|
|
+ html += '<th>MD탭문구</th>';
|
|
|
+ html += '<td colspan="3"><input type="text" name="mdTitle" id="mdTitle" style="width:30%;"></td>';
|
|
|
+ html += '</tr>';
|
|
|
+ }
|
|
|
+ if(contentsLoc=='SMM007'){
|
|
|
+ html += '<tr>';
|
|
|
+ html += '<th>브랜드코드</th>';
|
|
|
+ html += '<td colspan="3"><input type="text" name="brandGroupNo" style="width:30%;">';
|
|
|
+ html += '<button type="button" class="btn btnRight btn-success btn-lg" onclick="fnGetBrandGroup();">브랜드조회</button>';
|
|
|
+ html += '</td>';
|
|
|
+ html += '</tr>';
|
|
|
+ html += '<tr name="brandImgRow">';
|
|
|
+ html += '<th>브랜드이미지</th>';
|
|
|
+ html += '<td colspan="3">';
|
|
|
+ html += ' <div class="uFile w300">';
|
|
|
+ html += ' <input id="brandFile_' + brandIdx + '" name="file" type="file" class="uFileInput w300" onchange="fnBrandImgFileUpload(this, ' + brandIdx + ')">';
|
|
|
+ html += ' <label for="brandFile_' + brandIdx + '" class="uFileLabel">파일선택</label>';
|
|
|
+ html += ' <input type="hidden" name="brandImgPath" value="' + imgPath + '">';
|
|
|
+ html += ' <input type="hidden" name="brandNewImgFile" value="">';
|
|
|
+ html += ' </div>';
|
|
|
+ html += ' <div id="brandImgViewPop_' + brandIdx + '" class=';
|
|
|
+ if (src != '') {
|
|
|
+ html += '"on">';
|
|
|
+ } else {
|
|
|
+ html += '"off">';
|
|
|
+ }
|
|
|
+ html += ' <img id="brandPreViewUrlPop_' + brandIdx + '" src="" style="height:100px; max-width:500px;" onclick="cfnOpenImagePreViewPopup(\'brandPreViewUrlPop\',$(this).attr(\'src\'));"/>';
|
|
|
+ html += ' </div>';
|
|
|
+ html += '</td>';
|
|
|
+ html += '</tr>';
|
|
|
}
|
|
|
- html += ' <img id="brandPreViewUrlPop_' + brandIdx + '" src="" style="height:100px; max-width:500px;" onclick="cfnOpenImagePreViewPopup(\'brandPreViewUrlPop\',$(this).attr(\'src\'));"/>';
|
|
|
- html += ' </div>';
|
|
|
- html += '</td>';
|
|
|
- html += '</tr>';
|
|
|
html += '</thead><tbody></tbody></table>';
|
|
|
|
|
|
brandIdx++;
|
|
|
@@ -267,7 +309,7 @@
|
|
|
* 기획전/배너 추가
|
|
|
*/
|
|
|
var planImgIndex = 0;
|
|
|
- var fnAddPlanRow = function (param){
|
|
|
+ var fnAddPlanRow = function (strvar, param){
|
|
|
var src = '';
|
|
|
var imgPath = '';
|
|
|
if(typeof param!='object'){
|
|
|
@@ -276,7 +318,7 @@
|
|
|
}
|
|
|
var html = '<tr name="planRow">';
|
|
|
html += '<th>기획전/배너<br>링크/이미지</th>';
|
|
|
- html += '<td><input type="text" name="planLink" id="planLink'+planImgIndex+'"></td>';
|
|
|
+ html += '<td><input type="text" name="planLink" id="planLink'+planImgIndex+'" value="'+strvar+'"></td>';
|
|
|
html += '<td><div class="uFile w300">';
|
|
|
html += '<input id="planFile_'+planImgIndex+'" name="file" type="file" class="uFileInput w300" onchange="fnPlanFileUpload(this, '+planImgIndex+')"/>';
|
|
|
html += '<label for="planFile_'+planImgIndex+'" class="uFileLabel">파일선택</label>';
|
|
|
@@ -481,6 +523,7 @@
|
|
|
, mdTitle : mdTitle
|
|
|
, useYn : 'Y'
|
|
|
, dispOrd : dispOrd
|
|
|
+ , multiContentsYn : 'Y'
|
|
|
};
|
|
|
|
|
|
dataArr.push(data);
|
|
|
@@ -530,7 +573,7 @@
|
|
|
var data = {
|
|
|
cateNo : cateNo
|
|
|
, contentsLoc : contentsLoc
|
|
|
- , contentsTitle : $("#contentsTitleForm input[name=contentsTitle]").val()
|
|
|
+ , contentsTitle : $("#multiContentsTitleForm input[name=contentsTitle]").val()
|
|
|
}
|
|
|
dataArr.push(data);
|
|
|
|
|
|
@@ -539,7 +582,7 @@
|
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function(){
|
|
|
- gagajf.ajaxJsonSubmit('/display/contents/preview/save', jsonData, fnGetContentsPreviewList);
|
|
|
+ gagajf.ajaxJsonSubmit('/display/contents/preview/save', jsonData, fnGetMultiContentsPreviewList);
|
|
|
}
|
|
|
});
|
|
|
});
|