퍼블팀 script 추가요청 및 관심자료 수정

This commit is contained in:
JSYOO 2021-12-01 13:54:30 +09:00
parent e4775e6214
commit a8396b24ab
3 changed files with 227 additions and 216 deletions

View File

@ -389,7 +389,6 @@ function fn_listPops(typeDivCd) {
<sec:authorize access="isAuthenticated()"> <sec:authorize access="isAuthenticated()">
<button type="button" id="mo-member-btn" class="member-btn" onclick="fn_getMemberCard();">회원증 보러가기</button> <button type="button" id="mo-member-btn" class="member-btn" onclick="fn_getMemberCard();">회원증 보러가기</button>
</sec:authorize> </sec:authorize>
<script> <script>
/* 메인슬라이드 */ /* 메인슬라이드 */
var myswiper = new Swiper(".MainSwiper", { var myswiper = new Swiper(".MainSwiper", {
@ -426,21 +425,23 @@ function fn_listPops(typeDivCd) {
var _slidesPerViewpopula = 4; var _slidesPerViewpopula = 4;
var _slidesPerViewOnline = 7; var _slidesPerViewOnline = 7;
var _spaceBetween = 30; var _spaceBetween = 30;
var _lenght = 5;
if (windowWidth < 1400) { if (windowWidth < 1400) {
_slidesPerView = 3; _slidesPerView = 3;
_slidesPerViewpopula = 2; _slidesPerViewpopula = 2;
_slidesPerViewOnline = 3; _slidesPerViewOnline = 3;
_spaceBetween = 20; _spaceBetween = 20;
_lenght = 1;
} }
if (windowWidth < 480) { if (windowWidth < 480) {
_slidesPerView = 1; _slidesPerView = 1;
_slidesPerViewpopula = 1; _slidesPerViewpopula = 1;
_slidesPerViewOnline = 1.5; _slidesPerViewOnline = 1.5;
_spaceBetween = 20; _spaceBetween = 20;
_lenght = 1;
} }
/* 문화원s pick */ /* 문화원s pick */
var swiper = new Swiper('.pickSwiper', { var swiper = new Swiper('.pickSwiper', {
loop : false, loop : false,
@ -463,7 +464,7 @@ function fn_listPops(typeDivCd) {
*/ */
on: { on: {
init: function () { init: function () {
if (this.slides.length <= 5) { if (this.slides.length <= _lenght) {
// First way: // First way:
this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping
this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next
@ -489,7 +490,7 @@ function fn_listPops(typeDivCd) {
}, },
on: { on: {
init: function () { init: function () {
if (this.slides.length <= 5) { if (this.slides.length <= _lenght) {
// First way: // First way:
this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping
this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next
@ -514,7 +515,7 @@ function fn_listPops(typeDivCd) {
}, },
on: { on: {
init: function () { init: function () {
if (this.slides.length <= 5) { if (this.slides.length <= _lenght) {
// First way: // First way:
this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping
//this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next //this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next
@ -524,6 +525,5 @@ function fn_listPops(typeDivCd) {
} }
} }
}); });
</script> </script>

View File

@ -50,21 +50,20 @@
}); // document ready }); // document ready
function selectAll(){ function selectAll(){
if($("#allChk").is(":checked") == false) if($("#allChk").prop("checked") == false)
{ {
$("#allChk").prop("checked", true); $("#allChk").prop("checked", true);
selectAllChk(); selectAllChk();
}else if($("#allChk").is(":checked") == true) }else if($("#allChk").prop("checked") == true)
{ {
$("#allChk").prop("checked", false); $("#allChk").prop("checked", false);
selectAllChk(); selectAllChk();
} }
chkCount();
} }
function chkCount() function chkCount()
{ {
$("input:checkbox[name = 'interestChk']").each(function() { $("input:checkbox[name = 'interestChk']").each(function() {
if($(this).is(":checked") == false) if($(this).prop("checked") == false)
{ {
$("#allChk").prop("checked", false); $("#allChk").prop("checked", false);
} }
@ -120,6 +119,7 @@
{ {
$("input:checkbox[name = 'interestChk']").prop("checked", true); $("input:checkbox[name = 'interestChk']").prop("checked", true);
} }
chkCount();
} }
//상세보기 //상세보기
@ -176,7 +176,7 @@
t_title += "<div class=\"t-cultural t-mo\">문화원</div>" t_title += "<div class=\"t-cultural t-mo\">문화원</div>"
t_title += "<div class=\"t-data t-mo\">자료정보</div>" t_title += "<div class=\"t-data t-mo\">자료정보</div>"
t_title += "<div class=\"t-btn t-mo\">이용</div>" t_title += "<div class=\"t-btn t-mo\">이용</div>"
t_title += "<div class=\"t-delete mo-ver\">선택삭제</div>" t_title += "<div class=\"t-delete mo-ver\" onclick=\"deleteInterests('multiple','');\">선택삭제</div>"
t_title += "</div>" t_title += "</div>"
t_title += "<li class=\"no-result\" style=\"display:none;\">" t_title += "<li class=\"no-result\" style=\"display:none;\">"
t_title += "<span>검색결과가 없습니다.</span>" t_title += "<span>검색결과가 없습니다.</span>"

View File

@ -397,8 +397,14 @@ function goList(){
<script> <script>
var windowWidth = $(window).width(); var windowWidth = $(window).width();
var _slidesPerView = 4; var _slidesPerView = 4;
var _lenght = 5;
if (windowWidth < 1400) {
_slidesPerView = 3;
_lenght = 3;
}
if (windowWidth < 480) { if (windowWidth < 480) {
_slidesPerView = 1; _slidesPerView = 1;
_lenght = 1;
} }
/* 함께 볼만한자료 슬라이드 */ /* 함께 볼만한자료 슬라이드 */
@ -423,7 +429,7 @@ function goList(){
*/ */
on: { on: {
init: function () { init: function () {
if (this.slides.length <= 5) { if (this.slides.length <= _lenght) {
// First way: // First way:
this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping
this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next
@ -435,17 +441,22 @@ function goList(){
var _slidesPerViewBottom = 5; var _slidesPerViewBottom = 5;
var _spaceBetween = 30; var _spaceBetween = 30;
if (windowWidth < 1400) {
_slidesPerView = 3;
_lenght = 3;
}
if (windowWidth < 480) { if (windowWidth < 480) {
_slidesPerViewBottom = 1.5; _slidesPerViewBottom = 1.5;
_spaceBetween = 20; _spaceBetween = 20;
_lenght = 1;
} }
/* 유사한 자료 슬라이드 */ /* 유사한 자료 슬라이드 */
var swiper = new Swiper('.DetailSwiper2', { var swiper = new Swiper('.DetailSwiper2', {
loop: false, loop: true,
slidesPerView: _slidesPerViewBottom, slidesPerView: _slidesPerViewBottom,
spaceBetween: _spaceBetween, spaceBetween: _spaceBetween,
centeredSlides: false, centeredSlides: true,
autoplay: { autoplay: {
delay: 2500, delay: 2500,
disableOnInteraction: false, disableOnInteraction: false,
@ -462,7 +473,7 @@ function goList(){
*/ */
on: { on: {
init: function () { init: function () {
if (this.slides.length <= 1) { if (this.slides.length <= _lenght) {
// First way: // First way:
this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping this.allowSlidePrev = this.allowSlideNext = false; // disabling swiping
this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next this.el.querySelector(".swiper-button-prev").style.visibility = "hidden"; // hiding arrows prev&next