LookbookMainFormWeb.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org"
  4. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  5. layout:decorator="web/common/layout/PlanningLayoutWeb">
  6. <!--
  7. *******************************************************************************
  8. * @source : LookbookMainFormWeb.html
  9. * @desc : 룩북메인 Page
  10. *============================================================================
  11. * STYLE24
  12. * Copyright(C) 2020 TSIT, All rights reserved.
  13. *============================================================================
  14. * VER DATE AUTHOR DESCRIPTION
  15. * === =========== ========== =============================================
  16. * 1.0 2021.03.30 bin2107 최초 작성
  17. *******************************************************************************
  18. -->
  19. <body>
  20. <th:block layout:fragment="content">
  21. <div id="container" class="container dp">
  22. <div class="breadcrumb">
  23. <ul>
  24. <li class="bread_home"><a href="javascript:void(0);" id="navHome">홈</a></li>
  25. <li class="bread_home" id="brandLi" th:if="${lbInfo.lookbookGb=='BL'}"></li>
  26. <li class="bread_2depth">룩북</li>
  27. </ul>
  28. </div>
  29. <div class="wrap">
  30. <div class="content">
  31. <div class="cont_head">
  32. <div>
  33. <h3>룩북</h3>
  34. </div>
  35. </dziv>
  36. <div class="cont_body">
  37. <div class="event_list" id="changeClass">
  38. <div class="event_top">
  39. <div class="ui_row">
  40. <div class="count">
  41. <span id="lookbookTotCnt"></span>개의 이벤트
  42. </div>
  43. <div class="ui_col_12">
  44. <div class="btn_group">
  45. <!-- <div class="btn_group open"> -->
  46. <a href="javascript:void(0);" data-toggle="dropdown" class="btn btn_default tgl_dropdown" aria-expanded="true" id="brandBox">브랜드 선택<span class="caret"></span></a>
  47. <div class="dropdown_menu">
  48. <ul id="brandArea">
  49. </ul>
  50. <div class="ui_row">
  51. <button type="button" class="fillter_reset" onclick="fnGetLookbookList();"><span>초기화</span></button>
  52. <button type="button" class="fillter_apply" onclick="fnGetBrandLookbookList();"><span>적용</span></button>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="list">
  60. <ul class="clear event_con" id="lookbookArea" style="display: none;">
  61. </ul>
  62. <ul class="clear no_con" id="divLookbookNoData" style="display: none;">
  63. <li>
  64. <p><img src="/images/pc/ico_content_none.png" alt="등록된 이벤트가 없습니다."></p>
  65. <span>등록된 룩북이 없습니다.</span>
  66. <a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_MAIN);">메인으로 가기</a>
  67. </li>
  68. </ul>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <script th:inline="javascript">
  76. /*<![CDATA[*/
  77. var lookbookGb = [[${lbInfo.lookbookGb}]];
  78. if(lookbookGb != 'BL'){
  79. lookbookGb = 'L';
  80. }
  81. var brandCd = [[${lbInfo.brandCd}]];
  82. var navBrandNm = "";
  83. let fnGetLookbookList = function (lookbookGb, brandGroupNo){
  84. let actionUrl = '/display/lookbook/main/list?lookbookGb='+lookbookGb;
  85. if (!gagajf.isNull(brandGroupNo)) actionUrl += '&multiBrandCd=' + brandGroupNo;
  86. $('#lookbookArea').html('');
  87. $('#divLookbookNoData').hide();
  88. $.getJSON(actionUrl
  89. , function (result, status){
  90. if (status == 'success'){
  91. if (result.length > 0){
  92. $('#lookbookTotCnt').html('<span>' + result.length.addComma() + '</span>');
  93. if (gagajf.isNull(brandGroupNo)){
  94. $('#brandArea').html('');
  95. let tag = '';
  96. let brandArr = [];
  97. $.each(result, function(idx, item) {
  98. if(!brandArr.includes(item.brandCd)){
  99. brandArr.push(item.brandCd);
  100. tag += '<li>';
  101. tag += ' <label class="brand_btn">';
  102. tag += ' <input type="checkbox" group="filterValue" id="chkFilterBrand'+idx+'" data-name="chkFilterBrand'+idx+'" name="filterBrandCds" value="'+item.brandCd+'"><span>'+item.brandNm+'</span>';
  103. tag += ' </label>';
  104. tag += '</li>';
  105. }
  106. });
  107. $('#brandArea').html(tag);
  108. }
  109. $('#lookbookArea').html('');
  110. let tag2 = '';
  111. tag2 += '<ul class="clear event_con" id="lookbookArea" style="display: block;">';
  112. $.each(result, function(idx, item) {
  113. tag2 += '<li>';
  114. tag2 += ' <a href="javascript:void(0);" onclick="cfnGoToLookbookDetail(\''+lookbookGb+'\','+item.lookbookSq+','+item.brandCd+')">';
  115. tag2 += ' <div class="ev_img">';
  116. tag2 += ' <img src="' + _imgUrl + item.orgTnfileNm + '" alt="" style="height:100%">';
  117. tag2 += ' </div>';
  118. tag2 += ' <div class="txt">';
  119. if(lookbookGb != 'BL') {
  120. tag2 += ' <span class="brand">' + item.brandNm + '</span>';
  121. }
  122. tag2 += ' <p class="tit">'+item.title+'</p>';
  123. tag2 += ' </div>';
  124. tag2 += ' </a>';
  125. tag2 += '</li>';
  126. navBrandNm = item.brandNm;
  127. $("#brandLi").text(navBrandNm);
  128. });
  129. tag2 += '</ul>';
  130. $('#lookbookArea').html(tag2);
  131. $('#divLookbookNoData').hide();
  132. $('#lookbookArea').show();
  133. }else{
  134. $('#lookbookTotCnt').html('<span>0</span>');
  135. document.getElementById("changeClass").className = "event_list no_data";
  136. $('#lookbookArea').hide();
  137. $('#divLookbookNoData').show();
  138. }
  139. }
  140. document.getElementById("brandBox").className = "btn btn_default tgl_dropdown";
  141. $('.dropdown_menu').hide();
  142. });
  143. }
  144. var fnGetBrandLookbookList = function (){
  145. var multiBrandCd = [];
  146. $("input:checkbox:checked").each(function (index) {
  147. multiBrandCd.push($(this).val());
  148. });
  149. fnGetLookbookList(lookbookGb,multiBrandCd);
  150. }
  151. $(document).ready(function() {
  152. //$("#container .wrap .content .cont_body .event_list .event_top .ui_row .count").find('span').text(totalCnt.addComma());
  153. fnGetLookbookList(lookbookGb,brandCd);
  154. if(lookbookGb=='BL'){
  155. $("#brandBox").hide();
  156. $("#navHome").attr('onclick', 'cfnGoToBrandMain('+brandCd+');');
  157. }else{
  158. $("#navHome").attr('href', '/');
  159. }
  160. });
  161. /*]]>*/
  162. </script>
  163. </th:block>
  164. </body>
  165. </html>