|
@@ -168,9 +168,7 @@
|
|
|
if(contentsLoc!='SMM005' && contentsLoc!='SBM005' && contentsLoc!='SBMM005'){
|
|
if(contentsLoc!='SMM005' && contentsLoc!='SBM005' && contentsLoc!='SBMM005'){
|
|
|
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>';
|
|
|
}
|
|
}
|
|
|
- if(contentsLoc!='SMM005') {
|
|
|
|
|
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>';
|
|
@@ -240,15 +238,19 @@
|
|
|
html += '</tr>';
|
|
html += '</tr>';
|
|
|
}
|
|
}
|
|
|
if(contentsLoc=='SMM005'){
|
|
if(contentsLoc=='SMM005'){
|
|
|
- if(contentsLoc=='SMM005'){
|
|
|
|
|
html += '<tr>';
|
|
html += '<tr>';
|
|
|
html += ' <th>배너유형</th>';
|
|
html += ' <th>배너유형</th>';
|
|
|
html += ' <td class="bannerArea" id="bannerArea'+i+'">';
|
|
html += ' <td class="bannerArea" id="bannerArea'+i+'">';
|
|
|
- html += ' <label class="rdoBtn"><input type="radio" name="bannerType'+i+'" value="1" onclick="fnChangeBannerType(this,1);">1단</label>';
|
|
|
|
|
- html += ' <label class="rdoBtn"><input type="radio" name="bannerType'+i+'" value="2" onclick="fnChangeBannerType(this,2);">2단</label>';
|
|
|
|
|
|
|
+ if(result[i].contentsType=='1'){
|
|
|
|
|
+ html += ' <label class="rdoBtn"><input type="radio" name="bannerType'+i+'" value="1" checked="checked">1단</label>';
|
|
|
|
|
+ html += ' <label class="rdoBtn"><input type="radio" name="bannerType'+i+'" value="2" >2단</label>';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ html += ' <label class="rdoBtn"><input type="radio" name="bannerType'+i+'" value="1" >1단</label>';
|
|
|
|
|
+ html += ' <label class="rdoBtn"><input type="radio" name="bannerType'+i+'" value="2" checked="checked">2단</label>';
|
|
|
|
|
+ }
|
|
|
html += ' </td>';
|
|
html += ' </td>';
|
|
|
html += '</tr>';
|
|
html += '</tr>';
|
|
|
- html += '<tr id="bannerImgTr1" name="imgPopRow">';
|
|
|
|
|
|
|
+ /*html += '<tr id="bannerImgTr1" name="imgPopRow">';
|
|
|
html += ' <th>이미지1</th>';
|
|
html += ' <th>이미지1</th>';
|
|
|
html += ' <td>';
|
|
html += ' <td>';
|
|
|
html += ' <div id="ImageArea1" style="height:33px;">';
|
|
html += ' <div id="ImageArea1" style="height:33px;">';
|
|
@@ -285,8 +287,7 @@
|
|
|
html += ' <th>링크2</th>';
|
|
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 += ' <td><input type="text" class="w400" name="linkUrl" maxlength="300" required="required" data-valid-name="LINK" value="'+result[i].strVar2+'"/></td>';
|
|
|
html += '</tr>';
|
|
html += '</tr>';
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
}
|
|
}
|
|
|
html += '</thead><tbody>';
|
|
html += '</thead><tbody>';
|
|
|
if(contentsLoc!='SCM002' && contentsLoc!='SCM003'){
|
|
if(contentsLoc!='SCM002' && contentsLoc!='SCM003'){
|
|
@@ -372,12 +373,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!='SBM005' && contentsLoc!='SBMM005') {
|
|
|
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>';
|
|
|
}
|
|
}
|
|
|
- if(contentsLoc!='SMM005') {
|
|
|
|
|
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>';
|
|
@@ -420,11 +419,11 @@
|
|
|
html += '<tr>';
|
|
html += '<tr>';
|
|
|
html += ' <th>배너유형</th>';
|
|
html += ' <th>배너유형</th>';
|
|
|
html += ' <td class="bannerArea" id="bannerArea'+dataIdx+'">';
|
|
html += ' <td class="bannerArea" id="bannerArea'+dataIdx+'">';
|
|
|
- html += ' <label class="rdoBtn"><input type="radio" name="bannerType'+dataIdx+'" value="1" onclick="fnChangeBannerType(this,1);">1단</label>';
|
|
|
|
|
- html += ' <label class="rdoBtn"><input type="radio" name="bannerType'+dataIdx+'" value="2" onclick="fnChangeBannerType(this,2);">2단</label>';
|
|
|
|
|
|
|
+ html += ' <label class="rdoBtn"><input type="radio" name="bannerType'+dataIdx+'" value="1" checked="checked">1단</label>'; /*onclick="fnChangeBannerType(this,1);"*/
|
|
|
|
|
+ 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 += '<tr id="bannerImgTr1" name="imgPopRow" style="display: none;">';
|
|
|
html += ' <th>이미지1</th>';
|
|
html += ' <th>이미지1</th>';
|
|
|
html += ' <td>';
|
|
html += ' <td>';
|
|
|
html += ' <div id="ImageArea1" style="height:33px;">';
|
|
html += ' <div id="ImageArea1" style="height:33px;">';
|
|
@@ -459,7 +458,7 @@
|
|
|
html += '<tr id="bannerLinkTr2" name="linkRow" style="display: none;">';
|
|
html += '<tr id="bannerLinkTr2" name="linkRow" style="display: none;">';
|
|
|
html += ' <th>링크2</th>';
|
|
html += ' <th>링크2</th>';
|
|
|
html += ' <td><input type="text" class="w400" name="linkUrl" maxlength="300" required="required" data-valid-name="LINK" value="#"/></td>';
|
|
html += ' <td><input type="text" class="w400" name="linkUrl" maxlength="300" required="required" data-valid-name="LINK" value="#"/></td>';
|
|
|
- html += '</tr>';
|
|
|
|
|
|
|
+ html += '</tr>';*/
|
|
|
}
|
|
}
|
|
|
html += '</thead><tbody>';
|
|
html += '</thead><tbody>';
|
|
|
html += '</tbody></table>';
|
|
html += '</tbody></table>';
|
|
@@ -503,11 +502,6 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // SMM005 배너유형 이미지/링크
|
|
|
|
|
- var fnAddSmm005ImgRow = function (param , idx){
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// 몰메인>메인롤링배너 기획전 조회
|
|
// 몰메인>메인롤링배너 기획전 조회
|
|
|
var tableDataId = 0;
|
|
var tableDataId = 0;
|
|
|
var fnSearchPlan = function (idx){
|
|
var fnSearchPlan = function (idx){
|
|
@@ -520,7 +514,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// SMM005 데이터 validation 체크
|
|
// SMM005 데이터 validation 체크
|
|
|
- function smm005DataValidation(){
|
|
|
|
|
|
|
+ /*function smm005DataValidation(){
|
|
|
$(".mcTable").each(function(i){
|
|
$(".mcTable").each(function(i){
|
|
|
var thisIdx = $(this).find("input[name=tableIdx]").val();
|
|
var thisIdx = $(this).find("input[name=tableIdx]").val();
|
|
|
var contentsType = $(this).find("input:radio[name=bannerType"+thisIdx+"]:checked").val();
|
|
var contentsType = $(this).find("input:radio[name=bannerType"+thisIdx+"]:checked").val();
|
|
@@ -551,7 +545,7 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
return true;
|
|
return true;
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
|
|
// SMM001 데이터 validation 체크
|
|
// SMM001 데이터 validation 체크
|
|
|
function smm001DataValidation(){
|
|
function smm001DataValidation(){
|
|
@@ -602,11 +596,11 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(contentsLoc=='SMM005'){
|
|
|
|
|
|
|
+ /*if(contentsLoc=='SMM005'){
|
|
|
if(!smm005DataValidation()){
|
|
if(!smm005DataValidation()){
|
|
|
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) {
|
|
@@ -690,11 +684,11 @@
|
|
|
|
|
|
|
|
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=bannerType1"+thisIdx+"]:checked").val();
|
|
|
|
|
- imgPath1 = $(this).find("#ImageArea1").find("input[name=imgPath]").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();
|
|
strVar1 = $(this).find("#bannerLinkTr1").find("input[name=linkUrl]").val();
|
|
|
imgPath2 = $(this).find("#ImageArea2").find("input[name=imgPath]").val();
|
|
imgPath2 = $(this).find("#ImageArea2").find("input[name=imgPath]").val();
|
|
|
- strVar2 = $(this).find("#bannerLinkTr2").find("input[name=linkUrl]").val();
|
|
|
|
|
|
|
+ strVar2 = $(this).find("#bannerLinkTr2").find("input[name=linkUrl]").val();*/
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(contentsLoc=='SCM002' || contentsLoc=='SCM003'){
|
|
if(contentsLoc=='SCM002' || contentsLoc=='SCM003'){
|
|
@@ -831,10 +825,18 @@
|
|
|
html += '<td class="aL"><button type="button" class="btn icn" onclick="fnDeleteTrRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button></td>';
|
|
html += '<td class="aL"><button type="button" class="btn icn" onclick="fnDeleteTrRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button></td>';
|
|
|
html += '</tr>';
|
|
html += '</tr>';
|
|
|
if(typeof param == 'object'){
|
|
if(typeof param == 'object'){
|
|
|
- if($(param).closest("table").find("tbody").find("tr[name=linkPopRow]").length>3){
|
|
|
|
|
- mcxDialog.alert("링크는 4개까지 등록 가능합니다");
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ if(contentsLoc=='SMM005'){
|
|
|
|
|
+ if($(param).closest("table").find("tbody").find("tr[name=linkPopRow]").length>1){
|
|
|
|
|
+ mcxDialog.alert("링크는 최대 2개까지 등록 가능합니다");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if($(param).closest("table").find("tbody").find("tr[name=linkPopRow]").length>3){
|
|
|
|
|
+ mcxDialog.alert("링크는 4개까지 등록 가능합니다");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
$(param).closest("table").find("tbody").append(html);
|
|
$(param).closest("table").find("tbody").append(html);
|
|
|
}else{
|
|
}else{
|
|
|
return html;
|
|
return html;
|
|
@@ -914,9 +916,16 @@
|
|
|
html += '<td class="aL"><button type="button" class="btn icn" onclick="fnDeleteTrRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button></td>';
|
|
html += '<td class="aL"><button type="button" class="btn icn" onclick="fnDeleteTrRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button></td>';
|
|
|
html += '</tr>';
|
|
html += '</tr>';
|
|
|
if(typeof param == 'object'){
|
|
if(typeof param == 'object'){
|
|
|
- if($(param).closest("table").find("tbody").find("tr[name=imgPopRow]").length>3){
|
|
|
|
|
- mcxDialog.alert("이미지는 4개까지 등록 가능합니다");
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ if(contentsLoc=='SMM005'){
|
|
|
|
|
+ if($(param).closest("table").find("tbody").find("tr[name=imgPopRow]").length>1){
|
|
|
|
|
+ mcxDialog.alert("이미지는 최대 2개까지 등록 가능합니다");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if($(param).closest("table").find("tbody").find("tr[name=imgPopRow]").length>3){
|
|
|
|
|
+ mcxDialog.alert("이미지는 4개까지 등록 가능합니다");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
imgIndex++;
|
|
imgIndex++;
|
|
|
$(param).closest("table").find("tbody").append(html);
|
|
$(param).closest("table").find("tbody").append(html);
|