|
@@ -46,6 +46,7 @@
|
|
|
var tdWidth = $("#sortable").find("td").width();
|
|
var tdWidth = $("#sortable").find("td").width();
|
|
|
var tdDeleteWidth = parseInt(tdWidth/11, 10);
|
|
var tdDeleteWidth = parseInt(tdWidth/11, 10);
|
|
|
tdWidth = tdWidth - tdDeleteWidth;
|
|
tdWidth = tdWidth - tdDeleteWidth;
|
|
|
|
|
+ var cate1List = [[${cate1List}]];
|
|
|
|
|
|
|
|
var tableLen = 0; // 테이블 ID
|
|
var tableLen = 0; // 테이블 ID
|
|
|
|
|
|
|
@@ -66,6 +67,7 @@
|
|
|
for(var i=0; i<result.length; i++){
|
|
for(var i=0; i<result.length; i++){
|
|
|
var dispStdt = result[i].dispStdt.split(" ");
|
|
var dispStdt = result[i].dispStdt.split(" ");
|
|
|
var dispEddt = result[i].dispEddt.split(" ");
|
|
var dispEddt = result[i].dispEddt.split(" ");
|
|
|
|
|
+ var cate1No = result[i].contentsType;
|
|
|
html += '<table class="frmStyle mcTable" style="margin-bottom:30px" id="mcTable'+i+'">';
|
|
html += '<table class="frmStyle mcTable" style="margin-bottom:30px" id="mcTable'+i+'">';
|
|
|
html += '<input type="hidden" name="tableIdx" value="'+i+'" data-id="'+i+'">';
|
|
html += '<input type="hidden" name="tableIdx" value="'+i+'" data-id="'+i+'">';
|
|
|
html += '<colgroup>';
|
|
html += '<colgroup>';
|
|
@@ -101,10 +103,10 @@
|
|
|
if(contentsLoc=='SBM005' || contentsLoc=='SBMM005'){
|
|
if(contentsLoc=='SBM005' || contentsLoc=='SBMM005'){
|
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddBrandDescRow(this);">브랜드소개추가</button>';
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddBrandDescRow(this);">브랜드소개추가</button>';
|
|
|
}
|
|
}
|
|
|
- if(contentsLoc!='SMM005' && contentsLoc!='SBM005' && contentsLoc!='SBMM005'){
|
|
|
|
|
|
|
+ if(contentsLoc!='SMM005' && contentsLoc!='SBM005' && contentsLoc!='SBMM005' && contentsLoc!='SGNB001'){
|
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddImgPopRow(this);">이미지추가</button>';
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddImgPopRow(this);">이미지추가</button>';
|
|
|
}
|
|
}
|
|
|
- html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddLinkPopRow(this);">링크추가</button>';
|
|
|
|
|
|
|
+ html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddLinkPopRow(this);">링크추가</button>';
|
|
|
html += '<button type="button" class="btn btn-danger btn-lg" onclick="fnDeleteContentsRow(this);">삭제</button></td>';
|
|
html += '<button type="button" class="btn btn-danger btn-lg" onclick="fnDeleteContentsRow(this);">삭제</button></td>';
|
|
|
}
|
|
}
|
|
|
html += '</tr>';
|
|
html += '</tr>';
|
|
@@ -127,22 +129,75 @@
|
|
|
}
|
|
}
|
|
|
html += ' </td>';
|
|
html += ' </td>';
|
|
|
html += '</tr>';
|
|
html += '</tr>';
|
|
|
- html += ' <tr name="tabBgColorRow'+i+'"';
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if(result[i].contentsType=='OPEN'){
|
|
|
|
|
+ var src = $("#uploadDefaultUrlPop").val().replace('/contents/', '')+result[i].imgPath1;
|
|
|
|
|
+ var src2 = $("#uploadDefaultUrlPop").val().replace('/contents/', '')+result[i].imgPath2;
|
|
|
|
|
+ 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 type="hidden" name="imgPath" value="'+result[i].imgPath1+'"/>';
|
|
|
|
|
+ html += ' <input type="hidden" name="newImgFile" value="" />';
|
|
|
|
|
+ html += ' </div>';
|
|
|
|
|
+ html += ' <div id="imgViewPop_0" 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 += ' </div></td>';
|
|
|
|
|
+ html += '</tr>';
|
|
|
|
|
+
|
|
|
|
|
+ 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 type="hidden" name="imgPath" value="'+result[i].imgPath2+'"/>';
|
|
|
|
|
+ html += ' <input type="hidden" name="newImgFile" value="" />';
|
|
|
|
|
+ html += ' </div>';
|
|
|
|
|
+ html += ' <div id="imgViewPop_1" class=';
|
|
|
|
|
+ if(src!=''){
|
|
|
|
|
+ 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 += ' </div></td>';
|
|
|
|
|
+ html += '</tr>';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if(result[i].contentsType=='IMG'){
|
|
if(result[i].contentsType=='IMG'){
|
|
|
- html += 'style="display:none;"';
|
|
|
|
|
|
|
+ var src = $("#uploadDefaultUrlPop").val().replace('/contents/', '')+result[i].imgPath1;
|
|
|
|
|
+ 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 type="hidden" name="imgPath" value="'+result[i].imgPath1+'"/>';
|
|
|
|
|
+ html += ' <input type="hidden" name="newImgFile" value="" />';
|
|
|
|
|
+ html += ' </div>';
|
|
|
|
|
+ html += ' <div id="imgViewPop_0" 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 += ' </div></td>';
|
|
|
|
|
+ html += '</tr>';
|
|
|
}
|
|
}
|
|
|
- html += ' >';
|
|
|
|
|
- html += ' <th>배경 RGB코드</th>';
|
|
|
|
|
- html += ' <td><input name="gnbBgColor' + i + '" type="text" maxlength="200" data-valid-name="배경 RGB코드" value="' + result[i].strVar5 + '"/></td>';
|
|
|
|
|
- html += ' </tr>';
|
|
|
|
|
|
|
|
|
|
- html += ' <tr name="tabTextColorRow'+i+'"';
|
|
|
|
|
- if(result[i].contentsType!='TEXT'){
|
|
|
|
|
|
|
+ html += ' <tr name="tabBgColorRow'+i+'"';
|
|
|
|
|
+ if(result[i].contentsType=='TEXT'){
|
|
|
html += 'style="display:none;"';
|
|
html += 'style="display:none;"';
|
|
|
}
|
|
}
|
|
|
html += ' >';
|
|
html += ' >';
|
|
|
- html += ' <th>텍스트 RGB코드</th>';
|
|
|
|
|
- html += ' <td><input name="gnbTextColor'+i+'" type="text" maxlength="200" data-valid-name="텍스트 RGB코드" value="' + result[i].strVar6 + '"/></td>';
|
|
|
|
|
|
|
+ html += ' <th>배경 RGB코드</th>';
|
|
|
|
|
+ html += ' <td><input name="gnbBgColor' + i + '" type="text" maxlength="200" data-valid-name="배경 RGB코드" value="' + result[i].strVar5 + '"/></td>';
|
|
|
html += ' </tr>';
|
|
html += ' </tr>';
|
|
|
|
|
|
|
|
html += ' <tr name="tabShowYnRow'+i+'"';
|
|
html += ' <tr name="tabShowYnRow'+i+'"';
|
|
@@ -241,44 +296,23 @@
|
|
|
}
|
|
}
|
|
|
html += ' </td>';
|
|
html += ' </td>';
|
|
|
html += '</tr>';
|
|
html += '</tr>';
|
|
|
- /*html += '<tr id="bannerImgTr1" name="imgPopRow">';
|
|
|
|
|
- html += ' <th>이미지1</th>';
|
|
|
|
|
- html += ' <td>';
|
|
|
|
|
- html += ' <div id="ImageArea1" style="height:33px;">';
|
|
|
|
|
- html += ' <span className="uFile w300">';
|
|
|
|
|
- html += ' <input id="file_1" name="file" type="file" className="uFileInput w300" data-valid-name="이미지파일" onChange="fnPopFileUpload(this, 1)"/>';
|
|
|
|
|
- html += ' <label htmlFor="file_1" className="uFileLabel"></label>';
|
|
|
|
|
- html += ' <input type="hidden" name="imgPath" value="'+result[i].imgPath1+'"/>';
|
|
|
|
|
- html += ' <input type="hidden" name="newImgFile" value="" />';
|
|
|
|
|
- html += ' </span>';
|
|
|
|
|
- html += ' <span className="memAdd off" id="imgFileNm1"></span>';
|
|
|
|
|
- html += ' </div>';
|
|
|
|
|
- html += ' </td>';
|
|
|
|
|
- html += '</tr>';
|
|
|
|
|
- html += '<tr id="bannerLinkTr1" name="linkRow">';
|
|
|
|
|
- html += ' <th>링크1</th>';
|
|
|
|
|
- html += ' <td><input type="text" class="w400" name="linkUrl" maxlength="300" required="required" data-valid-name="LINK" value="'+result[i].strVar1+'"/></td>';
|
|
|
|
|
- html += '</tr>';
|
|
|
|
|
- if(result[i].contentsType==2){
|
|
|
|
|
- html += '<tr id="bannerImgTr2" name="imgPopRow">';
|
|
|
|
|
- html += ' <th>이미지2</th>';
|
|
|
|
|
- html += ' <td>';
|
|
|
|
|
- html += ' <div id="ImageArea2" style="height:33px;">';
|
|
|
|
|
- html += ' <span className="uFile w300">';
|
|
|
|
|
- html += ' <input id="file_2" name="file" type="file" className="uFileInput w300" data-valid-name="이미지파일" onChange="fnPopFileUpload(this, 2)"/>';
|
|
|
|
|
- html += ' <label htmlFor="file_2" className="uFileLabel"></label>';
|
|
|
|
|
- html += ' <input type="hidden" name="imgPath" value="'+result[i].imgPath2+'"/>';
|
|
|
|
|
- html += ' <input type="hidden" name="newImgFile" value="" />';
|
|
|
|
|
- html += ' </span>';
|
|
|
|
|
- html += ' <span className="memAdd off" id="imgFileNm2"></span>';
|
|
|
|
|
- html += ' </div>';
|
|
|
|
|
- html += ' </td>';
|
|
|
|
|
- html += '</tr>';
|
|
|
|
|
- html += '<tr id="bannerLinkTr2" name="linkRow" >';
|
|
|
|
|
- html += ' <th>링크2</th>';
|
|
|
|
|
- html += ' <td><input type="text" class="w400" name="linkUrl" maxlength="300" required="required" data-valid-name="LINK" value="'+result[i].strVar2+'"/></td>';
|
|
|
|
|
- html += '</tr>';
|
|
|
|
|
- }*/
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if(contentsLoc=='STAB003'){
|
|
|
|
|
+ html += ' <tr name="tabCateRow">';
|
|
|
|
|
+ html += ' <th>카테고리</th>';
|
|
|
|
|
+ html += ' <td colspan="3">카테고리선택';
|
|
|
|
|
+ html += ' <select name="cate1List">';
|
|
|
|
|
+ html += ' <option value="">[선택]</option>';
|
|
|
|
|
+ for(let i=0; i<cate1List.length; i++){
|
|
|
|
|
+ if(cate1No == cate1List[i].cd){
|
|
|
|
|
+ html += '<option value="'+cate1List[i].cd+'" selected="selected">['+cate1List[i].cd+'] '+cate1List[i].cdNm+'</option>';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ html += '<option value="'+cate1List[i].cd+'">['+cate1List[i].cd+'] '+cate1List[i].cdNm+'</option>';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ html += ' </select>';
|
|
|
|
|
+ html += ' </td>';
|
|
|
|
|
+ html += ' </tr>';
|
|
|
}
|
|
}
|
|
|
html += '</thead><tbody>';
|
|
html += '</thead><tbody>';
|
|
|
if(contentsLoc!='SCM002' && contentsLoc!='SCM003'){
|
|
if(contentsLoc!='SCM002' && contentsLoc!='SCM003'){
|
|
@@ -290,8 +324,10 @@
|
|
|
if(strTitle!=null && strTitle!='null' && strTitle!='' ){
|
|
if(strTitle!=null && strTitle!='null' && strTitle!='' ){
|
|
|
html += fnAddTitlePopRow(strTitle);
|
|
html += fnAddTitlePopRow(strTitle);
|
|
|
}
|
|
}
|
|
|
- if(imgPath!=null && imgPath!='null' && imgPath!='' ){
|
|
|
|
|
- html += fnAddImgPopRow(imgPath);
|
|
|
|
|
|
|
+ if(contentsLoc!='SGNB001'){
|
|
|
|
|
+ if(imgPath!=null && imgPath!='null' && imgPath!='' ){
|
|
|
|
|
+ html += fnAddImgPopRow(imgPath);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if(strVar!=null && strVar!='null' && strVar!='' ){
|
|
if(strVar!=null && strVar!='null' && strVar!='' ){
|
|
|
html += fnAddLinkPopRow(strVar);
|
|
html += fnAddLinkPopRow(strVar);
|
|
@@ -322,15 +358,39 @@
|
|
|
if(cateType=='OPEN'){
|
|
if(cateType=='OPEN'){
|
|
|
$(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").show();
|
|
$(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").show();
|
|
|
$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").show();
|
|
$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").show();
|
|
|
- $(obj).closest("table").find("[name=tabTextColorRow"+idx+"]").hide();
|
|
|
|
|
|
|
+ $(obj).closest("table").find("[id=openBanner0]").show();
|
|
|
|
|
+ $(obj).closest("table").find("[id=openBanner1]").show();
|
|
|
|
|
+ $(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'){
|
|
}else if(cateType=='IMG'){
|
|
|
- $(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").hide();
|
|
|
|
|
|
|
+ $(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").show();
|
|
|
$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").hide();
|
|
$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").hide();
|
|
|
- $(obj).closest("table").find("[name=tabTextColorRow"+idx+"]").hide();
|
|
|
|
|
|
|
+ $(obj).closest("table").find("[id=openBanner0]").show();
|
|
|
|
|
+ $(obj).closest("table").find("[id=openBanner1]").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");
|
|
|
}else if(cateType=='TEXT'){
|
|
}else if(cateType=='TEXT'){
|
|
|
- $(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").show();
|
|
|
|
|
|
|
+ $(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").hide();
|
|
|
$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").hide();
|
|
$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").hide();
|
|
|
- $(obj).closest("table").find("[name=tabTextColorRow"+idx+"]").show();
|
|
|
|
|
|
|
+ $(obj).closest("table").find("[id=openBanner0]").hide();
|
|
|
|
|
+ $(obj).closest("table").find("[id=openBanner1]").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");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -382,7 +442,7 @@
|
|
|
if(contentsLoc=='SBM005' || contentsLoc=='SBMM005'){
|
|
if(contentsLoc=='SBM005' || contentsLoc=='SBMM005'){
|
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddBrandDescRow(this);">브랜드소개추가</button>';
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddBrandDescRow(this);">브랜드소개추가</button>';
|
|
|
}
|
|
}
|
|
|
- if(contentsLoc!='SBM005' && contentsLoc!='SBMM005') {
|
|
|
|
|
|
|
+ if(contentsLoc!='SBM005' && contentsLoc!='SBMM005' && contentsLoc!='SGNB001') {
|
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddImgPopRow(this);">이미지추가</button>';
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddImgPopRow(this);">이미지추가</button>';
|
|
|
}
|
|
}
|
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddLinkPopRow(this);">링크추가</button>';
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddLinkPopRow(this);">링크추가</button>';
|
|
@@ -398,14 +458,48 @@
|
|
|
html += ' <label class="rdoBtn"><input type="radio" name="cateType'+dataIdx+'" value="TEXT" onclick="fnChangeGnbCateType(this,'+dataIdx+');"/>텍스트배너</label>';
|
|
html += ' <label class="rdoBtn"><input type="radio" name="cateType'+dataIdx+'" value="TEXT" onclick="fnChangeGnbCateType(this,'+dataIdx+');"/>텍스트배너</label>';
|
|
|
html += ' </td>';
|
|
html += ' </td>';
|
|
|
html += '</tr>';
|
|
html += '</tr>';
|
|
|
|
|
+
|
|
|
|
|
+ var src = '';
|
|
|
|
|
+ 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 type="hidden" name="imgPath" value=""/>';
|
|
|
|
|
+ html += ' <input type="hidden" name="newImgFile" value="" />';
|
|
|
|
|
+ html += ' </div>';
|
|
|
|
|
+ html += ' <div id="imgViewPop_0" 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 += ' </div></td>';
|
|
|
|
|
+ html += '</tr>';
|
|
|
|
|
+
|
|
|
|
|
+ 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 type="hidden" name="imgPath" value=""/>';
|
|
|
|
|
+ html += ' <input type="hidden" name="newImgFile" value="" />';
|
|
|
|
|
+ html += ' </div>';
|
|
|
|
|
+ html += ' <div id="imgViewPop_1" 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 += ' </div></td>';
|
|
|
|
|
+ html += '</tr>';
|
|
|
|
|
+
|
|
|
html += ' <tr name="tabBgColorRow'+dataIdx+'">';
|
|
html += ' <tr name="tabBgColorRow'+dataIdx+'">';
|
|
|
html += ' <th>배경 RGB코드</th>';
|
|
html += ' <th>배경 RGB코드</th>';
|
|
|
html += ' <td><input name="gnbBgColor'+dataIdx+'" type="text" maxlength="200" data-valid-name="배경 RGB코드" value=""/></td>';
|
|
html += ' <td><input name="gnbBgColor'+dataIdx+'" type="text" maxlength="200" data-valid-name="배경 RGB코드" value=""/></td>';
|
|
|
html += ' </tr>';
|
|
html += ' </tr>';
|
|
|
- html += ' <tr name="tabTextColorRow'+dataIdx+'" style="display:none;">';
|
|
|
|
|
- html += ' <th>텍스트 RGB코드</th>';
|
|
|
|
|
- html += ' <td><input name="gnbTextColor'+dataIdx+'" type="text" maxlength="200" data-valid-name="텍스트 RGB코드" value=""/></td>';
|
|
|
|
|
- html += ' </tr>';
|
|
|
|
|
html += ' <tr name="tabShowYnRow'+dataIdx+'">';
|
|
html += ' <tr name="tabShowYnRow'+dataIdx+'">';
|
|
|
html += ' <th>오늘하루 보지않기<br>노출여부</th>';
|
|
html += ' <th>오늘하루 보지않기<br>노출여부</th>';
|
|
|
html += ' <td>';
|
|
html += ' <td>';
|
|
@@ -457,42 +551,19 @@
|
|
|
html += ' <label class="rdoBtn"><input type="radio" name="bannerType'+dataIdx+'" value="2" >2단</label>';
|
|
html += ' <label class="rdoBtn"><input type="radio" name="bannerType'+dataIdx+'" value="2" >2단</label>';
|
|
|
html += ' </td>';
|
|
html += ' </td>';
|
|
|
html += '</tr>';
|
|
html += '</tr>';
|
|
|
- /*html += '<tr id="bannerImgTr1" name="imgPopRow" style="display: none;">';
|
|
|
|
|
- html += ' <th>이미지1</th>';
|
|
|
|
|
- html += ' <td>';
|
|
|
|
|
- html += ' <div id="ImageArea1" style="height:33px;">';
|
|
|
|
|
- html += ' <span className="uFile w300">';
|
|
|
|
|
- html += ' <input id="file_1" name="file" type="file" className="uFileInput w300" data-valid-name="이미지파일" onChange="fnPopFileUpload(this, 1)"/>';
|
|
|
|
|
- html += ' <label htmlFor="file_1" className="uFileLabel"></label>';
|
|
|
|
|
- html += ' <input type="hidden" name="imgPath" value=""/>';
|
|
|
|
|
- html += ' <input type="hidden" name="newImgFile" value="" />';
|
|
|
|
|
- html += ' </span>';
|
|
|
|
|
- html += ' <span className="memAdd off" id="imgFileNm1"></span>';
|
|
|
|
|
- html += ' </div>';
|
|
|
|
|
- html += ' </td>';
|
|
|
|
|
- html += '</tr>';
|
|
|
|
|
- html += '<tr id="bannerLinkTr1" name="linkRow" style="display: none;">';
|
|
|
|
|
- html += ' <th>링크1</th>';
|
|
|
|
|
- html += ' <td><input type="text" class="w400" name="linkUrl" maxlength="300" required="required" data-valid-name="LINK" value="#"/></td>';
|
|
|
|
|
- html += '</tr>';
|
|
|
|
|
- html += '<tr id="bannerImgTr2" name="imgPopRow" style="display: none;">';
|
|
|
|
|
- html += ' <th>이미지2</th>';
|
|
|
|
|
- html += ' <td>';
|
|
|
|
|
- html += ' <div id="ImageArea2" style="height:33px;">';
|
|
|
|
|
- html += ' <span className="uFile w300">';
|
|
|
|
|
- html += ' <input id="file_2" name="file" type="file" className="uFileInput w300" data-valid-name="이미지파일" onChange="fnPopFileUpload(this, 2)"/>';
|
|
|
|
|
- html += ' <label htmlFor="file_2" className="uFileLabel"></label>';
|
|
|
|
|
- html += ' <input type="hidden" name="imgPath" value=""/>';
|
|
|
|
|
- html += ' <input type="hidden" name="newImgFile" value="" />';
|
|
|
|
|
- html += ' </span>';
|
|
|
|
|
- html += ' <span className="memAdd off" id="imgFileNm2"></span>';
|
|
|
|
|
- html += ' </div>';
|
|
|
|
|
- html += ' </td>';
|
|
|
|
|
- html += '</tr>';
|
|
|
|
|
- html += '<tr id="bannerLinkTr2" name="linkRow" style="display: none;">';
|
|
|
|
|
- html += ' <th>링크2</th>';
|
|
|
|
|
- html += ' <td><input type="text" class="w400" name="linkUrl" maxlength="300" required="required" data-valid-name="LINK" value="#"/></td>';
|
|
|
|
|
- html += '</tr>';*/
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if(contentsLoc=='STAB003'){
|
|
|
|
|
+ html += ' <tr name="tabCateRow">';
|
|
|
|
|
+ html += ' <th>카테고리</th>';
|
|
|
|
|
+ html += ' <td colspan="3">카테고리선택';
|
|
|
|
|
+ html += ' <select name="cate1List">';
|
|
|
|
|
+ html += ' <option value="">[선택]</option>';
|
|
|
|
|
+ for(let i=0; i<cate1List.length; i++){
|
|
|
|
|
+ html += '<option value="'+cate1List[i].cd+'">['+cate1List[i].cd+'] '+cate1List[i].cdNm+'</option>';
|
|
|
|
|
+ }
|
|
|
|
|
+ html += ' </select>';
|
|
|
|
|
+ html += ' </td>';
|
|
|
|
|
+ html += ' </tr>';
|
|
|
}
|
|
}
|
|
|
html += '</thead><tbody>';
|
|
html += '</thead><tbody>';
|
|
|
html += '</tbody></table>';
|
|
html += '</tbody></table>';
|
|
@@ -547,40 +618,6 @@
|
|
|
$("#mcTable"+tableDataId+" .planArea").find("input[name=planSq"+tableDataId+"]").val(result[0].planSq);
|
|
$("#mcTable"+tableDataId+" .planArea").find("input[name=planSq"+tableDataId+"]").val(result[0].planSq);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // SMM005 데이터 validation 체크
|
|
|
|
|
- /*function smm005DataValidation(){
|
|
|
|
|
- $(".mcTable").each(function(i){
|
|
|
|
|
- var thisIdx = $(this).find("input[name=tableIdx]").val();
|
|
|
|
|
- var contentsType = $(this).find("input:radio[name=bannerType"+thisIdx+"]:checked").val();
|
|
|
|
|
-
|
|
|
|
|
- var imgPath1 = $(this).find("[id=ImageArea1]").find("input[name=imgPath]").val();
|
|
|
|
|
- var imgPath2 = $(this).find("[id=ImageArea2]").find("input[name=imgPath]").val();
|
|
|
|
|
- var link1 = $(this).find("[id=bannerLinkTr1]").find("input[name=linkUrl]").val();
|
|
|
|
|
- var link2 = $(this).find("[id=bannerLinkTr2]").find("input[name=linkUrl]").val();
|
|
|
|
|
-
|
|
|
|
|
- if(gagajf.isNull(imgPath1)){
|
|
|
|
|
- mcxDialog.alert('배너1 이미지를 선택해주세요.');
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if(gagajf.isNull(link1)){
|
|
|
|
|
- mcxDialog.alert('배너1 링크를 선택해주세요.');
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(contentsType==2){
|
|
|
|
|
- if(gagajf.isNull(imgPath2)){
|
|
|
|
|
- mcxDialog.alert('배너2 이미지를 선택해주세요.');
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if(gagajf.isNull(link2)){
|
|
|
|
|
- mcxDialog.alert('배너2 링크를 선택해주세요.');
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return true;
|
|
|
|
|
- }*/
|
|
|
|
|
-
|
|
|
|
|
// SMM001 데이터 validation 체크
|
|
// SMM001 데이터 validation 체크
|
|
|
function smm001DataValidation(){
|
|
function smm001DataValidation(){
|
|
|
$(".mcTable").each(function(i){
|
|
$(".mcTable").each(function(i){
|
|
@@ -607,6 +644,20 @@
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // STAB003 데이터 validation 체크
|
|
|
|
|
+ function stab003DataValidation(){
|
|
|
|
|
+ $(".mcTable").each(function(i){
|
|
|
|
|
+ var cateValue = $(this).find("tr[name=tabCateRow]").find("select[name=cate1List] option:selected").val();
|
|
|
|
|
+ console.log('cateValue::'+cateValue);
|
|
|
|
|
+ if(gagajf.isNull(cateValue)){
|
|
|
|
|
+ mcxDialog.alert('적용할 카테고리를 선택해주세요.');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 임시저장
|
|
* 임시저장
|
|
|
*/
|
|
*/
|
|
@@ -622,11 +673,11 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /*if(contentsLoc=='SMM005'){
|
|
|
|
|
- if(!smm005DataValidation()){
|
|
|
|
|
|
|
+ if(contentsLoc=='STAB003'){
|
|
|
|
|
+ if(!stab003DataValidation()){
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- }*/
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
var titleBool = true;
|
|
var titleBool = true;
|
|
|
$("#popSortable").find('input[name=title]').each(function(idx, title) {
|
|
$("#popSortable").find('input[name=title]').each(function(idx, title) {
|
|
@@ -719,10 +770,6 @@
|
|
|
if(contentsLoc=='SMM005'){
|
|
if(contentsLoc=='SMM005'){
|
|
|
var thisIdx = $(this).find("input[name=tableIdx]").val();
|
|
var thisIdx = $(this).find("input[name=tableIdx]").val();
|
|
|
contentsType = $(this).find("input:radio[name=bannerType"+thisIdx+"]:checked").val();
|
|
contentsType = $(this).find("input:radio[name=bannerType"+thisIdx+"]:checked").val();
|
|
|
- /*imgPath1 = $(this).find("#ImageArea1").find("input[name=imgPath]").val();
|
|
|
|
|
- strVar1 = $(this).find("#bannerLinkTr1").find("input[name=linkUrl]").val();
|
|
|
|
|
- imgPath2 = $(this).find("#ImageArea2").find("input[name=imgPath]").val();
|
|
|
|
|
- strVar2 = $(this).find("#bannerLinkTr2").find("input[name=linkUrl]").val();*/
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(contentsLoc=='SCM002' || contentsLoc=='SCM003'){
|
|
if(contentsLoc=='SCM002' || contentsLoc=='SCM003'){
|
|
@@ -732,6 +779,11 @@
|
|
|
strVar1 = $(this).find("input:radio[name=dispCnt]:checked").val();
|
|
strVar1 = $(this).find("input:radio[name=dispCnt]:checked").val();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if(contentsLoc=='STAB003'){
|
|
|
|
|
+ var cateValue = $(this).find("tr[name=tabCateRow]").find("select[name=cate1List] option:selected").val();
|
|
|
|
|
+ contentsType = cateValue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
var data = {cateNo : cateNo
|
|
var data = {cateNo : cateNo
|
|
|
, contentsLoc : contentsLoc
|
|
, contentsLoc : contentsLoc
|
|
|
, contentsType : contentsType
|
|
, contentsType : contentsType
|