Florian Eisenmenger 3 лет назад
Родитель
Сommit
33b09e49d0
3 измененных файлов: 19 добавлений и 9 удалений
  1. +9
    -4
      zenitPlatformAtmosSet1/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set1.js
  2. +1
    -1
      zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss
  3. +9
    -4
      zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js

+ 9
- 4
zenitPlatformAtmosSet1/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set1.js Просмотреть файл

@@ -111,7 +111,10 @@ function manipulateDateInputValue() {
}
if (inputSameDayDelivery.is(':checked')) {
// 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");
$(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $("#spwn-delivery .spwn-delivery--time span.active").text());
$(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $("#spwn-delivery .spwn-delivery--time span.active").attr('data-time'));
$(".flatpickr-hour").val($("#spwn-delivery .spwn-delivery--time span.active").attr('data-hour'));
} else {
$("#spwn-dp-input").val(spawnDateInputValue);
}
@@ -140,8 +143,10 @@ function changeDelivery(fp) {
$("#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'));
let spawnDateTime = spawnDateInputValue + " " + $(this).attr('data-time');
$(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateTime);
$(".flatpickr-hour").val($(this).attr('data-hour'));
fp.setDate(spawnDateInputValue, true, "d.m.Y H:i");
});

let daysToAdd = 0;
@@ -202,7 +207,7 @@ function changeDelivery(fp) {
// If Abendzustellung date is not in DPD range
setDateSelected();
}
$(".flatpickr-hour").val('00');
$(".flatpickr-hour").val('01');
}
} else {
console.log("DPD AT");
@@ -217,7 +222,7 @@ function changeDelivery(fp) {
// If Abendzustellung or DPD DE date is not in DPD AT range
setDateSelected();
}
$(".flatpickr-hour").val('00');
$(".flatpickr-hour").val('01');
}
}



+ 1
- 1
zenitPlatformAtmosSet1/src/Resources/app/storefront/src/scss/overrides.scss Просмотреть файл

@@ -181,7 +181,7 @@ input.custom-number[type=number] {
transition: all .15s ease-in-out;
&:hover,
&.active {
background: #86b04b;
background: #33548c;
color: #fff;
}
}


+ 9
- 4
zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js Просмотреть файл

@@ -111,7 +111,10 @@ function manipulateDateInputValue() {
}
if (inputSameDayDelivery.is(':checked')) {
// 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");
$(".confirm-delivery-date #spwn-dp-input").val(spawnDateInputValue + " " + $("#spwn-delivery .spwn-delivery--time span.active").text());
$(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $("#spwn-delivery .spwn-delivery--time span.active").attr('data-time'));
$(".flatpickr-hour").val($("#spwn-delivery .spwn-delivery--time span.active").attr('data-hour'));
} else {
$("#spwn-dp-input").val(spawnDateInputValue);
}
@@ -140,8 +143,10 @@ function changeDelivery(fp) {
$("#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'));
let spawnDateTime = spawnDateInputValue + " " + $(this).attr('data-time');
$(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateTime);
$(".flatpickr-hour").val($(this).attr('data-hour'));
fp.setDate(spawnDateInputValue, true, "d.m.Y H:i");
});

let daysToAdd = 0;
@@ -202,7 +207,7 @@ function changeDelivery(fp) {
// If Abendzustellung date is not in DPD range
setDateSelected();
}
$(".flatpickr-hour").val('00');
$(".flatpickr-hour").val('01');
}
} else {
console.log("DPD AT");
@@ -217,7 +222,7 @@ function changeDelivery(fp) {
// If Abendzustellung or DPD DE date is not in DPD AT range
setDateSelected();
}
$(".flatpickr-hour").val('00');
$(".flatpickr-hour").val('01');
}
}



Загрузка…
Отмена
Сохранить