parent
commit
401e89dccc
3 ha cambiato i file con 133 aggiunte e 41 eliminazioni
  1. +61
    -16
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss
  2. +27
    -21
      zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js
  3. +45
    -4
      zenitPlatformAtmosSet2/src/Resources/app/storefront/src/scss/overrides.scss

+ 61
- 16
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss Vedi File

@@ -13,6 +13,7 @@ html {


body { body {
background: #fff; background: #fff;
overflow-x: hidden;
} }


h1 { h1 {
@@ -42,7 +43,7 @@ h6 {
} }


.breadcrumb-container { .breadcrumb-container {
display: none;
display: none;
} }


.cms-block { .cms-block {
@@ -106,6 +107,7 @@ input.custom-number[type=number] {
} }
} }



/* Wunschliefertermin Datepicker */ /* Wunschliefertermin Datepicker */
.confirm-delivery-date { .confirm-delivery-date {
.spwn-date-wrapper { .spwn-date-wrapper {
@@ -148,12 +150,13 @@ input.custom-number[type=number] {
&:after { &:after {
transform: rotate(45deg); transform: rotate(45deg);
} }
}
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay { .flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay {
border-color: #33548c; border-color: #33548c;
background: #33548c; background: #33548c;
} }
} }

#spwn-delivery { #spwn-delivery {
padding: 0 0 40px 0; padding: 0 0 40px 0;
.spwn-delivery--time { .spwn-delivery--time {
@@ -163,7 +166,7 @@ input.custom-number[type=number] {
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
margin: 0 20px 0 0; margin: 0 20px 0 0;
color: #33548c;
color: #86b04b;
font-size: 16px; font-size: 16px;
line-height: 18px; line-height: 18px;
border: 2px solid #33548c; border: 2px solid #33548c;
@@ -178,7 +181,7 @@ input.custom-number[type=number] {
transition: all .15s ease-in-out; transition: all .15s ease-in-out;
&:hover, &:hover,
&.active { &.active {
background: #33548c;
background: #86b04b;
color: #fff; color: #fff;
} }
} }
@@ -190,18 +193,60 @@ input.custom-number[type=number] {
display: none !important; display: none !important;
} }


.swag-custom-notification-info-modal__content {
padding-bottom: 40px;
.row {
align-items: center;
h3 {
font-family: $sw-font-family-headline !important;
font-size: 44px;
font-weight: 700 !important;
margin-bottom: 30px;
.swag-custom-notification-banner {
padding: 3px 6px !important;
width: 100vw;
position: relative;
left: 50%;
right: 50%;
margin: 0 -50vw 0px -50vw;
.swag-custom-notification-banner-text {
font-size: 18px;
}
}

.modal.spwn-swag-custom-notification-info {
.modal-header {
.close {
opacity: 1;
}
.icon {
color: #fff;
}
} }
img {
width: 100%;
@media (min-width: 576px) {
.modal-dialog {
max-width: 600px !important;
}
}
.modal-content {
background: transparent;
box-shadow: none;
} }
}
} }

.swag-custom-notification-info-modal__content {
padding-bottom: 40px;
.row {
align-items: center;
.col-md-6 {
flex: 0 0 100%;
max-width: 100%;
text-align: center;
}
h3 {
font-family: $sw-font-family-headline !important;
font-size: 44px;
font-weight: 700 !important;
margin-bottom: 30px;
display: none;
}
p {
display: none;
}
img {
width: 100%;
max-width: 450px;
}
}
}

+ 27
- 21
zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js Vedi File

@@ -45,24 +45,17 @@ $(document).ready(function() {


/* Set first selectable day selected */ /* Set first selectable day selected */
// remove hours // remove hours
console.log("A");
console.log($(".confirm-delivery-date #dtgs-datepicker-inputfield").val());
console.log(spawnDateInputValue);
if ($(".confirm-delivery-date #dtgs-datepicker-inputfield").val().indexOf(":") !== -1) { if ($(".confirm-delivery-date #dtgs-datepicker-inputfield").val().indexOf(":") !== -1) {
let inputTemp = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(); let inputTemp = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val();
spawnDateInputValue = inputTemp.substring(0, inputTemp.length - 6); spawnDateInputValue = inputTemp.substring(0, inputTemp.length - 6);
console.log("A2");
console.log(spawnDateInputValue);
} else { } else {
spawnDateInputValue = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(); spawnDateInputValue = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val();
console.log("3");
console.log(spawnDateInputValue);
} }
if (spawnDateInputValue === '') { if (spawnDateInputValue === '') {
setDateSelected(); setDateSelected();
} }
$("#spwn-dp-input").val(spawnDateInputValue);
$("body").find("#spwn-dp-input").val(spawnDateInputValue);
changeDelivery(fp); changeDelivery(fp);
} }


@@ -108,27 +101,24 @@ function easeOutCuaic(t){
} }


function manipulateDateInputValue() { function manipulateDateInputValue() {
console.log("manipulateDateInputValue");
// remove hours // remove hours
console.log("B");
console.log($(".confirm-delivery-date #dtgs-datepicker-inputfield").val());
console.log(spawnDateInputValue);
if ($(".confirm-delivery-date #dtgs-datepicker-inputfield").val().indexOf(":") !== -1) { if ($(".confirm-delivery-date #dtgs-datepicker-inputfield").val().indexOf(":") !== -1) {
let inputTemp = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(); let inputTemp = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val();
spawnDateInputValue = inputTemp.substring(0, inputTemp.length - 6); spawnDateInputValue = inputTemp.substring(0, inputTemp.length - 6);
console.log("B2");
console.log(spawnDateInputValue);
} else { } else {
spawnDateInputValue = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(); spawnDateInputValue = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val();
console.log("B3");
console.log(spawnDateInputValue);
} }
if (inputSameDayDelivery.is(':checked')) { if (inputSameDayDelivery.is(':checked')) {
// If same day delivery is checked, select time // If same day delivery is checked, select time
$("#spwn-delivery .spwn-delivery--time span.active").trigger("click"); $("#spwn-delivery .spwn-delivery--time span.active").trigger("click");
} else {
$("#spwn-dp-input").val(spawnDateInputValue);
} }
} }


function setDateSelected() { function setDateSelected() {
console.log("setDateSelected");
let spwnFirstSelectableDay = $(".flatpickr-day:not(.flatpickr-disabled)").first().text(); let spwnFirstSelectableDay = $(".flatpickr-day:not(.flatpickr-disabled)").first().text();
let spwnFPdate = new Date(); let spwnFPdate = new Date();
let spwnDay = spwnFPdate.getDate(); let spwnDay = spwnFPdate.getDate();
@@ -145,12 +135,13 @@ function setDateSelected() {
} }


function changeDelivery(fp) { function changeDelivery(fp) {
console.log("changeDelivery");
$("body").on("click", "#spwn-delivery .spwn-delivery--time span", function() { $("body").on("click", "#spwn-delivery .spwn-delivery--time span", function() {
$("#spwn-delivery .spwn-delivery--time span").removeClass("active"); $("#spwn-delivery .spwn-delivery--time span").removeClass("active");
$(this).addClass("active"); $(this).addClass("active");
$(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $(this).text()); $(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $(this).text());
$(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $(this).attr('data-time')); $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $(this).attr('data-time'));
$(".flatpickr-hour").val($(this).attr('data-hour'));
}); });


let daysToAdd = 0; let daysToAdd = 0;
@@ -163,21 +154,30 @@ function changeDelivery(fp) {
// Abholung im Ladengeschäft // Abholung im Ladengeschäft
console.log("Abholung"); console.log("Abholung");
$(".confirm-delivery-date #spwn-dp-input").val('Abholung im Ladengeschäft'); $(".confirm-delivery-date #spwn-dp-input").val('Abholung im Ladengeschäft');
$(".confirm-delivery-date #dtgs-datepicker-inputfield").val('9.9.1999 19:19');
// let spwnDate = fp.formatDate('31.12.2050', 'd.m.Y');
// fp.set("maxDate", '2050/12/31');
// fp.setDate(new Date('2050/12/31'), true);
fp.set("dateFormat", 'd.m.Y');
fp.set("minDate", '05.04.2022');
fp.set("maxDate", '05.04.2022');
fp.set("enable", ["05.04.2022"]);
// fp.set("minDate", '31.12.2050');
// fp.set("maxDate", '31.12.2050');
// fp.set("enable", ["31.12.2050"]);
$(".confirm-delivery-date #dtgs-datepicker-inputfield").val('31.12.2050 04:00');
$(".confirm-delivery-date").hide(); $(".confirm-delivery-date").hide();
$("#spwn-delivery p").text("Die bestellten Produkte stehen zur Abholung in unserem Ladengeschäft in Hamburg für Sie bereit."); $("#spwn-delivery p").text("Die bestellten Produkte stehen zur Abholung in unserem Ladengeschäft in Hamburg für Sie bereit.");
$(".flatpickr-hour").val('04');
} else if (inputSameDayDelivery.is(':checked')) { } else if (inputSameDayDelivery.is(':checked')) {
// Abendzustellung // Abendzustellung
console.log("Abendzustellung"); console.log("Abendzustellung");
$(".confirm-delivery-date #spwn-dp-input").val('');
$(".confirm-delivery-date #dtgs-datepicker-inputfield").val('');
spwnIncludedDays = [1, 2, 3, 4, 5]; spwnIncludedDays = [1, 2, 3, 4, 5];
if (daysToAdd === 0) { if (daysToAdd === 0) {
daysToAdd = 0; daysToAdd = 0;
} }
setIncludedDays("evening", fp, daysToAdd); setIncludedDays("evening", fp, daysToAdd);
$("#spwn-delivery p").text("Abendzustellung gewählt. Bitte wählen Sie nun eine Wunsch-Zeit:"); $("#spwn-delivery p").text("Abendzustellung gewählt. Bitte wählen Sie nun eine Wunsch-Zeit:");
$("#spwn-delivery .spwn-delivery--time").append("<span class='active' data-time='18:00'>18 - 20 Uhr</span><span data-time='19:00'>19 - 21 Uhr</span><span data-time='20:00'>20 - 22 Uhr</span>");
$("#spwn-delivery .spwn-delivery--time").append("<span class='active' data-time='18:00' data-hour='18'>18 - 20 Uhr</span><span data-time='19:00' data-hour='19'>19 - 21 Uhr</span><span data-time='20:00' data-hour='20'>20 - 22 Uhr</span>");
// If not date from DPD days // If not date from DPD days
if (!$(".flatpickr-day").hasClass("selected")) { if (!$(".flatpickr-day").hasClass("selected")) {
setDateSelected(); setDateSelected();
@@ -191,6 +191,7 @@ function changeDelivery(fp) {
// If DPD date is not in Abendzustellung range // If DPD date is not in Abendzustellung range
setDateSelected(); setDateSelected();
} }
$("#spwn-delivery .spwn-delivery--time span.active").trigger("click");
} else { } else {
// DPD // DPD
console.log("DPD"); console.log("DPD");
@@ -209,6 +210,7 @@ function changeDelivery(fp) {
// If Abendzustellung date is not in DPD range // If Abendzustellung date is not in DPD range
setDateSelected(); setDateSelected();
} }
$(".flatpickr-hour").val('01');
} }
} else { } else {
console.log("DPD AT"); console.log("DPD AT");
@@ -223,6 +225,7 @@ function changeDelivery(fp) {
// If Abendzustellung or DPD DE date is not in DPD AT range // If Abendzustellung or DPD DE date is not in DPD AT range
setDateSelected(); setDateSelected();
} }
$(".flatpickr-hour").val('01');
} }
} }


