|
@@ -92,7 +92,7 @@
|
|
|
<!-- //리스트 영역 -->
|
|
<!-- //리스트 영역 -->
|
|
|
<!-- 등록/수정 -->
|
|
<!-- 등록/수정 -->
|
|
|
<div class="panelStyle">
|
|
<div class="panelStyle">
|
|
|
- <form id="detailForm" name="detailForm" action="#" th:action="@{'/display/brand/save'}">
|
|
|
|
|
|
|
+ <form id="detailForm" name="detailForm" action="#" >
|
|
|
<table class="frmStyle">
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
<colgroup>
|
|
|
<col style="width:10%;"/>
|
|
<col style="width:10%;"/>
|
|
@@ -113,9 +113,9 @@
|
|
|
</td>
|
|
</td>
|
|
|
<th>동영상구분<em class="required" title="필수"></em></th>
|
|
<th>동영상구분<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
<td>
|
|
|
- <select name="videoGb" id="videoGb" required="required" data-valid-name="동영상구분" onchange="">
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- <option value="Y">[Y] 유투브</option>
|
|
|
|
|
|
|
+ <select name="videoGb" id="videoGb" required="required" data-valid-name="동영상구분" onchange="fnVideoGb();">
|
|
|
|
|
+ <!-- <option value="">[선택]</option> -->
|
|
|
|
|
+ <option value="Y" selected="selected">[Y] 유투브</option>
|
|
|
<option value="M">[M] MP4</option>
|
|
<option value="M">[M] MP4</option>
|
|
|
</select>
|
|
</select>
|
|
|
</td>
|
|
</td>
|
|
@@ -125,14 +125,27 @@
|
|
|
<label class="rdoBtn"><input type="radio" name="dispYn" id="dispYn" value="N">N</label>
|
|
<label class="rdoBtn"><input type="radio" name="dispYn" id="dispYn" value="N">N</label>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
- <tr>
|
|
|
|
|
|
|
+ <tr id="youtobeArea">
|
|
|
<th>동영상URL<em class="required" title="필수"></em></th>
|
|
<th>동영상URL<em class="required" title="필수"></em></th>
|
|
|
<td class="infoTxt" colspan="5">
|
|
<td class="infoTxt" colspan="5">
|
|
|
<em><i class="fa fa-info-circle"></i>유투브의 경우 빨간색 표시로 되어있는 값만 넣으세요.</em><br/>
|
|
<em><i class="fa fa-info-circle"></i>유투브의 경우 빨간색 표시로 되어있는 값만 넣으세요.</em><br/>
|
|
|
예시 : https://www.youtube.com/embed/<em><strong>5YqYG71bQ3s</strong></em>?showinfo=0&rel=0&vp=hd1080&fs=0&wmode=opaque&enablejsapi=1
|
|
예시 : https://www.youtube.com/embed/<em><strong>5YqYG71bQ3s</strong></em>?showinfo=0&rel=0&vp=hd1080&fs=0&wmode=opaque&enablejsapi=1
|
|
|
<br/>
|
|
<br/>
|
|
|
- <input type="text" class="w400" id="videoVal" name="videoVal" maxlength="100" required="required" data-valid-name="동영상URL">
|
|
|
|
|
- <button type="button" class="btn btn-dark btn-lg" onclick="cfnOpenGoodsVideoPopup('filmVideoView','videoVal', '#detailForm', $('#videoGb').val());">미리보기</button>
|
|
|
|
|
|
|
+ <input type="text" class="w400" id="kmcKey" name="kmcKey" maxlength="100" >
|
|
|
|
|
+ <button type="button" class="btn btn-dark btn-lg" onclick="cfnOpenGoodsVideoPopup('filmVideoView','kmcKey', '#detailForm', $('#videoGb').val());">미리보기</button>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr id="fileArea" style="display:none;">
|
|
|
|
|
+ <th>파일첨부<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td class="infoTxt" colspan="5">
|
|
|
|
|
+ <div class="uFile w300">
|
|
|
|
|
+ <input id="file" name="file" type="file" class="uFileInput w300"/>
|
|
|
|
|
+ <label for="file" class="uFileLabel">파일선택</label>
|
|
|
|
|
+ <input type="hidden" name="kufKey"/>
|
|
|
|
|
+ <input type="hidden" name="kmcKey"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button type="button" class="btn btn-dark btn-lg" onclick="cfnOpenGoodsVideoPopup('filmVideoView','kmcKey', '#detailForm', $('#videoGb').val());">미리보기</button>
|
|
|
|
|
+
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</table>
|
|
</table>
|
|
@@ -145,7 +158,7 @@
|
|
|
</form>
|
|
</form>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.kollus.js"></script>
|
|
|
<script th:inline="javascript">
|
|
<script th:inline="javascript">
|
|
|
/*<![CDATA[*/
|
|
/*<![CDATA[*/
|
|
|
var videoGbList = {'Y':'유투브', 'M':'MP4'};
|
|
var videoGbList = {'Y':'유투브', 'M':'MP4'};
|
|
@@ -163,7 +176,7 @@
|
|
|
{headerName: "동영상구분", field: "videoGb", width: 100, cellClass: 'text-center',
|
|
{headerName: "동영상구분", field: "videoGb", width: 100, cellClass: 'text-center',
|
|
|
cellRenderer: function (params) { return !gagajf.isNull(params.value) ? "["+params.value+"] "+gagaAgGrid.lookupValue(videoGbList, params.value) : '';}
|
|
cellRenderer: function (params) { return !gagajf.isNull(params.value) ? "["+params.value+"] "+gagaAgGrid.lookupValue(videoGbList, params.value) : '';}
|
|
|
},
|
|
},
|
|
|
- {headerName: "동영상정보", field: "videoVal", width: 300, cellClass: 'text-center'},
|
|
|
|
|
|
|
+ {headerName: "동영상정보", field: "kmcKey", width: 300, cellClass: 'text-center'},
|
|
|
{headerName: "노출여부", field: "dispYn", width: 80, cellClass: 'text-center'},
|
|
{headerName: "노출여부", field: "dispYn", width: 80, cellClass: 'text-center'},
|
|
|
{headerName: "등록일자", field: "regDt", width: 150, cellClass: 'text-center',
|
|
{headerName: "등록일자", field: "regDt", width: 150, cellClass: 'text-center',
|
|
|
cellRenderer: function(params) {
|
|
cellRenderer: function(params) {
|
|
@@ -192,7 +205,7 @@
|
|
|
$(formId + " input[name=videoSq]").val(event.data.videoSq);
|
|
$(formId + " input[name=videoSq]").val(event.data.videoSq);
|
|
|
$(formId + " input[name=goodsCd]").val(event.data.goodsCd);
|
|
$(formId + " input[name=goodsCd]").val(event.data.goodsCd);
|
|
|
$(formId + " select[name=videoGb]").val(event.data.videoGb);
|
|
$(formId + " select[name=videoGb]").val(event.data.videoGb);
|
|
|
- $(formId + " input[name=videoVal]").val(event.data.videoVal);
|
|
|
|
|
|
|
+ $(formId + " input[name=kmcKey]").val(event.data.kmcKey);
|
|
|
$(formId + " input:radio[name=dispYn]:input[value="+event.data.dispYn+"]").click();
|
|
$(formId + " input:radio[name=dispYn]:input[value="+event.data.dispYn+"]").click();
|
|
|
$(formId + " input[name=goodsCd]").prop("disabled", true);
|
|
$(formId + " input[name=goodsCd]").prop("disabled", true);
|
|
|
$(formId).closest("div").show();
|
|
$(formId).closest("div").show();
|
|
@@ -204,6 +217,8 @@
|
|
|
$("#detailForm")[0].reset();
|
|
$("#detailForm")[0].reset();
|
|
|
$("#detailForm input[name=videoSq]").val('');
|
|
$("#detailForm input[name=videoSq]").val('');
|
|
|
$("#detailForm input[name=goodsCd]").prop("disabled", false);
|
|
$("#detailForm input[name=goodsCd]").prop("disabled", false);
|
|
|
|
|
+ $('#youtobeArea').show();
|
|
|
|
|
+ $('#fileArea').hide();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 엑셀등록
|
|
// 엑셀등록
|
|
@@ -218,6 +233,17 @@
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 동영상구분 변경시
|
|
|
|
|
+ var fnVideoGb = function(){debugger;
|
|
|
|
|
+ if ("Y" == $("#detailForm select[name=videoGb]").val()){
|
|
|
|
|
+ $('#youtobeArea').show();
|
|
|
|
|
+ $('#fileArea').hide();
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $('#youtobeArea').hide();
|
|
|
|
|
+ $('#fileArea').show();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 조회
|
|
// 조회
|
|
|
$('#btnSearch').on('click', function() {
|
|
$('#btnSearch').on('click', function() {
|
|
|
$("#goodsCd").val('');
|
|
$("#goodsCd").val('');
|
|
@@ -261,12 +287,13 @@
|
|
|
|
|
|
|
|
var formId = '#detailForm';
|
|
var formId = '#detailForm';
|
|
|
var videoSq = $(formId + " input[name=videoSq]").val();
|
|
var videoSq = $(formId + " input[name=videoSq]").val();
|
|
|
- var displocVal = $(formId + " input[name=goodsCd]").val();
|
|
|
|
|
|
|
+ var goodsCd = $(formId + " input[name=goodsCd]").val();
|
|
|
var videoGb = $(formId + " select[name=videoGb]").val();
|
|
var videoGb = $(formId + " select[name=videoGb]").val();
|
|
|
- var videoVal = $(formId + " input[name=videoVal]").val();
|
|
|
|
|
|
|
+ var kmcKey = $(formId + " input[name=kmcKey]").val();
|
|
|
var dispYn = $(formId + " input:radio[name=dispYn]:checked").val();
|
|
var dispYn = $(formId + " input:radio[name=dispYn]:checked").val();
|
|
|
|
|
+ var kufKey = $(formId + " input[name=kufKey]").val();
|
|
|
|
|
|
|
|
- if(displocVal==''){
|
|
|
|
|
|
|
+ if(goodsCd==''){
|
|
|
gagajf.alertMessage(formId + " input[name=goodsCd]", 'input');
|
|
gagajf.alertMessage(formId + " input[name=goodsCd]", 'input');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -274,21 +301,14 @@
|
|
|
gagajf.alertMessage(formId + " select[name=videoGb]", 'select');
|
|
gagajf.alertMessage(formId + " select[name=videoGb]", 'select');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if(videoVal==''){
|
|
|
|
|
- gagajf.alertMessage(formId + " input[name=videoVal]", 'input');
|
|
|
|
|
|
|
+ if(kmcKey==''){
|
|
|
|
|
+ gagajf.alertMessage(formId + " input[name=kmcKey]", 'input');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(videoVal.indexOf("http")>-1){
|
|
|
|
|
- if(videoGb=='Y'){
|
|
|
|
|
- mcxDialog.alert('동영상URL 형식이 유투브와 맞지 않습니다.');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- }else{
|
|
|
|
|
- if(videoGb=='M'){
|
|
|
|
|
- mcxDialog.alert('동영상URL 형식이 MP4와 맞지 않습니다.');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if(kmcKey.indexOf("http")>-1){
|
|
|
|
|
+ mcxDialog.alert('동영상 정보를 확인해 주세요.');
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
mcxDialog.confirm('저장 하시겠습니까?', {
|
|
mcxDialog.confirm('저장 하시겠습니까?', {
|
|
@@ -296,10 +316,10 @@
|
|
|
sureBtnText: "확인",
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function(){
|
|
sureBtnClick: function(){
|
|
|
var data = {videoSq : videoSq
|
|
var data = {videoSq : videoSq
|
|
|
- ,displocGb : 'G'
|
|
|
|
|
- ,displocValArr : [displocVal]
|
|
|
|
|
|
|
+ ,goodsCd : goodsCd
|
|
|
,videoGb : videoGb
|
|
,videoGb : videoGb
|
|
|
- ,videoVal : videoVal
|
|
|
|
|
|
|
+ ,kmcKey : kmcKey
|
|
|
|
|
+ ,kufKey : kufKey
|
|
|
,dispYn : dispYn
|
|
,dispYn : dispYn
|
|
|
};
|
|
};
|
|
|
var jsonData = JSON.stringify(data);
|
|
var jsonData = JSON.stringify(data);
|
|
@@ -312,6 +332,12 @@
|
|
|
$('#btnSearch').click();
|
|
$('#btnSearch').click();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 동영상파일 선택 시
|
|
|
|
|
+ $('#detailForm input[name=file]').on('change', function() {
|
|
|
|
|
+ var file = this.files[0];
|
|
|
|
|
+ gagaKollus.upload('Goods', file, $('input[name=kufKey]'));
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
$(document).ready(function() {
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '등록일', true);
|
|
cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '등록일', true);
|