diff --git a/zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss b/zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss index 69113c9..8f016fa 100644 --- a/zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss +++ b/zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss @@ -13,6 +13,7 @@ html { body { background: #fff; + overflow-x: hidden; } h1 { @@ -42,7 +43,7 @@ h6 { } .breadcrumb-container { - display: none; + display: none; } .cms-block { @@ -106,6 +107,7 @@ input.custom-number[type=number] { } } + /* Wunschliefertermin Datepicker */ .confirm-delivery-date { .spwn-date-wrapper { @@ -148,12 +150,13 @@ input.custom-number[type=number] { &:after { 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 { border-color: #33548c; background: #33548c; } } + #spwn-delivery { padding: 0 0 40px 0; .spwn-delivery--time { @@ -163,7 +166,7 @@ input.custom-number[type=number] { cursor: pointer; display: inline-block; margin: 0 20px 0 0; - color: #33548c; + color: #86b04b; font-size: 16px; line-height: 18px; border: 2px solid #33548c; @@ -178,7 +181,7 @@ input.custom-number[type=number] { transition: all .15s ease-in-out; &:hover, &.active { - background: #33548c; + background: #86b04b; color: #fff; } } @@ -190,18 +193,60 @@ input.custom-number[type=number] { 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; + } + } +} \ No newline at end of file diff --git a/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js b/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js index 82ed5d9..ab6122e 100644 --- a/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js +++ b/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js @@ -45,24 +45,17 @@ $(document).ready(function() { /* Set first selectable day selected */ // 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) { let inputTemp = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(); spawnDateInputValue = inputTemp.substring(0, inputTemp.length - 6); - console.log("A2"); - console.log(spawnDateInputValue); } else { spawnDateInputValue = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(); - console.log("3"); - console.log(spawnDateInputValue); } if (spawnDateInputValue === '') { setDateSelected(); } - $("#spwn-dp-input").val(spawnDateInputValue); - + $("body").find("#spwn-dp-input").val(spawnDateInputValue); + changeDelivery(fp); } @@ -108,27 +101,24 @@ function easeOutCuaic(t){ } function manipulateDateInputValue() { + console.log("manipulateDateInputValue"); // 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) { let inputTemp = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(); spawnDateInputValue = inputTemp.substring(0, inputTemp.length - 6); - console.log("B2"); - console.log(spawnDateInputValue); } else { spawnDateInputValue = $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(); - console.log("B3"); - console.log(spawnDateInputValue); } if (inputSameDayDelivery.is(':checked')) { // If same day delivery is checked, select time $("#spwn-delivery .spwn-delivery--time span.active").trigger("click"); + } else { + $("#spwn-dp-input").val(spawnDateInputValue); } } function setDateSelected() { + console.log("setDateSelected"); let spwnFirstSelectableDay = $(".flatpickr-day:not(.flatpickr-disabled)").first().text(); let spwnFPdate = new Date(); let spwnDay = spwnFPdate.getDate(); @@ -145,12 +135,13 @@ function setDateSelected() { } function changeDelivery(fp) { - + console.log("changeDelivery"); $("body").on("click", "#spwn-delivery .spwn-delivery--time span", function() { $("#spwn-delivery .spwn-delivery--time span").removeClass("active"); $(this).addClass("active"); $(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $(this).text()); $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $(this).attr('data-time')); + $(".flatpickr-hour").val($(this).attr('data-hour')); }); let daysToAdd = 0; @@ -163,21 +154,30 @@ function changeDelivery(fp) { // Abholung im Ladengeschäft console.log("Abholung"); $(".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(); $("#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')) { // Abendzustellung console.log("Abendzustellung"); - $(".confirm-delivery-date #spwn-dp-input").val(''); - $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(''); spwnIncludedDays = [1, 2, 3, 4, 5]; if (daysToAdd === 0) { daysToAdd = 0; } setIncludedDays("evening", fp, daysToAdd); $("#spwn-delivery p").text("Abendzustellung gewählt. Bitte wählen Sie nun eine Wunsch-Zeit:"); - $("#spwn-delivery .spwn-delivery--time").append("18 - 20 Uhr19 - 21 Uhr20 - 22 Uhr"); + $("#spwn-delivery .spwn-delivery--time").append("18 - 20 Uhr19 - 21 Uhr20 - 22 Uhr"); // If not date from DPD days if (!$(".flatpickr-day").hasClass("selected")) { setDateSelected(); @@ -191,6 +191,7 @@ function changeDelivery(fp) { // If DPD date is not in Abendzustellung range setDateSelected(); } + $("#spwn-delivery .spwn-delivery--time span.active").trigger("click"); } else { // DPD console.log("DPD"); @@ -209,6 +210,7 @@ function changeDelivery(fp) { // If Abendzustellung date is not in DPD range setDateSelected(); } + $(".flatpickr-hour").val('01'); } } else { console.log("DPD AT"); @@ -223,6 +225,7 @@ function changeDelivery(fp) { // If Abendzustellung or DPD DE date is not in DPD AT range setDateSelected(); } + $(".flatpickr-hour").val('01'); } } @@ -236,9 +239,12 @@ function setIncludedDays(delivery, fp, addDays) { if ((delivery === "evening" && spwnTime > 1100) || (delivery === "dpd" && spwnTime > 1400)) { spwnDateTemp.setDate(spwnDateTemp.getDate() + 1); } + console.log(spwnDateTemp); let spwnDate = fp.formatDate(spwnDateTemp, "d.m.Y"); fp.set("minDate", spwnDate); + fp.set("maxDate", new Date().fp_incr(21)); + fp.set("enable", [ function(date) { let day = date.getDate(); diff --git a/zenitPlatformAtmosSet2/src/Resources/app/storefront/src/scss/overrides.scss b/zenitPlatformAtmosSet2/src/Resources/app/storefront/src/scss/overrides.scss index 5d68c2d..bc3a49c 100644 --- a/zenitPlatformAtmosSet2/src/Resources/app/storefront/src/scss/overrides.scss +++ b/zenitPlatformAtmosSet2/src/Resources/app/storefront/src/scss/overrides.scss @@ -154,7 +154,7 @@ input.custom-number[type=number] { top: 8px; width: 16px; height: 2px; - background: #33548c; + background: #86b04b; } &:before { transform: rotate(-45deg); @@ -204,19 +204,60 @@ input.custom-number[type=number] { 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 { 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: 34px; + font-size: 44px; font-weight: 700 !important; margin-bottom: 30px; - font-style: italic; + display: none; + } + p { + display: none; } - img { + img { width: 100%; + max-width: 450px; } } } \ No newline at end of file