@@ -236,9 +239,12 @@ function setIncludedDays(delivery, fp, addDays) {
if ((delivery === "evening" && spwnTime > 1100) || (delivery === "dpd" && spwnTime > 1400)) { if ((delivery === "evening" && spwnTime > 1100) || (delivery === "dpd" && spwnTime > 1400)) {
spwnDateTemp.setDate(spwnDateTemp.getDate() + 1); spwnDateTemp.setDate(spwnDateTemp.getDate() + 1);
} }
console.log(spwnDateTemp);
let spwnDate = fp.formatDate(spwnDateTemp, "d.m.Y"); let spwnDate = fp.formatDate(spwnDateTemp, "d.m.Y");
fp.set("minDate", spwnDate); fp.set("minDate", spwnDate);


fp.set("maxDate", new Date().fp_incr(21));

fp.set("enable", [ fp.set("enable", [
function(date) { function(date) {
let day = date.getDate(); let day = date.getDate();


+ 45
- 4
zenitPlatformAtmosSet2/src/Resources/app/storefront/src/scss/overrides.scss Vedi File

@@ -154,7 +154,7 @@ input.custom-number[type=number] {
top: 8px; top: 8px;
width: 16px; width: 16px;
height: 2px; height: 2px;
background: #33548c;
background: #86b04b;
} }
&:before { &:before {
transform: rotate(-45deg); transform: rotate(-45deg);
@@ -204,19 +204,60 @@ input.custom-number[type=number] {
display: none !important; display: none !important;
} }


.swag-custom-notification-banner {
padding: 3px 6px !important;
width: 100vw;
position: relative;
left: 50%;
right: 50%;
margin: 0 -50vw 0px -50vw;
.swag-custom-notification-banner-text {
font-size: 18px;
}
}

.modal.spwn-swag-custom-notification-info {
.modal-header {
.close {
opacity: 1;
}
.icon {
color: #fff;
}
}
@media (min-width: 576px) {
.modal-dialog {
max-width: 600px !important;
}
}
.modal-content {
background: transparent;
box-shadow: none;
}
}

.swag-custom-notification-info-modal__content { .swag-custom-notification-info-modal__content {
padding-bottom: 40px; padding-bottom: 40px;
.row { .row {
align-items: center; align-items: center;
.col-md-6 {
flex: 0 0 100%;
max-width: 100%;
text-align: center;
}
h3 { h3 {
font-family: $sw-font-family-headline !important; font-family: $sw-font-family-headline !important;
font-size: 34px;
font-size: 44px;
font-weight: 700 !important; font-weight: 700 !important;
margin-bottom: 30px; margin-bottom: 30px;
font-style: italic;
display: none;
}
p {
display: none;
} }
img {
img {
width: 100%; width: 100%;
max-width: 450px;
} }
} }
} }

Caricamento…
Annulla
Salva