스트리밍 프리미엄 수정

This commit is contained in:
2024-09-12 22:34:23 +09:00
parent bd656d65a6
commit d364cc05c2
10 changed files with 3975 additions and 3875 deletions

View File

@@ -47,32 +47,18 @@ $(document).ready(function () {
e.preventDefault();
});
$(document).on(
"click",
".btnClose, .menuWarp .menuDepth2Wrap a",
function (e) {
$(".menuWarp .menuDepth1").removeClass("on");
$(".menuWarp .menuDepth2Wrap").hide();
$(".menuWarp").css("right", "-100%");
$("html").removeClass("scrollDisable");
}
);
$(document).on("click", ".btnClose, .menuWarp .menuDepth2Wrap a", function (e) {
$(".menuWarp .menuDepth1").removeClass("on");
$(".menuWarp .menuDepth2Wrap").hide();
$(".menuWarp").css("right", "-100%");
$("html").removeClass("scrollDisable");
});
$(document).on("click", ".closeBtn", function () {
$(".menuWarp")
.stop()
.animate(
{ right: "-100%" },
{ queue: true, duration: 500, easing: "easeInOutExpo" }
);
$(".menuWarp").stop().animate({ right: "-100%" }, { queue: true, duration: 500, easing: "easeInOutExpo" });
$("html").removeClass("scrollDisable");
});
$(document).on("click", ".burgurBtn", function () {
$(".menuWarp")
.stop()
.animate(
{ right: "0" },
{ queue: true, duration: 500, easing: "easeInOutExpo" }
);
$(".menuWarp").stop().animate({ right: "0" }, { queue: true, duration: 500, easing: "easeInOutExpo" });
$("html").addClass("scrollDisable");
});
}
@@ -114,32 +100,18 @@ $(document).ready(function () {
e.preventDefault();
});
$(document).on(
"click",
".btnClose, .menuWarp .menuDepth2Wrap a",
function (e) {
$(".menuWarp .menuDepth1").removeClass("on");
$(".menuWarp .menuDepth2Wrap").hide();
$(".menuWarp").css("right", "-36rem");
$("html").removeClass("scrollDisable");
}
);
$(document).on("click", ".btnClose, .menuWarp .menuDepth2Wrap a", function (e) {
$(".menuWarp .menuDepth1").removeClass("on");
$(".menuWarp .menuDepth2Wrap").hide();
$(".menuWarp").css("right", "-36rem");
$("html").removeClass("scrollDisable");
});
$(document).on("click", ".closeBtn", function () {
$(".menuWarp")
.stop()
.animate(
{ right: "-36rem" },
{ queue: true, duration: 500, easing: "easeInOutExpo" }
);
$(".menuWarp").stop().animate({ right: "-36rem" }, { queue: true, duration: 500, easing: "easeInOutExpo" });
$("html").removeClass("scrollDisable");
});
$(document).on("click", ".burgurBtn", function () {
$(".menuWarp")
.stop()
.animate(
{ right: "0" },
{ queue: true, duration: 500, easing: "easeInOutExpo" }
);
$(".menuWarp").stop().animate({ right: "0" }, { queue: true, duration: 500, easing: "easeInOutExpo" });
$("html").addClass("scrollDisable");
});
}
@@ -189,12 +161,7 @@ $(document).ready(function () {
$(".mobileCarlist > .mobilecarItem").next().css("display", "none");
$(".menuDepth1Wrap > .menuDepth1").removeClass("on");
$(".menuDepth1Wrap > .menuDepth1").next().css("display", "none");
$(".menuWarp")
.stop()
.animate(
{ right: "-100%" },
{ queue: true, duration: 500, easing: "easeInOutExpo" }
);
$(".menuWarp").stop().animate({ right: "-100%" }, { queue: true, duration: 500, easing: "easeInOutExpo" });
$("html").removeClass("scrollDisable");
}
@@ -246,32 +213,24 @@ $(document).ready(function () {
$(this).toggleClass("active");
$(this).find(">dd.a").slideToggle();
$(this).find(">dt.q").toggleClass("active");
if (
$("body>div.contentWarp").find("div.productView").length > 0 &&
$(this).hasClass("active")
) {
if ($("body>div.contentWarp").find("div.productView").length > 0 && $(this).hasClass("active")) {
window.dataLayer.push({
event: "configurator",
event_category: "Product",
event_action: "Q&A",
event_label: "Details",
customer_ID:
ComUtils.getCookie("dlu") === null ? "" : ComUtils.getCookie("dlu"), //ID가 이메일 등의 개인정보일 경우 참고
customer_ID: ComUtils.getCookie("dlu") === null ? "" : ComUtils.getCookie("dlu"), //ID가 이메일 등의 개인정보일 경우 참고
fod_product: $("h1.productName").text(), // eg Vehicle To Grid
fod_qa_detail: $(this).find("dd.a>p").text().substr(0, 20),
fod_review_detail: undefined,
});
} else if (
$("body>div.contentWarp").find("div.faqWarp").length > 0 &&
$(this).hasClass("active")
) {
} else if ($("body>div.contentWarp").find("div.faqWarp").length > 0 && $(this).hasClass("active")) {
window.dataLayer.push({
event: "FAQ",
event_category: "FAQ",
event_action: $("ul.tabList>li.on>a").text(), //eg '전체', '회원', '상품' …
event_label: $(this).find("dt>p>span").text().substr(0, 20), //eg'회원정보 수정은…'
customer_ID:
ComUtils.getCookie("dlu") === null ? "" : ComUtils.getCookie("dlu"), //ID가 이메일 등의 개인정보일 경우 참고
customer_ID: ComUtils.getCookie("dlu") === null ? "" : ComUtils.getCookie("dlu"), //ID가 이메일 등의 개인정보일 경우 참고
});
}
});
@@ -309,6 +268,9 @@ $(document).ready(function () {
pdpDisplayThemeSwiperDtl();
pdpInCarGameSwiper();
pdpInCarGameSwiperDtl();
pdpSwiperDtl(".streamingPremium-swiper1");
pdpSwiperDtl(".streamingPremium-swiper2");
pdpSwiperDtl(".streamingPremium-swiper3");
flagScroll = false;
}
@@ -347,9 +309,7 @@ $(document).ready(function () {
if (content.length > maxInquiryContentsCount) {
$(this).val($(this).val().substring(0, maxInquiryContentsCount));
$(".textCount").text(
maxInquiryContentsCount + "/" + maxInquiryContentsCount
);
$(".textCount").text(maxInquiryContentsCount + "/" + maxInquiryContentsCount);
alert("글자수는 " + maxInquiryContentsCount + "자까지 입력 가능합니다.");
}
});
@@ -424,9 +384,7 @@ function pdpDisplayThemeSwiper() {
function () {
let leftPos = $(this).offset().left;
if (dtthumbClickFlag === false) {
$(this).append(
`<div class="tooltip"><div class="msg">썸네일을 클릭하면 적용예시를 확인<br>할 수 있습니다.</div><button class="btn-close">x</button></div>`
);
$(this).append(`<div class="tooltip"><div class="msg">썸네일을 클릭하면 적용예시를 확인<br>할 수 있습니다.</div><button class="btn-close">x</button></div>`);
}
},
function () {
@@ -439,6 +397,26 @@ function pdpDisplayThemeSwiper() {
flagScroll = false;
}
function pdpSwiperDtl(obj) {
if ($(`${obj}`).length > 0) {
var swiperThemeDtl = new Swiper(`${obj} .swiper`, {
slidesPerView: 1,
navigation: {
nextEl: `${obj} .swiper-button-next`,
prevEl: `${obj} .swiper-button-prev`,
},
pagination: {
el: `${obj} .swiper-pagination`,
},
on: {
init: function () {},
},
});
}
flagScroll = false;
}
function pdpDisplayThemeSwiperDtl() {
if ($(".displayThemeDtl .swiper").length > 0) {
var swiperThemeDtl = new Swiper(".displayThemeDtl .swiper", {
@@ -655,12 +633,8 @@ $(document).on("click", ".displayTheme .dtthumb", function () {
$(".theme-story .btn-dtthumb").removeClass("active");
const dtthumbItem = $(this).html();
const dtthumbSelectedItem = $(
`.pdpDisplayThemeSwiper .dtthumb[value=${dtlImgPath}]`
);
const dtthumbHisSelectedItem = $(
`.theme-story .dtthumb[value=${dtlImgPath}]`
).parent();
const dtthumbSelectedItem = $(`.pdpDisplayThemeSwiper .dtthumb[value=${dtlImgPath}]`);
const dtthumbHisSelectedItem = $(`.theme-story .dtthumb[value=${dtlImgPath}]`).parent();
const dtthumbItemHtml = `
<div class="btn-dtthumb active">
<button class="dtthumb" value="${dtlImgPath}">
@@ -695,13 +669,8 @@ $(document).on("click", ".displayTheme .dtthumb", function () {
}
$(".btn-dtthumb .btn-remove").click(function () {
const dtthumbValue = $(this)
.closest(".btn-dtthumb")
.find(".dtthumb")
.attr("value");
const selectedItem = $(
`.pdpDisplayThemeSwiper .dtthumb[value=${dtthumbValue}]`
);
const dtthumbValue = $(this).closest(".btn-dtthumb").find(".dtthumb").attr("value");
const selectedItem = $(`.pdpDisplayThemeSwiper .dtthumb[value=${dtthumbValue}]`);
$(this).closest(".btn-dtthumb").remove();
selectedItem.attr("data-click", "false");
selectedItem.removeClass("selected");
@@ -737,15 +706,14 @@ function pdpIntro() {
case $(".srsPlus").length > 0:
cookieVal = "srsPlusIntro";
break;
case $(".streamingPremium").length > 0:
cookieVal = "streamingPremiumIntro";
break;
}
$(".close-today").html(
`<span onclick="hideTodayIntroPopup('${cookieVal}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`
);
$(".close-today").html(`<span onclick="hideTodayIntroPopup('${cookieVal}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`);
$(".btn-intro")
.css({ display: "flex", opacity: "0", marginTop: "2rem" })
.animate({ opacity: "1", marginTop: "0" }, 400);
$(".btn-intro").css({ display: "flex", opacity: "0", marginTop: "2rem" }).animate({ opacity: "1", marginTop: "0" }, 400);
if (getCookie(cookieVal)) {
$(".editorWarp").removeClass("playing");
$(".video_wrap").css("display", "none");
@@ -754,17 +722,11 @@ function pdpIntro() {
// videoElements[0].pause();
// videoElements[0].currentTime = 0;
$(".close-today").html(
`<span onclick="deleteCookie('${cookieVal}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`
);
$(".close-today").html(`<span onclick="deleteCookie('${cookieVal}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`);
$(".editorWarp .youtube-box").html("");
} else {
$(".video_wrap")
.css({ display: "flex", opacity: "0" })
.animate({ opacity: "1" }, 200);
$(".close-today").html(
`<span onclick="hideTodayIntroPopup('${cookieVal}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`
);
$(".video_wrap").css({ display: "flex", opacity: "0" }).animate({ opacity: "1" }, 200);
$(".close-today").html(`<span onclick="hideTodayIntroPopup('${cookieVal}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`);
$(".editorWarp .youtube-box").html(youtubeFrame);
}
@@ -891,17 +853,12 @@ function initSwiper() {
slidesPerView: "auto",
on: {
click: function (swiper) {
let getEventLabel = $(
".lnbList>ul>li:nth-of-type(" + (swiper.clickedIndex + 1) + ")>a"
).data("dleventlabel");
let getEventLabel = $(".lnbList>ul>li:nth-of-type(" + (swiper.clickedIndex + 1) + ")>a").data("dleventlabel");
if (getEventLabel) {
myLnbTagManager(getEventLabel);
}
location.href = $(".lnbList > ul > li")
.eq(swiper.clickedIndex)
.find("a")
.attr("href");
location.href = $(".lnbList > ul > li").eq(swiper.clickedIndex).find("a").attr("href");
},
},
});
@@ -929,13 +886,8 @@ function setImageFromFile(input, expression) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$(expression)
.attr("src", e.target.result)
.attr("id", input.files[0].lastModified);
$(expression)
.closest(".imgItem")
.find(".delImg")
.data("index", input.files[0].lastModified);
$(expression).attr("src", e.target.result).attr("id", input.files[0].lastModified);
$(expression).closest(".imgItem").find(".delImg").data("index", input.files[0].lastModified);
};
reader.readAsDataURL(input.files[0]);
}
@@ -949,16 +901,10 @@ function open_layer_popup(popid) {
$("body").css("touch-action", "none");
$("#" + popid)
.stop()
.animate(
{ opacity: "1" },
{ queue: true, duration: 450, easing: "easeInOutExpo" }
);
.animate({ opacity: "1" }, { queue: true, duration: 450, easing: "easeInOutExpo" });
$("#" + popid + ">.popInner")
.stop()
.animate(
{ top: "50%" },
{ queue: true, duration: 450, easing: "easeInOutExpo" }
);
.animate({ top: "50%" }, { queue: true, duration: 450, easing: "easeInOutExpo" });
}
//레이어 팝업 클로즈 스크립트
@@ -1034,10 +980,7 @@ function XSS_Check(strTemp, level) {
strTemp = strTemp.replaceAll(/\)/g, "&#41;");
strTemp = strTemp.replaceAll(/\//g, "&#x2F;");
} else if (level != undefined && level == 2) {
strTemp = strTemp.replaceAll(
/alert|window|document|eval|cookie|this|self|parent|top|opener|function|constructor|script|on|\-+\\<>=/gi,
""
);
strTemp = strTemp.replaceAll(/alert|window|document|eval|cookie|this|self|parent|top|opener|function|constructor|script|on|\-+\\<>=/gi, "");
}
if (getType === "object") {
@@ -1072,13 +1015,7 @@ function enterVideo() {
$(".withVideo").find("video").get(0).load();
$(".withVideo").find("video").get(0).currentTime = 0;
$(document).on("mouseenter", ".withVideo", function () {
$(this)
.find(".productSmallVideo > img")
.stop()
.animate(
{ opacity: "0" },
{ queue: true, duration: 300, easing: "easeInOutExpo" }
);
$(this).find(".productSmallVideo > img").stop().animate({ opacity: "0" }, { queue: true, duration: 300, easing: "easeInOutExpo" });
playPromise = $(this).find("video").get(0).play();
});
$(document).on("mouseleave", ".withVideo", function () {
@@ -1126,12 +1063,7 @@ $.fn.clearForm = function () {
if (tag === "form") {
return $(":input", this).clearForm();
}
if (
type === "text" ||
type === "password" ||
type === "hidden" ||
tag === "textarea"
) {
if (type === "text" || type === "password" || type === "hidden" || tag === "textarea") {
this.value = "";
} else if (type === "checkbox" || type === "radio") {
this.checked = false;
@@ -1167,9 +1099,7 @@ function deleteCookie(name) {
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
$(".close-today input").prop("checked", false);
$(".close-today").html(
`<span onclick="hideTodayIntroPopup('${name}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`
);
$(".close-today").html(`<span onclick="hideTodayIntroPopup('${name}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`);
}
// 팝업을 숨기는 함수
@@ -1184,7 +1114,5 @@ function hideTodayIntroPopup(name) {
} else {
setCookie("hideIntroPopup", "true", 1);
}
$(".close-today").html(
`<span onclick="deleteCookie('${name}')" style="cursor:pointer"><input type="checkbox" checked> 오늘 하루 재생하지 않기</span>`
);
$(".close-today").html(`<span onclick="deleteCookie('${name}')" style="cursor:pointer"><input type="checkbox" checked> 오늘 하루 재생하지 않기</span>`);
}