wickes-css2 2.94.0-develop.5 → 2.94.0-ic-298-mega-nav.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +1 -1
- package/build/css/category-main.css +1 -1
- package/build/css/emulation.css +1 -1
- package/build/css/homepage-main.css +1 -1
- package/build/css/main.css +1 -1
- package/build/css/my-account-main.css +1 -1
- package/build/css/pages/checkout-new.css +1 -1
- package/build/css/pages/checkout.css +1 -1
- package/build/css/pages/my-account.css +1 -1
- package/build/css/pages/page_checkout_delivery-new.css +1 -1
- package/build/css/pages/page_product-details-v2-critical.css +1 -1
- package/build/css/pages/page_product-details-v2.css +1 -1
- package/build/css/pages/page_shopping-cart-v2.css +1 -1
- package/build/css/pdp-main-before-combine.css +1 -1
- package/build/css/pdp-main-critical.css +1 -1
- package/build/css/pdp-main-non-critical.css +1 -1
- package/build/css/pdp-main.css +1 -1
- package/build/css/plp-main.css +1 -1
- package/build/css/store-locator-main.css +1 -1
- package/build/img/placeholders/discount-sm-15.jpg +0 -0
- package/build/img/placeholders/discount-sm.png +0 -0
- package/build/js/account-members.min.js +1 -1
- package/build/js/basket.min.js +1 -1
- package/build/js/bundle.min.js +1 -1
- package/build/js/checkout.min.js +1 -1
- package/build/js/emulation.min.js +30 -177
- package/build/js/general.bundle.min.js +1 -1
- package/build/js/merged-checkout.min.js +1 -1
- package/build/js/page/plp-load-more.js +0 -1
- package/build/js/pdp.bundle.min.js +1 -1
- package/build/js/plp.bundle.min.js +1 -1
- package/build/js/project-list.min.js +1 -1
- package/package.json +1 -1
- package/src/components/account-families/actions-bar.hbs +3 -6
- package/src/components/aside-nav2.hbs +1 -1
- package/src/components/calendar-time-table-v2.hbs +3 -0
- package/src/components/calendar-time-table.hbs +3 -0
- package/src/components/date-selection-v2.hbs +106 -0
- package/src/components/date-selection.hbs +59 -46
- package/src/components/delivery-selection.hbs +11 -0
- package/src/components/delivery-types-v2.hbs +17 -0
- package/src/components/delivery-types.hbs +38 -18
- package/src/components/navigation/menu-item-sub.hbs +33 -0
- package/src/components/navigation/menu-item-top.hbs +32 -0
- package/src/components/navigation/menu-item.hbs +32 -0
- package/src/components/navigation/nav-wrapper.hbs +12 -0
- package/src/components/store-details.hbs +20 -22
- package/src/components/store-preview.hbs +11 -0
- package/src/components.html +0 -1
- package/src/data/data_big-wins-stores.json +22 -0
- package/src/data/data_notification-page.json +0 -4
- package/src/data/navigation.json +854 -0
- package/src/elements/dropdown.hbs +5 -16
- package/src/elements/form-row.hbs +1 -1
- package/src/elements/input.hbs +2 -2
- package/src/img/placeholders/discount-sm-15.jpg +0 -0
- package/src/img/placeholders/discount-sm.png +0 -0
- package/src/js/components/date-selection.js +20 -6
- package/src/js/components/general/main-nav.js +23 -14
- package/src/js/components/general/switchVat.js +1 -27
- package/src/js/components/leave-event.js +5 -51
- package/src/js/emulation/big-wins.js +2 -0
- package/src/js/emulation/date-selection.js +21 -0
- package/src/js/emulation/forms.js +1 -1
- package/src/js/emulation/main-nav-local.js +6 -4
- package/src/js/page/plp-load-more.js +0 -1
- package/src/layouts/my-account.hbs +1 -1
- package/src/page_checkout_delivery-address.html +70 -0
- package/src/page_checkout_delivery-details-ASM.html +251 -0
- package/src/page_checkout_delivery-details-oos-partially.html +215 -0
- package/src/page_checkout_delivery-details-oos.html +232 -0
- package/src/page_checkout_delivery-details-v2-asm.html +3 -3
- package/src/page_checkout_delivery-details-v2-calendar-message.html +1 -1
- package/src/page_checkout_delivery-details-v2-oos.html +1 -1
- package/src/page_checkout_delivery-details-v2-wisdom-not-available.html +2 -2
- package/src/page_checkout_delivery-details-v2-wisdom.html +2 -2
- package/src/{page_checkout_rapid-delivery-details.html → page_checkout_delivery-details-v2.html} +3 -14
- package/src/page_checkout_delivery-details-with-loader-v2.html +1 -1
- package/src/page_checkout_delivery-details-with-loader.html +220 -0
- package/src/page_checkout_delivery-details.html +221 -0
- package/src/page_checkout_delivery-details_guest-new.html +1 -1
- package/src/page_checkout_delivery-details_guest.html +198 -0
- package/src/page_discount_installer.html +1 -7
- package/src/page_marketing-preferences.html +1 -7
- package/src/page_my-account.html +59 -56
- package/src/page_my-account_address-book.html +2 -8
- package/src/page_my-account_order-history.html +3 -8
- package/src/page_my-account_personal-details.html +1 -7
- package/src/page_old-navigation.html +10 -0
- package/src/page_tradePro_delivery-details.html +243 -0
- package/src/page_tradePro_discount.html +2 -8
- package/src/page_tradePro_rewards.html +1 -7
- package/src/page_wismo-order-history-loadmore.html +3 -3
- package/src/partials/breadcrumbs.hbs +8 -27
- package/src/partials/head.hbs +1 -5
- package/src/partials/header.hbs +49 -68
- package/src/partials/main-nav.hbs +15 -19
- package/src/scss/components/_aside-nav2.scss +0 -18
- package/src/scss/components/_big-wins-critical.scss +1 -0
- package/src/scss/components/_big-wins.scss +8 -1
- package/src/scss/components/_date-selection-add-new-styles.scss +19 -78
- package/src/scss/components/_date-selection.scss +215 -30
- package/src/scss/components/_order-item-cc.scss +6 -0
- package/src/scss/emulation.scss +24 -0
- package/src/scss/helpers/_variables.scss +1 -3
- package/src/scss/pages/_my-account_new.scss +12 -1
- package/src/scss/pages/checkout-new.scss +0 -51
- package/src/scss/pages/my-account.scss +0 -1
- package/src/scss/pages/page_checkout_delivery-new.scss +1 -2
- package/src/scss/pages/page_paint-mixing-error.scss +1 -1
- package/src/scss/partials/_header.scss +0 -35
- package/src/scss/partials/_main-nav.scss +11 -6
- package/src/sitemap.html +78 -47
- package/build/css/my-account-main-v2.css +0 -1
- package/build/css/pages/my-account-v2.css +0 -1
- package/build/css/pages/page_default-store.css +0 -1
- package/build/css/pages/page_personal-details.css +0 -1
- package/build/js/default-store.min.js +0 -1
- package/build/js/my-account.min.js +0 -1
- package/build/js/page/default-store.js +0 -44
- package/build/js/page/my-account.js +0 -51
- package/build/js/page/personal-details.js +0 -286
- package/build/js/personal-details.min.js +0 -1
- package/src/components/banner-news.hbs +0 -8
- package/src/components/default-store/current-store.hbs +0 -60
- package/src/components/default-store/list-of-store.hbs +0 -39
- package/src/components/default-store/store-form.hbs +0 -29
- package/src/components/default-store/store-unavailable.hbs +0 -4
- package/src/components/my-account/active-orders/consignment-info.hbs +0 -11
- package/src/components/my-account/active-orders/header.hbs +0 -4
- package/src/components/my-account/active-orders/list-orders.hbs +0 -9
- package/src/components/my-account/active-orders/order-details.hbs +0 -18
- package/src/components/my-account/active-orders/order-header.hbs +0 -7
- package/src/components/my-account/active-orders/order.hbs +0 -20
- package/src/components/my-account/active-orders/shipment-detail.hbs +0 -13
- package/src/components/my-account/barcode.hbs +0 -17
- package/src/components/my-account/clipboard-code-card.hbs +0 -16
- package/src/components/my-account/contact-us.hbs +0 -23
- package/src/components/my-account/discount.hbs +0 -11
- package/src/components/my-account/greetings.hbs +0 -7
- package/src/components/my-account/leave-modal.hbs +0 -13
- package/src/components/my-account/menu-items.hbs +0 -25
- package/src/components/my-account/mobile-nav.hbs +0 -46
- package/src/components/my-account/personal-details-form.hbs +0 -29
- package/src/components/my-account/personal-details.hbs +0 -14
- package/src/components/my-account/user-account-actions.hbs +0 -18
- package/src/components/user-information-field.hbs +0 -4
- package/src/data/data_calendar.json +0 -149
- package/src/data/my-account/data_my-account.json +0 -469
- package/src/data/my-account/data_personal-details.json +0 -204
- package/src/data/my-account/page_default-store.json +0 -158
- package/src/js/components/leave-event-v2.js +0 -0
- package/src/js/emulation/default-store.js +0 -97
- package/src/js/emulation/personal-details-local.js +0 -73
- package/src/js/page/default-store.js +0 -44
- package/src/js/page/my-account.js +0 -51
- package/src/js/page/personal-details.js +0 -286
- package/src/layouts/my-account-v2.hbs +0 -27
- package/src/page_checkout_next-day-delivery-details.html +0 -161
- package/src/page_default-store-page-empty.html +0 -48
- package/src/page_default-store-page.html +0 -55
- package/src/page_my-account-installer.html +0 -93
- package/src/page_my-account-trade-pro.html +0 -91
- package/src/page_personal-details-installer.html +0 -62
- package/src/page_personal-details.html +0 -60
- package/src/scss/components/my-account/_consignment-info.scss +0 -46
- package/src/scss/components/my-account/_contacts.scss +0 -116
- package/src/scss/components/my-account/_menu.scss +0 -215
- package/src/scss/components/my-account/_mobile-nav.scss +0 -130
- package/src/scss/components/my-account/_order.scss +0 -112
- package/src/scss/components/my-account/_shipment.scss +0 -93
- package/src/scss/my-account-main-v2.scss +0 -32
- package/src/scss/pages/my-account-v2.scss +0 -570
- package/src/scss/pages/page_default-store.scss +0 -634
- package/src/scss/pages/page_personal-details.scss +0 -281
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
<div class="ddn {{mod}} {{#if error}}ddn_error{{/if}}">
|
|
2
2
|
<select id="{{id}}" name="{{id}}" {{#if disabled}}disabled{{/if}}>
|
|
3
|
-
{{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
{{option.label}}
|
|
10
|
-
</option>
|
|
11
|
-
{{/each}}
|
|
12
|
-
{{else}}
|
|
13
|
-
<option value="" disabled selected hidden>{{placeholder}}</option>
|
|
14
|
-
<option value="item1">Item value</option>
|
|
15
|
-
<option value="item2">Item value 2</option>
|
|
16
|
-
<option value="item3">Item value 3</option>
|
|
17
|
-
<option value="item4">Item value 4</option>
|
|
18
|
-
{{/if}}
|
|
3
|
+
<option value="" disabled selected hidden>{{placeholder}}</option>
|
|
4
|
+
<option>Item value</option>
|
|
5
|
+
<option>Item value 2</option>
|
|
6
|
+
<option>Item value 3</option>
|
|
7
|
+
<option>Item value 4</option>
|
|
19
8
|
</select>
|
|
20
9
|
<span class="icon">
|
|
21
10
|
<i class="fas fa-chevron-down"></i>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
{{/if}}
|
|
23
23
|
{{/unless}}
|
|
24
24
|
{{#if dropdown}}
|
|
25
|
-
{{> dropdown mod=ddn-mod
|
|
25
|
+
{{> dropdown mod=ddn-mod }}
|
|
26
26
|
{{/if}}
|
|
27
27
|
{{#if infoIcon}}
|
|
28
28
|
{{> info-icon modification="icon-info" title=infoIcon data-container=(concat "." infoIcon-uid) data-placement="top"}}
|
package/src/elements/input.hbs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{#if textarea}}
|
|
2
2
|
<textarea class="tbx {{#if textarea}}tbx_textarea{{/if}} {{#if error}}tbx_error{{/if}}" rows="{{textareaRows}}" cols="{{textareaCols}}" value="{{value}}" maxlength="{{maxlength}}" id="{{id}}" name="{{#if name}}{{name}}{{else}}{{id}}{{/if}}" {{#if disabled}}disabled{{/if}}></textarea>
|
|
3
3
|
{{else if type}}
|
|
4
|
-
<input type="{{type}}" class="tbx {{#if error}}tbx_error{{/if}}
|
|
4
|
+
<input type="{{type}}" class="tbx {{#if error}}tbx_error{{/if}}" value="{{value}}" id="{{id}}" name="{{#if name}}{{name}}{{else}}{{id}}{{/if}}" {{#if (or locked disabled)}}disabled{{/if}} {{#if need-pattern}}pattern=""{{/if}} {{#if readonly}}readonly{{/if}}>
|
|
5
5
|
{{else}}
|
|
6
|
-
<input type="text" class="tbx {{#if error}}tbx_error{{/if}}
|
|
6
|
+
<input type="text" class="tbx {{#if error}}tbx_error{{/if}}" value="{{value}}" id="{{id}}" name="{{#if name}}{{name}}{{else}}{{id}}{{/if}}" placeholder="{{placeholder}}" {{#if (or locked disabled)}}disabled{{/if}} {{#if need-pattern}}pattern=""{{/if}} {{#if readonly}}readonly{{/if}}>
|
|
7
7
|
{{/if}}
|
|
Binary file
|
|
Binary file
|
|
@@ -8,20 +8,24 @@ Wick.DateSelection = function () {
|
|
|
8
8
|
calendarCell = $(calendarCellClassName),
|
|
9
9
|
calendarCellSelected = 'calendar__cell_selected',
|
|
10
10
|
calendarRowExtended = '.calendar__row_extended',
|
|
11
|
+
deliverySelection = $('.delivery-selection'),
|
|
12
|
+
deliverySelectionMobile = $('.delivery-selection-mobile'),
|
|
11
13
|
inputField = '.delivery-types__slot label',
|
|
12
14
|
confirmButton = '.delivery-types__confirm',
|
|
15
|
+
changeDateLinks = '.delivery-time__show-calendar-link, .delivery-selection__show-calendar-link',
|
|
13
16
|
validationError = $('.delivery-types__error'),
|
|
14
17
|
validationErrorShow = 'delivery-types__error-show',
|
|
18
|
+
deliverySelectionShow = 'delivery-selection-show',
|
|
15
19
|
deliveryTypesHide = 'delivery-types-hide',
|
|
16
20
|
deliveryTypesSlotLabel = $(inputField),
|
|
17
21
|
closeIcon = $('.delivery-types__accordion'),
|
|
18
22
|
deliveryTypesInnerStr = '.delivery-types__inner',
|
|
19
23
|
dateSelection = '.date-selection',
|
|
20
24
|
dateSelectionTimeVisible = 'date-selection_time-visible',
|
|
21
|
-
|
|
25
|
+
deliveryTypesWrap = $('.delivery-types-wrap'),
|
|
22
26
|
deliveryTypesBtn = 'button.btn',
|
|
23
27
|
deliveryTypeBtnClassSecondary = 'btn-secondary',
|
|
24
|
-
|
|
28
|
+
deliveryTypeBtnClass = 'delivery-type__action-btn-primary';
|
|
25
29
|
|
|
26
30
|
function init() {
|
|
27
31
|
var count = 0;
|
|
@@ -46,9 +50,9 @@ Wick.DateSelection = function () {
|
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
componentDateSelection.on('click', deliveryTypesBtn, function () {
|
|
49
|
-
$(this).parent(
|
|
50
|
-
$(this).parent(
|
|
51
|
-
$(this).addClass(
|
|
53
|
+
$(this).parent(deliveryTypesWrap).find(deliveryTypesBtn).removeClass(deliveryTypeBtnClass);
|
|
54
|
+
$(this).parent(deliveryTypesWrap).find(deliveryTypesBtn).addClass(deliveryTypeBtnClassSecondary);
|
|
55
|
+
$(this).addClass(deliveryTypeBtnClass);
|
|
52
56
|
$(this).removeClass(deliveryTypeBtnClassSecondary);
|
|
53
57
|
});
|
|
54
58
|
|
|
@@ -75,7 +79,9 @@ Wick.DateSelection = function () {
|
|
|
75
79
|
if ($(window).width() < 767) {
|
|
76
80
|
var rowExtendedBlock = $(this).closest(calendarRowExtended);
|
|
77
81
|
rowExtendedBlock.slideUp();
|
|
82
|
+
deliverySelectionMobile.show();
|
|
78
83
|
} else {
|
|
84
|
+
deliverySelection.addClass(deliverySelectionShow);
|
|
79
85
|
$deliveryTypes.addClass(deliveryTypesHide);
|
|
80
86
|
}
|
|
81
87
|
} else {
|
|
@@ -106,6 +112,7 @@ Wick.DateSelection = function () {
|
|
|
106
112
|
|
|
107
113
|
calendarCell.on("click", function () {
|
|
108
114
|
$deliveryTypes.removeClass(deliveryTypesHide);
|
|
115
|
+
deliverySelection.removeClass(deliverySelectionShow);
|
|
109
116
|
|
|
110
117
|
$(deliveryTypesInnerStr).find('input').each(function () {
|
|
111
118
|
if ($(this).attr('checked')) {
|
|
@@ -141,6 +148,12 @@ Wick.DateSelection = function () {
|
|
|
141
148
|
}
|
|
142
149
|
}
|
|
143
150
|
});
|
|
151
|
+
|
|
152
|
+
$(changeDateLinks).on("click", function () {
|
|
153
|
+
$(this).closest(dateSelection).removeClass(dateSelectionTimeVisible);
|
|
154
|
+
deliverySelection.removeClass(deliverySelectionShow);
|
|
155
|
+
calendarCell.removeClass(calendarCellSelected);
|
|
156
|
+
});
|
|
144
157
|
}
|
|
145
158
|
|
|
146
159
|
if (!componentDateSelection.length) {
|
|
@@ -153,7 +166,8 @@ Wick.DateSelection = function () {
|
|
|
153
166
|
closeIcon.unbind('click');
|
|
154
167
|
componentDateSelection.unbind('click');
|
|
155
168
|
calendarCell.unbind('click');
|
|
156
|
-
|
|
169
|
+
$(changeDateLinks).unbind('click');
|
|
170
|
+
deliveryTypesWrap.unbind('click');
|
|
157
171
|
}
|
|
158
172
|
|
|
159
173
|
$(window).on('resize', _.debounce(function () {
|
|
@@ -34,7 +34,7 @@ Wick.MainNav = (function () {
|
|
|
34
34
|
<ul class="main-nav__menu">
|
|
35
35
|
${menuSection.children.map(createMainNavItems).join('')}
|
|
36
36
|
</ul>
|
|
37
|
-
|
|
37
|
+
</div>
|
|
38
38
|
</li>
|
|
39
39
|
`
|
|
40
40
|
} else {
|
|
@@ -66,6 +66,9 @@ Wick.MainNav = (function () {
|
|
|
66
66
|
function createMainNavItems(menuSection) {
|
|
67
67
|
if (menuSection) {
|
|
68
68
|
if (menuSection.children && menuSection.children.length) {
|
|
69
|
+
if(menuSection.originalChildrenCount) {
|
|
70
|
+
console.log(menuSection)
|
|
71
|
+
}
|
|
69
72
|
return `
|
|
70
73
|
<li class="main-nav__menu__item nav-col">
|
|
71
74
|
<a href="${checkUrl(menuSection)}" class="main-nav__menu__label ${setClass(menuSection, 2)}" tabindex="0" ${setColor(menuSection)}>
|
|
@@ -259,25 +262,31 @@ Wick.MainNav = (function () {
|
|
|
259
262
|
});
|
|
260
263
|
}
|
|
261
264
|
|
|
262
|
-
|
|
265
|
+
function isSSR() {
|
|
266
|
+
return $mainNav.attr('data-ssr') === 'true'
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (isSSR()) {
|
|
270
|
+
Wick.Nav();
|
|
271
|
+
Wick.Responsive.callBr();
|
|
272
|
+
} else {
|
|
273
|
+
checkIfRealEnvironment();
|
|
274
|
+
}
|
|
263
275
|
}
|
|
264
276
|
}
|
|
265
277
|
})();
|
|
266
278
|
|
|
267
279
|
$(document).ready(function () {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
};
|
|
280
|
+
const defaultOptions = {
|
|
281
|
+
type: 'GET',
|
|
282
|
+
cache: true,
|
|
283
|
+
link: window.location.origin,
|
|
284
|
+
local: false
|
|
285
|
+
};
|
|
275
286
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
Wick.MainNav.createMainNav(defaultOptions);
|
|
287
|
+
if (!$('#main-nav').length) {
|
|
288
|
+
return;
|
|
280
289
|
}
|
|
281
290
|
|
|
282
|
-
|
|
291
|
+
Wick.MainNav.createMainNav(defaultOptions);
|
|
283
292
|
});
|
|
@@ -36,11 +36,7 @@ Wick.VatToggle = {
|
|
|
36
36
|
},
|
|
37
37
|
|
|
38
38
|
getSwitcherState: function() {
|
|
39
|
-
|
|
40
|
-
return !!$(Wick.VatToggle.el.switchVatInput).attr('checked');
|
|
41
|
-
} else {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
39
|
+
return !!$(Wick.VatToggle.el.switchVatInput).attr('checked');
|
|
44
40
|
},
|
|
45
41
|
|
|
46
42
|
createToggleEvent: function(isToggled) {
|
|
@@ -69,28 +65,6 @@ Wick.VatToggle = {
|
|
|
69
65
|
$(includingVatEl).toggleClass(hiddenClassName);
|
|
70
66
|
$(excludingVat).toggleClass(hiddenClassName);
|
|
71
67
|
},
|
|
72
|
-
reapplyDisplayClass: function () {
|
|
73
|
-
const includingVatEl = Wick.VatToggle.el.includingVat;
|
|
74
|
-
const excludingVatEl = Wick.VatToggle.el.excludingVat;
|
|
75
|
-
const hiddenClassName = Wick.VatToggle.HIDDEN_CLASS_NAME;
|
|
76
|
-
|
|
77
|
-
let vatState = null;
|
|
78
|
-
|
|
79
|
-
// check switcher state for web or cookie for app
|
|
80
|
-
if (Wick.VatToggle.getSwitcherState() !== null) {
|
|
81
|
-
vatState = Wick.VatToggle.getSwitcherState();
|
|
82
|
-
} else {
|
|
83
|
-
vatState = Wick.VatToggle.isOn();
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (vatState) {
|
|
87
|
-
$(includingVatEl).addClass(hiddenClassName);
|
|
88
|
-
$(excludingVatEl).removeClass(hiddenClassName);
|
|
89
|
-
} else {
|
|
90
|
-
$(includingVatEl).removeClass(hiddenClassName);
|
|
91
|
-
$(excludingVatEl).addClass(hiddenClassName);
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
68
|
|
|
95
69
|
updateGlobalClass: function () {
|
|
96
70
|
const includingVatGlobal = Wick.VatToggle.el.includingVatGlobalClass;
|
|
@@ -8,7 +8,7 @@ Wick.LeaveEvent = {
|
|
|
8
8
|
},
|
|
9
9
|
proceedBrowserLeave: true,
|
|
10
10
|
initialFormState: {},
|
|
11
|
-
makeLeaveByAction(e, form
|
|
11
|
+
makeLeaveByAction(e, form) {
|
|
12
12
|
const currentState = Wick.LeaveEvent.getState(form);
|
|
13
13
|
const isDifferent = !_.isEqual(currentState, Wick.LeaveEvent.initialFormState);
|
|
14
14
|
|
|
@@ -17,63 +17,20 @@ Wick.LeaveEvent = {
|
|
|
17
17
|
Wick.LeaveEvent.showCustomModal();
|
|
18
18
|
Wick.LeaveEvent.proceedBrowserLeave = false;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
if (callback && !isDifferent) {
|
|
22
|
-
callback();
|
|
23
|
-
}
|
|
24
20
|
},
|
|
25
21
|
makeLeaveByBrowser(form) {
|
|
26
22
|
const currentState = Wick.LeaveEvent.getState(form);
|
|
27
23
|
const isDifferent = !_.isEqual(currentState, Wick.LeaveEvent.initialFormState);
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (isDifferent && (csrfTokenCheck || csrfTokenCheck === undefined)) {
|
|
25
|
+
if (isDifferent) {
|
|
32
26
|
return Wick.LeaveEvent.LEAVE_MESSAGE;
|
|
33
27
|
}
|
|
34
28
|
},
|
|
35
|
-
isCsrfTokenEqual(currentState, initialFormState) {
|
|
36
|
-
const csrfTokenCurrentState = currentState.find(item => item.name === 'CSRFToken')?.value;
|
|
37
|
-
const csrfTokenNewState = initialFormState.find(item => item.name === 'CSRFToken')?.value;
|
|
38
|
-
|
|
39
|
-
return csrfTokenCurrentState === csrfTokenNewState;
|
|
40
|
-
},
|
|
41
29
|
showCustomModal() {
|
|
42
30
|
$(Wick.LeaveEvent.el.leavePopup).modal('show')
|
|
43
31
|
},
|
|
44
32
|
getState(form) {
|
|
45
|
-
|
|
46
|
-
arrForm = Wick.LeaveEvent.processSerializedArr(arrForm, form);
|
|
47
|
-
return arrForm;
|
|
48
|
-
},
|
|
49
|
-
processSerializedArr(arrForm, form) {
|
|
50
|
-
arrForm = arrForm.map((item) => {
|
|
51
|
-
let element = $(form).find(`[name="${item.name}"]`);
|
|
52
|
-
|
|
53
|
-
if (element.attr("data-tag")) {
|
|
54
|
-
let dataTagValue = element.attr("data-tag");
|
|
55
|
-
let similarElements = $(form).find(`[data-tag="${dataTagValue}"]`);
|
|
56
|
-
let hiddenElement = similarElements.filter(`[type="hidden"]`);
|
|
57
|
-
|
|
58
|
-
if (hiddenElement.length) {
|
|
59
|
-
let previousElement = similarElements.not(`[type="hidden"]`);
|
|
60
|
-
let previousValue = previousElement.val();
|
|
61
|
-
item.value = hiddenElement.val();
|
|
62
|
-
item.text = previousValue;
|
|
63
|
-
}
|
|
64
|
-
} else if (element.prop("tagName").toLowerCase() === "select") {
|
|
65
|
-
item.value = element.find("option:selected").val();
|
|
66
|
-
item.text = element.find("option:selected").text();
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (item.name === "email" && item.value) {
|
|
70
|
-
item.value = item.value.toLowerCase();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return item;
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
return arrForm;
|
|
33
|
+
return $(form).serializeArray();
|
|
77
34
|
},
|
|
78
35
|
checkLeavePopup() {
|
|
79
36
|
if (Wick.LeaveEvent.proceedBrowserLeave) {
|
|
@@ -83,12 +40,12 @@ Wick.LeaveEvent = {
|
|
|
83
40
|
removeLeaveEvent() {
|
|
84
41
|
$(window).off('beforeunload', Wick.LeaveEvent.checkLeavePopup);
|
|
85
42
|
},
|
|
86
|
-
bindEvent(form = 'form', leaveBtn, submitBtn
|
|
43
|
+
bindEvent(form = 'form', leaveBtn, submitBtn) {
|
|
87
44
|
Wick.LeaveEvent.initialFormState = Wick.LeaveEvent.getState(form);
|
|
88
45
|
Wick.LeaveEvent.el.form = form;
|
|
89
46
|
|
|
90
47
|
$(leaveBtn).on('click', (e) => {
|
|
91
|
-
Wick.LeaveEvent.makeLeaveByAction(e, form
|
|
48
|
+
Wick.LeaveEvent.makeLeaveByAction(e, form);
|
|
92
49
|
});
|
|
93
50
|
|
|
94
51
|
if ($(Wick.LeaveEvent.el.leavePopup).length) {
|
|
@@ -100,9 +57,6 @@ Wick.LeaveEvent = {
|
|
|
100
57
|
if ($(submitBtn).length) {
|
|
101
58
|
$(submitBtn).on('click', (e) => {
|
|
102
59
|
Wick.LeaveEvent.removeLeaveEvent();
|
|
103
|
-
if (callback) {
|
|
104
|
-
callback();
|
|
105
|
-
}
|
|
106
60
|
});
|
|
107
61
|
}
|
|
108
62
|
|
|
@@ -48,6 +48,7 @@ Wick.BigWinsProto = function () {
|
|
|
48
48
|
$defaultInfo: $('.default-store__det'),
|
|
49
49
|
$store: $('.store'),
|
|
50
50
|
$chosenItem: $('.chosen__item'),
|
|
51
|
+
$storeAct: $('.store__act'),
|
|
51
52
|
$storeCount: $('.store__count'),
|
|
52
53
|
$stockList: $('.stock__list'),
|
|
53
54
|
$stockTarget: $('.stock__target'),
|
|
@@ -63,6 +64,7 @@ Wick.BigWinsProto = function () {
|
|
|
63
64
|
$findStore: $('.my-account_find-store'),
|
|
64
65
|
$postCodeErrorMsg: $('.stock__postcode_invalid-msg'),
|
|
65
66
|
$ccOrder: $('.cc-order'),
|
|
67
|
+
storeAct: 'store__act',
|
|
66
68
|
storeState: 'store__state',
|
|
67
69
|
storeCount: '.store__count',
|
|
68
70
|
ccBtn: '.bw__cc-btn',
|
|
@@ -4,6 +4,7 @@ Wick.DateSelection = (function(){
|
|
|
4
4
|
cell = '.calendar__cell_cnt',
|
|
5
5
|
selectedCell = 'calendar__cell_selected',
|
|
6
6
|
isSelected = 'date-selection_selected',
|
|
7
|
+
backToCalendar = '.delivery-time__show-calendar-link',
|
|
7
8
|
isDateSelected = false;
|
|
8
9
|
|
|
9
10
|
var selectTimeSlot = function(e){
|
|
@@ -14,12 +15,32 @@ Wick.DateSelection = (function(){
|
|
|
14
15
|
isDateSelected = true;
|
|
15
16
|
};
|
|
16
17
|
|
|
18
|
+
var mobileView = function(){
|
|
19
|
+
var isTimeSlotsVisible = 'date-selection_time-visible';
|
|
20
|
+
|
|
21
|
+
$self
|
|
22
|
+
.off('.time')
|
|
23
|
+
.removeClass(isTimeSlotsVisible)
|
|
24
|
+
.on('click.time', cell, function(){
|
|
25
|
+
$self.addClass(isTimeSlotsVisible);
|
|
26
|
+
})
|
|
27
|
+
.on('click.time', backToCalendar, function(){
|
|
28
|
+
$self.removeClass(isTimeSlotsVisible);
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
17
32
|
var init = function () {
|
|
18
33
|
if (!$self.length) {
|
|
19
34
|
return;
|
|
20
35
|
}
|
|
21
36
|
|
|
22
37
|
$self.on('click', cell, selectTimeSlot);
|
|
38
|
+
new SimpleBar($self.find('.delivery-types__inner')[0]);
|
|
39
|
+
|
|
40
|
+
if (Wick.Responsive.getCurrentBreakpoint() === 'down-sm') {
|
|
41
|
+
mobileView();
|
|
42
|
+
}
|
|
43
|
+
Wick.Responsive.onBreakpoint(mobileView, 'down-sm');
|
|
23
44
|
}
|
|
24
45
|
|
|
25
46
|
init();
|
|
@@ -5,7 +5,7 @@ Wick.Forms = (function(){
|
|
|
5
5
|
fieldError = '.form-row__error',
|
|
6
6
|
formInvalid = 'form_invalid',
|
|
7
7
|
rowValidationError = 'form-row_validation-error',
|
|
8
|
-
excludedClassesForForm = ['header', 'quiz-modal__form'
|
|
8
|
+
excludedClassesForForm = ['header', 'quiz-modal__form'],
|
|
9
9
|
// validationError = '<div class="form-row__error">Error message here</div>',
|
|
10
10
|
$forgotPassword = $('.link-forgot-password'),
|
|
11
11
|
scenarios = [{
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
var Wick = Wick || {};
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Wick.MainNavLocal = function(){
|
|
3
4
|
function init() {
|
|
4
5
|
var localOptions = {
|
|
5
6
|
local: true,
|
|
6
7
|
mockData: Wick.MainNavData.returnData()
|
|
7
8
|
};
|
|
8
9
|
|
|
9
|
-
if (!$('#main-nav').length) {
|
|
10
|
+
if (!$('#main-nav').length || !$('.ssc-nav').length) {
|
|
10
11
|
return;
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
|
|
13
15
|
setTimeout(()=> {
|
|
14
16
|
Wick.MainNav.createMainNav(localOptions);
|
|
15
17
|
}, 2000)
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
init()
|
|
19
|
-
}
|
|
20
|
+
init()
|
|
21
|
+
}();
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{{#extend "checkout" pageClass="page_checkout-delivery-address" title="Checkout - Delivery address" logout=true isAsideSticky="true"}}
|
|
2
|
+
{{#content "steps"}}
|
|
3
|
+
{{> steps active-step-index="1" }}
|
|
4
|
+
{{/content}}
|
|
5
|
+
{{#content "main"}}
|
|
6
|
+
<div class="delivery-address">
|
|
7
|
+
<div data-addresses>
|
|
8
|
+
{{> user-address-simplified radioName="checkout-address-radio" modal="modalDeliveryEdit" mod="js-selectable"
|
|
9
|
+
selectedAddress=true simpleAddress=true isDeleted=true hasRemove=true}}
|
|
10
|
+
</div>
|
|
11
|
+
<div data-new-address style="display: none;">
|
|
12
|
+
<div class="delivery-address__btn-back">
|
|
13
|
+
<a href="#" class="link-primary btn-back-to-addresses">Back to choose address</a>
|
|
14
|
+
</div>
|
|
15
|
+
<form class="form-wrapper delivery-address-form" id="form-checkout-your-details" data-action="./page_checkout_delivery-details.html">
|
|
16
|
+
<div class="delivery-address-form__inner">
|
|
17
|
+
{{> checkout_your-details uid="cyd1" address-list=true}}
|
|
18
|
+
</div>
|
|
19
|
+
</form>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
<div class="delivery-address__actions">
|
|
26
|
+
<a href="#" class="btn-new-address">Add new address</a>
|
|
27
|
+
<a href="./page_checkout_delivery-details.html" class="btn_full btn btn-action checkout-widget__outer-button btn-delivery-details btn-md-lg-continue-delivery-details">Continue to delivery details
|
|
28
|
+
<span class="icon">
|
|
29
|
+
<i class="fas fa-arrow-right"></i>
|
|
30
|
+
</span>
|
|
31
|
+
</a>
|
|
32
|
+
</div>
|
|
33
|
+
{{/content}}
|
|
34
|
+
{{#content "aside"}}
|
|
35
|
+
{{> checkout_order-summary label="Subtotal: "}}
|
|
36
|
+
<a href="./page_checkout_delivery-details.html" class="btn_full btn btn-action checkout-widget__outer-button btn-delivery-details">Continue to delivery details
|
|
37
|
+
<span class="icon">
|
|
38
|
+
<i class="fas fa-arrow-right"></i>
|
|
39
|
+
</span>
|
|
40
|
+
</a>
|
|
41
|
+
{{/content}}
|
|
42
|
+
{{#content "foot" mode="append"}}
|
|
43
|
+
<script defer src="js/page/checkout-delivery-address.js"></script>
|
|
44
|
+
|
|
45
|
+
{{#extend "modal" id="modalDeliveryEdit" title="Edit delivery address" fullWidth=true classMod="edit-delivery-addr-guest"}}
|
|
46
|
+
{{#content "sections"}}
|
|
47
|
+
|
|
48
|
+
{{#extend "modal-body-section" customSectionClass="edit-delivery-addr-guest__form"}}
|
|
49
|
+
{{#content "body"}}
|
|
50
|
+
<form class="form-wrapper" id="checkout-your-details-modal">
|
|
51
|
+
{{> checkout_your-details open-delivery-block="true" uid="cyd2"}}
|
|
52
|
+
<div class="form-row form-row__action">
|
|
53
|
+
<div class="form-row__col-btn">
|
|
54
|
+
<button class="btn btn-action btn_full">
|
|
55
|
+
<span class="btn__text">Continue to delivery details</span>
|
|
56
|
+
<span class="icon">
|
|
57
|
+
<i class="fas fa-arrow-right"></i>
|
|
58
|
+
</span>
|
|
59
|
+
</button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</form>
|
|
63
|
+
{{/content}}
|
|
64
|
+
{{/extend}}
|
|
65
|
+
|
|
66
|
+
{{/content}}
|
|
67
|
+
{{/extend}}
|
|
68
|
+
|
|
69
|
+
{{/content}}
|
|
70
|
+
{{/extend}}
|