|
|
@@ -19,19 +19,23 @@
|
|
|
<div class="panelStyle">
|
|
|
<!-- TITLE -->
|
|
|
<div class="panelTitle">
|
|
|
- <h2>상품 이미지 수정</h2>
|
|
|
+ <h2>상품 이미지 <th:block th:text="${goodsImg.mode =='U'}? '상세':'등록'"></th:block></h2>
|
|
|
<button type="button" class="close" onclick="fnGoodsImgFormClose()"><i class="fa fa-times"></i></button>
|
|
|
</div>
|
|
|
<!-- //TITLE -->
|
|
|
<!-- CONTENT -->
|
|
|
<div class="panelContent">
|
|
|
-
|
|
|
+ <form id="goodsImgForm" name="goodsImgForm" action="#" th:method="post">
|
|
|
+ <input type="hidden" name="goodsCd" th:value="${goodsImg.goodsCd}"/>
|
|
|
+ <input type="hidden" name="colorCd" th:value="${goodsImg.colorCd}"/>
|
|
|
+<!-- <input type="hidden" name="goodsCd" th:value="14373767"/>
|
|
|
+ <input type="hidden" name="colorCd" th:value="IV"/>
|
|
|
+ -->
|
|
|
<ul class="notice">
|
|
|
<li>[업로드/수정] 버튼 클릭 하면 프론트에 바로 적용되므로 최종 확인 후 전송을 권장합니다.</li>
|
|
|
<li>이미지 미리보기 리스트는 <em>업로드 후</em> 확인 할 수 있습니다.</li>
|
|
|
<li>이미지보기 버튼은 이미지 파일 <em>등록 후</em> 확인 할 수 있습니다. 이미 <em>업로드 된</em> 파일은 확인 할 수 없습니다.(파일 크기 옆 화살표로 구분 가능합니다.)</li>
|
|
|
</ul>
|
|
|
-
|
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
|
<col width="100px"/>
|
|
|
@@ -40,13 +44,18 @@
|
|
|
<col/>
|
|
|
<col width="100px"/>
|
|
|
<col/>
|
|
|
+ <col width="100px"/>
|
|
|
+ <col/>
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
+ <th>상품코드</th>
|
|
|
+ <td th:text="${goodsImg.goodsCd}">14373767</td>
|
|
|
<th>컬러명</th>
|
|
|
- <td>PINK</td>
|
|
|
- <td colspan="4"></td>
|
|
|
- <!-- <th>대표 이미지순번</th>
|
|
|
- <td><input type="text" value="1"/></td>
|
|
|
+ <td th:text="${goodsImg.goodsNm}">PINK</td>
|
|
|
+ <th>대표 이미지순번</th>
|
|
|
+ <td><input type="text" class="text-right" name="defaultImgOrd" maxlength="3" th:value="${defaultImgOrd}" required="required" data-valid-type="number" data-valid-name="대표이미지순번"/></td>
|
|
|
+ <td colspan="2"></td>
|
|
|
+ <!--
|
|
|
<th>마우스오버 이미지순번</th>
|
|
|
<td><input type="text" value="2"/></td> -->
|
|
|
</tr>
|
|
|
@@ -429,165 +438,28 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
+ </form>
|
|
|
</div>
|
|
|
<!-- 버튼 배치 영역 -->
|
|
|
<ul class="panelBar marT10">
|
|
|
<li class="center">
|
|
|
- <button type="button" class="btn btn-base btn-lg">파일 추가</button>
|
|
|
- <button type="button" class="btn btn-default btn-lg">선택 삭제</button>
|
|
|
- <button type="button" class="btn btn-default btn-lg">전체 삭제</button>
|
|
|
- <button type="button" class="btn btn-info btn-lg">뒤로 이동</button>
|
|
|
- <button type="button" class="btn btn-info btn-lg">아래로 이동</button>
|
|
|
- <button type="button" class="btn btn-base btn-lg">이미지 보기</button>
|
|
|
- <button type="button" class="btn btn-base btn-lg">업로드/수정</button>
|
|
|
- <button type="button" class="btn btn-base btn-lg">저장하기</button>
|
|
|
+ <button type="button" class="btn btn-base btn-sm" id="btnAddFiles">파일 추가</button>
|
|
|
+ <button type="button" class="btn btn-default btn-sm" onclick="gagaDx5.deleteChooseFile();">선택 삭제</button>
|
|
|
+ <button type="button" class="btn btn-default btn-sm" onclick="gagaDx5.deleteAllFiles();">전체 삭제</button>
|
|
|
+ <button type="button" class="btn btn-info btn-sm" onclick="gagaDx5.moveFile(true);">위로 이동</button>
|
|
|
+ <button type="button" class="btn btn-info btn-sm" onclick="gagaDx5.moveFile(false);">아래로 이동</button>
|
|
|
+ <!-- <button type="button" class="btn btn-base btn-sm" onclick="gagaDx5.previewImage();">이미지 보기</button> -->
|
|
|
+ <button type="button" class="btn btn-base btn-sm" onclick="gagaDx5.uploadFiles();">업로드/수정</button>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<!-- //버튼 배치 영역 -->
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- <div class="panelStyle">
|
|
|
- <div class="panelTitle">
|
|
|
- <strong>상품 이미지 보기 <button type="button" class="btn icn" onclick="fnOpenCommentPopup('comment')" ><i class="fa fa-cog" aria-hidden="true"></i></button></strong>
|
|
|
- <button type="button" class="close" onclick="fnGoodsImgFormClose()"><i class="fa fa-times"></i></button>
|
|
|
- </div>
|
|
|
- <div class="panelContent">
|
|
|
- <form id="goodsImgForm" name="goodsImgForm" th:method="post">
|
|
|
- <input type="hidden" id="goodsCd" name="goodsCd" th:value="${params.goodsCd}"/>
|
|
|
- <table class="frmStyle" th:with="uploadGoodsUrl=${@environment.getProperty('upload.goods.view')},uxImgUrl=${@environment.getProperty('domain.uximage')}">
|
|
|
- <colgroup>
|
|
|
- <col width="75%"/>
|
|
|
- <col width="25%"/>
|
|
|
- </colgroup>
|
|
|
- <tbody id="goodsImgList">
|
|
|
- <tr>
|
|
|
- <th class="aL vaT">imgPath1 : <th:block th:utext="${'필수: 상품코드_01.jpg<i class=star></i>'}"></th:block>
|
|
|
- <hr/>
|
|
|
- <input type="text" class="w100p" id="imgPath1" name="imgPath1" />
|
|
|
- </th>
|
|
|
- <td>
|
|
|
- <img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/image/no.gif'}+'\';'" width="200px"/>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- <ul class="panelBar">
|
|
|
- <th:block th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDetailImgSave">저장</button>
|
|
|
- </th:block>
|
|
|
- </ul>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
+<script type="text/javascript" src="/dx5/dextuploadx5-configuration.js?v=2020121801"></script>
|
|
|
+<script type="text/javascript" src="/dx5/dextuploadx5.js?v=2020121801"></script>
|
|
|
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.dx5.js?2020121801"></script>
|
|
|
<script th:inline="javascript">
|
|
|
/*<![CDATA[*/
|
|
|
- var fileExtension = [[${@environment.getProperty('upload.goods.allow.extension')}]];
|
|
|
-
|
|
|
- //상품이미지 저정버튼 클릭 시
|
|
|
- $('#btnGoodsDetailImgSave').click(function(e) {
|
|
|
- if ($("#goodsImgForm").find("#goodsImgList tr").length == 0){
|
|
|
- /* mcxDialog.alert('', function(){
|
|
|
-
|
|
|
- });
|
|
|
- return false; */
|
|
|
- }
|
|
|
- var optCheck = false;
|
|
|
- var imgType = $('#goodsImgForm input[name=imgType]').val();
|
|
|
-
|
|
|
- $("#goodsImgForm").find("#goodsImgList tr").each(function() {
|
|
|
- var size = 30;
|
|
|
-
|
|
|
- for(i=0;i<size;i++){
|
|
|
- var imgVal = $("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1) +"]").val();
|
|
|
-
|
|
|
- if(!gagajf.isNull(imgVal)){
|
|
|
- var reg = "\.("+fileExtension+")$";
|
|
|
- if(!(new RegExp(reg, "i")).test(imgVal)) {
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC('이미지는 ['+ fileExtension + '] 파일만 가능합니다.', {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
|
|
|
- }
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if (imgVal.indexOf('\\"') > -1){
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC('["]는 입력할 수 없습니다.', {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
|
|
|
- }
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (imgVal.indexOf("\\'") > -1){
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC("[\\']는 입력할 수 없습니다.", {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
|
|
|
- }
|
|
|
-
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (imgType == "A"){
|
|
|
- if (imgVal.indexOf("http") > -1){
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC("이미지 도메인은 입력할 수 없습니다.", {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
|
|
|
- }
|
|
|
-
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
- }else{
|
|
|
- if (imgVal.indexOf("https") <= -1){
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC("이미지 도메인을 입력해 주세요.", {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
|
|
|
- }
|
|
|
-
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- }else{
|
|
|
- if(i == 0){
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC("필수 상품이미지 입니다.", {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
|
|
|
- }
|
|
|
-
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- if(optCheck) {
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- mcxDialog.confirm('저장하시겠습니까?', {
|
|
|
- cancelBtnText: "취소",
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function(){
|
|
|
- gagajf.ajaxFormSubmit("/goods/img/save", "#goodsImgForm", fnGoodsImgFormClose);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
|
|
|
//창종료
|
|
|
var fnGoodsImgFormClose = function(){
|