Changeset 2745279
- Timestamp:
- 06/20/2022 12:34:10 PM (4 years ago)
- Location:
- orderable
- Files:
-
- 10 added
- 46 edited
- 1 copied
-
tags/1.4.0 (copied) (copied from orderable/trunk)
-
tags/1.4.0/assets/admin/js/main.min.js (modified) (1 diff)
-
tags/1.4.0/assets/frontend/css/main.css (modified) (2 diffs)
-
tags/1.4.0/assets/frontend/css/main.min.css (modified) (1 diff)
-
tags/1.4.0/assets/frontend/js/main.js (modified) (13 diffs)
-
tags/1.4.0/assets/frontend/js/main.min.js (modified) (1 diff)
-
tags/1.4.0/inc/class-ajax.php (modified) (2 diffs)
-
tags/1.4.0/inc/class-helpers.php (modified) (3 diffs)
-
tags/1.4.0/inc/class-modules.php (modified) (1 diff)
-
tags/1.4.0/inc/class-products.php (modified) (1 diff)
-
tags/1.4.0/inc/class-shortcodes.php (added)
-
tags/1.4.0/inc/modules/drawer/class-drawer-ajax.php (modified) (2 diffs)
-
tags/1.4.0/inc/modules/layouts/assets/admin/js/main.min.js (modified) (1 diff)
-
tags/1.4.0/inc/modules/live-view/assets/js/admin.js (modified) (2 diffs)
-
tags/1.4.0/inc/modules/live-view/class-live-view.php (modified) (1 diff)
-
tags/1.4.0/inc/modules/notifications (added)
-
tags/1.4.0/inc/modules/notifications/class-notifications.php (added)
-
tags/1.4.0/inc/modules/services/class-services-order.php (modified) (3 diffs)
-
tags/1.4.0/inc/modules/table-ordering (added)
-
tags/1.4.0/inc/modules/table-ordering/class-table-ordering.php (added)
-
tags/1.4.0/inc/modules/timings/class-timings-order.php (modified) (3 diffs)
-
tags/1.4.0/inc/modules/timings/class-timings-settings.php (modified) (1 diff)
-
tags/1.4.0/inc/modules/tip/class-tip.php (modified) (1 diff)
-
tags/1.4.0/languages/orderable.pot (modified) (10 diffs)
-
tags/1.4.0/orderable.php (modified) (4 diffs)
-
tags/1.4.0/readme.txt (modified) (2 diffs)
-
tags/1.4.0/templates/product/actions.php (modified) (1 diff)
-
tags/1.4.0/templates/product/options.php (modified) (2 diffs)
-
tags/1.4.0/woocommerce/cart/mini-cart.php (modified) (2 diffs)
-
trunk/assets/admin/js/main.min.js (modified) (1 diff)
-
trunk/assets/frontend/css/main.css (modified) (2 diffs)
-
trunk/assets/frontend/css/main.min.css (modified) (1 diff)
-
trunk/assets/frontend/js/main.js (modified) (13 diffs)
-
trunk/assets/frontend/js/main.min.js (modified) (1 diff)
-
trunk/inc/class-ajax.php (modified) (2 diffs)
-
trunk/inc/class-helpers.php (modified) (3 diffs)
-
trunk/inc/class-modules.php (modified) (1 diff)
-
trunk/inc/class-products.php (modified) (1 diff)
-
trunk/inc/class-shortcodes.php (added)
-
trunk/inc/modules/drawer/class-drawer-ajax.php (modified) (2 diffs)
-
trunk/inc/modules/layouts/assets/admin/js/main.min.js (modified) (1 diff)
-
trunk/inc/modules/live-view/assets/js/admin.js (modified) (2 diffs)
-
trunk/inc/modules/live-view/class-live-view.php (modified) (1 diff)
-
trunk/inc/modules/notifications (added)
-
trunk/inc/modules/notifications/class-notifications.php (added)
-
trunk/inc/modules/services/class-services-order.php (modified) (3 diffs)
-
trunk/inc/modules/table-ordering (added)
-
trunk/inc/modules/table-ordering/class-table-ordering.php (added)
-
trunk/inc/modules/timings/class-timings-order.php (modified) (3 diffs)
-
trunk/inc/modules/timings/class-timings-settings.php (modified) (1 diff)
-
trunk/inc/modules/tip/class-tip.php (modified) (1 diff)
-
trunk/languages/orderable.pot (modified) (10 diffs)
-
trunk/orderable.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/product/actions.php (modified) (1 diff)
-
trunk/templates/product/options.php (modified) (2 diffs)
-
trunk/woocommerce/cart/mini-cart.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
orderable/tags/1.4.0/assets/admin/js/main.min.js
r2709284 r2745279 1 !function(n,e){"use strict";var t=function(){n(e.body).on("change",".orderable-table--product-lists input, .orderable-table--product-lists select",function(e){var t=n(this).closest(".orderable-table__row--repeatable"),r=t.find(".orderable-field--product-list-shortcode"),o={categories:"",layout:"grid",images:"true"},t={categories:t.find(".orderable-select--categories").val().toString(),layout:t.find(".orderable-select--layout").val().toString(),images:t.find(".orderable-checkbox--images").is(":checked").toString()},a="[orderable";n.each(t,function(e,t){t!==o[e]&&(a+=" "+e+'="'+t+'"')}),a+="]",r.val(a)})};n(e).ready(t)}(jQuery,document),function(n,e){"use strict";var r={on_ready:function(){r.init(n(".orderable-select--multi-select")),n(e).on("orderable-init-multiselects",function(e,t){void 0!==t.selects&&r.init(t.selects)}),n(e).on("orderable-destroy-multiselects",function(e,t){void 0!==t.selects&&r.destroy(t.selects)})},init:function(e){e.multiSelect(),e.each(function(e,t){var t=n(t),r=t.siblings(".multi-select-container"),o=r.find(".multi-select-menuitem--none"),t=t.data("orderable-select-none-option"),o=(o.remove(),r.find(".multi-select-menuitem")),a=r.find(".multi-select-menuitems input:disabled").parent();o.show(),a.hide(),o.length===a.length&&t&&r.find(".multi-select-menuitems").append('<span class="multi-select-menuitem multi-select-menuitem--none">'+t+"</span>")})},destroy:function(e){e.siblings(".multi-select-container").remove(),e.data("plugin_multiSelect",!1)}};n(e).ready(r.on_ready)}(jQuery,document),function(a,e){"use strict";var r={on_ready:function(){a(e.body).on("iconic_onboard_wait_complete",r.init.woo_installed)},init:{woo_installed:function(e,t){void 0!==t&&"install_plugin"===t.wait_event&&"woocommerce"===t.json.plugin_data["repo-slug"]&&r.populate_woo_fields()}},populate_woo_fields:function(){var e={default_country:{type:"select",selector:"select#iconic_onboard_default_country"},business_name:{type:"text",selector:"input#iconic_onboard_business_name"},business_address:{type:"text",selector:"input#iconic_onboard_business_address"},business_address_2:{type:"text",selector:"input#iconic_onboard_business_address_2"},business_city:{type:"text",selector:"input#iconic_onboard_business_city"},business_postcode:{type:"text",selector:"input#iconic_onboard_business_postcode"}};a.post(ajaxurl,{action:"orderable_get_onboard_woo_fields",fields:e}).done(function(o){try{o.success&&a.each(e,function(e,t){var r=a(t.selector);r.length<=0||void 0===o.data[e]||("select"===t.type?r.html(o.data[e]):r.val(o.data[e]))})}catch(e){console.log(o),console.log(e),alert("Couldn't save.")}}).fail(function(){alert("Couldn't save. Are you connected to the internet? ")}).always(function(){})}};a(e).ready(r.on_ready)}(jQuery,document),jQuery(document).ready(function(){setTimeout(function(){"undefined"!=typeof orderable_pointers&&jQuery.each(orderable_pointers.pointers,function(e){return function e(t){var r,o,n=orderable_pointers.pointers[t];void 0!==n&&(r=jQuery.extend(n.options,{pointerClass:"wp-pointer wc-pointer orderable-pointer",close:function(){jQuery.post(orderable_pointers.ajax_url,{pointer:t,action:"dismiss-wp-pointer"}),n&&n.next&&orderable_pointers.pointers[n.next]&&setTimeout(function(){e(n.next)},250)},skip:function(){var e=document.querySelectorAll(".wp-pointer.orderable-pointer");Array.from(e).forEach(function(e){e.remove()}),jQuery.post(orderable_pointers.ajax_url,{pointer:"orderable-tour-dismissed",action:"dismiss-wp-pointer"})},buttons:function(e,t){var r=n&&n.next&&orderable_pointers.pointers[n.next]?orderable_pointers.i18n.next:orderable_pointers.i18n.close,r=jQuery('<a class="button button-primary" href="#">'+r+"</a>"),o=jQuery('<div class="wc-pointer-buttons" />'),a=orderable_pointers.i18n.skip,a=jQuery('<a class="button button-secondary" href="#">'+a+"</a>");return r.bind("click.pointer",function(e){e.preventDefault(),t.element.pointer("close")}),a.bind("click.pointer",function(e){e.preventDefault(),n.options.skip()}),o.append(r),o.append(a),o}}),(o=jQuery(n.target).pointer(r)).pointer("open"),n.next_trigger&&jQuery(n.next_trigger.target).on(n.next_trigger.event,function(){setTimeout(function(){o.pointer("close")},400)}))}(e),!1})},800)}),function(e,t){"use strict";var r={on_ready:function(){e(t.body).on("orderable-pro-modal",r.trigger_pro_modal)},trigger_pro_modal:function(){console.log("Pro only."),tb_show("Pro Feature","#TB_inline?inlineId=orderable-pro-modal")}};e(t).ready(r.on_ready)}(jQuery,document),function(n,l){"use strict";var e=function(){n(l.body).on("change",".orderable-enable-day",function(e){var t=n(this),r=t.data("orderable-day"),t=t.is(":checked"),o=n(".orderable-select--days");o.find('option[value="'+r+'"]').attr("disabled",!t).attr("selected",!1),n(l).trigger("orderable-destroy-multiselects",{selects:o}),n(l).trigger("orderable-init-multiselects",{selects:o})}),n(l.body).on("change",'[name*="\\[store_general_services\\]"]',function(e){var t=n(this),r=t.val(),t=t.is(":checked"),r=n(".orderable-toggle-wrapper--"+r+', button[data-orderable-wrapper="'+r+'"]'),o="orderable-ui-hide",a=n(".orderable-notice--select-service"),t=(t?r.removeClass(o):r.addClass(o),n('[name*="\\[store_general_services\\]"]:checked')),a=(t.length<=0?a.removeClass(o):(a.addClass(o),r=t.eq(0).val(),n('button[data-orderable-wrapper="'+r+'"]').click()),n("#orderable_settings_store_general_service_hours_pickup_same")),r=a.data("default-state");void 0===r&&(r=a.is(":checked"),a.data("default-state",r)),1===t.length&&"pickup"===t.val()?(a.prop("checked",!1).parent().addClass(o),n(l.body).trigger("orderable-toggle-element",{trigger_element:a[0],add_class:!1})):(a.prop("checked",r).parent().removeClass(o),n(l.body).trigger("orderable-toggle-element",{trigger_element:a[0],add_class:r})),n(l).trigger("orderable-add-last-row-class")}),n(l.body).on("change","#orderable_settings_store_general_service_hours_pickup_same",function(e){n(this).data("default-state",n(this).is(":checked"))}),n(".orderable-enable-day").on("change",function(){jQuery(this).closest("tr").toggleClass("orderable-table__row--hidden",!this.checked)})};n(l).ready(e)}(jQuery,document),function(a,n){"use strict";var e={on_ready:function(){a(n.body).on("click change","[data-orderable-trigger]",function(e){var t=a(this),r=t.data("orderable-trigger");"click"===e.type&&(t.is("select")||t.is("input")||t.is("label"))||((t.is("button")||t.is("a"))&&e.preventDefault(),a(n.body).trigger("orderable-"+r,{trigger_element:t}))}),a(n.body).on("orderable-new-row",function(e,t){var t=a(t.trigger_element),t=a(t.data("orderable-target")).find(".orderable-table__body"),r=t.find(".orderable-table__row--repeatable:last-child"),o=parseInt(r.data("orderable-index"))+1,r=r[0].outerHTML.replace(/\[\d+\]/gm,"["+o+"]").replace(/data-orderable-index="\d+"/gm,'data-orderable-index="'+o+'"'),o=(t.append(r),t.find(".orderable-table__row--repeatable:last-child"));o.find("input").not('input[type="checkbox"]').val(""),o.find(".hasDatepicker").each(function(e,t){a(t).removeClass("hasDatepicker").attr("id","")}),o.find("select").each(function(e,t){var t=a(t),r=t.find('option[value=""]'),o=t.hasClass("orderable-select--multi-select"),r=r.length||o?"":t.find("option:first-child").val();t.val(r),o&&t.change()}),o.find('input[type="checkbox"]').prop("checked",!1),o.find(".multi-select-container").remove(),a(n).trigger("orderable-init-multiselects",{selects:t.find(".orderable-select--multi-select")}),t.find('[data-orderable-trigger="toggle-element-select"]').change(),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-remove-row",function(e,t){var t=a(t.trigger_element),r=t.closest("tr");1===t.closest("tbody").find(">tr").length?(r.find("input").val(""),r.find('input[type="checkbox"], input[type="radio"]').prop("checked",!1),r.find("select").each(function(){a(this).hasClass("orderable-select--multi-select")||(this.selectedIndex=0,a(this).trigger("change"))}),r.find('.multi-select-container input[type="checkbox"]').trigger("change")):r.remove(),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-toggle-element",function(e,t){t.add_class=void 0!==t.add_class?t.add_class:null;var r=a(t.trigger_element),o=a(r.data("orderable-target")),r=r.data("orderable-toggle-class");null===t.add_class?o.toggleClass(r):!0===t.add_class?o.addClass(r):!1===t.add_class&&o.removeClass(r),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-toggle-element-select",function(e,t){var t=a(t.trigger_element),r=t.closest(t.data("orderable-parent")),o=t.data("orderable-target"),t=t.val();r.length<=0||void 0===o||void 0===o[t]||(a.each(o[t],function(e,t){t=r.find(t);"show"===e?t.show():"hide"===e&&t.hide()}),a(n).trigger("orderable-add-last-row-class"))}),a(n.body).on("orderable-toggle-wrapper",function(e,t){var t=a(t.trigger_element),r=t.data("orderable-wrapper"),t=t.data("orderable-wrapper-group"),o=a(".orderable-toggle-wrapper--"+r+'[data-orderable-wrapper-group="'+t+'"]');a('.orderable-toggle-wrapper[data-orderable-wrapper-group="'+t+'"]').removeClass("orderable-toggle-wrapper--active"),o.addClass("orderable-toggle-wrapper--active"),a('[data-orderable-wrapper-group="'+t+'"]').removeClass("orderable-trigger-element--active"),a('[data-orderable-wrapper="'+r+'"]').addClass("orderable-trigger-element--active"),a(n).trigger("orderable-add-last-row-class")}),a(n).on("orderable-add-last-row-class",e.add_last_row_class),a(n).trigger("orderable-add-last-row-class")},add_last_row_class:function(){var e=a(".orderable-table"),t="orderable-table__row--last",r=e.find("."+t),e=e.find("tbody > tr:visible:last");r.removeClass(t),e.addClass(t)}};a(n).ready(e.on_ready)}(jQuery,document);1 !function(n,e){"use strict";var t=function(){n(e.body).on("change",".orderable-table--product-lists input, .orderable-table--product-lists select",function(e){var t=n(this).closest(".orderable-table__row--repeatable"),r=t.find(".orderable-field--product-list-shortcode"),o={categories:"",layout:"grid",images:"true"},t={categories:t.find(".orderable-select--categories").val().toString(),layout:t.find(".orderable-select--layout").val().toString(),images:t.find(".orderable-checkbox--images").is(":checked").toString()},a="[orderable";n.each(t,function(e,t){t!==o[e]&&(a+=" "+e+'="'+t+'"')}),a+="]",r.val(a)})};n(e).ready(t)}(jQuery,document),function(n,e){"use strict";var r={on_ready:function(){r.init(n(".orderable-select--multi-select")),n(e).on("orderable-init-multiselects",function(e,t){void 0!==t.selects&&r.init(t.selects)}),n(e).on("orderable-destroy-multiselects",function(e,t){void 0!==t.selects&&r.destroy(t.selects)})},init:function(e){e.multiSelect(),e.each(function(e,t){var r=n(t),o=r.siblings(".multi-select-container"),a=o.find(".multi-select-menuitem--none"),t=r.data("orderable-select-none-option");a.remove();r=o.find(".multi-select-menuitem"),a=o.find(".multi-select-menuitems input:disabled").parent();r.show(),a.hide(),r.length===a.length&&t&&o.find(".multi-select-menuitems").append('<span class="multi-select-menuitem multi-select-menuitem--none">'+t+"</span>")})},destroy:function(e){e.siblings(".multi-select-container").remove(),e.data("plugin_multiSelect",!1)}};n(e).ready(r.on_ready)}(jQuery,document),function(a,e){"use strict";var r={on_ready:function(){a(e.body).on("iconic_onboard_wait_complete",r.init.woo_installed)},init:{woo_installed:function(e,t){void 0!==t&&"install_plugin"===t.wait_event&&"woocommerce"===t.json.plugin_data["repo-slug"]&&r.populate_woo_fields()}},populate_woo_fields:function(){var e={default_country:{type:"select",selector:"select#iconic_onboard_default_country"},business_name:{type:"text",selector:"input#iconic_onboard_business_name"},business_address:{type:"text",selector:"input#iconic_onboard_business_address"},business_address_2:{type:"text",selector:"input#iconic_onboard_business_address_2"},business_city:{type:"text",selector:"input#iconic_onboard_business_city"},business_postcode:{type:"text",selector:"input#iconic_onboard_business_postcode"}};a.post(ajaxurl,{action:"orderable_get_onboard_woo_fields",fields:e}).done(function(o){try{o.success&&a.each(e,function(e,t){var r=a(t.selector);r.length<=0||void 0===o.data[e]||("select"===t.type?r.html(o.data[e]):r.val(o.data[e]))})}catch(e){console.log(o),console.log(e),alert("Couldn't save.")}}).fail(function(){alert("Couldn't save. Are you connected to the internet? ")}).always(function(){})}};a(e).ready(r.on_ready)}(jQuery,document),jQuery(document).ready(function(){setTimeout(function(){"undefined"!=typeof orderable_pointers&&jQuery.each(orderable_pointers.pointers,function(e){return function e(t){var r,o,n=orderable_pointers.pointers[t];void 0!==n&&(r=jQuery.extend(n.options,{pointerClass:"wp-pointer wc-pointer orderable-pointer",close:function(){jQuery.post(orderable_pointers.ajax_url,{pointer:t,action:"dismiss-wp-pointer"}),n&&n.next&&orderable_pointers.pointers[n.next]&&setTimeout(function(){e(n.next)},250)},skip:function(){var e=document.querySelectorAll(".wp-pointer.orderable-pointer");Array.from(e).forEach(function(e){e.remove()}),jQuery.post(orderable_pointers.ajax_url,{pointer:"orderable-tour-dismissed",action:"dismiss-wp-pointer"})},buttons:function(e,t){var r=n&&n.next&&orderable_pointers.pointers[n.next]?orderable_pointers.i18n.next:orderable_pointers.i18n.close,o=jQuery('<a class="button button-primary" href="#">'+r+"</a>"),a=jQuery('<div class="wc-pointer-buttons" />'),r=orderable_pointers.i18n.skip,r=jQuery('<a class="button button-secondary" href="#">'+r+"</a>");return o.bind("click.pointer",function(e){e.preventDefault(),t.element.pointer("close")}),r.bind("click.pointer",function(e){e.preventDefault(),n.options.skip()}),a.append(o),a.append(r),a}}),(o=jQuery(n.target).pointer(r)).pointer("open"),n.next_trigger&&jQuery(n.next_trigger.target).on(n.next_trigger.event,function(){setTimeout(function(){o.pointer("close")},400)}))}(e),!1})},800)}),function(e,t){"use strict";var r={on_ready:function(){e(t.body).on("orderable-pro-modal",r.trigger_pro_modal)},trigger_pro_modal:function(){console.log("Pro only."),tb_show("Pro Feature","#TB_inline?inlineId=orderable-pro-modal")}};e(t).ready(r.on_ready)}(jQuery,document),function(l,i){"use strict";var e=function(){l(i.body).on("change",".orderable-enable-day",function(e){var t=l(this),r=t.data("orderable-day"),o=t.is(":checked"),t=l(".orderable-select--days");t.find('option[value="'+r+'"]').attr("disabled",!o).attr("selected",!1),l(i).trigger("orderable-destroy-multiselects",{selects:t}),l(i).trigger("orderable-init-multiselects",{selects:t})}),l(i.body).on("change",'[name*="\\[store_general_services\\]"]',function(e){var t=l(this),r=t.val(),o=t.is(":checked"),a=l(".orderable-toggle-wrapper--"+r+', button[data-orderable-wrapper="'+r+'"]'),t="orderable-ui-hide",r=l(".orderable-notice--select-service");o?a.removeClass(t):a.addClass(t);a=l('[name*="\\[store_general_services\\]"]:checked');a.length<=0?r.removeClass(t):(r.addClass(t),n=a.eq(0).val(),l('button[data-orderable-wrapper="'+n+'"]').click());var r=l("#orderable_settings_store_general_service_hours_pickup_same"),n=r.data("default-state");void 0===n&&(n=r.is(":checked"),r.data("default-state",n)),1===a.length&&"pickup"===a.val()?(r.prop("checked",!1).parent().addClass(t),l(i.body).trigger("orderable-toggle-element",{trigger_element:r[0],add_class:!1})):(r.prop("checked",n).parent().removeClass(t),l(i.body).trigger("orderable-toggle-element",{trigger_element:r[0],add_class:n})),l(i).trigger("orderable-add-last-row-class")}),l(i.body).on("change","#orderable_settings_store_general_service_hours_pickup_same",function(e){l(this).data("default-state",l(this).is(":checked"))}),l(".orderable-enable-day").on("change",function(){jQuery(this).closest("tr").toggleClass("orderable-table__row--hidden",!this.checked)})};l(i).ready(e)}(jQuery,document),function(a,n){"use strict";var e={on_ready:function(){a(n.body).on("click change","[data-orderable-trigger]",function(e){var t=a(this),r=t.data("orderable-trigger");"click"===e.type&&(t.is("select")||t.is("input")||t.is("label"))||((t.is("button")||t.is("a"))&&e.preventDefault(),a(n.body).trigger("orderable-"+r,{trigger_element:t}))}),a(n.body).on("orderable-new-row",function(e,t){var r=a(t.trigger_element),o=a(r.data("orderable-target")).find(".orderable-table__body"),t=o.find(".orderable-table__row--repeatable:last-child"),r=parseInt(t.data("orderable-index"))+1,r=t[0].outerHTML.replace(/\[\d+\]/gm,"["+r+"]").replace(/data-orderable-index="\d+"/gm,'data-orderable-index="'+r+'"');o.append(r);r=o.find(".orderable-table__row--repeatable:last-child");r.find("input").not('input[type="checkbox"]').val(""),r.find(".hasDatepicker").each(function(e,t){a(t).removeClass("hasDatepicker").attr("id","")}),r.find("select").each(function(e,t){var r=a(t),o=r.find('option[value=""]'),t=r.hasClass("orderable-select--multi-select"),o=o.length||t?"":r.find("option:first-child").val();r.val(o),t&&r.change()}),r.find('input[type="checkbox"]').prop("checked",!1),r.find(".multi-select-container").remove(),a(n).trigger("orderable-init-multiselects",{selects:o.find(".orderable-select--multi-select")}),o.find('[data-orderable-trigger="toggle-element-select"]').change(),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-remove-row",function(e,t){var r=a(t.trigger_element),t=r.closest("tr");1===r.closest("tbody").find(">tr").length?(t.find("input").val(""),t.find('input[type="checkbox"], input[type="radio"]').prop("checked",!1),t.find("select").each(function(){a(this).hasClass("orderable-select--multi-select")||(this.selectedIndex=0,a(this).trigger("change"))}),t.find('.multi-select-container input[type="checkbox"]').trigger("change")):t.remove(),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-toggle-element",function(e,t){t.add_class=void 0!==t.add_class?t.add_class:null;var r=a(t.trigger_element),o=a(r.data("orderable-target")),r=r.data("orderable-toggle-class");null===t.add_class?o.toggleClass(r):!0===t.add_class?o.addClass(r):!1===t.add_class&&o.removeClass(r),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-toggle-element-select",function(e,t){var r=a(t.trigger_element),o=r.closest(r.data("orderable-parent")),t=r.data("orderable-target"),r=r.val();o.length<=0||void 0===t||void 0===t[r]||(a.each(t[r],function(e,t){t=o.find(t);"show"===e?t.show():"hide"===e&&t.hide()}),a(n).trigger("orderable-add-last-row-class"))}),a(n.body).on("orderable-toggle-wrapper",function(e,t){var r=a(t.trigger_element),o=r.data("orderable-wrapper"),t=r.data("orderable-wrapper-group"),r=a(".orderable-toggle-wrapper--"+o+'[data-orderable-wrapper-group="'+t+'"]');a('.orderable-toggle-wrapper[data-orderable-wrapper-group="'+t+'"]').removeClass("orderable-toggle-wrapper--active"),r.addClass("orderable-toggle-wrapper--active"),a('[data-orderable-wrapper-group="'+t+'"]').removeClass("orderable-trigger-element--active"),a('[data-orderable-wrapper="'+o+'"]').addClass("orderable-trigger-element--active"),a(n).trigger("orderable-add-last-row-class")}),a(n).on("orderable-add-last-row-class",e.add_last_row_class),a(n).trigger("orderable-add-last-row-class")},add_last_row_class:function(){var e=a(".orderable-table"),t="orderable-table__row--last",r=e.find("."+t),e=e.find("tbody > tr:visible:last");r.removeClass(t),e.addClass(t)}};a(n).ready(e.on_ready)}(jQuery,document); -
orderable/tags/1.4.0/assets/frontend/css/main.css
r2709284 r2745279 553 553 .orderable-product__actions-button { 554 554 margin: 0 0 0 auto; 555 } 556 557 .orderable-product__actions-button .orderable-product__cancel-update { 558 background-color: #f2f2f3; 559 border-color: #f2f2f3; 560 margin-right: 10px; 555 561 } 556 562 … … 885 891 .orderable--button-style-square .orderable-drawer__cart .orderable-mini-cart-item__remove { 886 892 border-radius: 0; 893 } 894 895 .orderable-drawer__cart .orderable-edit-cart-item__button { 896 position: absolute; 897 bottom: 21px; 898 right: 50px; 899 height: 30px; 900 line-height: normal; 901 padding: 0 13px !important; 902 font-size: 14px; 903 } 904 905 .orderable-drawer__cart .orderable-edit-cart-item__button.orderable-button--loading { 906 display: -webkit-box; 907 display: -ms-flexbox; 908 display: flex; 909 -webkit-box-align: center; 910 -ms-flex-align: center; 911 align-items: center; 912 } 913 914 .orderable-drawer__cart .orderable-edit-cart-item__button.orderable-button--loading::after { 915 position: static; 916 margin-left: 5px; 887 917 } 888 918 -
orderable/tags/1.4.0/assets/frontend/css/main.min.css
r2709284 r2745279 1 @-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}@keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}.orderable-main__group{margin:0 0 36px}.orderable-main--sections-tabs .orderable-main__group{display:none}.orderable-main--sections-tabs .orderable-main__group:first-of-type{display:block}@media screen and (min-width:620px){.orderable-main--sections-side_tabs{display:-webkit-box;display:-ms-flexbox;display:flex}.orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 0 0!important}.orderable-main--sections-side_tabs .orderable-main__sections{-webkit-box-flex:1;-ms-flex:1;flex:1}}.orderable-button,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable-drawer__close{display:inline-block;border:2px solid #000;background:0 0;padding:0 24px!important;height:40px;line-height:36px;white-space:nowrap;border-radius:20px;color:#000;text-transform:none;margin:0;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}.orderable-button:active,.orderable-button:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:focus,.orderable-drawer__close:active,.orderable-drawer__close:focus{outline:0}.orderable-button--active,.orderable-button--hover,.orderable-button:active,.orderable-button:focus,.orderable-button:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:hover,.orderable-drawer__close:active,.orderable-drawer__close:focus,.orderable-drawer__close:hover{border-color:#000;background:#000;color:#fff;text-decoration:none;-webkit-box-shadow:none;box-shadow:none}.orderable-button--filled,.orderable-button--filled--hover,.orderable-button--filled:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:hover{background:#000!important;color:#fff}.orderable-button--full{width:100%}.orderable-button--loading{position:relative;padding-right:48px!important}.orderable-button--loading:after{content:'';display:block;width:16px;height:16px;position:absolute;top:10px;right:22px;background:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:2px solid #000;border-left:2px solid #000;border-right:2px solid transparent;border-bottom:2px solid transparent;border-radius:100%;-webkit-animation:spin .6s ease-out infinite;animation:spin .6s ease-out infinite}.orderable-button--filled .orderable-button--loading:after,.orderable-button--loading.orderable-button--hover:after,.orderable-button--loading:active:after,.orderable-button--loading:focus:after,.orderable-button--loading:hover:after,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout .orderable-button--loading:after{border-top-color:#fff;border-left-color:#fff}.orderable-button--out-of-stock.orderable-button--hover.orderable-drawer__close,.orderable-button--out-of-stock.orderable-drawer__close,.orderable-button--out-of-stock.orderable-drawer__close:active,.orderable-button--out-of-stock.orderable-drawer__close:focus,.orderable-button--out-of-stock.orderable-drawer__close:hover,.orderable-button.orderable-button--out-of-stock,.orderable-button.orderable-button--out-of-stock.orderable-button--hover,.orderable-button.orderable-button--out-of-stock:active,.orderable-button.orderable-button--out-of-stock:focus,.orderable-button.orderable-button--out-of-stock:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.orderable-button--hover.button.checkout{cursor:not-allowed;border-color:#c7d4db;color:#a8bdc7;background:0 0!important}.orderable--button-style-square .orderable-button,.orderable--button-style-square .orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable--button-style-square .orderable-drawer__close,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable--button-style-square .button.checkout{border-radius:0}.orderable-button--icon{padding:10px!important;width:44px;height:44px;line-height:24px;border:none;background:0 0!important}body .orderable-button--icon:active,body .orderable-button--icon:focus,body .orderable-button--icon:hover{background:0 0!important;opacity:.6}.orderable-button--icon svg{width:24px;height:24px;border-radius:12px;overflow:hidden;-webkit-transition:opacity 250ms ease-in-out;transition:opacity 250ms ease-in-out}.orderable-button--icon.orderable-button--loading:after{display:none}.orderable-input--select,select.orderable-input--select{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;padding:10px;border:2px solid #E6ECEF;border-radius:8px;background-color:#fff;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23c1cfd7'><polygon points='0,0 100,0 50,50'/></svg>");background-size:16px;background-position:calc(100% - 14px) 19px;background-repeat:no-repeat;cursor:pointer}.orderable-input--select:focus,select.orderable-input--select:focus{outline:0;border-color:#000;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23000000'><polygon points='0,0 100,0 50,50'/></svg>")}.orderable-input.orderable-input--text{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;padding:10px;border:2px solid #E6ECEF;border-radius:8px;width:100%;background-color:#fff;-webkit-box-shadow:none;box-shadow:none}.orderable-floating-cart__button,.orderable-products-list__item .orderable-product{-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07)}.orderable-input.orderable-input--text:focus{outline:0;border-color:#000;background-color:#fff}.orderable-category-heading{margin:0 0 24px}.orderable-products-list{margin-bottom:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list:last-child{margin-bottom:0}@media screen and (min-width:480px){.orderable-products-list .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 0 200px;flex:0 0 200px}.orderable-products-list .orderable-product__hero{width:200px}.orderable-products-list .orderable-product__image{-o-object-fit:cover;object-fit:cover;width:100%!important;height:100%!important}.orderable-products-list .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column nowrap;flex-flow:column nowrap}}.orderable-products-list .orderable-product__actions{padding:12px 24px 18px;margin-top:auto}.orderable-products-list__item{width:100%;margin:0 0 24px}@media screen and (max-width:480px){.orderable-products-list__item{padding:0 0 24px;border-bottom:1px solid #ecf1f3}.orderable-products-list__item:last-child{border-bottom:none}}@media screen and (min-width:540px){.orderable-products-list--grid{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-12px;margin-right:-12px}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-products-list__item{margin:0 0 24px;padding:0 12px;width:50%}.orderable-products-list--grid .orderable-product{padding:0 0 88px;display:block;margin:0;-webkit-box-flex:0;-ms-flex:none;flex:none}}@media screen and (min-width:1120px){.orderable-products-list--grid .orderable-products-list__item{width:33.33%}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__hero{width:auto}.orderable-products-list--grid .orderable-product__hero img{-o-object-fit:fill;object-fit:fill;width:100%;height:auto}.orderable-products-list--grid .orderable-product__content-wrap{-webkit-box-flex:0;-ms-flex:none;flex:none;display:block}.orderable-products-list--grid .orderable-product__actions{padding:0;margin-top:0;position:absolute;bottom:24px;left:24px;right:24px}}.orderable-product{overflow:hidden;position:relative}.orderable-product__hero{position:relative}.orderable-product__image{border-radius:0;margin:0;display:block;width:100%;height:auto!important;max-width:none!important}.orderable-product__content{padding:18px 24px 12px}.orderable-product__content :last-child{margin-bottom:0}.orderable-product__title{margin:0 0 12px!important}.orderable-product__description{margin:0}.orderable-product__tags{overflow:hidden;margin:0;padding:0;list-style:none}img+.orderable-product__tags{position:absolute;bottom:0;left:0;padding:12px;z-index:20}.orderable-product__tags li{margin:6px 0 0}.orderable-product__options{margin:0 0 24px;padding:0;border-radius:6px}.orderable-product__options td,.orderable-product__options th{background-color:transparent!important;padding:0 0 12px;text-align:left;display:block;margin:0}.orderable-product__options th{line-height:22px}.orderable-product__options td{padding-bottom:24px}.orderable-product__options tr{padding:0;margin:0}.orderable-product__options tr:last-child td{padding-bottom:0}.orderable-product__actions{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-product__actions:last-child{margin-bottom:0}.orderable-product__actions-price{margin:0 4px 0 0}.orderable-product__actions-price .amount{white-space:nowrap;margin:0 6px 0 0;font-weight:700;color:#000;font-size:20px;line-height:24px}.orderable-product__actions-button{margin:0 0 0 auto}.orderable-product__ tabs{margin:24px 0}.orderable-product__tabs-section{display:none}.orderable-product__tabs-section:first-child{display:block}.orderable-product__tabs-section :last-child{margin-bottom:0}.orderable-product--options{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:visible;height:100%}.orderable-product--options .orderable-product__hero{margin:-24px -24px 0}.orderable-product--options .orderable-product__title{text-align:left;margin:24px 0!important}.orderable-product--options .orderable-product__actions{margin-top:auto;padding-top:24px;border-top:1px solid #E6ECEF;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.orderable-product--add-to-cart,.orderable-product--product-options,.orderable-product--view-product{cursor:pointer}.orderable-product--image-cropped .orderable-product__hero{overflow:hidden;padding:0;text-align:center;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;height:72px}.orderable-product--image-cropped .orderable-product__image{-o-object-fit:cover;object-fit:cover;position:absolute;z-index:-1;width:100%;height:100%!important;left:0;top:0}.orderable-products-list__item .orderable-product{height:100%;width:100%;box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border-radius:6px}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-shadow:none;box-shadow:none;border-radius:0}.orderable-products-list__item .orderable-product__hero{width:100%;min-width:60px;max-width:95px;border-radius:6px;overflow:hidden}.orderable-products-list__item .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1}.orderable-products-list__item .orderable-product__content{padding:0 0 0 24px}.orderable-products-list__item .orderable-product__actions{padding:6px 0 0 24px}.orderable-products-list__item .orderable-product__title{margin:0 0 6px!important}}.orderable-tag{display:inline-block;background:#EDF2F6;border-radius:15px;height:30px;line-height:30px;white-space:nowrap;color:#495568;padding:0 12px;font-size:14px}body.orderable-drawer-open{overflow:hidden}.orderable-drawer-overlay{height:100%;z-index:999998;position:fixed;top:0;left:0;opacity:0;visibility:hidden;background-color:rgba(34,34,34,.6);-webkit-transition:opacity .2s linear,visibility .1s,width 1s ease-in;transition:opacity .2s linear,visibility .1s,width 1s ease-in}.orderable-drawer{width:100%;visibility:hidden;-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transition:all .2s;transition:all .2s;border-radius:0;-webkit-box-shadow:0 4px 56px -2px rgba(0,0,0,.2),0 3px 6px -1px rgba(0,0,0,.4);box-shadow:0 4px 56px -2px rgba(0,0,0,.2),0 3px 6px -1px rgba(0,0,0,.4);display:block;position:fixed;top:0;right:0;height:100%;z-index:999999;background-color:#fff;overflow:hidden;padding:24px}@media screen and (min-width:640px){.orderable-drawer{max-width:600px}}.orderable-drawer h3{margin:0 60px 24px!important;font-size:20px;line-height:24px;text-align:center}.orderable-drawer h4{font-size:18px;line-height:22px}.orderable-drawer__inner{padding:0;height:100%;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.orderable-drawer__cart,.orderable-drawer__cart .orderable-mini-cart-wrapper{display:-webkit-box;display:-ms-flexbox;-webkit-box-orient:vertical;-webkit-box-direction:normal}.orderable-drawer__inner .orderable-sb-container{-ms-flex-preferred-size:100%;flex-basis:100%;margin-bottom:-1px}.orderable-drawer__cart{display:flex;-ms-flex-direction:column;flex-direction:column}.orderable-drawer__cart .orderable-mini-cart-wrapper{height:100%;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart{margin:0;padding:0;list-style:none;overflow:hidden;min-height:100%}.orderable-drawer__cart .orderable-mini-cart-item{margin:0;padding:10px 44px 10px 0;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-bottom:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart-item:last-child{border-bottom:none}.orderable-drawer__cart .orderable-mini-cart-item .variation{margin:7.5px 0}.orderable-drawer__cart .orderable-mini-cart-item .variation dd,.orderable-drawer__cart .orderable-mini-cart-item .variation dt,.orderable-drawer__cart .orderable-mini-cart-item .variation p{margin:0}.orderable-drawer__cart .orderable-mini-cart-item .blockOverlay{background:#fff!important;opacity:.8!important}.orderable-drawer__cart .orderable-mini-cart-item__remove{position:absolute;bottom:16px;right:0;z-index:20;color:#c7d4db;-webkit-box-shadow:none;box-shadow:none;height:40px;width:40px;text-indent:250%;white-space:nowrap;font-size:0;-webkit-transition:none;transition:none;-webkit-box-sizing:border-box;box-sizing:border-box;border:none}.orderable-drawer__cart .orderable-mini-cart-item__remove svg{display:block;height:20px;width:20px;position:absolute;left:50%;top:50%;-webkit-transition:none;transition:none;fill:#c7d4db;margin:-10px 0 0 -10px}.orderable-drawer__cart .orderable-mini-cart-item__remove:hover svg{opacity:.8}.orderable--button-style-square .orderable-drawer__cart .orderable-mini-cart-item__remove{border-radius:0}.orderable-drawer__cart .quantity{font-weight:700}.orderable-drawer__cart .orderable-mini-cart__notices{padding:15px 0;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error{margin:0;padding:0;list-style:none}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error li{border:1px solid #E34F4F;background:#fce9e9;color:#dc2323;padding:6px 12px 6px 28px!important;text-align:center;margin:0 0 6px;display:block;border-radius:8px}.orderable-drawer__cart .orderable-mini-cart__buttons .button,.orderable-drawer__cart .orderable-mini-cart__notices .button{display:none}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error li:last-child{margin-bottom:0}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error::before,.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-info::before,.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-message::before{left:12px}.orderable-drawer__cart .orderable-mini-cart__buttons,.orderable-drawer__cart .orderable-mini-cart__total{margin:0;padding:0;text-align:center}.orderable-drawer__cart .orderable-mini-cart__total{padding:15px 0;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout{display:block;width:100%}.orderable-drawer__cart .orderable-mini-cart__empty-message{margin:auto 0;text-align:center}.orderable-drawer__cart .orderable-services-selector__lookup,.orderable-drawer__cart .orderable-services-selector__selected{margin:0 0 15px}.orderable-drawer__cart .orderable-services-selector__lookup input{width:100%;margin:0 0 8px}.orderable-drawer__cart .orderable-services-selector__lookup-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button{display:block;width:100%}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button:first-child{margin-right:4px}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button:last-child{margin-left:4px}.orderable-drawer__actions{bottom:-24px;margin:auto 0 -24px;background:#fff;padding:24px 0;left:0;right:0;border-top:1px solid #F2F2F2}.orderable-drawer__actions--cart{border-top:none;padding-top:10px}.orderable-drawer__close{position:absolute;top:16px;left:24px;font-size:0;text-indent:250%!important;white-space:nowrap!important;overflow:hidden!important;padding:0!important;width:40px;height:40px;margin:0;z-index:100;border-color:#c7d4db}.orderable-drawer__close:after,.orderable-drawer__close:before{position:absolute;left:54%;content:' ';height:18px;width:2px;background-color:#c7d4db;top:50%;margin:-9px 0 0 -2px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;display:block}.orderable-drawer__close:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.orderable-drawer__close:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.orderable-drawer__close:active,.orderable-drawer__close:focus,.orderable-drawer__close:hover{background-color:#c7d4db;border-color:#c7d4db}.orderable-drawer__close:active:after,.orderable-drawer__close:active:before,.orderable-drawer__close:focus:after,.orderable-drawer__close:focus:before,.orderable-drawer__close:hover:after,.orderable-drawer__close:hover:before{background-color:#405763}.orderable-drawer .orderable-product__content{padding:15px 0}.orderable-drawer-overlay--open{-webkit-transition:opacity .2s ease,width 0s;transition:opacity .2s ease,width 0s;opacity:1;width:100%;visibility:visible}.orderable-drawer--open{visibility:visible;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.orderable-floating-cart{position:fixed;z-index:20}.orderable-floating-cart__button{padding:0;width:60px;height:60px;border:none;border-radius:100%;display:block;margin:0;text-align:center;line-height:60px;background:#fff;box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);outline:0!important;-webkit-transition:-webkit-transform 150ms ease-in-out;transition:-webkit-transform 150ms ease-in-out;transition:transform 150ms ease-in-out;transition:transform 150ms ease-in-out,-webkit-transform 150ms ease-in-out}.orderable-floating-cart__button:hover{background:#fff;-webkit-animation:wobble-hor-bottom .8s both;animation:wobble-hor-bottom .8s both;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07)}.orderable-floating-cart__button svg{width:24px;height:24px;display:block;margin:0 auto}.orderable-floating-cart__count{position:absolute;top:0;right:0;white-space:nowrap;padding:0 4px;background:#E52C23;color:#fff;height:22px;line-height:22px;font-size:13px;border-radius:11px;min-width:22px;text-align:center}.orderable-floating-cart--bl,.orderable-floating-cart--br{bottom:40px}.orderable-floating-cart--br,.orderable-floating-cart--tr{right:40px}.orderable-floating-cart--bl,.orderable-floating-cart--tl{left:40px}.orderable-floating-cart--tl,.orderable-floating-cart--tr{top:40px}.orderable-services-selector__selected p{margin:0}.orderable-services-selector__selected-change{padding:0;margin:0;font-size:inherit;background:0 0;display:inline;color:#333;-webkit-transition:none;transition:none;text-transform:none;-webkit-box-shadow:none;box-shadow:none}.orderable-services-selector__selected-change:active,.orderable-services-selector__selected-change:focus,.orderable-services-selector__selected-change:hover{padding:0;margin:0;background:0 0;color:#333;text-decoration:underline;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}.orderable-services-selector--selected .orderable-services-selector__lookup{display:none}.orderable-open-hours__date,.orderable-open-hours__service{margin:0 0 0 6px;padding:2px 6px;background:#000;color:#fff;border-radius:4px;display:inline-block;font-size:80%}.orderable-open-hours__service--closed{background-color:#E34F4F;display:none}.orderable-open-hours__date{margin:0 4px 0 0;text-align:center;min-width:30px;border:1px solid #E6ECEF;background:0 0;color:inherit}.orderable-tabs{margin:0 0 24px;position:relative}.orderable-tabs__list{margin:0 1px 0 0!important;padding:0!important;list-style:none;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;overflow-x:auto;overflow-y:hidden;overflow:-moz-scrollbars-none;scrollbar-base-color:transparent;-webkit-overflow-scrolling:touch}.orderable-tabs__list::-webkit-scrollbar{display:none}.orderable-tabs__item{display:inline-block;margin:0 10px 0 0;padding:0}.orderable-tabs__item:last-child{margin-right:0}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__list{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:auto}.orderable-main--sections-side_tabs .orderable-tabs__item{margin:0 0 12px;display:block}.orderable-main--sections-side_tabs .orderable-tabs__item:last-child{margin:0}}a.orderable-tabs__link{text-decoration:none!important;display:inline-block;padding:0 24px;white-space:nowrap;line-height:40px;color:#405763;font-weight:400;border-radius:20px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;background:#ecf1f3}a.orderable-tabs__link:active,a.orderable-tabs__link:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}a.orderable-tabs__link:active,a.orderable-tabs__link:focus,a.orderable-tabs__link:hover{color:#405763;text-decoration:none;background:#c7d4db}.orderable-tabs__item--active a.orderable-tabs__link{background:#000;color:#fff}.orderable--button-style-square a.orderable-tabs__link{border-radius:0}.orderable-tabs__arrow{background:#fff;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border:none;width:40px!important;height:40px!important;padding:0!important;margin:0!important;border-radius:20px!important;position:absolute;top:0;right:0;text-align:center;line-height:40px;display:none}.orderable-tabs__arrow:active,.orderable-tabs__arrow:focus,.orderable-tabs__arrow:hover{background:#fff;outline:0}.orderable-tabs__arrow svg{width:21px;height:24px;margin:8px 0}.orderable-accordion{margin:24px 0;background:#f6f8f9;padding:0 24px;border-radius:6px}.orderable-product-fields-group-wrap+.orderable-accordion,.orderable-product__options+.orderable-accordion{margin-top:36px}.orderable-accordion__item{border-top:1px solid #E6ECEF}.orderable-accordion__item:first-child{border-top:none}.orderable-accordion__item-link{display:block;padding:18px 0;margin:0;color:inherit;position:relative}.orderable-accordion__item-link--active,.orderable-accordion__item-link:active,.orderable-accordion__item-link:focus,.orderable-accordion__item-link:hover{color:#000;border:none;outline:0}.orderable-accordion__item-link--active:after,.orderable-accordion__item-link--active:before,.orderable-accordion__item-link:active:after,.orderable-accordion__item-link:active:before,.orderable-accordion__item-link:focus:after,.orderable-accordion__item-link:focus:before,.orderable-accordion__item-link:hover:after,.orderable-accordion__item-link:hover:before{background-color:#405763!important}.orderable-accordion__item-link:after,.orderable-accordion__item-link:before{position:absolute;right:5px;content:' ';height:11px;width:2px;background-color:#c7d4db;top:50%;display:block;margin:-4px 0 0}.orderable-accordion__item-link:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.orderable-accordion__item-link:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:12px}.orderable-accordion__item-link--active:before{right:12px}.orderable-accordion__item-link--active:after{right:5px}.orderable-accordion__item-content{display:none}.orderable-accordion__item-content--active{display:block}.orderable-accordion__item-content:after{content:"";display:table;clear:both}.orderable-sb-container{position:relative;overflow:hidden;padding-right:25px}.orderable-sb-content{height:100%;width:120%;padding-right:20%;overflow-y:scroll;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-sb-scrollbar-container{position:absolute;right:0;bottom:10px;top:10px;width:10px}.orderable-sb-container-noscroll .orderable-sb-scrollbar-container{right:-20px}.orderable-sb-scrollbar{position:absolute;right:0;height:30px;width:10px;border-radius:10px;background:#d6e0e5}.orderable-sb-scrollbar:hover{background:#c7d4db}.orderable--button-style-square .orderable-sb-scrollbar{border-radius:0}.orderable-sb-container-noscroll{padding-right:0}.orderable-sb-container-noscroll .orderable-sb-content{width:100%;padding-right:0;overflow:hidden}.orderable-quantity-roller{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-quantity-roller *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-quantity-roller__roller{border:2px solid #c7d4db;border-radius:20px;height:40px;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex}.orderable--button-style-square .orderable-quantity-roller__roller{border-radius:0}.orderable-quantity-roller__button{height:36px;width:24px;background:0 0;border:none;border-radius:0;text-align:center;color:#c7d4db;line-height:36px;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;padding:0 6px;-webkit-box-sizing:content-box;box-sizing:content-box;position:relative;font-size:0;text-indent:250%;overflow:hidden;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out}.orderable-quantity-roller__button:after,.orderable-quantity-roller__button:before{content:"";position:absolute;display:block!important;height:2px;width:12px;background:#c7d4db;top:50%;left:50%;margin:-1px 0 0 -6px;-webkit-transition:background 150ms ease-out;transition:background 150ms ease-out}.orderable-quantity-roller__button:focus,.orderable-quantity-roller__button:hover,.orderable-quantity-roller__button:visited{background-color:#c7d4db;color:#405763;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;outline:0}.orderable-quantity-roller__button:focus:after,.orderable-quantity-roller__button:focus:before,.orderable-quantity-roller__button:hover:after,.orderable-quantity-roller__button:hover:before,.orderable-quantity-roller__button:visited:after,.orderable-quantity-roller__button:visited:before{background:#405763}.orderable-quantity-roller__button--decrease{padding-right:4px}.orderable-quantity-roller__button--decrease:after{display:none!important}.orderable-quantity-roller__button--increase{padding-left:4px}.orderable-quantity-roller__button--increase:after{height:12px;width:2px;margin:-6px 0 0 -1px}.orderable-quantity-roller__quantity{text-align:center;display:inline-block;line-height:36px;padding:0 6px;min-width:24px;outline:0}.orderable-quantity-roller__price{margin-left:8px}.orderable-quantity-roller__price:before{content:"x";margin:0 8px;color:#c7d4db}.orderable-drawer__cart .orderable-quantity-roller{margin:12px 0 6px}1 @-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}@keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}.orderable-main__group{margin:0 0 36px}.orderable-main--sections-tabs .orderable-main__group{display:none}.orderable-main--sections-tabs .orderable-main__group:first-of-type{display:block}@media screen and (min-width:620px){.orderable-main--sections-side_tabs{display:-webkit-box;display:-ms-flexbox;display:flex}.orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 0 0!important}.orderable-main--sections-side_tabs .orderable-main__sections{-webkit-box-flex:1;-ms-flex:1;flex:1}}.orderable-button,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable-drawer__close{display:inline-block;border:2px solid #000;background:0 0;padding:0 24px!important;height:40px;line-height:36px;white-space:nowrap;border-radius:20px;color:#000;text-transform:none;margin:0;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}.orderable-button:active,.orderable-button:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:focus,.orderable-drawer__close:active,.orderable-drawer__close:focus{outline:0}.orderable-button--active,.orderable-button--hover,.orderable-button:active,.orderable-button:focus,.orderable-button:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:hover,.orderable-drawer__close:active,.orderable-drawer__close:focus,.orderable-drawer__close:hover{border-color:#000;background:#000;color:#fff;text-decoration:none;-webkit-box-shadow:none;box-shadow:none}.orderable-button--filled,.orderable-button--filled--hover,.orderable-button--filled:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:hover{background:#000!important;color:#fff}.orderable-button--full{width:100%}.orderable-button--loading{position:relative;padding-right:48px!important}.orderable-button--loading:after{content:'';display:block;width:16px;height:16px;position:absolute;top:10px;right:22px;background:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:2px solid #000;border-left:2px solid #000;border-right:2px solid transparent;border-bottom:2px solid transparent;border-radius:100%;-webkit-animation:spin .6s ease-out infinite;animation:spin .6s ease-out infinite}.orderable-button--filled .orderable-button--loading:after,.orderable-button--loading.orderable-button--hover:after,.orderable-button--loading:active:after,.orderable-button--loading:focus:after,.orderable-button--loading:hover:after,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout .orderable-button--loading:after{border-top-color:#fff;border-left-color:#fff}.orderable-button--out-of-stock.orderable-button--hover.orderable-drawer__close,.orderable-button--out-of-stock.orderable-drawer__close,.orderable-button--out-of-stock.orderable-drawer__close:active,.orderable-button--out-of-stock.orderable-drawer__close:focus,.orderable-button--out-of-stock.orderable-drawer__close:hover,.orderable-button.orderable-button--out-of-stock,.orderable-button.orderable-button--out-of-stock.orderable-button--hover,.orderable-button.orderable-button--out-of-stock:active,.orderable-button.orderable-button--out-of-stock:focus,.orderable-button.orderable-button--out-of-stock:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.orderable-button--hover.button.checkout{cursor:not-allowed;border-color:#c7d4db;color:#a8bdc7;background:0 0!important}.orderable--button-style-square .orderable-button,.orderable--button-style-square .orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable--button-style-square .orderable-drawer__close,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable--button-style-square .button.checkout{border-radius:0}.orderable-button--icon{padding:10px!important;width:44px;height:44px;line-height:24px;border:none;background:0 0!important}body .orderable-button--icon:active,body .orderable-button--icon:focus,body .orderable-button--icon:hover{background:0 0!important;opacity:.6}.orderable-button--icon svg{width:24px;height:24px;border-radius:12px;overflow:hidden;-webkit-transition:opacity 250ms ease-in-out;transition:opacity 250ms ease-in-out}.orderable-button--icon.orderable-button--loading:after{display:none}.orderable-input--select,select.orderable-input--select{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;padding:10px;border:2px solid #E6ECEF;border-radius:8px;background-color:#fff;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23c1cfd7'><polygon points='0,0 100,0 50,50'/></svg>");background-size:16px;background-position:calc(100% - 14px) 19px;background-repeat:no-repeat;cursor:pointer}.orderable-input--select:focus,select.orderable-input--select:focus{outline:0;border-color:#000;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23000000'><polygon points='0,0 100,0 50,50'/></svg>")}.orderable-input.orderable-input--text{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;padding:10px;border:2px solid #E6ECEF;border-radius:8px;width:100%;background-color:#fff;-webkit-box-shadow:none;box-shadow:none}.orderable-floating-cart__button,.orderable-products-list__item .orderable-product{-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07)}.orderable-input.orderable-input--text:focus{outline:0;border-color:#000;background-color:#fff}.orderable-category-heading{margin:0 0 24px}.orderable-products-list{margin-bottom:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list:last-child{margin-bottom:0}@media screen and (min-width:480px){.orderable-products-list .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 0 200px;flex:0 0 200px}.orderable-products-list .orderable-product__hero{width:200px}.orderable-products-list .orderable-product__image{-o-object-fit:cover;object-fit:cover;width:100%!important;height:100%!important}.orderable-products-list .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column nowrap;flex-flow:column nowrap}}.orderable-products-list .orderable-product__actions{padding:12px 24px 18px;margin-top:auto}.orderable-products-list__item{width:100%;margin:0 0 24px}@media screen and (max-width:480px){.orderable-products-list__item{padding:0 0 24px;border-bottom:1px solid #ecf1f3}.orderable-products-list__item:last-child{border-bottom:none}}@media screen and (min-width:540px){.orderable-products-list--grid{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-12px;margin-right:-12px}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-products-list__item{margin:0 0 24px;padding:0 12px;width:50%}.orderable-products-list--grid .orderable-product{padding:0 0 88px;display:block;margin:0;-webkit-box-flex:0;-ms-flex:none;flex:none}}@media screen and (min-width:1120px){.orderable-products-list--grid .orderable-products-list__item{width:33.33%}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__hero{width:auto}.orderable-products-list--grid .orderable-product__hero img{-o-object-fit:fill;object-fit:fill;width:100%;height:auto}.orderable-products-list--grid .orderable-product__content-wrap{-webkit-box-flex:0;-ms-flex:none;flex:none;display:block}.orderable-products-list--grid .orderable-product__actions{padding:0;margin-top:0;position:absolute;bottom:24px;left:24px;right:24px}}.orderable-product{overflow:hidden;position:relative}.orderable-product__hero{position:relative}.orderable-product__image{border-radius:0;margin:0;display:block;width:100%;height:auto!important;max-width:none!important}.orderable-product__content{padding:18px 24px 12px}.orderable-product__content :last-child{margin-bottom:0}.orderable-product__title{margin:0 0 12px!important}.orderable-product__description{margin:0}.orderable-product__tags{overflow:hidden;margin:0;padding:0;list-style:none}img+.orderable-product__tags{position:absolute;bottom:0;left:0;padding:12px;z-index:20}.orderable-product__tags li{margin:6px 0 0}.orderable-product__options{margin:0 0 24px;padding:0;border-radius:6px}.orderable-product__options td,.orderable-product__options th{background-color:transparent!important;padding:0 0 12px;text-align:left;display:block;margin:0}.orderable-product__options th{line-height:22px}.orderable-product__options td{padding-bottom:24px}.orderable-product__options tr{padding:0;margin:0}.orderable-product__options tr:last-child td{padding-bottom:0}.orderable-product__actions{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-product__actions:last-child{margin-bottom:0}.orderable-product__actions-price{margin:0 4px 0 0}.orderable-product__actions-price .amount{white-space:nowrap;margin:0 6px 0 0;font-weight:700;color:#000;font-size:20px;line-height:24px}.orderable-product__actions-button{margin:0 0 0 auto}.orderable-product__actions-button .orderable-product__cancel-update{background-color:#f2f2f3;border-color:#f2f2f3;margin-right:10px}.orderable-product__tabs{margin:24px 0}.orderable-product__tabs-section{display:none}.orderable-product__tabs-section:first-child{display:block}.orderable-product__tabs-section :last-child{margin-bottom:0}.orderable-product--options{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:visible;height:100%}.orderable-product--options .orderable-product__hero{margin:-24px -24px 0}.orderable-product--options .orderable-product__title{text-align:left;margin:24px 0!important}.orderable-product--options .orderable-product__actions{margin-top:auto;padding-top:24px;border-top:1px solid #E6ECEF;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.orderable-product--add-to-cart,.orderable-product--product-options,.orderable-product--view-product{cursor:pointer}.orderable-product--image-cropped .orderable-product__hero{overflow:hidden;padding:0;text-align:center;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;height:72px}.orderable-product--image-cropped .orderable-product__image{-o-object-fit:cover;object-fit:cover;position:absolute;z-index:-1;width:100%;height:100%!important;left:0;top:0}.orderable-products-list__item .orderable-product{height:100%;width:100%;box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border-radius:6px}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-shadow:none;box-shadow:none;border-radius:0}.orderable-products-list__item .orderable-product__hero{width:100%;min-width:60px;max-width:95px;border-radius:6px;overflow:hidden}.orderable-products-list__item .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1}.orderable-products-list__item .orderable-product__content{padding:0 0 0 24px}.orderable-products-list__item .orderable-product__actions{padding:6px 0 0 24px}.orderable-products-list__item .orderable-product__title{margin:0 0 6px!important}}.orderable-tag{display:inline-block;background:#EDF2F6;border-radius:15px;height:30px;line-height:30px;white-space:nowrap;color:#495568;padding:0 12px;font-size:14px}body.orderable-drawer-open{overflow:hidden}.orderable-drawer-overlay{height:100%;z-index:999998;position:fixed;top:0;left:0;opacity:0;visibility:hidden;background-color:rgba(34,34,34,.6);-webkit-transition:opacity .2s linear,visibility .1s,width 1s ease-in;transition:opacity .2s linear,visibility .1s,width 1s ease-in}.orderable-drawer{width:100%;visibility:hidden;-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transition:all .2s;transition:all .2s;border-radius:0;-webkit-box-shadow:0 4px 56px -2px rgba(0,0,0,.2),0 3px 6px -1px rgba(0,0,0,.4);box-shadow:0 4px 56px -2px rgba(0,0,0,.2),0 3px 6px -1px rgba(0,0,0,.4);display:block;position:fixed;top:0;right:0;height:100%;z-index:999999;background-color:#fff;overflow:hidden;padding:24px}@media screen and (min-width:640px){.orderable-drawer{max-width:600px}}.orderable-drawer h3{margin:0 60px 24px!important;font-size:20px;line-height:24px;text-align:center}.orderable-drawer h4{font-size:18px;line-height:22px}.orderable-drawer__inner{padding:0;height:100%;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.orderable-drawer__cart,.orderable-drawer__cart .orderable-mini-cart-wrapper{display:-webkit-box;display:-ms-flexbox;-webkit-box-orient:vertical;-webkit-box-direction:normal}.orderable-drawer__inner .orderable-sb-container{-ms-flex-preferred-size:100%;flex-basis:100%;margin-bottom:-1px}.orderable-drawer__cart{display:flex;-ms-flex-direction:column;flex-direction:column}.orderable-drawer__cart .orderable-mini-cart-wrapper{height:100%;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart{margin:0;padding:0;list-style:none;overflow:hidden;min-height:100%}.orderable-drawer__cart .orderable-mini-cart-item{margin:0;padding:10px 44px 10px 0;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-bottom:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart-item:last-child{border-bottom:none}.orderable-drawer__cart .orderable-mini-cart-item .variation{margin:7.5px 0}.orderable-drawer__cart .orderable-mini-cart-item .variation dd,.orderable-drawer__cart .orderable-mini-cart-item .variation dt,.orderable-drawer__cart .orderable-mini-cart-item .variation p{margin:0}.orderable-drawer__cart .orderable-mini-cart-item .blockOverlay{background:#fff!important;opacity:.8!important}.orderable-drawer__cart .orderable-mini-cart-item__remove{position:absolute;bottom:16px;right:0;z-index:20;color:#c7d4db;-webkit-box-shadow:none;box-shadow:none;height:40px;width:40px;text-indent:250%;white-space:nowrap;font-size:0;-webkit-transition:none;transition:none;-webkit-box-sizing:border-box;box-sizing:border-box;border:none}.orderable-drawer__cart .orderable-mini-cart-item__remove svg{display:block;height:20px;width:20px;position:absolute;left:50%;top:50%;-webkit-transition:none;transition:none;fill:#c7d4db;margin:-10px 0 0 -10px}.orderable-drawer__cart .orderable-mini-cart-item__remove:hover svg{opacity:.8}.orderable--button-style-square .orderable-drawer__cart .orderable-mini-cart-item__remove{border-radius:0}.orderable-drawer__cart .orderable-edit-cart-item__button{position:absolute;bottom:21px;right:50px;height:30px;line-height:normal;padding:0 13px!important;font-size:14px}.orderable-drawer__cart .orderable-edit-cart-item__button.orderable-button--loading{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-drawer__cart .orderable-edit-cart-item__button.orderable-button--loading::after{position:static;margin-left:5px}.orderable-drawer__cart .quantity{font-weight:700}.orderable-drawer__cart .orderable-mini-cart__notices{padding:15px 0;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error{margin:0;padding:0;list-style:none}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error li{border:1px solid #E34F4F;background:#fce9e9;color:#dc2323;padding:6px 12px 6px 28px!important;text-align:center;margin:0 0 6px;display:block;border-radius:8px}.orderable-drawer__cart .orderable-mini-cart__buttons .button,.orderable-drawer__cart .orderable-mini-cart__notices .button{display:none}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error li:last-child{margin-bottom:0}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error::before,.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-info::before,.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-message::before{left:12px}.orderable-drawer__cart .orderable-mini-cart__buttons,.orderable-drawer__cart .orderable-mini-cart__total{margin:0;padding:0;text-align:center}.orderable-drawer__cart .orderable-mini-cart__total{padding:15px 0;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout{display:block;width:100%}.orderable-drawer__cart .orderable-mini-cart__empty-message{margin:auto 0;text-align:center}.orderable-drawer__cart .orderable-services-selector__lookup,.orderable-drawer__cart .orderable-services-selector__selected{margin:0 0 15px}.orderable-drawer__cart .orderable-services-selector__lookup input{width:100%;margin:0 0 8px}.orderable-drawer__cart .orderable-services-selector__lookup-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button{display:block;width:100%}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button:first-child{margin-right:4px}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button:last-child{margin-left:4px}.orderable-drawer__actions{bottom:-24px;margin:auto 0 -24px;background:#fff;padding:24px 0;left:0;right:0;border-top:1px solid #F2F2F2}.orderable-drawer__actions--cart{border-top:none;padding-top:10px}.orderable-drawer__close{position:absolute;top:16px;left:24px;font-size:0;text-indent:250%!important;white-space:nowrap!important;overflow:hidden!important;padding:0!important;width:40px;height:40px;margin:0;z-index:100;border-color:#c7d4db}.orderable-drawer__close:after,.orderable-drawer__close:before{position:absolute;left:54%;content:' ';height:18px;width:2px;background-color:#c7d4db;top:50%;margin:-9px 0 0 -2px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;display:block}.orderable-drawer__close:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.orderable-drawer__close:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.orderable-drawer__close:active,.orderable-drawer__close:focus,.orderable-drawer__close:hover{background-color:#c7d4db;border-color:#c7d4db}.orderable-drawer__close:active:after,.orderable-drawer__close:active:before,.orderable-drawer__close:focus:after,.orderable-drawer__close:focus:before,.orderable-drawer__close:hover:after,.orderable-drawer__close:hover:before{background-color:#405763}.orderable-drawer .orderable-product__content{padding:15px 0}.orderable-drawer-overlay--open{-webkit-transition:opacity .2s ease,width 0s;transition:opacity .2s ease,width 0s;opacity:1;width:100%;visibility:visible}.orderable-drawer--open{visibility:visible;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.orderable-floating-cart{position:fixed;z-index:20}.orderable-floating-cart__button{padding:0;width:60px;height:60px;border:none;border-radius:100%;display:block;margin:0;text-align:center;line-height:60px;background:#fff;box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);outline:0!important;-webkit-transition:-webkit-transform 150ms ease-in-out;transition:-webkit-transform 150ms ease-in-out;transition:transform 150ms ease-in-out;transition:transform 150ms ease-in-out,-webkit-transform 150ms ease-in-out}.orderable-floating-cart__button:hover{background:#fff;-webkit-animation:wobble-hor-bottom .8s both;animation:wobble-hor-bottom .8s both;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07)}.orderable-floating-cart__button svg{width:24px;height:24px;display:block;margin:0 auto}.orderable-floating-cart__count{position:absolute;top:0;right:0;white-space:nowrap;padding:0 4px;background:#E52C23;color:#fff;height:22px;line-height:22px;font-size:13px;border-radius:11px;min-width:22px;text-align:center}.orderable-floating-cart--bl,.orderable-floating-cart--br{bottom:40px}.orderable-floating-cart--br,.orderable-floating-cart--tr{right:40px}.orderable-floating-cart--bl,.orderable-floating-cart--tl{left:40px}.orderable-floating-cart--tl,.orderable-floating-cart--tr{top:40px}.orderable-services-selector__selected p{margin:0}.orderable-services-selector__selected-change{padding:0;margin:0;font-size:inherit;background:0 0;display:inline;color:#333;-webkit-transition:none;transition:none;text-transform:none;-webkit-box-shadow:none;box-shadow:none}.orderable-services-selector__selected-change:active,.orderable-services-selector__selected-change:focus,.orderable-services-selector__selected-change:hover{padding:0;margin:0;background:0 0;color:#333;text-decoration:underline;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}.orderable-services-selector--selected .orderable-services-selector__lookup{display:none}.orderable-open-hours__date,.orderable-open-hours__service{margin:0 0 0 6px;padding:2px 6px;background:#000;color:#fff;border-radius:4px;display:inline-block;font-size:80%}.orderable-open-hours__service--closed{background-color:#E34F4F;display:none}.orderable-open-hours__date{margin:0 4px 0 0;text-align:center;min-width:30px;border:1px solid #E6ECEF;background:0 0;color:inherit}.orderable-tabs{margin:0 0 24px;position:relative}.orderable-tabs__list{margin:0 1px 0 0!important;padding:0!important;list-style:none;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;overflow-x:auto;overflow-y:hidden;overflow:-moz-scrollbars-none;scrollbar-base-color:transparent;-webkit-overflow-scrolling:touch}.orderable-tabs__list::-webkit-scrollbar{display:none}.orderable-tabs__item{display:inline-block;margin:0 10px 0 0;padding:0}.orderable-tabs__item:last-child{margin-right:0}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__list{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:auto}.orderable-main--sections-side_tabs .orderable-tabs__item{margin:0 0 12px;display:block}.orderable-main--sections-side_tabs .orderable-tabs__item:last-child{margin:0}}a.orderable-tabs__link{text-decoration:none!important;display:inline-block;padding:0 24px;white-space:nowrap;line-height:40px;color:#405763;font-weight:400;border-radius:20px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;background:#ecf1f3}a.orderable-tabs__link:active,a.orderable-tabs__link:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}a.orderable-tabs__link:active,a.orderable-tabs__link:focus,a.orderable-tabs__link:hover{color:#405763;text-decoration:none;background:#c7d4db}.orderable-tabs__item--active a.orderable-tabs__link{background:#000;color:#fff}.orderable--button-style-square a.orderable-tabs__link{border-radius:0}.orderable-tabs__arrow{background:#fff;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border:none;width:40px!important;height:40px!important;padding:0!important;margin:0!important;border-radius:20px!important;position:absolute;top:0;right:0;text-align:center;line-height:40px;display:none}.orderable-tabs__arrow:active,.orderable-tabs__arrow:focus,.orderable-tabs__arrow:hover{background:#fff;outline:0}.orderable-tabs__arrow svg{width:21px;height:24px;margin:8px 0}.orderable-accordion{margin:24px 0;background:#f6f8f9;padding:0 24px;border-radius:6px}.orderable-product-fields-group-wrap+.orderable-accordion,.orderable-product__options+.orderable-accordion{margin-top:36px}.orderable-accordion__item{border-top:1px solid #E6ECEF}.orderable-accordion__item:first-child{border-top:none}.orderable-accordion__item-link{display:block;padding:18px 0;margin:0;color:inherit;position:relative}.orderable-accordion__item-link--active,.orderable-accordion__item-link:active,.orderable-accordion__item-link:focus,.orderable-accordion__item-link:hover{color:#000;border:none;outline:0}.orderable-accordion__item-link--active:after,.orderable-accordion__item-link--active:before,.orderable-accordion__item-link:active:after,.orderable-accordion__item-link:active:before,.orderable-accordion__item-link:focus:after,.orderable-accordion__item-link:focus:before,.orderable-accordion__item-link:hover:after,.orderable-accordion__item-link:hover:before{background-color:#405763!important}.orderable-accordion__item-link:after,.orderable-accordion__item-link:before{position:absolute;right:5px;content:' ';height:11px;width:2px;background-color:#c7d4db;top:50%;display:block;margin:-4px 0 0}.orderable-accordion__item-link:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.orderable-accordion__item-link:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:12px}.orderable-accordion__item-link--active:before{right:12px}.orderable-accordion__item-link--active:after{right:5px}.orderable-accordion__item-content{display:none}.orderable-accordion__item-content--active{display:block}.orderable-accordion__item-content:after{content:"";display:table;clear:both}.orderable-sb-container{position:relative;overflow:hidden;padding-right:25px}.orderable-sb-content{height:100%;width:120%;padding-right:20%;overflow-y:scroll;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-sb-scrollbar-container{position:absolute;right:0;bottom:10px;top:10px;width:10px}.orderable-sb-container-noscroll .orderable-sb-scrollbar-container{right:-20px}.orderable-sb-scrollbar{position:absolute;right:0;height:30px;width:10px;border-radius:10px;background:#d6e0e5}.orderable-sb-scrollbar:hover{background:#c7d4db}.orderable--button-style-square .orderable-sb-scrollbar{border-radius:0}.orderable-sb-container-noscroll{padding-right:0}.orderable-sb-container-noscroll .orderable-sb-content{width:100%;padding-right:0;overflow:hidden}.orderable-quantity-roller{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-quantity-roller *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-quantity-roller__roller{border:2px solid #c7d4db;border-radius:20px;height:40px;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex}.orderable--button-style-square .orderable-quantity-roller__roller{border-radius:0}.orderable-quantity-roller__button{height:36px;width:24px;background:0 0;border:none;border-radius:0;text-align:center;color:#c7d4db;line-height:36px;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;padding:0 6px;-webkit-box-sizing:content-box;box-sizing:content-box;position:relative;font-size:0;text-indent:250%;overflow:hidden;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out}.orderable-quantity-roller__button:after,.orderable-quantity-roller__button:before{content:"";position:absolute;display:block!important;height:2px;width:12px;background:#c7d4db;top:50%;left:50%;margin:-1px 0 0 -6px;-webkit-transition:background 150ms ease-out;transition:background 150ms ease-out}.orderable-quantity-roller__button:focus,.orderable-quantity-roller__button:hover,.orderable-quantity-roller__button:visited{background-color:#c7d4db;color:#405763;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;outline:0}.orderable-quantity-roller__button:focus:after,.orderable-quantity-roller__button:focus:before,.orderable-quantity-roller__button:hover:after,.orderable-quantity-roller__button:hover:before,.orderable-quantity-roller__button:visited:after,.orderable-quantity-roller__button:visited:before{background:#405763}.orderable-quantity-roller__button--decrease{padding-right:4px}.orderable-quantity-roller__button--decrease:after{display:none!important}.orderable-quantity-roller__button--increase{padding-left:4px}.orderable-quantity-roller__button--increase:after{height:12px;width:2px;margin:-6px 0 0 -1px}.orderable-quantity-roller__quantity{text-align:center;display:inline-block;line-height:36px;padding:0 6px;min-width:24px;outline:0}.orderable-quantity-roller__price{margin-left:8px}.orderable-quantity-roller__price:before{content:"x";margin:0 8px;color:#c7d4db}.orderable-drawer__cart .orderable-quantity-roller{margin:12px 0 6px} -
orderable/tags/1.4.0/assets/frontend/js/main.js
r2709284 r2745279 1 1 2 /** 3 * jQiery scrollBar Plugin 4 * @author Falk Müller (www-falk-m.de) 5 * Thankts to https://codepen.io/IliaSky/pen/obowmv 6 */ 7 ;( function( $, window, document ) { 8 9 "use strict"; 10 11 var pluginName = "scrollBox", 12 defaults = { 13 containerClass: "sb-container", 14 containerNoScrollClass: "sb-container-noscroll", 15 contentClass: "sb-content", 16 scrollbarContainerClass: "sb-scrollbar-container", 17 scrollBarClass: "sb-scrollbar" 18 19 }; 20 21 // plugin constructor 22 function Plugin ( element, options ) { 23 this.element = element; 24 25 this.settings = $.extend( {}, defaults, options ); 26 this._defaults = defaults; 27 this._name = pluginName; 28 this.init(); 29 30 } 31 32 // Avoid Plugin.prototype conflicts 33 $.extend( Plugin.prototype, { 34 init: function() { 35 36 this.addScrollbar(); 37 this.addEvents(); 38 this.onResize(); 39 }, 40 addScrollbar: function() { 41 $( this.element ).addClass(this.settings.containerClass); 42 this.wrapper = $("<div class='" + this.settings.contentClass + "' />"); 43 this.wrapper.append($( this.element ).contents()); 44 $( this.element ).append( this.wrapper ); 45 46 this.scollbarContainer = $("<div class='" + this.settings.scrollbarContainerClass + "' />"); 47 this.scrollBar = $("<div class='" + this.settings.scrollBarClass + "' />"); 48 this.scollbarContainer.append(this.scrollBar); 49 $( this.element ).prepend(this.scollbarContainer); 50 }, 51 addEvents: function(){ 52 53 this.wrapper.on("scroll." + pluginName, $.proxy(this.onScroll, this) ); 54 $(window).on("resize." + pluginName, $.proxy(this.onResize, this) ); 55 56 this.scrollBar.on('mousedown.' + pluginName, $.proxy(this.onMousedown, this)); 57 this.scrollBar.on('touchstart.' + pluginName, $.proxy(this.onTouchstart, this)); 58 }, 59 60 onTouchstart: function(ev){ 61 var me = this; 62 63 ev.preventDefault(); 64 var y = me.scrollBar[0].offsetTop; 65 66 var onMove = function(end){ 67 var delta = end.touches[0].pageY - ev.touches[0].pageY; 68 me.scrollBar[0].style.top = Math.min(me.scollbarContainer[0].clientHeight - me.scrollBar[0].clientHeight, Math.max(0, y + delta)) + 'px'; 69 me.wrapper[0].scrollTop = (me.wrapper[0].scrollHeight * me.scrollBar[0].offsetTop / me.scollbarContainer[0].clientHeight); 70 }; 71 72 $(document).on("touchmove." + pluginName, onMove); 73 $(document).on("touchend." + pluginName, function(){ 74 $(document).off("touchmove." + pluginName); 75 $(document).off("touchend." + pluginName); 76 }); 77 }, 78 79 onMousedown: function(ev){ 80 var me = this; 81 82 ev.preventDefault(); 83 var y = me.scrollBar[0].offsetTop; 84 85 var onMove = function(end){ 86 var delta = end.pageY - ev.pageY; 87 me.scrollBar[0].style.top = Math.min(me.scollbarContainer[0].clientHeight - me.scrollBar[0].clientHeight, Math.max(0, y + delta)) + 'px'; 88 me.wrapper[0].scrollTop = (me.wrapper[0].scrollHeight * me.scrollBar[0].offsetTop / me.scollbarContainer[0].clientHeight); 89 }; 90 91 $(document).on("mousemove." + pluginName, onMove); 92 $(document).on("mouseup." + pluginName, function(){ 93 $(document).off("mousemove." + pluginName); 94 $(document).off("mouseup." + pluginName); 95 }); 96 }, 97 98 onResize: function(){ 99 100 this.wrapper.css("max-height", $(this.element).height()); 101 102 var wrapper_client_height = this.wrapper[0].clientHeight; 103 104 this.scrollBar.css("height", this.scollbarContainer[0].clientHeight * wrapper_client_height / this.wrapper[0].scrollHeight + "px"); 105 if(this.scollbarContainer[0].clientHeight <= this.scrollBar[0].clientHeight){ 106 $( this.element ).addClass(this.settings.containerNoScrollClass); 107 } else { 108 $( this.element ).removeClass(this.settings.containerNoScrollClass); 109 } 110 111 this.onScroll(); 112 }, 113 114 onScroll: function(){ 115 116 this.scrollBar.css("top", Math.min(this.scollbarContainer[0].clientHeight - this.scrollBar[0].clientHeight, this.scollbarContainer[0].clientHeight * this.wrapper[0].scrollTop / this.wrapper[0].scrollHeight) + "px"); 117 118 } 119 } ); 120 121 // A really lightweight plugin wrapper around the constructor, 122 // preventing against multiple instantiations 123 $.fn[pluginName] = function( options ) { 124 return this.each( function() { 125 if ( !$.data( this, "plugin_" + pluginName ) ) { 126 $.data( this, "plugin_" + 127 pluginName, new Plugin( this, options ) ); 128 } 129 } ); 130 }; 131 132 } )( jQuery, window, document ); 133 /*! 134 * swiped-events.js - v1.1.6 135 * Pure JavaScript swipe events 136 * https://github.com/john-doherty/swiped-events 137 * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element 138 * @author John Doherty <www.johndoherty.info> 139 * @license MIT 140 */ 141 !function(t,e){"use strict";"function"!=typeof t.CustomEvent&&(t.CustomEvent=function(t,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var a=e.createEvent("CustomEvent");return a.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),a},t.CustomEvent.prototype=t.Event.prototype),e.addEventListener("touchstart",function(t){if("true"===t.target.getAttribute("data-swipe-ignore"))return;s=t.target,r=Date.now(),n=t.touches[0].clientX,a=t.touches[0].clientY,u=0,i=0},!1),e.addEventListener("touchmove",function(t){if(!n||!a)return;var e=t.touches[0].clientX,r=t.touches[0].clientY;u=n-e,i=a-r},!1),e.addEventListener("touchend",function(t){if(s!==t.target)return;var e=parseInt(l(s,"data-swipe-threshold","20"),10),o=parseInt(l(s,"data-swipe-timeout","500"),10),c=Date.now()-r,d="",p=t.changedTouches||t.touches||[];Math.abs(u)>Math.abs(i)?Math.abs(u)>e&&c<o&&(d=u>0?"swiped-left":"swiped-right"):Math.abs(i)>e&&c<o&&(d=i>0?"swiped-up":"swiped-down");if(""!==d){var b={dir:d.replace(/swiped-/,""),touchType:(p[0]||{}).touchType||"direct",xStart:parseInt(n,10),xEnd:parseInt((p[0]||{}).clientX||-1,10),yStart:parseInt(a,10),yEnd:parseInt((p[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:b})),s.dispatchEvent(new CustomEvent(d,{bubbles:!0,cancelable:!0,detail:b}))}n=null,a=null,r=null},!1);var n=null,a=null,u=null,i=null,r=null,s=null;function l(t,n,a){for(;t&&t!==e.documentElement;){var u=t.getAttribute(n);if(u)return u;t=t.parentNode}return a}}(window,document); 2 142 (function( $, document ) { 3 143 "use strict"; … … 207 347 } ); 208 348 209 $( document.body ).on( 'orderable-increase-quantity', orderable_drawer.cart.click_increase_decrease_quantity ); 210 $( document.body ).on( 'orderable-decrease-quantity', orderable_drawer.cart.click_increase_decrease_quantity ); 349 $( document.body ).on( 'orderable-increase-quantity', orderable_drawer.cart.handle_quantity_change_by_button); 350 $( document.body ).on( 'orderable-decrease-quantity', orderable_drawer.cart.handle_quantity_change_by_button); 351 352 const updateQuantityRequest = orderable_drawer.debounce( orderable_drawer.cart.click_increase_decrease_quantity ); 353 354 $( document.body ).on( 'orderable-increase-quantity', updateQuantityRequest ); 355 $( document.body ).on( 'orderable-decrease-quantity', updateQuantityRequest ); 211 356 212 357 var drawer = document.querySelector( 'body:not( .rtl ) .orderable-drawer' ); … … 279 424 */ 280 425 click_increase_decrease_quantity: function( e, $button ) { 281 var product_id = $button.data( 'orderable-product-id' ), 282 cart_item_key = $button.data( 'orderable-cart-item-key' ), 283 direction = $button.data( 'orderable-trigger' ), 284 quantity = parseInt( $button.data( 'orderable-quantity' ) ); 426 var product_id = $button.attr( 'data-orderable-product-id' ), 427 cart_item_key = $button.attr( 'data-orderable-cart-item-key' ), 428 quantity = $button.attr( 'data-orderable-quantity' ); 285 429 286 430 var data = { … … 288 432 cart_item_key, 289 433 product_id, 290 'quantity': 'increase-quantity' === direction ? quantity + 1 : quantity - 1434 quantity 291 435 }; 292 436 293 jQuery.post( 437 if (this.currentRequest) { 438 this.currentRequest.abort(); 439 this.currentRequest = undefined; 440 } 441 442 this.currentRequest = jQuery.post( 294 443 orderable_vars.ajax_url, 295 444 data, 296 function( response ) {445 (function( response ) { 297 446 if ( ! response ) { 298 447 return; 299 448 } 300 449 301 $( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash, $button ] ); 302 $( document.body ).trigger( 'orderable-drawer.quantity-updated' ); 303 } 304 ); 450 const $quantityElement = $button.siblings('.orderable-quantity-roller__quantity'); 451 452 if (data.quantity === $quantityElement.attr('data-orderable-updating-quantity')) { 453 $( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash, $button ] ); 454 $( document.body ).trigger( 'orderable-drawer.quantity-updated' ); 455 } 456 457 }).bind(this) 458 ) 459 .always((function() { 460 this.currentRequest = undefined; 461 }).bind(this)); 462 }, 463 handle_quantity_change_by_button: function (e, $button) { 464 const direction = $button.data( 'orderable-trigger' ); 465 const quantity = parseInt( $button.attr( 'data-orderable-quantity' ) ); 466 467 const siblingButtonName = 'increase-quantity' === direction ? 'decrease' : 'increase'; 468 469 const $siblingButton = $button.siblings(`.orderable-quantity-roller__button--${siblingButtonName}`); 470 const $quantityElement = $button.siblings('.orderable-quantity-roller__quantity'); 471 472 const newQuantity = 'increase-quantity' === direction ? quantity + 1 : Math.max(0, quantity - 1); 473 474 $button.attr('data-orderable-quantity', newQuantity); 475 $siblingButton.attr('data-orderable-quantity', newQuantity); 476 $quantityElement.attr('data-orderable-updating-quantity', newQuantity); 477 $quantityElement.text(newQuantity); 305 478 } 306 479 } … … 351 524 $( document.body ).on( 'orderable-view-product', orderable_products.view_product ); 352 525 $( document.body ).on( 'mouseenter mouseleave', '.' + orderable_products.vars.classes.clickable_product, orderable_products.simulate_add_to_order_hover ); 526 $( document.body ).on('orderable-edit-cart-item', orderable_products.edit_cart_item); 527 $( document.body ).on( 'orderable-update-cart-item', orderable_products.update_cart_item); 528 $( document.body ).on( 'orderable-show-cart', orderable_products.show_cart); 353 529 }, 354 530 … … 422 598 423 599 /** 600 * Show the cart. 601 */ 602 show_cart: function() { 603 $( document.body ).trigger( 'orderable-drawer.open', { show_cart: true } ); 604 }, 605 606 /** 424 607 * View product. 425 608 * … … 485 668 callback( response ); 486 669 } 670 } 671 ); 672 }, 673 674 /** 675 * Edit cart item. 676 * 677 * @param event 678 * @param $element 679 */ 680 edit_cart_item: function(event, $element) { 681 const cart_item_key = $element.data('orderable-cart-item-key'); 682 683 $element.addClass( orderable_products.vars.classes.button_loading ); 684 685 orderable_products.get_cart_item_options( 686 { 687 cart_item_key 688 }, 689 function(response) { 690 const args = { 691 html: response.html, 692 action: 'update-cart-item' 693 }; 694 695 $( document.body ).trigger( 'orderable-drawer.open', args ); 696 $element.removeClass( orderable_products.vars.classes.button_loading ); 697 } 698 ); 699 }, 700 701 /** 702 * Update cart item. 703 * 704 * @param event 705 * @param $element 706 */ 707 update_cart_item: function(event, $element) { 708 const cart_item_key = $element.data('orderable-cart-item-key'); 709 const product_id = $element.data( 'orderable-product-id' ); 710 const variation_id = $element.data( 'orderable-variation-id' ); 711 const attributes = $element.data( 'orderable-variation-attributes' ); 712 713 $element.addClass( orderable_products.vars.classes.button_loading ); 714 orderable_products.update_cart_item_options( 715 { 716 cart_item_key, 717 product_id, 718 variation_id, 719 attributes, 720 }, 721 function(response) { 722 const args = { 723 show_cart: true, 724 response 725 }; 726 727 $( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash ] ); 728 $(document.body).trigger('orderable-drawer.open', args); 729 $element.removeClass( orderable_products.vars.classes.button_loading ); 487 730 } 488 731 ); … … 539 782 540 783 /** 784 * Get variable product options. 785 * 786 * @param args 787 * @param callback 788 */ 789 get_cart_item_options: function( args, callback ) { 790 if ( typeof args.cart_item_key === 'undefined' ) { 791 return; 792 } 793 794 args.action = 'orderable_get_cart_item_options'; 795 796 jQuery.post( 797 orderable_vars.ajax_url, 798 args, 799 function( response ) { 800 if ( !response.success ) { 801 return; 802 } 803 804 if ( typeof callback === 'function' ) { 805 callback( response.data ); 806 } 807 } 808 ); 809 }, 810 811 /** 812 * Update variable product options. 813 * 814 * @param args 815 * @param callback 816 */ 817 update_cart_item_options: function( args, callback ) { 818 if ( typeof args.cart_item_key === 'undefined' ) { 819 return; 820 } 821 822 args.action = 'orderable_update_cart_item_options'; 823 824 // Prepare addons data. 825 if ( $( '.orderable-product-fields-group' ).length ) { 826 const inputs = jQuery( '.orderable-product-fields-group :input' ).serializeArray(); 827 const addons_data = orderable_products.convert_to_flat_object( inputs ); 828 if ( ! jQuery.isEmptyObject( addons_data ) ) { 829 args = Object.assign( args, addons_data ); // Merge objects. 830 } 831 } 832 833 jQuery.post( 834 orderable_vars.ajax_url, 835 args, 836 function( response ) { 837 if ( !response ) { 838 return; 839 } 840 841 if ( typeof callback === 'function' ) { 842 callback( response ); 843 } 844 } 845 ); 846 }, 847 848 /** 541 849 * Init drawer product options. 542 850 * … … 545 853 */ 546 854 init_product_options: function( event, args ) { 547 if ( typeof args.action === 'undefined' || 'product-options' !== args.action) {855 if ( typeof args.action === 'undefined' || ( 'product-options' !== args.action && 'update-cart-item' !== args.action ) ) { 548 856 return; 549 857 } … … 571 879 */ 572 880 product_options_change: function( $options ) { 573 var $add_to_order_button = $( '.orderable-drawer .orderable-product__add-to-order ' ),881 var $add_to_order_button = $( '.orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item' ), 574 882 options_set = orderable_products.check_options( $options ), 575 883 product_type = $add_to_order_button.data( 'orderable-product-type' ); 576 884 577 $add_to_order_button.attr( 'data-orderable-trigger', 'add-to-cart' ); 885 if ( 'product-options' === $add_to_order_button.attr( 'data-orderable-trigger' )) { 886 $add_to_order_button.attr( 'data-orderable-trigger', 'add-to-cart' ); 887 } 888 578 889 $( '.' + orderable_products.vars.classes.product_messages ).html( '' ); 579 890 … … 626 937 */ 627 938 check_variation: function( $options ) { 628 var $product = $options.closest( '.orderable-drawer' ), 629 variations = $.parseJSON( $product.find( '.orderable-product__variations' ).text() ), 630 selected_options = orderable_products.serialize_object( $options ), 631 matching_variations = orderable_products.find_matching_variations( variations, selected_options ); 939 var $product = $options.closest( '.orderable-drawer' ); 940 941 var variations = $product.find( '.orderable-product__variations' ).text(); 942 943 variations = variations ? JSON.parse( variations) : ''; 944 945 var selected_options = orderable_products.serialize_object( $options ), 946 matching_variations = orderable_products.find_matching_variations( variations, selected_options ); 632 947 633 948 if ( orderable_products.is_empty( matching_variations ) ) { … … 771 1086 // Add delay to ensure invalid class has been assigned to inputs. 772 1087 setTimeout( function () { 773 var $button = $( '.orderable-drawer .orderable-product__add-to-order ' ),1088 var $button = $( '.orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item' ), 774 1089 invalid_fields_count = $( '.orderable-drawer__html .' + orderable_products.vars.classes.invalid_field ).length, 775 1090 product_type = $button.data( 'orderable-product-type' ), … … 1296 1611 $( document ).ready( orderable_triggers.on_ready ); 1297 1612 }( jQuery, document )); 1298 /**1299 * jQiery scrollBar Plugin1300 * @author Falk Müller (www-falk-m.de)1301 * Thankts to https://codepen.io/IliaSky/pen/obowmv1302 */1303 ;( function( $, window, document ) {1304 1305 "use strict";1306 1307 var pluginName = "scrollBox",1308 defaults = {1309 containerClass: "sb-container",1310 containerNoScrollClass: "sb-container-noscroll",1311 contentClass: "sb-content",1312 scrollbarContainerClass: "sb-scrollbar-container",1313 scrollBarClass: "sb-scrollbar"1314 1315 };1316 1317 // plugin constructor1318 function Plugin ( element, options ) {1319 this.element = element;1320 1321 this.settings = $.extend( {}, defaults, options );1322 this._defaults = defaults;1323 this._name = pluginName;1324 this.init();1325 1326 }1327 1328 // Avoid Plugin.prototype conflicts1329 $.extend( Plugin.prototype, {1330 init: function() {1331 1332 this.addScrollbar();1333 this.addEvents();1334 this.onResize();1335 },1336 addScrollbar: function() {1337 $( this.element ).addClass(this.settings.containerClass);1338 this.wrapper = $("<div class='" + this.settings.contentClass + "' />");1339 this.wrapper.append($( this.element ).contents());1340 $( this.element ).append( this.wrapper );1341 1342 this.scollbarContainer = $("<div class='" + this.settings.scrollbarContainerClass + "' />");1343 this.scrollBar = $("<div class='" + this.settings.scrollBarClass + "' />");1344 this.scollbarContainer.append(this.scrollBar);1345 $( this.element ).prepend(this.scollbarContainer);1346 },1347 addEvents: function(){1348 1349 this.wrapper.on("scroll." + pluginName, $.proxy(this.onScroll, this) );1350 $(window).on("resize." + pluginName, $.proxy(this.onResize, this) );1351 1352 this.scrollBar.on('mousedown.' + pluginName, $.proxy(this.onMousedown, this));1353 this.scrollBar.on('touchstart.' + pluginName, $.proxy(this.onTouchstart, this));1354 },1355 1356 onTouchstart: function(ev){1357 var me = this;1358 1359 ev.preventDefault();1360 var y = me.scrollBar[0].offsetTop;1361 1362 var onMove = function(end){1363 var delta = end.touches[0].pageY - ev.touches[0].pageY;1364 me.scrollBar[0].style.top = Math.min(me.scollbarContainer[0].clientHeight - me.scrollBar[0].clientHeight, Math.max(0, y + delta)) + 'px';1365 me.wrapper[0].scrollTop = (me.wrapper[0].scrollHeight * me.scrollBar[0].offsetTop / me.scollbarContainer[0].clientHeight);1366 };1367 1368 $(document).on("touchmove." + pluginName, onMove);1369 $(document).on("touchend." + pluginName, function(){1370 $(document).off("touchmove." + pluginName);1371 $(document).off("touchend." + pluginName);1372 });1373 },1374 1375 onMousedown: function(ev){1376 var me = this;1377 1378 ev.preventDefault();1379 var y = me.scrollBar[0].offsetTop;1380 1381 var onMove = function(end){1382 var delta = end.pageY - ev.pageY;1383 me.scrollBar[0].style.top = Math.min(me.scollbarContainer[0].clientHeight - me.scrollBar[0].clientHeight, Math.max(0, y + delta)) + 'px';1384 me.wrapper[0].scrollTop = (me.wrapper[0].scrollHeight * me.scrollBar[0].offsetTop / me.scollbarContainer[0].clientHeight);1385 };1386 1387 $(document).on("mousemove." + pluginName, onMove);1388 $(document).on("mouseup." + pluginName, function(){1389 $(document).off("mousemove." + pluginName);1390 $(document).off("mouseup." + pluginName);1391 });1392 },1393 1394 onResize: function(){1395 1396 this.wrapper.css("max-height", $(this.element).height());1397 1398 var wrapper_client_height = this.wrapper[0].clientHeight;1399 1400 this.scrollBar.css("height", this.scollbarContainer[0].clientHeight * wrapper_client_height / this.wrapper[0].scrollHeight + "px");1401 if(this.scollbarContainer[0].clientHeight <= this.scrollBar[0].clientHeight){1402 $( this.element ).addClass(this.settings.containerNoScrollClass);1403 } else {1404 $( this.element ).removeClass(this.settings.containerNoScrollClass);1405 }1406 1407 this.onScroll();1408 },1409 1410 onScroll: function(){1411 1412 this.scrollBar.css("top", Math.min(this.scollbarContainer[0].clientHeight - this.scrollBar[0].clientHeight, this.scollbarContainer[0].clientHeight * this.wrapper[0].scrollTop / this.wrapper[0].scrollHeight) + "px");1413 1414 }1415 } );1416 1417 // A really lightweight plugin wrapper around the constructor,1418 // preventing against multiple instantiations1419 $.fn[pluginName] = function( options ) {1420 return this.each( function() {1421 if ( !$.data( this, "plugin_" + pluginName ) ) {1422 $.data( this, "plugin_" +1423 pluginName, new Plugin( this, options ) );1424 }1425 } );1426 };1427 1428 } )( jQuery, window, document );1429 /*!1430 * swiped-events.js - v1.1.61431 * Pure JavaScript swipe events1432 * https://github.com/john-doherty/swiped-events1433 * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element1434 * @author John Doherty <www.johndoherty.info>1435 * @license MIT1436 */1437 !function(t,e){"use strict";"function"!=typeof t.CustomEvent&&(t.CustomEvent=function(t,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var a=e.createEvent("CustomEvent");return a.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),a},t.CustomEvent.prototype=t.Event.prototype),e.addEventListener("touchstart",function(t){if("true"===t.target.getAttribute("data-swipe-ignore"))return;s=t.target,r=Date.now(),n=t.touches[0].clientX,a=t.touches[0].clientY,u=0,i=0},!1),e.addEventListener("touchmove",function(t){if(!n||!a)return;var e=t.touches[0].clientX,r=t.touches[0].clientY;u=n-e,i=a-r},!1),e.addEventListener("touchend",function(t){if(s!==t.target)return;var e=parseInt(l(s,"data-swipe-threshold","20"),10),o=parseInt(l(s,"data-swipe-timeout","500"),10),c=Date.now()-r,d="",p=t.changedTouches||t.touches||[];Math.abs(u)>Math.abs(i)?Math.abs(u)>e&&c<o&&(d=u>0?"swiped-left":"swiped-right"):Math.abs(i)>e&&c<o&&(d=i>0?"swiped-up":"swiped-down");if(""!==d){var b={dir:d.replace(/swiped-/,""),touchType:(p[0]||{}).touchType||"direct",xStart:parseInt(n,10),xEnd:parseInt((p[0]||{}).clientX||-1,10),yStart:parseInt(a,10),yEnd:parseInt((p[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:b})),s.dispatchEvent(new CustomEvent(d,{bubbles:!0,cancelable:!0,detail:b}))}n=null,a=null,r=null},!1);var n=null,a=null,u=null,i=null,r=null,s=null;function l(t,n,a){for(;t&&t!==e.documentElement;){var u=t.getAttribute(n);if(u)return u;t=t.parentNode}return a}}(window,document); -
orderable/tags/1.4.0/assets/frontend/js/main.min.js
r2709284 r2745279 1 !function(o, s){"use strict";var n={on_ready:function(){n.cache(),n.watch()},cache:function(){n.vars={classes:{parent:"orderable-accordion",link:"orderable-accordion__item-link",content:"orderable-accordion__item-content",link_active:"orderable-accordion__item-link--active",content_active:"orderable-accordion__item-content--active"}}},watch:function(){o(s.body).on("click","."+n.vars.classes.link,function(e){e.preventDefault();var e=o(this),r=e.closest("."+n.vars.classes.parent),t=e.attr("href"),t=o(t),a=e.hasClass(n.vars.classes.link_active);r.find("."+n.vars.classes.link).removeClass(n.vars.classes.link_active),r.find("."+n.vars.classes.content).removeClass(n.vars.classes.content_active),a||(e.addClass(n.vars.classes.link_active),t.addClass(n.vars.classes.content_active)),o(s.body).trigger("orderable-accordion.toggled",{link:e,content:t})}),o(s.body).on("orderable-scrollbar.created",function(e,r){var t=o(".orderable-drawer ."+n.vars.classes.link_active);t.length<=0||(t=(r=r.content).scrollTop()-r.offset().top+t.offset().top,r.scrollTop(t))})}};o(s).ready(n.on_ready)}(jQuery,document),function(n,i){"use strict";var t={debounce:function(r,t=700){let a;return(...e)=>{clearTimeout(a),a=setTimeout(()=>{r.apply(this,e)},t)}},allow_only_numbers:function(e){var r=String.fromCharCode(e.which);/^\d+$/.test(r)||e.preventDefault()},on_change_quantity:function(e){const r=n(e.currentTarget);var e=r.data("orderable-product-id"),t=r.data("orderable-cart-item-key"),a=parseInt(r.text());jQuery.post(orderable_vars.ajax_url,{action:"orderable_cart_quantity",cart_item_key:t,product_id:e,quantity:a},function(e){e&&(n(i.body).trigger("added_to_cart",[e.fragments,e.cart_hash,r]),n(i.body).trigger("orderable-drawer.quantity-updated"))})},on_ready:function(){t.cache(),t.watch(),n(i.body).on("keypress",".orderable-quantity-roller__quantity",t.allow_only_numbers),n(".orderable-drawer__cart").on("input",".orderable-quantity-roller__quantity",t.debounce(t.on_change_quantity)),orderable_vars&&!orderable_vars.woocommerce_enable_ajax_add_to_cart&&n(i.body).off("click",".add_to_cart_button")},cache:function(){t.vars={classes:{overlay:"orderable-drawer-overlay",drawer:"orderable-drawer",drawer_cart:"orderable-drawer__cart",drawer_html:"orderable-drawer__html",overlay_open:"orderable-drawer-overlay--open",drawer_open:"orderable-drawer--open",drawer_open_body:"orderable-drawer-open"}},t.elements={body:n("body"),overlay:n("."+t.vars.classes.overlay),drawer:n("."+t.vars.classes.drawer),drawer_cart:n("."+t.vars.classes.drawer_cart),drawer_html:n("."+t.vars.classes.drawer_html),floating_cart_button_class:".orderable-floating-cart__button"}},watch:function(){var e,r;void 0!==t.elements.drawer&&(n(i.body).on("orderable-drawer.open",t.open),n(i.body).on("orderable-drawer.close",t.close),n(i.body).on("click",t.elements.floating_cart_button_class,function(){n(i.body).trigger("orderable-drawer.open",{show_cart:!0})}),n(i.body).on("orderable-increase-quantity",t.cart.click_increase_decrease_quantity),n(i.body).on("orderable-decrease-quantity",t.cart.click_increase_decrease_quantity),e=i.querySelector("body:not( .rtl ) .orderable-drawer"),r=i.querySelector("body.rtl .orderable-drawer"),e&&e.addEventListener("swiped-right",function(e){t.close()}),r&&r.addEventListener("swiped-left",function(e){t.close()}))},open:function(e,r){r.html=r.html||!1,r.show_cart=r.show_cart||!1,t.elements.drawer_html.hide(),t.elements.drawer_cart.hide(),r.html&&(t.elements.drawer_html.html(r.html),t.elements.drawer_html.show()),r.show_cart&&(t.elements.drawer_html.html(""),t.elements.drawer_cart.show()),t.elements.overlay.addClass(t.vars.classes.overlay_open),t.elements.drawer.addClass(t.vars.classes.drawer_open),t.elements.body.addClass(t.vars.classes.drawer_open_body),n(i.body).trigger("orderable-drawer.opened",r)},close:function(){t.elements.overlay.removeClass(t.vars.classes.overlay_open),t.elements.drawer.removeClass(t.vars.classes.drawer_open),t.elements.body.removeClass(t.vars.classes.drawer_open_body),t.elements.drawer_html.html(""),n(i.body).trigger("orderable-drawer.closed")},cart:{click_increase_decrease_quantity:function(e,r){var t=r.data("orderable-product-id"),a=r.data("orderable-cart-item-key"),o=r.data("orderable-trigger"),s=parseInt(r.data("orderable-quantity"));jQuery.post(orderable_vars.ajax_url,{action:"orderable_cart_quantity",cart_item_key:a,product_id:t,quantity:"increase-quantity"===o?s+1:s-1},function(e){e&&(n(i.body).trigger("added_to_cart",[e.fragments,e.cart_hash,r]),n(i.body).trigger("orderable-drawer.quantity-updated"))})}}};n(i).ready(t.on_ready)}(jQuery,document),function(i,l){"use strict";var d={on_ready:function(){d.cache(),d.watch()},cache:function(){d.vars={classes:{clickable_product:"orderable-product--add-to-cart ",add_to_order_button:"orderable-product__add-to-order",product_messages:"orderable-product__messages",product_price:"orderable-product__actions-price",invalid_field:"orderable-field--invalid",option_select_td:"orderable-product__option-select",button_loading:"orderable-button--loading",out_of_stock:"orderable-button--out-of-stock"},parent_price:null},d.elements={}},watch:function(){i(l.body).on("orderable-drawer.opened",d.init_product_options),i(l.body).on("orderable-add-to-cart",d.click_add_to_order),i(l.body).on("orderable-product-options",d.click_add_to_order),i(l.body).on("orderable-view-product",d.view_product),i(l.body).on("mouseenter mouseleave","."+d.vars.classes.clickable_product,d.simulate_add_to_order_hover)},simulate_add_to_order_hover:function(e){i(this).find("."+d.vars.classes.add_to_order_button).toggleClass("orderable-button--hover","mouseenter"===e.type)},click_add_to_order:function(e,r){var t=(r=void 0!==r?r:i(this)).is("button")?r:r.find("."+d.vars.classes.add_to_order_button),r=t.data("orderable-trigger"),a=t.data("orderable-product-id"),o=t.data("orderable-variation-id"),s=t.data("orderable-variation-attributes"),n={action:r};t.hasClass(d.vars.classes.button_loading)||t.hasClass(d.vars.classes.out_of_stock)||(t.addClass(d.vars.classes.button_loading),"add-to-cart"===r?d.add_to_cart({product_id:a,variation_id:o,attributes:s},function(e){n.show_cart=!0,n.response=e,i(l.body).trigger("orderable-drawer.open",n),t.removeClass(d.vars.classes.button_loading)}):"product-options"===r&&d.get_product_options({product_id:a,focus:t.data("orderable-focus")},function(e){n.html=e.html,i(l.body).trigger("orderable-drawer.open",n),t.removeClass(d.vars.classes.button_loading)}))},view_product:function(e,r){var t=r.data("orderable-product-id"),a={action:"product-options"};d.get_product_options({product_id:t,focus:r.data("orderable-focus")},function(e){a.html=e.html,i(l.body).trigger("orderable-drawer.open",a)})},add_to_cart:function(e,r){var t;void 0!==e.product_id&&(e={action:"orderable_add_to_cart",product_id:e.product_id,variation_id:e.variation_id||!1,attributes:e.attributes||!1},i(".orderable-product-fields-group").length&&(t=jQuery(".orderable-product-fields-group :input").serializeArray(),t=d.convert_to_flat_object(t),jQuery.isEmptyObject(t)||(e=Object.assign(e,t))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&(i(l.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),"function"==typeof r&&r(e))}))},convert_to_flat_object:function(e){var a={};return e.forEach(function(e){var r="[]"===e.name.substr(-2)||Array.isArray(e.name),t=r?e.name.substr(0,e.name.length-2):e.name;r?(a[t]=void 0===a[t]?[]:a[t],a[t].push(e.value)):a[t]=e.value}),a},get_product_options:function(e,r){void 0!==e.product_id&&(e.action="orderable_get_product_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof r&&r(e.data)}))},init_product_options:function(e,r){var t,a,o;void 0!==r.action&&"product-options"===r.action&&(t=i(r=".orderable-drawer .orderable-product__options input, .orderable-drawer .orderable-product__options select"),d.vars.parent_price=i(".orderable-drawer .orderable-product__actions-price").html(),d.product_options_change(t),d.update_button_state(),a=d.debounce(d.update_button_state,500),o=d.debounce(d.product_options_change,500),i(l).on("change keyup",r,function(){o(t),a()}))},product_options_change:function(e){var r=i(".orderable-drawer .orderable-product__add-to-order"),t=d.check_options(e),a=r.data("orderable-product-type");r.attr("data-orderable-trigger","add-to-cart"),i("."+d.vars.classes.product_messages).html(""),"variable"===a&&(t?(a=d.check_variation(e),d.set_variation(r,a)):d.clear_variation(r))},check_options:function(e){if(e.length<=0)return!1;var t=!0;return e.each(function(e,r){i(r).hasClass("orderable-input--validate")&&(""===i(r).val()?(i(r).addClass(d.vars.classes.invalid_field),t=!1):i(r).removeClass(d.vars.classes.invalid_field))}),t},check_variation:function(e){var r=e.closest(".orderable-drawer"),r=i.parseJSON(r.find(".orderable-product__variations").text()),e=d.serialize_object(e),r=d.find_matching_variations(r,e);if(d.is_empty(r))return!1;r=r.shift();return r.attributes=e,r.attributes_json=JSON.stringify(e),void 0!==r&&r},set_variation:function(e,r){var t=r.variation_id||"",a=r.attributes_json||"",o=r.price_html||d.vars.parent_price,s="";r&&""!==r.availability_html&&(s=r.availability_html),r&&!r.is_in_stock&&(s="<p>"+orderable_vars.i18n.out_of_stock+"</p>"),r&&!r.is_purchasable&&(s="<p>"+orderable_vars.i18n.unavailable+"</p>"),!1===r&&(s="<p>"+orderable_vars.i18n.no_exist+"</p>"),!r||r.is_purchasable&&r.is_in_stock||(a=t=""),""!==s&&i("."+d.vars.classes.product_messages).html(s),e.data("orderable-variation-id",t),e.data("orderable-variation-attributes",a),i(".orderable-drawer .orderable-product__actions-price").html(o),e.trigger("orderable_variation_set",{variation:r,variation_id:t,attributes:a,price:o})},clear_variation:function(e){d.set_variation(e,""),d.vars.parent_price&&i(".orderable-drawer .orderable-product__actions-price").html(d.vars.parent_price)},find_matching_variations:function(e,r){for(var t=[],a=0;a<e.length;a++){var o=e[a];d.is_matching_variation(o.attributes,r)&&t.push(o)}return t},is_matching_variation:function(e,r){var t,a,o,s=!0;for(t in e)e.hasOwnProperty(t)&&(a=e[t],o=r[t],void 0!==a&&void 0!==o&&0!==a.length&&0!==o.length&&a!==o&&(s=!1));return s},is_empty:function(e){return void 0===e||!1===e||e.length<=0||!e},serialize_object:function(e){for(var r=e.serializeArray(),t={},a=0;a<r.length;a++)t[r[a].name]=r[a].value;return t},update_button_state:function(){setTimeout(function(){var e=i(".orderable-drawer .orderable-product__add-to-order"),r=i(".orderable-drawer__html ."+d.vars.classes.invalid_field).length,t=!0;"variable"===e.data("orderable-product-type")&&(t=""!==e.data("orderable-variation-id")),e.prop("disabled",r||!t)},50)},debounce:function(a,o,s){var n;return function(){var e=this,r=arguments,t=s&&!n;clearTimeout(n),n=setTimeout(function(){n=null,s||a.apply(e,r)},o),t&&a.apply(e,r)}}};i(l).ready(d.on_ready)}(jQuery,document),function(o,s){"use strict";var n={on_ready:function(){n.cache(),n.watch()},cache:function(){n.vars={top:{}},n.elements={}},watch:function(){o(s.body).on("orderable-drawer.opened",n.trigger),o(s.body).on("orderable-tabs.changed",n.trigger),o(s.body).on("orderable-accordion.toggled",n.trigger),o(s.body).on("wc_fragments_loaded",n.trigger)},trigger:function(){o(".orderable-sb-container").each(function(e,r){var t,r=o(r),a=r.data("orderable-scroll-id");n.has_scrollbar(r)||(r.scrollBox({containerClass:"orderable-sb-container",containerNoScrollClass:"orderable-sb-container-noscroll",contentClass:"orderable-sb-content",scrollbarContainerClass:"orderable-sb-scrollbar-container",scrollBarClass:"orderable-sb-scrollbar"}),0<(t=r.find(".orderable-sb-content")).length&&(t.on("scroll.scrollBox",n.log_top_position),void 0!==n.vars.top[a]&&t.scrollTop(n.vars.top[a])),o(s.body).trigger("orderable-scrollbar.created",{element:r,content:t}))}),o(window).trigger("resize.scrollBox")},has_scrollbar:function(e){return 0<e.find(".orderable-sb-content").length},log_top_position:function(e){var r=o(e.currentTarget).closest(".orderable-sb-container").data("orderable-scroll-id");n.vars.top[r]=o(e.currentTarget).scrollTop()}};o(s).ready(n.on_ready)}(jQuery,document),function(n,e){"use strict";var r={on_ready:function(){r.watch()},watch:function(){n(e.body).on("orderable-show-lookup-services",function(e,r){var t=r.closest(".orderable-services-selector").find(".orderable-services-selector__lookup");r.hide(),t.show()}),n(e.body).on("orderable-lookup-services",function(e,r){var t=r.closest(".orderable-services-selector"),a=t.find(".orderable-services-selector__lookup-message"),o=t.find(".orderable-services-selector__selected-change"),s=t.find(".orderable-services-selector__lookup-city").val(),t=t.find(".orderable-services-selector__lookup-postcode").val(),r=r.data("orderable-service");jQuery.post(orderable_vars.ajax_url,{action:"orderable_lookup_service",postcode:t,city:s,service:r},function(e){e.success?(a.html(""),o.show(),void 0!==e.data.fragments&&n.each(e.data.fragments,function(e,r){n(e).html(r)}),console.log(e)):a.html("<p>"+e.data.message+"</p>")})})}};n(e).ready(r.on_ready)}(jQuery,document),function(n,i){"use strict";var l={on_ready:function(){l.cache(),l.watch(),l.toggle_scroll()},on_resize:function(){l.toggle_scroll()},cache:function(){l.vars={classes:{tabs:"orderable-tabs",tabs_list:"orderable-tabs__list",tab_items:"orderable-tabs__item",tab_item_active:"orderable-tabs__item--active",tab_links:"orderable-tabs__link",tab_arrow:"orderable-tabs__arrow"},dragging:!1},l.elements={}},watch:function(){n("body").on("touchstart",function(){l.vars.dragging=!1}).on("touchmove",function(){l.vars.dragging=!0}),n(i.body).on("click mouseup touchend","."+l.vars.classes.tab_links,function(e){var r,t,a,o,s;l.vars.dragging||(e.preventDefault(),r=(e=n(this)).attr("href"),t=e.closest("."+l.vars.classes.tab_items),a=(s=e.closest("."+l.vars.classes.tabs)).find("."+l.vars.classes.tabs_list),o=s.find("."+l.vars.classes.tab_items),s=s.data("orderable-tabs"),s=(e=e.closest(s.wrapper)).find(s.sections),e=e.find(r),s.hide(),e.show(),o.removeClass(l.vars.classes.tab_item_active),t.addClass(l.vars.classes.tab_item_active),a.animate({scrollLeft:a.scrollLeft()+t.position().left}),n(i.body).trigger("orderable-tabs.changed",{tab:t}))}),n("."+l.vars.classes.tabs_list).on("scroll",function(e){0<n(this).scrollLeft()&&n("."+l.vars.classes.tab_arrow).fadeOut()}),n("."+l.vars.classes.tabs_list).on("wheel DOMMouseScroll mousewheel touchmove",function(){n(this).stop()}),n(i).on("click","."+l.vars.classes.tab_arrow,function(e){e.preventDefault();var e=n(this),r=e.parent(),t=r.find("."+l.vars.classes.tabs_list);t.animate({scrollLeft:t.scrollLeft()+.5*r.width()}),e.fadeOut()})},toggle_scroll:function(){n("."+l.vars.classes.tabs).each(function(e,r){var t=n(this),a=t.data("orderable-tabs"),t=t.closest(a.wrapper),a=t.find("."+l.vars.classes.tabs_list),o=t.find("."+l.vars.classes.tab_arrow);t.outerWidth()<a[0].scrollWidth?o.show():o.hide()})}};n(i).ready(l.on_ready),n(window).on("resize",l.on_resize)}(jQuery,document);var orderable_timings={};!function(i,a){"use strict";orderable_timings={on_ready:function(){orderable_timings.watch(),orderable_timings.set_date_and_time()},set_date_and_time:function(){var e,r=a.querySelector("#orderable-date"),t="";r&&(e=r.options[r.selectedIndex])&&!(t=e.value)&&r.options[r.selectedIndex+1]&&(r.options[r.selectedIndex+1].selected=!0,i(r).change()),"asap"!==t&&(e="",(r=a.querySelector("#orderable-time"))&&(e=r.options[r.selectedIndex])&&r.options[r.selectedIndex+1]&&(e.value||(r.options[r.selectedIndex+1].selected=!0,i(r).change())))},restore:function(){var e=orderable_timings.get_timings();e&&e.date&&(i(".orderable-order-timings__date").val(e.date),i(".orderable-order-timings__date").change(),e.time&&(i(".orderable-order-timings__time").val(e.time),i(".orderable-order-timings__time").change()))},watch:function(){i(a.body).on("wc_fragments_refreshed",function(){orderable_timings.restore(),orderable_timings.set_date_and_time()}),i(a.body).on("updated_checkout",function(){orderable_timings.restore(),orderable_timings.set_date_and_time()}),i(a.body).on("change",".orderable-order-timings__date",function(e){var r=i(this).find("option:selected").data("orderable-slots"),t=i(".orderable-order-timings--time"),a=i(".orderable-order-timings__time"),o=a.find("option").first(),s=a.find('option[value="asap"]').first(),n=orderable_timings.get_timings();if(n.date=i(".orderable-order-timings__date").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(n)),a.html(o),s&&a.append(s),!r)return a.prop("disabled",!0),void t.hide();"all-day"===r[0].value?(t.hide(),a.prop("disabled",!0)):(a.prop("disabled",!1),t.show(),i.each(r,function(e,r){a.append(i("<option />").attr("value",r.value).text(r.formatted))}))}),i(a.body).on("change",".orderable-order-timings__time",function(e){var r=orderable_timings.get_timings();r.time=i(".orderable-order-timings__time").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(r))})},get_timings:function(){return JSON.parse(window.localStorage.getItem("orderable_timings"))||{}}},i(a).ready(orderable_timings.on_ready)}(jQuery,document),function(t,a){"use strict";var e={on_ready:function(){e.watch()},watch:function(){t(a.body).on("click","[data-orderable-trigger]",e.trigger)},trigger:function(e){e.stopImmediatePropagation();var e=t(this),r=e.data("orderable-trigger");t(a.body).trigger("orderable-"+r,[e])}};t(a).ready(e.on_ready)}(jQuery,document),function(o,e,s){"use strict";var n="scrollBox",t={containerClass:"sb-container",containerNoScrollClass:"sb-container-noscroll",contentClass:"sb-content",scrollbarContainerClass:"sb-scrollbar-container",scrollBarClass:"sb-scrollbar"};function r(e,r){this.element=e,this.settings=o.extend({},t,r),this._defaults=t,this._name=n,this.init()}o.extend(r.prototype,{init:function(){this.addScrollbar(),this.addEvents(),this.onResize()},addScrollbar:function(){o(this.element).addClass(this.settings.containerClass),this.wrapper=o("<div class='"+this.settings.contentClass+"' />"),this.wrapper.append(o(this.element).contents()),o(this.element).append(this.wrapper),this.scollbarContainer=o("<div class='"+this.settings.scrollbarContainerClass+"' />"),this.scrollBar=o("<div class='"+this.settings.scrollBarClass+"' />"),this.scollbarContainer.append(this.scrollBar),o(this.element).prepend(this.scollbarContainer)},addEvents:function(){this.wrapper.on("scroll."+n,o.proxy(this.onScroll,this)),o(e).on("resize."+n,o.proxy(this.onResize,this)),this.scrollBar.on("mousedown."+n,o.proxy(this.onMousedown,this)),this.scrollBar.on("touchstart."+n,o.proxy(this.onTouchstart,this))},onTouchstart:function(r){var t=this,a=(r.preventDefault(),t.scrollBar[0].offsetTop);o(s).on("touchmove."+n,function(e){e=e.touches[0].pageY-r.touches[0].pageY;t.scrollBar[0].style.top=Math.min(t.scollbarContainer[0].clientHeight-t.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",t.wrapper[0].scrollTop=t.wrapper[0].scrollHeight*t.scrollBar[0].offsetTop/t.scollbarContainer[0].clientHeight}),o(s).on("touchend."+n,function(){o(s).off("touchmove."+n),o(s).off("touchend."+n)})},onMousedown:function(r){var t=this,a=(r.preventDefault(),t.scrollBar[0].offsetTop);o(s).on("mousemove."+n,function(e){e=e.pageY-r.pageY;t.scrollBar[0].style.top=Math.min(t.scollbarContainer[0].clientHeight-t.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",t.wrapper[0].scrollTop=t.wrapper[0].scrollHeight*t.scrollBar[0].offsetTop/t.scollbarContainer[0].clientHeight}),o(s).on("mouseup."+n,function(){o(s).off("mousemove."+n),o(s).off("mouseup."+n)})},onResize:function(){this.wrapper.css("max-height",o(this.element).height());var e=this.wrapper[0].clientHeight;this.scrollBar.css("height",this.scollbarContainer[0].clientHeight*e/this.wrapper[0].scrollHeight+"px"),this.scollbarContainer[0].clientHeight<=this.scrollBar[0].clientHeight?o(this.element).addClass(this.settings.containerNoScrollClass):o(this.element).removeClass(this.settings.containerNoScrollClass),this.onScroll()},onScroll:function(){this.scrollBar.css("top",Math.min(this.scollbarContainer[0].clientHeight-this.scrollBar[0].clientHeight,this.scollbarContainer[0].clientHeight*this.wrapper[0].scrollTop/this.wrapper[0].scrollHeight)+"px")}}),o.fn[n]=function(e){return this.each(function(){o.data(this,"plugin_"+n)||o.data(this,"plugin_"+n,new r(this,e))})}}(jQuery,window,document),function(e,o){"use strict";"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,r){r=r||{bubbles:!1,cancelable:!1,detail:void 0};var t=o.createEvent("CustomEvent");return t.initCustomEvent(e,r.bubbles,r.cancelable,r.detail),t},e.CustomEvent.prototype=e.Event.prototype),o.addEventListener("touchstart",function(e){"true"!==e.target.getAttribute("data-swipe-ignore")&&(c=e.target,d=Date.now(),s=e.touches[0].clientX,n=e.touches[0].clientY,l=i=0)},!1),o.addEventListener("touchmove",function(e){var r;s&&n&&(r=e.touches[0].clientX,e=e.touches[0].clientY,i=s-r,l=n-e)},!1),o.addEventListener("touchend",function(e){var r,t,a,o;c===e.target&&(o=parseInt(u(c,"data-swipe-threshold","20"),10),r=parseInt(u(c,"data-swipe-timeout","500"),10),t=Date.now()-d,a="",e=e.changedTouches||e.touches||[],Math.abs(i)>Math.abs(l)?Math.abs(i)>o&&t<r&&(a=0<i?"swiped-left":"swiped-right"):Math.abs(l)>o&&t<r&&(a=0<l?"swiped-up":"swiped-down"),""!==a&&(o={dir:a.replace(/swiped-/,""),touchType:(e[0]||{}).touchType||"direct",xStart:parseInt(s,10),xEnd:parseInt((e[0]||{}).clientX||-1,10),yStart:parseInt(n,10),yEnd:parseInt((e[0]||{}).clientY||-1,10)},c.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:o})),c.dispatchEvent(new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:o}))),d=n=s=null)},!1);var s=null,n=null,i=null,l=null,d=null,c=null;function u(e,r,t){for(;e&&e!==o.documentElement;){var a=e.getAttribute(r);if(a)return a;e=e.parentNode}return t}}(window,document);1 !function(o,e,s){"use strict";var n="scrollBox",r={containerClass:"sb-container",containerNoScrollClass:"sb-container-noscroll",contentClass:"sb-content",scrollbarContainerClass:"sb-scrollbar-container",scrollBarClass:"sb-scrollbar"};function t(e,t){this.element=e,this.settings=o.extend({},r,t),this._defaults=r,this._name=n,this.init()}o.extend(t.prototype,{init:function(){this.addScrollbar(),this.addEvents(),this.onResize()},addScrollbar:function(){o(this.element).addClass(this.settings.containerClass),this.wrapper=o("<div class='"+this.settings.contentClass+"' />"),this.wrapper.append(o(this.element).contents()),o(this.element).append(this.wrapper),this.scollbarContainer=o("<div class='"+this.settings.scrollbarContainerClass+"' />"),this.scrollBar=o("<div class='"+this.settings.scrollBarClass+"' />"),this.scollbarContainer.append(this.scrollBar),o(this.element).prepend(this.scollbarContainer)},addEvents:function(){this.wrapper.on("scroll."+n,o.proxy(this.onScroll,this)),o(e).on("resize."+n,o.proxy(this.onResize,this)),this.scrollBar.on("mousedown."+n,o.proxy(this.onMousedown,this)),this.scrollBar.on("touchstart."+n,o.proxy(this.onTouchstart,this))},onTouchstart:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(s).on("touchmove."+n,function(e){e=e.touches[0].pageY-t.touches[0].pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(s).on("touchend."+n,function(){o(s).off("touchmove."+n),o(s).off("touchend."+n)})},onMousedown:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(s).on("mousemove."+n,function(e){e=e.pageY-t.pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(s).on("mouseup."+n,function(){o(s).off("mousemove."+n),o(s).off("mouseup."+n)})},onResize:function(){this.wrapper.css("max-height",o(this.element).height());var e=this.wrapper[0].clientHeight;this.scrollBar.css("height",this.scollbarContainer[0].clientHeight*e/this.wrapper[0].scrollHeight+"px"),this.scollbarContainer[0].clientHeight<=this.scrollBar[0].clientHeight?o(this.element).addClass(this.settings.containerNoScrollClass):o(this.element).removeClass(this.settings.containerNoScrollClass),this.onScroll()},onScroll:function(){this.scrollBar.css("top",Math.min(this.scollbarContainer[0].clientHeight-this.scrollBar[0].clientHeight,this.scollbarContainer[0].clientHeight*this.wrapper[0].scrollTop/this.wrapper[0].scrollHeight)+"px")}}),o.fn[n]=function(e){return this.each(function(){o.data(this,"plugin_"+n)||o.data(this,"plugin_"+n,new t(this,e))})}}(jQuery,window,document),function(e,o){"use strict";"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var r=o.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r},e.CustomEvent.prototype=e.Event.prototype),o.addEventListener("touchstart",function(e){"true"!==e.target.getAttribute("data-swipe-ignore")&&(c=e.target,l=Date.now(),s=e.touches[0].clientX,n=e.touches[0].clientY,d=i=0)},!1),o.addEventListener("touchmove",function(e){var t;s&&n&&(t=e.touches[0].clientX,e=e.touches[0].clientY,i=s-t,d=n-e)},!1),o.addEventListener("touchend",function(e){var t,r,a,o;c===e.target&&(o=parseInt(u(c,"data-swipe-threshold","20"),10),t=parseInt(u(c,"data-swipe-timeout","500"),10),r=Date.now()-l,a="",e=e.changedTouches||e.touches||[],Math.abs(i)>Math.abs(d)?Math.abs(i)>o&&r<t&&(a=0<i?"swiped-left":"swiped-right"):Math.abs(d)>o&&r<t&&(a=0<d?"swiped-up":"swiped-down"),""!==a&&(o={dir:a.replace(/swiped-/,""),touchType:(e[0]||{}).touchType||"direct",xStart:parseInt(s,10),xEnd:parseInt((e[0]||{}).clientX||-1,10),yStart:parseInt(n,10),yEnd:parseInt((e[0]||{}).clientY||-1,10)},c.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:o})),c.dispatchEvent(new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:o}))),l=n=s=null)},!1);var s=null,n=null,i=null,d=null,l=null,c=null;function u(e,t,r){for(;e&&e!==o.documentElement;){var a=e.getAttribute(t);if(a)return a;e=e.parentNode}return r}}(window,document),function(o,s){"use strict";var n={on_ready:function(){n.cache(),n.watch()},cache:function(){n.vars={classes:{parent:"orderable-accordion",link:"orderable-accordion__item-link",content:"orderable-accordion__item-content",link_active:"orderable-accordion__item-link--active",content_active:"orderable-accordion__item-content--active"}}},watch:function(){o(s.body).on("click","."+n.vars.classes.link,function(e){e.preventDefault();var e=o(this),t=e.closest("."+n.vars.classes.parent),r=e.attr("href"),r=o(r),a=e.hasClass(n.vars.classes.link_active);t.find("."+n.vars.classes.link).removeClass(n.vars.classes.link_active),t.find("."+n.vars.classes.content).removeClass(n.vars.classes.content_active),a||(e.addClass(n.vars.classes.link_active),r.addClass(n.vars.classes.content_active)),o(s.body).trigger("orderable-accordion.toggled",{link:e,content:r})}),o(s.body).on("orderable-scrollbar.created",function(e,t){var r=o(".orderable-drawer ."+n.vars.classes.link_active);r.length<=0||(r=(t=t.content).scrollTop()-t.offset().top+r.offset().top,t.scrollTop(r))})}};o(s).ready(n.on_ready)}(jQuery,document),function(o,s){"use strict";var r={debounce:function(t,r=700){let a;return(...e)=>{clearTimeout(a),a=setTimeout(()=>{t.apply(this,e)},r)}},allow_only_numbers:function(e){var t=String.fromCharCode(e.which);/^\d+$/.test(t)||e.preventDefault()},on_change_quantity:function(e){const t=o(e.currentTarget);var e=t.data("orderable-product-id"),r=t.data("orderable-cart-item-key"),a=parseInt(t.text());jQuery.post(orderable_vars.ajax_url,{action:"orderable_cart_quantity",cart_item_key:r,product_id:e,quantity:a},function(e){e&&(o(s.body).trigger("added_to_cart",[e.fragments,e.cart_hash,t]),o(s.body).trigger("orderable-drawer.quantity-updated"))})},on_ready:function(){r.cache(),r.watch(),o(s.body).on("keypress",".orderable-quantity-roller__quantity",r.allow_only_numbers),o(".orderable-drawer__cart").on("input",".orderable-quantity-roller__quantity",r.debounce(r.on_change_quantity)),orderable_vars&&!orderable_vars.woocommerce_enable_ajax_add_to_cart&&o(s.body).off("click",".add_to_cart_button")},cache:function(){r.vars={classes:{overlay:"orderable-drawer-overlay",drawer:"orderable-drawer",drawer_cart:"orderable-drawer__cart",drawer_html:"orderable-drawer__html",overlay_open:"orderable-drawer-overlay--open",drawer_open:"orderable-drawer--open",drawer_open_body:"orderable-drawer-open"}},r.elements={body:o("body"),overlay:o("."+r.vars.classes.overlay),drawer:o("."+r.vars.classes.drawer),drawer_cart:o("."+r.vars.classes.drawer_cart),drawer_html:o("."+r.vars.classes.drawer_html),floating_cart_button_class:".orderable-floating-cart__button"}},watch:function(){var e,t;void 0!==r.elements.drawer&&(o(s.body).on("orderable-drawer.open",r.open),o(s.body).on("orderable-drawer.close",r.close),o(s.body).on("click",r.elements.floating_cart_button_class,function(){o(s.body).trigger("orderable-drawer.open",{show_cart:!0})}),o(s.body).on("orderable-increase-quantity",r.cart.handle_quantity_change_by_button),o(s.body).on("orderable-decrease-quantity",r.cart.handle_quantity_change_by_button),e=r.debounce(r.cart.click_increase_decrease_quantity),o(s.body).on("orderable-increase-quantity",e),o(s.body).on("orderable-decrease-quantity",e),e=s.querySelector("body:not( .rtl ) .orderable-drawer"),t=s.querySelector("body.rtl .orderable-drawer"),e&&e.addEventListener("swiped-right",function(e){r.close()}),t&&t.addEventListener("swiped-left",function(e){r.close()}))},open:function(e,t){t.html=t.html||!1,t.show_cart=t.show_cart||!1,r.elements.drawer_html.hide(),r.elements.drawer_cart.hide(),t.html&&(r.elements.drawer_html.html(t.html),r.elements.drawer_html.show()),t.show_cart&&(r.elements.drawer_html.html(""),r.elements.drawer_cart.show()),r.elements.overlay.addClass(r.vars.classes.overlay_open),r.elements.drawer.addClass(r.vars.classes.drawer_open),r.elements.body.addClass(r.vars.classes.drawer_open_body),o(s.body).trigger("orderable-drawer.opened",t)},close:function(){r.elements.overlay.removeClass(r.vars.classes.overlay_open),r.elements.drawer.removeClass(r.vars.classes.drawer_open),r.elements.body.removeClass(r.vars.classes.drawer_open_body),r.elements.drawer_html.html(""),o(s.body).trigger("orderable-drawer.closed")},cart:{click_increase_decrease_quantity:function(e,r){var t=r.attr("data-orderable-product-id"),a={action:"orderable_cart_quantity",cart_item_key:r.attr("data-orderable-cart-item-key"),product_id:t,quantity:r.attr("data-orderable-quantity")};this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),this.currentRequest=jQuery.post(orderable_vars.ajax_url,a,function(e){if(e){const t=r.siblings(".orderable-quantity-roller__quantity");a.quantity===t.attr("data-orderable-updating-quantity")&&(o(s.body).trigger("added_to_cart",[e.fragments,e.cart_hash,r]),o(s.body).trigger("orderable-drawer.quantity-updated"))}}.bind(this)).always(function(){this.currentRequest=void 0}.bind(this))},handle_quantity_change_by_button:function(e,t){var r=t.data("orderable-trigger"),a=parseInt(t.attr("data-orderable-quantity"));const o=t.siblings(".orderable-quantity-roller__button--"+("increase-quantity"===r?"decrease":"increase")),s=t.siblings(".orderable-quantity-roller__quantity");r="increase-quantity"===r?a+1:Math.max(0,a-1);t.attr("data-orderable-quantity",r),o.attr("data-orderable-quantity",r),s.attr("data-orderable-updating-quantity",r),s.text(r)}}};o(s).ready(r.on_ready)}(jQuery,document),function(i,d){"use strict";var l={on_ready:function(){l.cache(),l.watch()},cache:function(){l.vars={classes:{clickable_product:"orderable-product--add-to-cart ",add_to_order_button:"orderable-product__add-to-order",product_messages:"orderable-product__messages",product_price:"orderable-product__actions-price",invalid_field:"orderable-field--invalid",option_select_td:"orderable-product__option-select",button_loading:"orderable-button--loading",out_of_stock:"orderable-button--out-of-stock"},parent_price:null},l.elements={}},watch:function(){i(d.body).on("orderable-drawer.opened",l.init_product_options),i(d.body).on("orderable-add-to-cart",l.click_add_to_order),i(d.body).on("orderable-product-options",l.click_add_to_order),i(d.body).on("orderable-view-product",l.view_product),i(d.body).on("mouseenter mouseleave","."+l.vars.classes.clickable_product,l.simulate_add_to_order_hover),i(d.body).on("orderable-edit-cart-item",l.edit_cart_item),i(d.body).on("orderable-update-cart-item",l.update_cart_item),i(d.body).on("orderable-show-cart",l.show_cart)},simulate_add_to_order_hover:function(e){i(this).find("."+l.vars.classes.add_to_order_button).toggleClass("orderable-button--hover","mouseenter"===e.type)},click_add_to_order:function(e,t){var r=(t=void 0!==t?t:i(this)).is("button")?t:t.find("."+l.vars.classes.add_to_order_button),t=r.data("orderable-trigger"),a=r.data("orderable-product-id"),o=r.data("orderable-variation-id"),s=r.data("orderable-variation-attributes"),n={action:t};r.hasClass(l.vars.classes.button_loading)||r.hasClass(l.vars.classes.out_of_stock)||(r.addClass(l.vars.classes.button_loading),"add-to-cart"===t?l.add_to_cart({product_id:a,variation_id:o,attributes:s},function(e){n.show_cart=!0,n.response=e,i(d.body).trigger("orderable-drawer.open",n),r.removeClass(l.vars.classes.button_loading)}):"product-options"===t&&l.get_product_options({product_id:a,focus:r.data("orderable-focus")},function(e){n.html=e.html,i(d.body).trigger("orderable-drawer.open",n),r.removeClass(l.vars.classes.button_loading)}))},show_cart:function(){i(d.body).trigger("orderable-drawer.open",{show_cart:!0})},view_product:function(e,t){var r=t.data("orderable-product-id"),a={action:"product-options"};l.get_product_options({product_id:r,focus:t.data("orderable-focus")},function(e){a.html=e.html,i(d.body).trigger("orderable-drawer.open",a)})},add_to_cart:function(e,t){var r;void 0!==e.product_id&&(e={action:"orderable_add_to_cart",product_id:e.product_id,variation_id:e.variation_id||!1,attributes:e.attributes||!1},i(".orderable-product-fields-group").length&&(r=jQuery(".orderable-product-fields-group :input").serializeArray(),r=l.convert_to_flat_object(r),jQuery.isEmptyObject(r)||(e=Object.assign(e,r))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&(i(d.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),"function"==typeof t&&t(e))}))},edit_cart_item:function(e,t){var r=t.data("orderable-cart-item-key");t.addClass(l.vars.classes.button_loading),l.get_cart_item_options({cart_item_key:r},function(e){e={html:e.html,action:"update-cart-item"};i(d.body).trigger("orderable-drawer.open",e),t.removeClass(l.vars.classes.button_loading)})},update_cart_item:function(e,r){var t=r.data("orderable-cart-item-key"),a=r.data("orderable-product-id"),o=r.data("orderable-variation-id"),s=r.data("orderable-variation-attributes");r.addClass(l.vars.classes.button_loading),l.update_cart_item_options({cart_item_key:t,product_id:a,variation_id:o,attributes:s},function(e){var t={show_cart:!0,response:e};i(d.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),i(d.body).trigger("orderable-drawer.open",t),r.removeClass(l.vars.classes.button_loading)})},convert_to_flat_object:function(e){var a={};return e.forEach(function(e){var t="[]"===e.name.substr(-2)||Array.isArray(e.name),r=t?e.name.substr(0,e.name.length-2):e.name;t?(a[r]=void 0===a[r]?[]:a[r],a[r].push(e.value)):a[r]=e.value}),a},get_product_options:function(e,t){void 0!==e.product_id&&(e.action="orderable_get_product_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},get_cart_item_options:function(e,t){void 0!==e.cart_item_key&&(e.action="orderable_get_cart_item_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},update_cart_item_options:function(e,t){var r;void 0!==e.cart_item_key&&(e.action="orderable_update_cart_item_options",i(".orderable-product-fields-group").length&&(r=jQuery(".orderable-product-fields-group :input").serializeArray(),r=l.convert_to_flat_object(r),jQuery.isEmptyObject(r)||(e=Object.assign(e,r))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&"function"==typeof t&&t(e)}))},init_product_options:function(e,t){var r,a,o;void 0===t.action||"product-options"!==t.action&&"update-cart-item"!==t.action||(r=i(t=".orderable-drawer .orderable-product__options input, .orderable-drawer .orderable-product__options select"),l.vars.parent_price=i(".orderable-drawer .orderable-product__actions-price").html(),l.product_options_change(r),l.update_button_state(),a=l.debounce(l.update_button_state,500),o=l.debounce(l.product_options_change,500),i(d).on("change keyup",t,function(){o(r),a()}))},product_options_change:function(e){var t=i(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),r=l.check_options(e),a=t.data("orderable-product-type");"product-options"===t.attr("data-orderable-trigger")&&t.attr("data-orderable-trigger","add-to-cart"),i("."+l.vars.classes.product_messages).html(""),"variable"===a&&(r?(a=l.check_variation(e),l.set_variation(t,a)):l.clear_variation(t))},check_options:function(e){if(e.length<=0)return!1;var r=!0;return e.each(function(e,t){i(t).hasClass("orderable-input--validate")&&(""===i(t).val()?(i(t).addClass(l.vars.classes.invalid_field),r=!1):i(t).removeClass(l.vars.classes.invalid_field))}),r},check_variation:function(e){var t=(t=e.closest(".orderable-drawer").find(".orderable-product__variations").text())?JSON.parse(t):"",e=l.serialize_object(e),t=l.find_matching_variations(t,e);if(l.is_empty(t))return!1;t=t.shift();return t.attributes=e,t.attributes_json=JSON.stringify(e),void 0!==t&&t},set_variation:function(e,t){var r=t.variation_id||"",a=t.attributes_json||"",o=t.price_html||l.vars.parent_price,s="";t&&""!==t.availability_html&&(s=t.availability_html),t&&!t.is_in_stock&&(s="<p>"+orderable_vars.i18n.out_of_stock+"</p>"),t&&!t.is_purchasable&&(s="<p>"+orderable_vars.i18n.unavailable+"</p>"),!1===t&&(s="<p>"+orderable_vars.i18n.no_exist+"</p>"),!t||t.is_purchasable&&t.is_in_stock||(a=r=""),""!==s&&i("."+l.vars.classes.product_messages).html(s),e.data("orderable-variation-id",r),e.data("orderable-variation-attributes",a),i(".orderable-drawer .orderable-product__actions-price").html(o),e.trigger("orderable_variation_set",{variation:t,variation_id:r,attributes:a,price:o})},clear_variation:function(e){l.set_variation(e,""),l.vars.parent_price&&i(".orderable-drawer .orderable-product__actions-price").html(l.vars.parent_price)},find_matching_variations:function(e,t){for(var r=[],a=0;a<e.length;a++){var o=e[a];l.is_matching_variation(o.attributes,t)&&r.push(o)}return r},is_matching_variation:function(e,t){var r,a,o,s=!0;for(r in e)e.hasOwnProperty(r)&&(a=e[r],o=t[r],void 0!==a&&void 0!==o&&0!==a.length&&0!==o.length&&a!==o&&(s=!1));return s},is_empty:function(e){return void 0===e||!1===e||e.length<=0||!e},serialize_object:function(e){for(var t=e.serializeArray(),r={},a=0;a<t.length;a++)r[t[a].name]=t[a].value;return r},update_button_state:function(){setTimeout(function(){var e=i(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),t=i(".orderable-drawer__html ."+l.vars.classes.invalid_field).length,r=!0;"variable"===e.data("orderable-product-type")&&(r=""!==e.data("orderable-variation-id")),e.prop("disabled",t||!r)},50)},debounce:function(a,o,s){var n;return function(){var e=this,t=arguments,r=s&&!n;clearTimeout(n),n=setTimeout(function(){n=null,s||a.apply(e,t)},o),r&&a.apply(e,t)}}};i(d).ready(l.on_ready)}(jQuery,document),function(o,s){"use strict";var n={on_ready:function(){n.cache(),n.watch()},cache:function(){n.vars={top:{}},n.elements={}},watch:function(){o(s.body).on("orderable-drawer.opened",n.trigger),o(s.body).on("orderable-tabs.changed",n.trigger),o(s.body).on("orderable-accordion.toggled",n.trigger),o(s.body).on("wc_fragments_loaded",n.trigger)},trigger:function(){o(".orderable-sb-container").each(function(e,t){var r,t=o(t),a=t.data("orderable-scroll-id");n.has_scrollbar(t)||(t.scrollBox({containerClass:"orderable-sb-container",containerNoScrollClass:"orderable-sb-container-noscroll",contentClass:"orderable-sb-content",scrollbarContainerClass:"orderable-sb-scrollbar-container",scrollBarClass:"orderable-sb-scrollbar"}),0<(r=t.find(".orderable-sb-content")).length&&(r.on("scroll.scrollBox",n.log_top_position),void 0!==n.vars.top[a]&&r.scrollTop(n.vars.top[a])),o(s.body).trigger("orderable-scrollbar.created",{element:t,content:r}))}),o(window).trigger("resize.scrollBox")},has_scrollbar:function(e){return 0<e.find(".orderable-sb-content").length},log_top_position:function(e){var t=o(e.currentTarget).closest(".orderable-sb-container").data("orderable-scroll-id");n.vars.top[t]=o(e.currentTarget).scrollTop()}};o(s).ready(n.on_ready)}(jQuery,document),function(n,e){"use strict";var t={on_ready:function(){t.watch()},watch:function(){n(e.body).on("orderable-show-lookup-services",function(e,t){var r=t.closest(".orderable-services-selector").find(".orderable-services-selector__lookup");t.hide(),r.show()}),n(e.body).on("orderable-lookup-services",function(e,t){var r=t.closest(".orderable-services-selector"),a=r.find(".orderable-services-selector__lookup-message"),o=r.find(".orderable-services-selector__selected-change"),s=r.find(".orderable-services-selector__lookup-city").val(),r=r.find(".orderable-services-selector__lookup-postcode").val(),t=t.data("orderable-service");jQuery.post(orderable_vars.ajax_url,{action:"orderable_lookup_service",postcode:r,city:s,service:t},function(e){e.success?(a.html(""),o.show(),void 0!==e.data.fragments&&n.each(e.data.fragments,function(e,t){n(e).html(t)}),console.log(e)):a.html("<p>"+e.data.message+"</p>")})})}};n(e).ready(t.on_ready)}(jQuery,document),function(n,i){"use strict";var d={on_ready:function(){d.cache(),d.watch(),d.toggle_scroll()},on_resize:function(){d.toggle_scroll()},cache:function(){d.vars={classes:{tabs:"orderable-tabs",tabs_list:"orderable-tabs__list",tab_items:"orderable-tabs__item",tab_item_active:"orderable-tabs__item--active",tab_links:"orderable-tabs__link",tab_arrow:"orderable-tabs__arrow"},dragging:!1},d.elements={}},watch:function(){n("body").on("touchstart",function(){d.vars.dragging=!1}).on("touchmove",function(){d.vars.dragging=!0}),n(i.body).on("click mouseup touchend","."+d.vars.classes.tab_links,function(e){var t,r,a,o,s;d.vars.dragging||(e.preventDefault(),t=(e=n(this)).attr("href"),r=e.closest("."+d.vars.classes.tab_items),a=(s=e.closest("."+d.vars.classes.tabs)).find("."+d.vars.classes.tabs_list),o=s.find("."+d.vars.classes.tab_items),s=s.data("orderable-tabs"),s=(e=e.closest(s.wrapper)).find(s.sections),e=e.find(t),s.hide(),e.show(),o.removeClass(d.vars.classes.tab_item_active),r.addClass(d.vars.classes.tab_item_active),a.animate({scrollLeft:a.scrollLeft()+r.position().left}),n(i.body).trigger("orderable-tabs.changed",{tab:r}))}),n("."+d.vars.classes.tabs_list).on("scroll",function(e){0<n(this).scrollLeft()&&n("."+d.vars.classes.tab_arrow).fadeOut()}),n("."+d.vars.classes.tabs_list).on("wheel DOMMouseScroll mousewheel touchmove",function(){n(this).stop()}),n(i).on("click","."+d.vars.classes.tab_arrow,function(e){e.preventDefault();var e=n(this),t=e.parent(),r=t.find("."+d.vars.classes.tabs_list);r.animate({scrollLeft:r.scrollLeft()+.5*t.width()}),e.fadeOut()})},toggle_scroll:function(){n("."+d.vars.classes.tabs).each(function(e,t){var r=n(this),a=r.data("orderable-tabs"),r=r.closest(a.wrapper),a=r.find("."+d.vars.classes.tabs_list),o=r.find("."+d.vars.classes.tab_arrow);r.outerWidth()<a[0].scrollWidth?o.show():o.hide()})}};n(i).ready(d.on_ready),n(window).on("resize",d.on_resize)}(jQuery,document);var orderable_timings={};!function(i,a){"use strict";orderable_timings={on_ready:function(){orderable_timings.watch(),orderable_timings.set_date_and_time()},set_date_and_time:function(){var e,t=a.querySelector("#orderable-date"),r="";t&&(e=t.options[t.selectedIndex])&&!(r=e.value)&&t.options[t.selectedIndex+1]&&(t.options[t.selectedIndex+1].selected=!0,i(t).change()),"asap"!==r&&(e="",(t=a.querySelector("#orderable-time"))&&(e=t.options[t.selectedIndex])&&t.options[t.selectedIndex+1]&&(e.value||(t.options[t.selectedIndex+1].selected=!0,i(t).change())))},restore:function(){var e=orderable_timings.get_timings();e&&e.date&&(i(".orderable-order-timings__date").val(e.date),i(".orderable-order-timings__date").change(),e.time&&(i(".orderable-order-timings__time").val(e.time),i(".orderable-order-timings__time").change()))},watch:function(){i(a.body).on("wc_fragments_refreshed",function(){orderable_timings.restore(),orderable_timings.set_date_and_time()}),i(a.body).on("updated_checkout",function(){orderable_timings.restore(),orderable_timings.set_date_and_time()}),i(a.body).on("change",".orderable-order-timings__date",function(e){var t=i(this).find("option:selected").data("orderable-slots"),r=i(".orderable-order-timings--time"),a=i(".orderable-order-timings__time"),o=a.find("option").first(),s=a.find('option[value="asap"]').first(),n=orderable_timings.get_timings();if(n.date=i(".orderable-order-timings__date").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(n)),a.html(o),s&&a.append(s),!t)return a.prop("disabled",!0),void r.hide();"all-day"===t[0].value?(r.hide(),a.prop("disabled",!0)):(a.prop("disabled",!1),r.show(),i.each(t,function(e,t){a.append(i("<option />").attr("value",t.value).text(t.formatted))}))}),i(a.body).on("change",".orderable-order-timings__time",function(e){var t=orderable_timings.get_timings();t.time=i(".orderable-order-timings__time").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(t))})},get_timings:function(){return JSON.parse(window.localStorage.getItem("orderable_timings"))||{}}},i(a).ready(orderable_timings.on_ready)}(jQuery,document),function(r,a){"use strict";var e={on_ready:function(){e.watch()},watch:function(){r(a.body).on("click","[data-orderable-trigger]",e.trigger)},trigger:function(e){e.stopImmediatePropagation();var e=r(this),t=e.data("orderable-trigger");r(a.body).trigger("orderable-"+t,[e])}};r(a).ready(e.on_ready)}(jQuery,document); -
orderable/tags/1.4.0/inc/class-ajax.php
r2709284 r2745279 21 21 'lookup_service' => true, 22 22 'get_onboard_woo_fields' => false, 23 'get_cart_item_options' => true, 23 24 ); 24 25 … … 73 74 'images' => true, 74 75 'focus' => $focus, 76 ); 77 78 ob_start(); 79 80 include ORDERABLE_TEMPLATES_PATH . 'product/options.php'; 81 82 $response['html'] = ob_get_clean(); 83 84 wp_send_json_success( $response ); 85 } 86 87 /** 88 * Get cart item options for a variable product. 89 */ 90 public static function get_cart_item_options() { 91 // phpcs:ignore WordPress.Security.NonceVerification.Missing 92 if ( empty( $_POST['cart_item_key'] ) ) { 93 wp_send_json_error(); 94 } 95 96 // phpcs:ignore WordPress.Security.NonceVerification.Missing 97 $cart_item_key = sanitize_text_field( wp_unslash( $_POST['cart_item_key'] ) ); 98 99 if ( empty( $cart_item_key ) ) { 100 wp_send_json_error(); 101 } 102 103 $cart_item = WC()->cart->get_cart_item( $cart_item_key ); 104 105 if ( empty( $cart_item ) ) { 106 wp_send_json_error(); 107 } 108 109 $product_id = $cart_item['product_id']; 110 $product = wc_get_product( $product_id ); 111 112 $response = array( 113 'product_id' => $product_id, 114 'product' => $product, 115 ); 116 117 if ( 'variable' === $product->get_type() ) { 118 $selected = $cart_item['variation']; 119 $attributes = Orderable_Products::get_available_attributes( $product ); 120 $available_variations = $product->get_available_variations(); 121 $variations_json = html_entity_decode( wp_json_encode( $available_variations ) ); 122 } 123 124 $args = array( 125 'images' => true, 126 ); 127 128 add_filter( 129 'orderable_get_group_data', 130 /** 131 * Fill the value of the fields. 132 * 133 * @param array $field_group The field group data. 134 * 135 * @return array 136 */ 137 function( $field_group ) use ( $cart_item ) { 138 foreach ( $field_group as $key => $value ) { 139 if ( empty( $cart_item['orderable_fields'][ $value['id'] ] ) ) { 140 continue; 141 } 142 143 switch ( $value['type'] ) { 144 case 'text': 145 $field_group[ $key ]['default'] = $cart_item['orderable_fields'][ $value['id'] ]['value']; 146 147 break; 148 149 case 'select': 150 case 'visual_radio': 151 foreach ( $value['options'] as $key_option => $option ) { 152 if ( $option['label'] === $cart_item['orderable_fields'][ $value['id'] ]['value'] ) { 153 $field_group[ $key ]['options'][ $key_option ]['selected'] = '1'; 154 155 break; 156 } 157 } 158 159 break; 160 161 case 'visual_checkbox': 162 foreach ( $value['options'] as $key_option => $option ) { 163 if ( empty( $cart_item['orderable_fields'][ $value['id'] ]['value'] ) ) { 164 continue; 165 } 166 167 $field_value = $cart_item['orderable_fields'][ $value['id'] ]['value']; 168 169 if ( ! is_array( $field_value ) ) { 170 continue; 171 } 172 173 if ( ! in_array( $option['label'], $field_value, true ) ) { 174 continue; 175 } 176 177 $field_group[ $key ]['options'][ $key_option ]['selected'] = '1'; 178 } 179 180 break; 181 } 182 } 183 184 return $field_group; 185 } 75 186 ); 76 187 -
orderable/tags/1.4.0/inc/class-helpers.php
r2558994 r2745279 132 132 * @return string 133 133 */ 134 public static function kses( $content, $context = '') {134 public static function kses( $content, $context = '' ) { 135 135 if ( empty( $content ) ) { 136 136 return $content; … … 195 195 global $wpdb; 196 196 197 $wpdb->query( "197 $wpdb->query( " 198 198 DELETE FROM $wpdb->options 199 199 WHERE option_name LIKE ('%%\_transient\_timeout\_orderable\_%%') 200 200 OR option_name LIKE ('%%\_transient\_orderable\_%%') 201 " );201 " ); 202 202 } 203 203 … … 210 210 return ! empty( WC()->session->get( 'wc_notices', array() ) ); 211 211 } 212 213 /** 214 * Add image to media library. 215 * 216 * @param string $url URL. 217 * @param int $associated_with_post Post ID if media is associated to post. 218 * @param string $file_name File name. 219 * 220 * @return bool|int|WP_Error 221 */ 222 public static function add_to_media( $url, $associated_with_post = 0, $file_name = '' ) { 223 require_once ABSPATH . 'wp-admin/includes/file.php'; 224 require_once ABSPATH . 'wp-admin/includes/media.php'; 225 require_once ABSPATH . 'wp-admin/includes/image.php'; 226 227 $tmp = download_url( $url ); 228 $post_id = $associated_with_post; 229 $file_array = array(); 230 231 // Set variables for storage. 232 // fix file filename for query strings. 233 preg_match( '/[^\?]+\.(jpg|jpe|jpeg|gif|png|apk)/i', $url, $matches ); 234 235 if ( empty( $matches ) ) { 236 return false; 237 } 238 239 $file_array['name'] = ! empty( $file_name ) ? $file_name : basename( $matches[0] ); 240 $file_array['tmp_name'] = $tmp; 241 242 // If error storing temporarily, unlink. 243 if ( is_wp_error( $tmp ) ) { 244 @unlink( $file_array['tmp_name'] ); 245 246 return false; 247 } 248 249 // do the validation and storage stuff. 250 $id = media_handle_sideload( $file_array, $post_id ); 251 252 // If error storing permanently, unlink. 253 if ( is_wp_error( $id ) ) { 254 @unlink( $file_array['tmp_name'] ); 255 256 return false; 257 } 258 259 return $id; 260 } 212 261 } -
orderable/tags/1.4.0/inc/class-modules.php
r2709284 r2745279 36 36 'timed-products', 37 37 'custom-order-status', 38 'notifications', 39 'table-ordering', 38 40 ); 39 41 -
orderable/tags/1.4.0/inc/class-products.php
r2709284 r2745279 333 333 334 334 /** 335 * Get update cart item button. 336 * 337 * @param string $cart_item_key The cart item key. 338 * @param WC_Product $product The product to be edited. 339 * @param string $classes Button classes. 340 * 341 * @return string 342 */ 343 public static function get_update_cart_item_button( $cart_item_key, $product, $classes = '' ) { 344 $cart_item = WC()->cart->get_cart_item( $cart_item_key ); 345 346 $args = array( 347 'trigger' => 'update-cart-item', 348 'product_id' => $cart_item['product_id'], 349 'cart_item_key' => $cart_item_key, 350 'variation_id' => $cart_item['variation_id'], 351 'variation_attributes' => empty( array_filter( $cart_item['variation'] ) ) ? false : wp_json_encode( $cart_item['variation'] ), 352 'product_type' => $product->get_type(), 353 'text' => __( 'Update', 'orderable' ), 354 'classes' => $classes, 355 ); 356 357 /** 358 * Filter arguments used to the update cart item button. 359 * 360 * @param array $args The arguments. 361 * 362 * @return array New arguments 363 * @since 1.4.0 364 * @hook orderable_update_cart_item_button_args 365 */ 366 $args = apply_filters( 'orderable_update_cart_item_button_args', $args, $cart_item_key ); 367 368 ob_start(); 369 ?> 370 <button 371 class="orderable-button orderable-product__cancel-update" 372 data-orderable-trigger="show-cart" 373 > 374 <?php echo esc_html__( 'Cancel', 'orderable' ); ?> 375 </button> 376 <button 377 class="orderable-button <?php echo esc_attr( $args['classes'] ); ?>" 378 data-orderable-trigger="<?php echo esc_attr( $args['trigger'] ); ?>" 379 data-orderable-cart-item-key="<?php echo esc_attr( $args['cart_item_key'] ); ?>" 380 data-orderable-product-id="<?php echo esc_attr( $args['product_id'] ); ?>" 381 data-orderable-variation-id="<?php echo esc_attr( $args['variation_id'] ); ?>" 382 data-orderable-variation-attributes="<?php echo esc_attr( $args['variation_attributes'] ); ?>" 383 data-orderable-product-type="<?php echo esc_attr( $args['product_type'] ); ?>" 384 > 385 <?php echo esc_html( $args['text'] ); ?> 386 </button> 387 <?php 388 389 /** 390 * Filter the Update Cart Item button HTML. 391 * 392 * @param array $update_cart_item_button_html The Update Cart Item button HTML. 393 * 394 * @return array New HTML 395 * @since 1.4.0 396 * @hook orderable_update_cart_item_button_html 397 */ 398 $html = apply_filters( 'orderable_update_cart_item_button_html', ob_get_clean() ); 399 400 return $html; 401 } 402 403 /** 335 404 * Get add to cart trigger value. 336 405 * -
orderable/tags/1.4.0/inc/modules/drawer/class-drawer-ajax.php
r2709284 r2745279 16 16 */ 17 17 public static function run() { 18 Orderable_Ajax::add_ajax_methods( array( 19 'cart_quantity' => true 20 ), __CLASS__ ); 18 Orderable_Ajax::add_ajax_methods( 19 array( 20 'cart_quantity' => true, 21 'update_cart_item_options' => true, 22 ), 23 __CLASS__ 24 ); 21 25 } 22 26 … … 75 79 WC_AJAX::get_refreshed_fragments(); 76 80 } 81 82 /** 83 * Update cart item attributes and addons. 84 */ 85 public static function update_cart_item_options() { 86 if ( empty( $_POST['cart_item_key'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing 87 wp_send_json_error( null, 400 ); 88 } 89 90 $cart_item_key = sanitize_text_field( wp_unslash( $_POST['cart_item_key'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing 91 $product_id = absint( filter_input( INPUT_POST, 'product_id', FILTER_SANITIZE_NUMBER_INT ) ); 92 $attributes = self::get_attributes(); 93 $variation_id = empty( $attributes ) ? 0 : absint( filter_input( INPUT_POST, 'variation_id', FILTER_SANITIZE_NUMBER_INT ) ); 94 $orderable_fields = self::get_orderable_fields(); 95 96 if ( 97 empty( $cart_item_key ) || 98 ( empty( $attributes ) && empty( $orderable_fields ) ) 99 ) { 100 wp_send_json_error( null, 400 ); 101 } 102 103 $cart_item = WC()->cart->get_cart_item( $cart_item_key ); 104 105 if ( empty( $cart_item ) ) { 106 wp_send_json_error(); 107 } 108 109 $product_data = empty( $variation_id ) ? wc_get_product( $cart_item['product_id'] ) : wc_get_product( $variation_id ); 110 111 if ( ! $product_data ) { 112 wp_send_json_error(); 113 } 114 115 // If the same data is sent (i.e. there is nothing to udpate), return early. 116 if ( 117 WC()->cart->generate_cart_id( 118 $product_id, 119 $variation_id, 120 empty( $attributes ) ? array( false ) : $attributes, 121 array( 'orderable_fields' => $orderable_fields ) 122 ) 123 === 124 $cart_item_key 125 ) { 126 wp_send_json_success(); 127 } 128 129 self::update_cart_item_attributes( $cart_item, $variation_id, $attributes, $orderable_fields ); 130 131 WC()->cart->calculate_totals(); 132 133 WC_AJAX::get_refreshed_fragments(); 134 } 135 136 /** 137 * Get attributes values to update. 138 * 139 * @return array. 140 */ 141 protected static function get_attributes() { 142 if ( empty( $_POST['attributes'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing 143 return array(); 144 } 145 146 $attributes = array_filter( 147 // phpcs:ignore WordPress.Security.NonceVerification.Missing 148 (array) json_decode( sanitize_text_field( wp_unslash( $_POST['attributes'] ) ) ), 149 function( $attribute_value, $attribute_name ) { 150 151 return ! empty( $attribute_value ) && false !== strpos( $attribute_name, 'attribute_' ); 152 }, 153 ARRAY_FILTER_USE_BOTH 154 ); 155 156 return $attributes; 157 } 158 159 /** 160 * Get Orderable Product Addons fields. 161 * 162 * @return array 163 */ 164 protected static function get_orderable_fields() { 165 166 if ( 167 ! class_exists( 'Orderable_Addons_Pro_Field_Groups' ) || 168 ! class_exists( 'Orderable_Addons_Pro_Fees' ) 169 ) { 170 return array(); 171 } 172 173 // phpcs:ignore WordPress.Security.NonceVerification.Missing 174 $orderable_fields = empty( $_POST['orderable_fields'] ) ? array() : map_deep( wp_unslash( $_POST['orderable_fields'] ), 'sanitize_text_field' ); 175 176 if ( empty( $orderable_fields ) || ! is_array( $orderable_fields ) ) { 177 return array(); 178 } 179 180 $orderable_item_data = array(); 181 182 foreach ( $orderable_fields as $group_id => $fields ) { 183 foreach ( $fields as $field_id => $field ) { 184 $field_setting = Orderable_Addons_Pro_Field_Groups::get_field_data( $field_id, $group_id ); 185 $fees = Orderable_Addons_Pro_Fees::calculate_fees( $field, $field_id, $group_id ); 186 187 $orderable_item_data[ $field_id ] = array( 188 'id' => $field_id, 189 'value' => $field, 190 'label' => $field_setting['title'], 191 'group_id' => $group_id, 192 'fees' => $fees, 193 ); 194 } 195 } 196 197 return $orderable_item_data; 198 } 199 200 /** 201 * Update cart item attributes. 202 * 203 * @param array $original_cart_item The cart item to be updated. 204 * @param int $variation_id The new variation ID. 205 * @param array $attributes The new attributes. 206 * @return void 207 */ 208 protected static function update_cart_item_attributes( $original_cart_item, $variation_id, $attributes, $cart_item_data ) { 209 if ( empty( $cart_item_data ) && ! empty( $original_cart_item['orderable_fields'] ) ) { 210 $cart_item_data = $original_cart_item['orderable_fields']; 211 } 212 213 if ( ! empty( $cart_item_data ) ) { 214 $cart_item_data = array( 'orderable_fields' => $cart_item_data ); 215 } 216 217 /** 218 * WooCommerce stores empty attributes ('variation' on the cart item) 219 * as `array( false )`. 220 */ 221 if ( empty( $attributes ) ) { 222 $attributes = array( false ); 223 } 224 225 /** 226 * We update the cart item by adding the updated item to the cart. 227 * This allows 3rd plugins/themes to integrate with the default 228 * WooCommerce hooks. 229 */ 230 $updated_cart_item_key = WC()->cart->add_to_cart( $original_cart_item['product_id'], $original_cart_item['quantity'], $variation_id, $attributes, $cart_item_data ); 231 232 $cart_content = WC()->cart->get_cart(); 233 234 /** 235 * We remove the updated item from the cart to re-insert 236 * at the same position of the original item. 237 */ 238 unset( $cart_content[ $updated_cart_item_key ] ); 239 240 $cart_content_updated = array(); 241 242 foreach ( $cart_content as $key => $item ) { 243 // We re-insert the updated item at the same position of the original item. 244 if ( $key === $original_cart_item['key'] ) { 245 $updated_cart_item = WC()->cart->get_cart_item( $updated_cart_item_key ); 246 247 $cart_content_updated[ $updated_cart_item['key'] ] = $updated_cart_item; 248 } else { 249 $cart_content_updated[ $key ] = $item; 250 } 251 } 252 253 WC()->cart->set_cart_contents( $cart_content_updated ); 254 } 77 255 } -
orderable/tags/1.4.0/inc/modules/layouts/assets/admin/js/main.min.js
r2709284 r2745279 1 !function(n,l){"use strict";var c={on_ready:function(){c.builder.init()},helpers:{get_field_type:function(e){return"SELECT"===e.get(0).tagName?"select":e.attr("type")},strip_prefix:function(e){return e.replace("orderable_","")}},builder:{init:function(){c.builder.watch()},watch:function(){n(l.body).on("change","#orderable-layout-settings-metabox input, #orderable-layout-settings-metabox select",function(){var e=n(this).closest("#orderable-layout-settings-metabox"),a={},o=!0;e.find(".form-field > input, .form-field > select").each(function(e,t){var t=n(t),r=c.helpers.get_field_type(t),i="";"string"==typeof(i="checkbox"===r?n(this).is(":checked"):("select"===r&&t.attr("multiple"),t.val()))&&0===i.indexOf("pro_")&&(o=!1,n(l.body).trigger("orderable-pro-modal")),a[c.helpers.strip_prefix(this.name.replace("[]",""))]=i}),o&&c.builder.reload_preview(a)})},reload_preview:function(e){n.post(ajaxurl,{action:"orderable_preview",data:e},function(e){e.success&&n("#orderable-layout-preview-metabox .orderable-main-wrap").html(e.data.shortcode)})}}};n(l).ready(c.on_ready)}(jQuery,document);1 !function(n,l){"use strict";var c={on_ready:function(){c.builder.init()},helpers:{get_field_type:function(e){return"SELECT"===e.get(0).tagName?"select":e.attr("type")},strip_prefix:function(e){return e.replace("orderable_","")}},builder:{init:function(){c.builder.watch()},watch:function(){n(l.body).on("change","#orderable-layout-settings-metabox input, #orderable-layout-settings-metabox select",function(){var e=n(this).closest("#orderable-layout-settings-metabox"),a={},o=!0;e.find(".form-field > input, .form-field > select").each(function(e,t){var r=n(t),i=c.helpers.get_field_type(r),t="";"string"==typeof(t="checkbox"===i?n(this).is(":checked"):("select"===i&&r.attr("multiple"),r.val()))&&0===t.indexOf("pro_")&&(o=!1,n(l.body).trigger("orderable-pro-modal")),a[c.helpers.strip_prefix(this.name.replace("[]",""))]=t}),o&&c.builder.reload_preview(a)})},reload_preview:function(e){n.post(ajaxurl,{action:"orderable_preview",data:e},function(e){e.success&&n("#orderable-layout-preview-metabox .orderable-main-wrap").html(e.data.shortcode)})}}};n(l).ready(c.on_ready)}(jQuery,document); -
orderable/tags/1.4.0/inc/modules/live-view/assets/js/admin.js
r2549156 r2745279 8 8 on_ready: function() { 9 9 orderable_live_view.mute_button(); 10 orderable_live_view.update_url_for_order_status_buttons(); 10 11 }, 11 12 … … 87 88 $button.data( 'orderable-mute-status', mute_status ).data( 'orderable-alt-text', current_text ).text( new_text ); 88 89 } ); 90 }, 91 92 /** 93 * Append '&orderable_live_view' to the order status hyperlinks. 94 */ 95 update_url_for_order_status_buttons: function () { 96 $( '.subsubsub li a' ).each( function () { 97 var href = $( this ).attr( 'href' ); 98 $( this ).attr( 'href', `${href}&orderable_live_view` ); 99 } ); 89 100 } 90 101 }; -
orderable/tags/1.4.0/inc/modules/live-view/class-live-view.php
r2709284 r2745279 141 141 } 142 142 143 /** 144 * Allows to override the notification audio file. 145 */ 146 $audio_url = apply_filters( 'orderable_live_view_new_order_audio_file_url', esc_url( ORDERABLE_URL ) . 'inc/modules/live-view/assets/audio/ding.wav' ); 143 147 ?> 144 <audio id="orderable_ding" src="<?php echo esc_ url( ORDERABLE_URL ); ?>inc/modules/live-view/assets/audio/ding.wav" type="audio/wav"></audio>148 <audio id="orderable_ding" src="<?php echo esc_attr( $audio_url ); ?>" type="audio/wav"></audio> 145 149 <?php 146 150 } -
orderable/tags/1.4.0/inc/modules/services/class-services-order.php
r2549156 r2745279 88 88 89 89 if ( empty( $shipping_methods ) ) { 90 return $type;90 return apply_filters( 'orderable_get_service_type', $type, $order ); 91 91 } 92 92 … … 94 94 $shipping_method_id = $shipping_method->get_method_id(); 95 95 96 return Orderable_Services::is_pickup_method( $shipping_method_id ) ? 'pickup' : 'delivery'; 96 $type = Orderable_Services::is_pickup_method( $shipping_method_id ) ? 'pickup' : 'delivery'; 97 98 return apply_filters( 'orderable_get_service_type', $type, $order ); 97 99 } 98 100 … … 118 120 public static function add_admin_order_columns_content( $column_name, $post_id ) { 119 121 if ( 'orderable_service_type' === $column_name ) { 120 $order = wc_get_order( $post_id ); 121 $type = Orderable_Services_Order::get_service_type( $order ); 122 $order = wc_get_order( $post_id ); 123 $type = self::get_service_type( $order ); 124 125 if ( empty( $type ) ) { 126 echo '—'; 127 128 return; 129 } 130 122 131 $background = 'pickup' === $type ? '#C6C7E1' : '#c5e2df'; 123 $color = 'pickup' === $type ? '#6264ac' : '#3e7a74'; 132 $color = 'pickup' === $type ? '#5457a0' : '#356964'; 133 134 $background = apply_filters( 'orderable_service_type_column_background_color', $background, $column_name, $post_id, $order, $type ); 135 $color = apply_filters( 'orderable_service_type_column_text_color', $color, $column_name, $post_id, $order, $type ); 124 136 125 137 printf( '<mark class="order-status order-status--%s" style="background-color: %s; color: %s;"><span>%s</span></mark>', esc_attr( $type ), esc_attr( $background ), esc_attr( $color ), Orderable_Services::get_service_label( $type ) ); -
orderable/tags/1.4.0/inc/modules/timings/class-timings-order.php
r2709284 r2745279 92 92 cancelLabel: orderable_timings_daterangepicker.clear, 93 93 applyLabel: orderable_timings_daterangepicker.apply, 94 customRangeLabel: orderable_timings_daterangepicker.custom_range, 94 95 daysOfWeek: [ 95 96 '<?php esc_html_e( 'Su', 'orderable' ); ?>', … … 100 101 '<?php esc_html_e( 'Fr', 'orderable' ); ?>', 101 102 '<?php esc_html_e( 'Sa', 'orderable' ); ?>', 103 ], 104 monthNames: [ 105 '<?php esc_html_e( 'January', 'orderable' ); ?>', 106 '<?php esc_html_e( 'February', 'orderable' ); ?>', 107 '<?php esc_html_e( 'March', 'orderable' ); ?>', 108 '<?php esc_html_e( 'April', 'orderable' ); ?>', 109 '<?php esc_html_e( 'May', 'orderable' ); ?>', 110 '<?php esc_html_e( 'June', 'orderable' ); ?>', 111 '<?php esc_html_e( 'July', 'orderable' ); ?>', 112 '<?php esc_html_e( 'August', 'orderable' ); ?>', 113 '<?php esc_html_e( 'September', 'orderable' ); ?>', 114 '<?php esc_html_e( 'October', 'orderable' ); ?>', 115 '<?php esc_html_e( 'November', 'orderable' ); ?>', 116 '<?php esc_html_e( 'December', 'orderable' ); ?>' 102 117 ], 103 118 }, … … 347 362 } 348 363 349 if ( isset( $start ) && ! $return['end']) {364 if ( isset( $start ) && ( ! $return['end'] || $return['end'] === $return['start'] ) ) { 350 365 $start->add( new DateInterval( 'P1D' ) ); 351 366 -
orderable/tags/1.4.0/inc/modules/timings/class-timings-settings.php
r2666071 r2745279 639 639 640 640 <p id="timezone-description"> 641 <?php echo wp_kses( sprintf( __( "Your store's current timezone is %s."), '<code>' . $tzstring . '</code>' ), array( 'code' => array() ) ); ?> 641 <?php 642 // Translators: %s: Timezone string. 643 echo wp_kses( sprintf( __( "Your store's current timezone is %s.", 'orderable' ), '<code>' . $tzstring . '</code>' ), array( 'code' => array() ) ); 644 ?> 642 645 </p> 643 646 -
orderable/tags/1.4.0/inc/modules/tip/class-tip.php
r2558994 r2745279 22 22 * Register settings. 23 23 * 24 * @param array $settings 24 * @param array $settings Settings. 25 25 * 26 26 * @return array -
orderable/tags/1.4.0/languages/orderable.pot
r2709284 r2745279 30 30 msgstr "" 31 31 32 #: inc/class-ajax.php: 13032 #: inc/class-ajax.php:241 33 33 msgid "Sorry, there are no delivery or pickup options available." 34 34 msgstr "" 35 35 36 #: inc/class-ajax.php: 13536 #: inc/class-ajax.php:246 37 37 msgid "pickup" 38 38 msgstr "" 39 39 40 #: inc/class-ajax.php: 13540 #: inc/class-ajax.php:246 41 41 msgid "delivery" 42 42 msgstr "" 43 43 44 #: inc/class-ajax.php: 13844 #: inc/class-ajax.php:249 45 45 msgid "Sorry, there are no %s options available. Please try %s instead." 46 46 msgstr "" 47 47 48 #: inc/class-ajax.php: 232, inc/class-settings.php:38048 #: inc/class-ajax.php:343, inc/class-settings.php:380 49 49 msgid "Country / State" 50 50 msgstr "" … … 164 164 msgstr "" 165 165 166 #: inc/class-products.php:657 166 #: inc/class-products.php:353 167 msgid "Update" 168 msgstr "" 169 170 #: inc/class-products.php:374 171 msgid "Cancel" 172 msgstr "" 173 174 #: inc/class-products.php:726 167 175 msgid "Description" 168 176 msgstr "" … … 380 388 msgstr "" 381 389 382 #: inc/class-settings.php:946, inc/modules/live-view/class-live-view.php:20 1, inc/modules/live-view/class-live-view.php:201390 #: inc/class-settings.php:946, inc/modules/live-view/class-live-view.php:205, inc/modules/live-view/class-live-view.php:205 383 391 msgid "Live Order View" 384 392 msgstr "" … … 484 492 msgstr "" 485 493 494 #: woocommerce/cart/mini-cart.php:48 495 msgid "Edit" 496 msgstr "" 497 486 498 #: inc/modules/addons/class-addons.php:35 487 499 msgid "Addons" 488 500 msgstr "" 489 501 490 #: inc/modules/addons/class-addons.php:35, inc/modules/custom-order-status/class-custom-order-status.php:35, inc/modules/t imed-products/class-timed-products.php:35502 #: inc/modules/addons/class-addons.php:35, inc/modules/custom-order-status/class-custom-order-status.php:35, inc/modules/table-ordering/class-table-ordering.php:35, inc/modules/timed-products/class-timed-products.php:35 491 503 msgid "Pro" 492 504 msgstr "" … … 509 521 510 522 #. translators: %s Product title. 511 #: inc/modules/drawer/class-drawer-ajax.php: 49523 #: inc/modules/drawer/class-drawer-ajax.php:53 512 524 msgid "You can only have 1 %s in your cart." 513 525 msgstr "" … … 645 657 msgstr "" 646 658 647 #: inc/modules/live-view/class-live-view.php:16 2659 #: inc/modules/live-view/class-live-view.php:166 648 660 msgid "Enable Live View" 649 661 msgstr "" 650 662 651 #: inc/modules/live-view/class-live-view.php:1 67663 #: inc/modules/live-view/class-live-view.php:171 652 664 msgid "Exit Live View" 653 665 msgstr "" 654 666 655 #: inc/modules/live-view/class-live-view.php:1 68667 #: inc/modules/live-view/class-live-view.php:172 656 668 msgid "Mute" 657 669 msgstr "" 658 670 659 #: inc/modules/live-view/class-live-view.php:1 68671 #: inc/modules/live-view/class-live-view.php:172 660 672 msgid "Unmute" 661 673 msgstr "" 662 674 663 #: inc/modules/live-view/class-live-view.php:24 3675 #: inc/modules/live-view/class-live-view.php:247 664 676 msgid "order_manager" 665 677 msgstr "" 666 678 667 #: inc/modules/live-view/class-live-view.php:24 3679 #: inc/modules/live-view/class-live-view.php:247 668 680 msgid "Order Manager" 681 msgstr "" 682 683 #: inc/modules/notifications/class-notifications.php:38 684 msgid "Notification Settings" 685 msgstr "" 686 687 #: inc/modules/notifications/class-notifications.php:44 688 msgid "Enable Notifications" 689 msgstr "" 690 691 #: inc/modules/notifications/class-notifications.php:45 692 msgid "Enable SMS/WhatsApp notifications for order statuses." 669 693 msgstr "" 670 694 … … 673 697 msgstr "" 674 698 675 #: inc/modules/services/class-services-order.php:10 7699 #: inc/modules/services/class-services-order.php:109 676 700 msgid "Service" 677 701 msgstr "" … … 683 707 #: inc/modules/services/class-services.php:194 684 708 msgid "Deliveries" 709 msgstr "" 710 711 #: inc/modules/table-ordering/class-table-ordering.php:35, inc/modules/table-ordering/class-table-ordering.php:35 712 msgid "Table Ordering" 685 713 msgstr "" 686 714 … … 747 775 msgstr "" 748 776 749 #: inc/modules/timings/class-timings-order.php:9 5777 #: inc/modules/timings/class-timings-order.php:96 750 778 msgid "Su" 751 779 msgstr "" 752 780 753 #: inc/modules/timings/class-timings-order.php:9 6781 #: inc/modules/timings/class-timings-order.php:97 754 782 msgid "Mo" 755 783 msgstr "" 756 784 757 #: inc/modules/timings/class-timings-order.php:9 7785 #: inc/modules/timings/class-timings-order.php:98 758 786 msgid "Tu" 759 787 msgstr "" 760 788 761 #: inc/modules/timings/class-timings-order.php:9 8789 #: inc/modules/timings/class-timings-order.php:99 762 790 msgid "We" 763 791 msgstr "" 764 792 765 #: inc/modules/timings/class-timings-order.php: 99793 #: inc/modules/timings/class-timings-order.php:100 766 794 msgid "Th" 767 795 msgstr "" 768 796 769 #: inc/modules/timings/class-timings-order.php:10 0797 #: inc/modules/timings/class-timings-order.php:101 770 798 msgid "Fr" 771 799 msgstr "" 772 800 773 #: inc/modules/timings/class-timings-order.php:10 1801 #: inc/modules/timings/class-timings-order.php:102 774 802 msgid "Sa" 775 803 msgstr "" 776 804 777 #: inc/modules/timings/class-timings-order.php:185, inc/modules/timings/class-timings-order.php:223 805 #: inc/modules/timings/class-timings-order.php:105 806 msgid "January" 807 msgstr "" 808 809 #: inc/modules/timings/class-timings-order.php:106 810 msgid "February" 811 msgstr "" 812 813 #: inc/modules/timings/class-timings-order.php:107 814 msgid "March" 815 msgstr "" 816 817 #: inc/modules/timings/class-timings-order.php:108 818 msgid "April" 819 msgstr "" 820 821 #: inc/modules/timings/class-timings-order.php:109 822 msgid "May" 823 msgstr "" 824 825 #: inc/modules/timings/class-timings-order.php:110 826 msgid "June" 827 msgstr "" 828 829 #: inc/modules/timings/class-timings-order.php:111 830 msgid "July" 831 msgstr "" 832 833 #: inc/modules/timings/class-timings-order.php:112 834 msgid "August" 835 msgstr "" 836 837 #: inc/modules/timings/class-timings-order.php:113 838 msgid "September" 839 msgstr "" 840 841 #: inc/modules/timings/class-timings-order.php:114 842 msgid "October" 843 msgstr "" 844 845 #: inc/modules/timings/class-timings-order.php:115 846 msgid "November" 847 msgstr "" 848 849 #: inc/modules/timings/class-timings-order.php:116 850 msgid "December" 851 msgstr "" 852 853 #: inc/modules/timings/class-timings-order.php:200, inc/modules/timings/class-timings-order.php:238 778 854 msgid "Date" 779 855 msgstr "" 780 856 781 #: inc/modules/timings/class-timings-order.php: 189, inc/modules/timings/class-timings-order.php:227857 #: inc/modules/timings/class-timings-order.php:204, inc/modules/timings/class-timings-order.php:242 782 858 msgid "Time" 783 859 msgstr "" 784 860 785 #: inc/modules/timings/class-timings-order.php: 193861 #: inc/modules/timings/class-timings-order.php:208 786 862 msgid "Timestamp" 787 863 msgstr "" 788 864 789 #: inc/modules/timings/class-timings-order.php:2 06865 #: inc/modules/timings/class-timings-order.php:221 790 866 msgid "Due Date/Time" 791 867 msgstr "" 792 868 793 #: inc/modules/timings/class-timings-order.php:3 07869 #: inc/modules/timings/class-timings-order.php:322 794 870 msgid "Filter by due date" 795 871 msgstr "" … … 943 1019 msgstr "" 944 1020 1021 #. translators: %s: Timezone string. 1022 #: inc/modules/timings/class-timings-settings.php:643 1023 msgid "Your store's current timezone is %s." 1024 msgstr "" 1025 945 1026 #: inc/modules/timings/class-timings.php:58 946 1027 msgid "Sun" -
orderable/tags/1.4.0/orderable.php
r2709284 r2745279 4 4 * Author URI: https://orderable.com 5 5 * Description: Take local online ordering to a whole new level with Orderable. 6 * Version: 1. 3.06 * Version: 1.4.0 7 7 * Author: Orderable 8 8 * Text Domain: orderable 9 9 * WC requires at least: 5.4.0 10 * WC tested up to: 6. 4.010 * WC tested up to: 6.6.0 11 11 */ 12 12 … … 20 20 * @var string Plugin version. 21 21 */ 22 public static $version = '1. 3.0';22 public static $version = '1.4.0'; 23 23 24 24 /** 25 25 * @var string Required pro version. 26 26 */ 27 public static $required_pro_version = '1. 3.0';27 public static $required_pro_version = '1.4.0'; 28 28 29 29 /** … … 168 168 require_once ORDERABLE_INC_PATH . 'class-admin-notices.php'; 169 169 require_once ORDERABLE_INC_PATH . 'class-webhooks.php'; 170 require_once ORDERABLE_INC_PATH . 'class-shortcodes.php'; 170 171 171 172 Orderable_Settings::run(); … … 174 175 Orderable_Products::run(); 175 176 Orderable_Ajax::run(); 176 Orderable_ Admin_Notices::run();177 Orderable_Shortcodes::run(); 177 178 } 178 179 -
orderable/tags/1.4.0/readme.txt
r2709284 r2745279 3 3 Tags: ecommerce, WooCommerce, local ordering, restaurants 4 4 Requires at least: 5.4 5 Tested up to: 5.95 Tested up to: 6.0 6 6 Requires PHP: 5.6 7 Stable tag: 1. 3.07 Stable tag: 1.4.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 142 142 143 143 == Changelog == 144 145 **v1.4.0** (13 Apr 2022) 146 [new] Edit product after adding to the cart 147 [new] Add shortcode [orderable_add_to_cart] 148 [new] Option to open quickview when card is clicked 149 [new] Allow users to manually change quantity in the side drawer 150 [new] Added filter to allow admin to override the live view audio notification file:`orderable_live_view_new_order_audio_file_url` 151 [new] New filters added for service types 152 [update] Ability to remove/clear any repeatable settings row 153 [update] Add translation for date range picker element in Live Order View 154 [update] Show error on quantity change if the requested quantity is more than available quantity 155 [update] Only modify mini cart in Orderable sidebar 156 [update] Optimized tabbed layout navigation on mobile 157 [update] Remove hidden categories/products from sitemap 158 [update] Add media import helper 159 [fix] Out of stock visibility in Product Layout 160 [fix] Allow order_manager users to place new orders 161 [fix] Increase/decrease quantity on mini cart when "Ajax add to cart" is disabled 162 [fix] Make Weekdays and 'Filter by due date' translatable 163 [fix] Multiple requests on changing the quantity of a product on mini cart 164 [fix] Translation issues in the backend 165 [fix] Clicking on Order status count closes the live order view 166 [fix] Issue where order page filter won't work for same start and end date 144 167 145 168 **v1.3.0** (13 Apr 2022) -
orderable/tags/1.4.0/templates/product/actions.php
r2549156 r2745279 16 16 </div> 17 17 <div class="orderable-product__actions-button"> 18 <?php echo Orderable_Products::get_add_to_cart_button( $product, 'orderable-product__add-to-order' ); ?> 18 <?php 19 if ( empty( $cart_item_key ) ) { 20 echo Orderable_Products::get_add_to_cart_button( $product, 'orderable-product__add-to-order' ); 21 } else { 22 echo Orderable_Products::get_update_cart_item_button( $cart_item_key, $product, 'orderable-product__update-cart-item orderable-button--filled' ); 23 } 24 ?> 19 25 </div> 20 26 </div> -
orderable/tags/1.4.0/templates/product/options.php
r2709284 r2745279 37 37 </th> 38 38 <td class="orderable-product__option-select"> 39 <?php wc_dropdown_variation_attribute_options( 40 array( 41 'options' => $options, 42 'attribute' => $attribute_name, 43 'product' => $product, 44 'show_option_none' => wc_attribute_label( $attribute_name ), 45 'class' => 'orderable-input orderable-input--select orderable-input--validate', 46 ) 47 ); ?> 39 <?php 40 wc_dropdown_variation_attribute_options( 41 array( 42 'options' => $options, 43 'attribute' => $attribute_name, 44 'selected' => empty( $selected[ wc_variation_attribute_name( $attribute_name ) ] ) ? false : $selected[ wc_variation_attribute_name( $attribute_name ) ], 45 'product' => $product, 46 'class' => 'orderable-input orderable-input--select orderable-input--validate', 47 ) 48 ); 49 ?> 48 50 </td> 49 51 </tr> … … 56 58 <div class="orderable-product__messages"></div> 57 59 58 < script class="orderable-product__variations" type="application/json">59 <?php echo ! empty( $variations_json ) ? $variations_json : ''; ?>60 </script>60 <?php if ( ! empty( $variations_json ) ) : ?> 61 <script class="orderable-product__variations" type="application/json"><?php echo $variations_json; ?></script> 62 <?php endif; ?> 61 63 </div> 62 64 -
orderable/tags/1.4.0/woocommerce/cart/mini-cart.php
r2709284 r2745279 40 40 ?> 41 41 <li class="orderable-mini-cart-item <?php echo esc_attr( apply_filters( 'woocommerce_mini_cart_item_class', 'mini_cart_item', $cart_item, $cart_item_key ) ); ?>"> 42 <?php if ( 'variation' === $_product->get_type() || ! empty( $cart_item['orderable_fields'] ) ) : ?> 43 <button 44 class="orderable-button orderable-edit-cart-item__button orderable-button--filled" 45 data-orderable-trigger="edit-cart-item" 46 data-orderable-cart-item-key="<?php echo esc_attr( $cart_item_key ); ?>" 47 > 48 <?php echo esc_html__( 'Edit', 'orderable' ); ?> 49 </button> 50 <?php endif; ?> 42 51 <?php 43 52 echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped … … 55 64 ?> 56 65 <strong><?php echo wp_kses_post( $product_name ); ?></strong> 66 67 57 68 58 69 <?php if ( ! empty( $formatted_cart_data ) ) { ?> -
orderable/trunk/assets/admin/js/main.min.js
r2709284 r2745279 1 !function(n,e){"use strict";var t=function(){n(e.body).on("change",".orderable-table--product-lists input, .orderable-table--product-lists select",function(e){var t=n(this).closest(".orderable-table__row--repeatable"),r=t.find(".orderable-field--product-list-shortcode"),o={categories:"",layout:"grid",images:"true"},t={categories:t.find(".orderable-select--categories").val().toString(),layout:t.find(".orderable-select--layout").val().toString(),images:t.find(".orderable-checkbox--images").is(":checked").toString()},a="[orderable";n.each(t,function(e,t){t!==o[e]&&(a+=" "+e+'="'+t+'"')}),a+="]",r.val(a)})};n(e).ready(t)}(jQuery,document),function(n,e){"use strict";var r={on_ready:function(){r.init(n(".orderable-select--multi-select")),n(e).on("orderable-init-multiselects",function(e,t){void 0!==t.selects&&r.init(t.selects)}),n(e).on("orderable-destroy-multiselects",function(e,t){void 0!==t.selects&&r.destroy(t.selects)})},init:function(e){e.multiSelect(),e.each(function(e,t){var t=n(t),r=t.siblings(".multi-select-container"),o=r.find(".multi-select-menuitem--none"),t=t.data("orderable-select-none-option"),o=(o.remove(),r.find(".multi-select-menuitem")),a=r.find(".multi-select-menuitems input:disabled").parent();o.show(),a.hide(),o.length===a.length&&t&&r.find(".multi-select-menuitems").append('<span class="multi-select-menuitem multi-select-menuitem--none">'+t+"</span>")})},destroy:function(e){e.siblings(".multi-select-container").remove(),e.data("plugin_multiSelect",!1)}};n(e).ready(r.on_ready)}(jQuery,document),function(a,e){"use strict";var r={on_ready:function(){a(e.body).on("iconic_onboard_wait_complete",r.init.woo_installed)},init:{woo_installed:function(e,t){void 0!==t&&"install_plugin"===t.wait_event&&"woocommerce"===t.json.plugin_data["repo-slug"]&&r.populate_woo_fields()}},populate_woo_fields:function(){var e={default_country:{type:"select",selector:"select#iconic_onboard_default_country"},business_name:{type:"text",selector:"input#iconic_onboard_business_name"},business_address:{type:"text",selector:"input#iconic_onboard_business_address"},business_address_2:{type:"text",selector:"input#iconic_onboard_business_address_2"},business_city:{type:"text",selector:"input#iconic_onboard_business_city"},business_postcode:{type:"text",selector:"input#iconic_onboard_business_postcode"}};a.post(ajaxurl,{action:"orderable_get_onboard_woo_fields",fields:e}).done(function(o){try{o.success&&a.each(e,function(e,t){var r=a(t.selector);r.length<=0||void 0===o.data[e]||("select"===t.type?r.html(o.data[e]):r.val(o.data[e]))})}catch(e){console.log(o),console.log(e),alert("Couldn't save.")}}).fail(function(){alert("Couldn't save. Are you connected to the internet? ")}).always(function(){})}};a(e).ready(r.on_ready)}(jQuery,document),jQuery(document).ready(function(){setTimeout(function(){"undefined"!=typeof orderable_pointers&&jQuery.each(orderable_pointers.pointers,function(e){return function e(t){var r,o,n=orderable_pointers.pointers[t];void 0!==n&&(r=jQuery.extend(n.options,{pointerClass:"wp-pointer wc-pointer orderable-pointer",close:function(){jQuery.post(orderable_pointers.ajax_url,{pointer:t,action:"dismiss-wp-pointer"}),n&&n.next&&orderable_pointers.pointers[n.next]&&setTimeout(function(){e(n.next)},250)},skip:function(){var e=document.querySelectorAll(".wp-pointer.orderable-pointer");Array.from(e).forEach(function(e){e.remove()}),jQuery.post(orderable_pointers.ajax_url,{pointer:"orderable-tour-dismissed",action:"dismiss-wp-pointer"})},buttons:function(e,t){var r=n&&n.next&&orderable_pointers.pointers[n.next]?orderable_pointers.i18n.next:orderable_pointers.i18n.close,r=jQuery('<a class="button button-primary" href="#">'+r+"</a>"),o=jQuery('<div class="wc-pointer-buttons" />'),a=orderable_pointers.i18n.skip,a=jQuery('<a class="button button-secondary" href="#">'+a+"</a>");return r.bind("click.pointer",function(e){e.preventDefault(),t.element.pointer("close")}),a.bind("click.pointer",function(e){e.preventDefault(),n.options.skip()}),o.append(r),o.append(a),o}}),(o=jQuery(n.target).pointer(r)).pointer("open"),n.next_trigger&&jQuery(n.next_trigger.target).on(n.next_trigger.event,function(){setTimeout(function(){o.pointer("close")},400)}))}(e),!1})},800)}),function(e,t){"use strict";var r={on_ready:function(){e(t.body).on("orderable-pro-modal",r.trigger_pro_modal)},trigger_pro_modal:function(){console.log("Pro only."),tb_show("Pro Feature","#TB_inline?inlineId=orderable-pro-modal")}};e(t).ready(r.on_ready)}(jQuery,document),function(n,l){"use strict";var e=function(){n(l.body).on("change",".orderable-enable-day",function(e){var t=n(this),r=t.data("orderable-day"),t=t.is(":checked"),o=n(".orderable-select--days");o.find('option[value="'+r+'"]').attr("disabled",!t).attr("selected",!1),n(l).trigger("orderable-destroy-multiselects",{selects:o}),n(l).trigger("orderable-init-multiselects",{selects:o})}),n(l.body).on("change",'[name*="\\[store_general_services\\]"]',function(e){var t=n(this),r=t.val(),t=t.is(":checked"),r=n(".orderable-toggle-wrapper--"+r+', button[data-orderable-wrapper="'+r+'"]'),o="orderable-ui-hide",a=n(".orderable-notice--select-service"),t=(t?r.removeClass(o):r.addClass(o),n('[name*="\\[store_general_services\\]"]:checked')),a=(t.length<=0?a.removeClass(o):(a.addClass(o),r=t.eq(0).val(),n('button[data-orderable-wrapper="'+r+'"]').click()),n("#orderable_settings_store_general_service_hours_pickup_same")),r=a.data("default-state");void 0===r&&(r=a.is(":checked"),a.data("default-state",r)),1===t.length&&"pickup"===t.val()?(a.prop("checked",!1).parent().addClass(o),n(l.body).trigger("orderable-toggle-element",{trigger_element:a[0],add_class:!1})):(a.prop("checked",r).parent().removeClass(o),n(l.body).trigger("orderable-toggle-element",{trigger_element:a[0],add_class:r})),n(l).trigger("orderable-add-last-row-class")}),n(l.body).on("change","#orderable_settings_store_general_service_hours_pickup_same",function(e){n(this).data("default-state",n(this).is(":checked"))}),n(".orderable-enable-day").on("change",function(){jQuery(this).closest("tr").toggleClass("orderable-table__row--hidden",!this.checked)})};n(l).ready(e)}(jQuery,document),function(a,n){"use strict";var e={on_ready:function(){a(n.body).on("click change","[data-orderable-trigger]",function(e){var t=a(this),r=t.data("orderable-trigger");"click"===e.type&&(t.is("select")||t.is("input")||t.is("label"))||((t.is("button")||t.is("a"))&&e.preventDefault(),a(n.body).trigger("orderable-"+r,{trigger_element:t}))}),a(n.body).on("orderable-new-row",function(e,t){var t=a(t.trigger_element),t=a(t.data("orderable-target")).find(".orderable-table__body"),r=t.find(".orderable-table__row--repeatable:last-child"),o=parseInt(r.data("orderable-index"))+1,r=r[0].outerHTML.replace(/\[\d+\]/gm,"["+o+"]").replace(/data-orderable-index="\d+"/gm,'data-orderable-index="'+o+'"'),o=(t.append(r),t.find(".orderable-table__row--repeatable:last-child"));o.find("input").not('input[type="checkbox"]').val(""),o.find(".hasDatepicker").each(function(e,t){a(t).removeClass("hasDatepicker").attr("id","")}),o.find("select").each(function(e,t){var t=a(t),r=t.find('option[value=""]'),o=t.hasClass("orderable-select--multi-select"),r=r.length||o?"":t.find("option:first-child").val();t.val(r),o&&t.change()}),o.find('input[type="checkbox"]').prop("checked",!1),o.find(".multi-select-container").remove(),a(n).trigger("orderable-init-multiselects",{selects:t.find(".orderable-select--multi-select")}),t.find('[data-orderable-trigger="toggle-element-select"]').change(),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-remove-row",function(e,t){var t=a(t.trigger_element),r=t.closest("tr");1===t.closest("tbody").find(">tr").length?(r.find("input").val(""),r.find('input[type="checkbox"], input[type="radio"]').prop("checked",!1),r.find("select").each(function(){a(this).hasClass("orderable-select--multi-select")||(this.selectedIndex=0,a(this).trigger("change"))}),r.find('.multi-select-container input[type="checkbox"]').trigger("change")):r.remove(),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-toggle-element",function(e,t){t.add_class=void 0!==t.add_class?t.add_class:null;var r=a(t.trigger_element),o=a(r.data("orderable-target")),r=r.data("orderable-toggle-class");null===t.add_class?o.toggleClass(r):!0===t.add_class?o.addClass(r):!1===t.add_class&&o.removeClass(r),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-toggle-element-select",function(e,t){var t=a(t.trigger_element),r=t.closest(t.data("orderable-parent")),o=t.data("orderable-target"),t=t.val();r.length<=0||void 0===o||void 0===o[t]||(a.each(o[t],function(e,t){t=r.find(t);"show"===e?t.show():"hide"===e&&t.hide()}),a(n).trigger("orderable-add-last-row-class"))}),a(n.body).on("orderable-toggle-wrapper",function(e,t){var t=a(t.trigger_element),r=t.data("orderable-wrapper"),t=t.data("orderable-wrapper-group"),o=a(".orderable-toggle-wrapper--"+r+'[data-orderable-wrapper-group="'+t+'"]');a('.orderable-toggle-wrapper[data-orderable-wrapper-group="'+t+'"]').removeClass("orderable-toggle-wrapper--active"),o.addClass("orderable-toggle-wrapper--active"),a('[data-orderable-wrapper-group="'+t+'"]').removeClass("orderable-trigger-element--active"),a('[data-orderable-wrapper="'+r+'"]').addClass("orderable-trigger-element--active"),a(n).trigger("orderable-add-last-row-class")}),a(n).on("orderable-add-last-row-class",e.add_last_row_class),a(n).trigger("orderable-add-last-row-class")},add_last_row_class:function(){var e=a(".orderable-table"),t="orderable-table__row--last",r=e.find("."+t),e=e.find("tbody > tr:visible:last");r.removeClass(t),e.addClass(t)}};a(n).ready(e.on_ready)}(jQuery,document);1 !function(n,e){"use strict";var t=function(){n(e.body).on("change",".orderable-table--product-lists input, .orderable-table--product-lists select",function(e){var t=n(this).closest(".orderable-table__row--repeatable"),r=t.find(".orderable-field--product-list-shortcode"),o={categories:"",layout:"grid",images:"true"},t={categories:t.find(".orderable-select--categories").val().toString(),layout:t.find(".orderable-select--layout").val().toString(),images:t.find(".orderable-checkbox--images").is(":checked").toString()},a="[orderable";n.each(t,function(e,t){t!==o[e]&&(a+=" "+e+'="'+t+'"')}),a+="]",r.val(a)})};n(e).ready(t)}(jQuery,document),function(n,e){"use strict";var r={on_ready:function(){r.init(n(".orderable-select--multi-select")),n(e).on("orderable-init-multiselects",function(e,t){void 0!==t.selects&&r.init(t.selects)}),n(e).on("orderable-destroy-multiselects",function(e,t){void 0!==t.selects&&r.destroy(t.selects)})},init:function(e){e.multiSelect(),e.each(function(e,t){var r=n(t),o=r.siblings(".multi-select-container"),a=o.find(".multi-select-menuitem--none"),t=r.data("orderable-select-none-option");a.remove();r=o.find(".multi-select-menuitem"),a=o.find(".multi-select-menuitems input:disabled").parent();r.show(),a.hide(),r.length===a.length&&t&&o.find(".multi-select-menuitems").append('<span class="multi-select-menuitem multi-select-menuitem--none">'+t+"</span>")})},destroy:function(e){e.siblings(".multi-select-container").remove(),e.data("plugin_multiSelect",!1)}};n(e).ready(r.on_ready)}(jQuery,document),function(a,e){"use strict";var r={on_ready:function(){a(e.body).on("iconic_onboard_wait_complete",r.init.woo_installed)},init:{woo_installed:function(e,t){void 0!==t&&"install_plugin"===t.wait_event&&"woocommerce"===t.json.plugin_data["repo-slug"]&&r.populate_woo_fields()}},populate_woo_fields:function(){var e={default_country:{type:"select",selector:"select#iconic_onboard_default_country"},business_name:{type:"text",selector:"input#iconic_onboard_business_name"},business_address:{type:"text",selector:"input#iconic_onboard_business_address"},business_address_2:{type:"text",selector:"input#iconic_onboard_business_address_2"},business_city:{type:"text",selector:"input#iconic_onboard_business_city"},business_postcode:{type:"text",selector:"input#iconic_onboard_business_postcode"}};a.post(ajaxurl,{action:"orderable_get_onboard_woo_fields",fields:e}).done(function(o){try{o.success&&a.each(e,function(e,t){var r=a(t.selector);r.length<=0||void 0===o.data[e]||("select"===t.type?r.html(o.data[e]):r.val(o.data[e]))})}catch(e){console.log(o),console.log(e),alert("Couldn't save.")}}).fail(function(){alert("Couldn't save. Are you connected to the internet? ")}).always(function(){})}};a(e).ready(r.on_ready)}(jQuery,document),jQuery(document).ready(function(){setTimeout(function(){"undefined"!=typeof orderable_pointers&&jQuery.each(orderable_pointers.pointers,function(e){return function e(t){var r,o,n=orderable_pointers.pointers[t];void 0!==n&&(r=jQuery.extend(n.options,{pointerClass:"wp-pointer wc-pointer orderable-pointer",close:function(){jQuery.post(orderable_pointers.ajax_url,{pointer:t,action:"dismiss-wp-pointer"}),n&&n.next&&orderable_pointers.pointers[n.next]&&setTimeout(function(){e(n.next)},250)},skip:function(){var e=document.querySelectorAll(".wp-pointer.orderable-pointer");Array.from(e).forEach(function(e){e.remove()}),jQuery.post(orderable_pointers.ajax_url,{pointer:"orderable-tour-dismissed",action:"dismiss-wp-pointer"})},buttons:function(e,t){var r=n&&n.next&&orderable_pointers.pointers[n.next]?orderable_pointers.i18n.next:orderable_pointers.i18n.close,o=jQuery('<a class="button button-primary" href="#">'+r+"</a>"),a=jQuery('<div class="wc-pointer-buttons" />'),r=orderable_pointers.i18n.skip,r=jQuery('<a class="button button-secondary" href="#">'+r+"</a>");return o.bind("click.pointer",function(e){e.preventDefault(),t.element.pointer("close")}),r.bind("click.pointer",function(e){e.preventDefault(),n.options.skip()}),a.append(o),a.append(r),a}}),(o=jQuery(n.target).pointer(r)).pointer("open"),n.next_trigger&&jQuery(n.next_trigger.target).on(n.next_trigger.event,function(){setTimeout(function(){o.pointer("close")},400)}))}(e),!1})},800)}),function(e,t){"use strict";var r={on_ready:function(){e(t.body).on("orderable-pro-modal",r.trigger_pro_modal)},trigger_pro_modal:function(){console.log("Pro only."),tb_show("Pro Feature","#TB_inline?inlineId=orderable-pro-modal")}};e(t).ready(r.on_ready)}(jQuery,document),function(l,i){"use strict";var e=function(){l(i.body).on("change",".orderable-enable-day",function(e){var t=l(this),r=t.data("orderable-day"),o=t.is(":checked"),t=l(".orderable-select--days");t.find('option[value="'+r+'"]').attr("disabled",!o).attr("selected",!1),l(i).trigger("orderable-destroy-multiselects",{selects:t}),l(i).trigger("orderable-init-multiselects",{selects:t})}),l(i.body).on("change",'[name*="\\[store_general_services\\]"]',function(e){var t=l(this),r=t.val(),o=t.is(":checked"),a=l(".orderable-toggle-wrapper--"+r+', button[data-orderable-wrapper="'+r+'"]'),t="orderable-ui-hide",r=l(".orderable-notice--select-service");o?a.removeClass(t):a.addClass(t);a=l('[name*="\\[store_general_services\\]"]:checked');a.length<=0?r.removeClass(t):(r.addClass(t),n=a.eq(0).val(),l('button[data-orderable-wrapper="'+n+'"]').click());var r=l("#orderable_settings_store_general_service_hours_pickup_same"),n=r.data("default-state");void 0===n&&(n=r.is(":checked"),r.data("default-state",n)),1===a.length&&"pickup"===a.val()?(r.prop("checked",!1).parent().addClass(t),l(i.body).trigger("orderable-toggle-element",{trigger_element:r[0],add_class:!1})):(r.prop("checked",n).parent().removeClass(t),l(i.body).trigger("orderable-toggle-element",{trigger_element:r[0],add_class:n})),l(i).trigger("orderable-add-last-row-class")}),l(i.body).on("change","#orderable_settings_store_general_service_hours_pickup_same",function(e){l(this).data("default-state",l(this).is(":checked"))}),l(".orderable-enable-day").on("change",function(){jQuery(this).closest("tr").toggleClass("orderable-table__row--hidden",!this.checked)})};l(i).ready(e)}(jQuery,document),function(a,n){"use strict";var e={on_ready:function(){a(n.body).on("click change","[data-orderable-trigger]",function(e){var t=a(this),r=t.data("orderable-trigger");"click"===e.type&&(t.is("select")||t.is("input")||t.is("label"))||((t.is("button")||t.is("a"))&&e.preventDefault(),a(n.body).trigger("orderable-"+r,{trigger_element:t}))}),a(n.body).on("orderable-new-row",function(e,t){var r=a(t.trigger_element),o=a(r.data("orderable-target")).find(".orderable-table__body"),t=o.find(".orderable-table__row--repeatable:last-child"),r=parseInt(t.data("orderable-index"))+1,r=t[0].outerHTML.replace(/\[\d+\]/gm,"["+r+"]").replace(/data-orderable-index="\d+"/gm,'data-orderable-index="'+r+'"');o.append(r);r=o.find(".orderable-table__row--repeatable:last-child");r.find("input").not('input[type="checkbox"]').val(""),r.find(".hasDatepicker").each(function(e,t){a(t).removeClass("hasDatepicker").attr("id","")}),r.find("select").each(function(e,t){var r=a(t),o=r.find('option[value=""]'),t=r.hasClass("orderable-select--multi-select"),o=o.length||t?"":r.find("option:first-child").val();r.val(o),t&&r.change()}),r.find('input[type="checkbox"]').prop("checked",!1),r.find(".multi-select-container").remove(),a(n).trigger("orderable-init-multiselects",{selects:o.find(".orderable-select--multi-select")}),o.find('[data-orderable-trigger="toggle-element-select"]').change(),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-remove-row",function(e,t){var r=a(t.trigger_element),t=r.closest("tr");1===r.closest("tbody").find(">tr").length?(t.find("input").val(""),t.find('input[type="checkbox"], input[type="radio"]').prop("checked",!1),t.find("select").each(function(){a(this).hasClass("orderable-select--multi-select")||(this.selectedIndex=0,a(this).trigger("change"))}),t.find('.multi-select-container input[type="checkbox"]').trigger("change")):t.remove(),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-toggle-element",function(e,t){t.add_class=void 0!==t.add_class?t.add_class:null;var r=a(t.trigger_element),o=a(r.data("orderable-target")),r=r.data("orderable-toggle-class");null===t.add_class?o.toggleClass(r):!0===t.add_class?o.addClass(r):!1===t.add_class&&o.removeClass(r),a(n).trigger("orderable-add-last-row-class")}),a(n.body).on("orderable-toggle-element-select",function(e,t){var r=a(t.trigger_element),o=r.closest(r.data("orderable-parent")),t=r.data("orderable-target"),r=r.val();o.length<=0||void 0===t||void 0===t[r]||(a.each(t[r],function(e,t){t=o.find(t);"show"===e?t.show():"hide"===e&&t.hide()}),a(n).trigger("orderable-add-last-row-class"))}),a(n.body).on("orderable-toggle-wrapper",function(e,t){var r=a(t.trigger_element),o=r.data("orderable-wrapper"),t=r.data("orderable-wrapper-group"),r=a(".orderable-toggle-wrapper--"+o+'[data-orderable-wrapper-group="'+t+'"]');a('.orderable-toggle-wrapper[data-orderable-wrapper-group="'+t+'"]').removeClass("orderable-toggle-wrapper--active"),r.addClass("orderable-toggle-wrapper--active"),a('[data-orderable-wrapper-group="'+t+'"]').removeClass("orderable-trigger-element--active"),a('[data-orderable-wrapper="'+o+'"]').addClass("orderable-trigger-element--active"),a(n).trigger("orderable-add-last-row-class")}),a(n).on("orderable-add-last-row-class",e.add_last_row_class),a(n).trigger("orderable-add-last-row-class")},add_last_row_class:function(){var e=a(".orderable-table"),t="orderable-table__row--last",r=e.find("."+t),e=e.find("tbody > tr:visible:last");r.removeClass(t),e.addClass(t)}};a(n).ready(e.on_ready)}(jQuery,document); -
orderable/trunk/assets/frontend/css/main.css
r2709284 r2745279 553 553 .orderable-product__actions-button { 554 554 margin: 0 0 0 auto; 555 } 556 557 .orderable-product__actions-button .orderable-product__cancel-update { 558 background-color: #f2f2f3; 559 border-color: #f2f2f3; 560 margin-right: 10px; 555 561 } 556 562 … … 885 891 .orderable--button-style-square .orderable-drawer__cart .orderable-mini-cart-item__remove { 886 892 border-radius: 0; 893 } 894 895 .orderable-drawer__cart .orderable-edit-cart-item__button { 896 position: absolute; 897 bottom: 21px; 898 right: 50px; 899 height: 30px; 900 line-height: normal; 901 padding: 0 13px !important; 902 font-size: 14px; 903 } 904 905 .orderable-drawer__cart .orderable-edit-cart-item__button.orderable-button--loading { 906 display: -webkit-box; 907 display: -ms-flexbox; 908 display: flex; 909 -webkit-box-align: center; 910 -ms-flex-align: center; 911 align-items: center; 912 } 913 914 .orderable-drawer__cart .orderable-edit-cart-item__button.orderable-button--loading::after { 915 position: static; 916 margin-left: 5px; 887 917 } 888 918 -
orderable/trunk/assets/frontend/css/main.min.css
r2709284 r2745279 1 @-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}@keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}.orderable-main__group{margin:0 0 36px}.orderable-main--sections-tabs .orderable-main__group{display:none}.orderable-main--sections-tabs .orderable-main__group:first-of-type{display:block}@media screen and (min-width:620px){.orderable-main--sections-side_tabs{display:-webkit-box;display:-ms-flexbox;display:flex}.orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 0 0!important}.orderable-main--sections-side_tabs .orderable-main__sections{-webkit-box-flex:1;-ms-flex:1;flex:1}}.orderable-button,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable-drawer__close{display:inline-block;border:2px solid #000;background:0 0;padding:0 24px!important;height:40px;line-height:36px;white-space:nowrap;border-radius:20px;color:#000;text-transform:none;margin:0;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}.orderable-button:active,.orderable-button:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:focus,.orderable-drawer__close:active,.orderable-drawer__close:focus{outline:0}.orderable-button--active,.orderable-button--hover,.orderable-button:active,.orderable-button:focus,.orderable-button:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:hover,.orderable-drawer__close:active,.orderable-drawer__close:focus,.orderable-drawer__close:hover{border-color:#000;background:#000;color:#fff;text-decoration:none;-webkit-box-shadow:none;box-shadow:none}.orderable-button--filled,.orderable-button--filled--hover,.orderable-button--filled:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:hover{background:#000!important;color:#fff}.orderable-button--full{width:100%}.orderable-button--loading{position:relative;padding-right:48px!important}.orderable-button--loading:after{content:'';display:block;width:16px;height:16px;position:absolute;top:10px;right:22px;background:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:2px solid #000;border-left:2px solid #000;border-right:2px solid transparent;border-bottom:2px solid transparent;border-radius:100%;-webkit-animation:spin .6s ease-out infinite;animation:spin .6s ease-out infinite}.orderable-button--filled .orderable-button--loading:after,.orderable-button--loading.orderable-button--hover:after,.orderable-button--loading:active:after,.orderable-button--loading:focus:after,.orderable-button--loading:hover:after,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout .orderable-button--loading:after{border-top-color:#fff;border-left-color:#fff}.orderable-button--out-of-stock.orderable-button--hover.orderable-drawer__close,.orderable-button--out-of-stock.orderable-drawer__close,.orderable-button--out-of-stock.orderable-drawer__close:active,.orderable-button--out-of-stock.orderable-drawer__close:focus,.orderable-button--out-of-stock.orderable-drawer__close:hover,.orderable-button.orderable-button--out-of-stock,.orderable-button.orderable-button--out-of-stock.orderable-button--hover,.orderable-button.orderable-button--out-of-stock:active,.orderable-button.orderable-button--out-of-stock:focus,.orderable-button.orderable-button--out-of-stock:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.orderable-button--hover.button.checkout{cursor:not-allowed;border-color:#c7d4db;color:#a8bdc7;background:0 0!important}.orderable--button-style-square .orderable-button,.orderable--button-style-square .orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable--button-style-square .orderable-drawer__close,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable--button-style-square .button.checkout{border-radius:0}.orderable-button--icon{padding:10px!important;width:44px;height:44px;line-height:24px;border:none;background:0 0!important}body .orderable-button--icon:active,body .orderable-button--icon:focus,body .orderable-button--icon:hover{background:0 0!important;opacity:.6}.orderable-button--icon svg{width:24px;height:24px;border-radius:12px;overflow:hidden;-webkit-transition:opacity 250ms ease-in-out;transition:opacity 250ms ease-in-out}.orderable-button--icon.orderable-button--loading:after{display:none}.orderable-input--select,select.orderable-input--select{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;padding:10px;border:2px solid #E6ECEF;border-radius:8px;background-color:#fff;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23c1cfd7'><polygon points='0,0 100,0 50,50'/></svg>");background-size:16px;background-position:calc(100% - 14px) 19px;background-repeat:no-repeat;cursor:pointer}.orderable-input--select:focus,select.orderable-input--select:focus{outline:0;border-color:#000;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23000000'><polygon points='0,0 100,0 50,50'/></svg>")}.orderable-input.orderable-input--text{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;padding:10px;border:2px solid #E6ECEF;border-radius:8px;width:100%;background-color:#fff;-webkit-box-shadow:none;box-shadow:none}.orderable-floating-cart__button,.orderable-products-list__item .orderable-product{-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07)}.orderable-input.orderable-input--text:focus{outline:0;border-color:#000;background-color:#fff}.orderable-category-heading{margin:0 0 24px}.orderable-products-list{margin-bottom:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list:last-child{margin-bottom:0}@media screen and (min-width:480px){.orderable-products-list .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 0 200px;flex:0 0 200px}.orderable-products-list .orderable-product__hero{width:200px}.orderable-products-list .orderable-product__image{-o-object-fit:cover;object-fit:cover;width:100%!important;height:100%!important}.orderable-products-list .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column nowrap;flex-flow:column nowrap}}.orderable-products-list .orderable-product__actions{padding:12px 24px 18px;margin-top:auto}.orderable-products-list__item{width:100%;margin:0 0 24px}@media screen and (max-width:480px){.orderable-products-list__item{padding:0 0 24px;border-bottom:1px solid #ecf1f3}.orderable-products-list__item:last-child{border-bottom:none}}@media screen and (min-width:540px){.orderable-products-list--grid{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-12px;margin-right:-12px}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-products-list__item{margin:0 0 24px;padding:0 12px;width:50%}.orderable-products-list--grid .orderable-product{padding:0 0 88px;display:block;margin:0;-webkit-box-flex:0;-ms-flex:none;flex:none}}@media screen and (min-width:1120px){.orderable-products-list--grid .orderable-products-list__item{width:33.33%}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__hero{width:auto}.orderable-products-list--grid .orderable-product__hero img{-o-object-fit:fill;object-fit:fill;width:100%;height:auto}.orderable-products-list--grid .orderable-product__content-wrap{-webkit-box-flex:0;-ms-flex:none;flex:none;display:block}.orderable-products-list--grid .orderable-product__actions{padding:0;margin-top:0;position:absolute;bottom:24px;left:24px;right:24px}}.orderable-product{overflow:hidden;position:relative}.orderable-product__hero{position:relative}.orderable-product__image{border-radius:0;margin:0;display:block;width:100%;height:auto!important;max-width:none!important}.orderable-product__content{padding:18px 24px 12px}.orderable-product__content :last-child{margin-bottom:0}.orderable-product__title{margin:0 0 12px!important}.orderable-product__description{margin:0}.orderable-product__tags{overflow:hidden;margin:0;padding:0;list-style:none}img+.orderable-product__tags{position:absolute;bottom:0;left:0;padding:12px;z-index:20}.orderable-product__tags li{margin:6px 0 0}.orderable-product__options{margin:0 0 24px;padding:0;border-radius:6px}.orderable-product__options td,.orderable-product__options th{background-color:transparent!important;padding:0 0 12px;text-align:left;display:block;margin:0}.orderable-product__options th{line-height:22px}.orderable-product__options td{padding-bottom:24px}.orderable-product__options tr{padding:0;margin:0}.orderable-product__options tr:last-child td{padding-bottom:0}.orderable-product__actions{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-product__actions:last-child{margin-bottom:0}.orderable-product__actions-price{margin:0 4px 0 0}.orderable-product__actions-price .amount{white-space:nowrap;margin:0 6px 0 0;font-weight:700;color:#000;font-size:20px;line-height:24px}.orderable-product__actions-button{margin:0 0 0 auto}.orderable-product__ tabs{margin:24px 0}.orderable-product__tabs-section{display:none}.orderable-product__tabs-section:first-child{display:block}.orderable-product__tabs-section :last-child{margin-bottom:0}.orderable-product--options{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:visible;height:100%}.orderable-product--options .orderable-product__hero{margin:-24px -24px 0}.orderable-product--options .orderable-product__title{text-align:left;margin:24px 0!important}.orderable-product--options .orderable-product__actions{margin-top:auto;padding-top:24px;border-top:1px solid #E6ECEF;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.orderable-product--add-to-cart,.orderable-product--product-options,.orderable-product--view-product{cursor:pointer}.orderable-product--image-cropped .orderable-product__hero{overflow:hidden;padding:0;text-align:center;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;height:72px}.orderable-product--image-cropped .orderable-product__image{-o-object-fit:cover;object-fit:cover;position:absolute;z-index:-1;width:100%;height:100%!important;left:0;top:0}.orderable-products-list__item .orderable-product{height:100%;width:100%;box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border-radius:6px}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-shadow:none;box-shadow:none;border-radius:0}.orderable-products-list__item .orderable-product__hero{width:100%;min-width:60px;max-width:95px;border-radius:6px;overflow:hidden}.orderable-products-list__item .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1}.orderable-products-list__item .orderable-product__content{padding:0 0 0 24px}.orderable-products-list__item .orderable-product__actions{padding:6px 0 0 24px}.orderable-products-list__item .orderable-product__title{margin:0 0 6px!important}}.orderable-tag{display:inline-block;background:#EDF2F6;border-radius:15px;height:30px;line-height:30px;white-space:nowrap;color:#495568;padding:0 12px;font-size:14px}body.orderable-drawer-open{overflow:hidden}.orderable-drawer-overlay{height:100%;z-index:999998;position:fixed;top:0;left:0;opacity:0;visibility:hidden;background-color:rgba(34,34,34,.6);-webkit-transition:opacity .2s linear,visibility .1s,width 1s ease-in;transition:opacity .2s linear,visibility .1s,width 1s ease-in}.orderable-drawer{width:100%;visibility:hidden;-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transition:all .2s;transition:all .2s;border-radius:0;-webkit-box-shadow:0 4px 56px -2px rgba(0,0,0,.2),0 3px 6px -1px rgba(0,0,0,.4);box-shadow:0 4px 56px -2px rgba(0,0,0,.2),0 3px 6px -1px rgba(0,0,0,.4);display:block;position:fixed;top:0;right:0;height:100%;z-index:999999;background-color:#fff;overflow:hidden;padding:24px}@media screen and (min-width:640px){.orderable-drawer{max-width:600px}}.orderable-drawer h3{margin:0 60px 24px!important;font-size:20px;line-height:24px;text-align:center}.orderable-drawer h4{font-size:18px;line-height:22px}.orderable-drawer__inner{padding:0;height:100%;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.orderable-drawer__cart,.orderable-drawer__cart .orderable-mini-cart-wrapper{display:-webkit-box;display:-ms-flexbox;-webkit-box-orient:vertical;-webkit-box-direction:normal}.orderable-drawer__inner .orderable-sb-container{-ms-flex-preferred-size:100%;flex-basis:100%;margin-bottom:-1px}.orderable-drawer__cart{display:flex;-ms-flex-direction:column;flex-direction:column}.orderable-drawer__cart .orderable-mini-cart-wrapper{height:100%;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart{margin:0;padding:0;list-style:none;overflow:hidden;min-height:100%}.orderable-drawer__cart .orderable-mini-cart-item{margin:0;padding:10px 44px 10px 0;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-bottom:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart-item:last-child{border-bottom:none}.orderable-drawer__cart .orderable-mini-cart-item .variation{margin:7.5px 0}.orderable-drawer__cart .orderable-mini-cart-item .variation dd,.orderable-drawer__cart .orderable-mini-cart-item .variation dt,.orderable-drawer__cart .orderable-mini-cart-item .variation p{margin:0}.orderable-drawer__cart .orderable-mini-cart-item .blockOverlay{background:#fff!important;opacity:.8!important}.orderable-drawer__cart .orderable-mini-cart-item__remove{position:absolute;bottom:16px;right:0;z-index:20;color:#c7d4db;-webkit-box-shadow:none;box-shadow:none;height:40px;width:40px;text-indent:250%;white-space:nowrap;font-size:0;-webkit-transition:none;transition:none;-webkit-box-sizing:border-box;box-sizing:border-box;border:none}.orderable-drawer__cart .orderable-mini-cart-item__remove svg{display:block;height:20px;width:20px;position:absolute;left:50%;top:50%;-webkit-transition:none;transition:none;fill:#c7d4db;margin:-10px 0 0 -10px}.orderable-drawer__cart .orderable-mini-cart-item__remove:hover svg{opacity:.8}.orderable--button-style-square .orderable-drawer__cart .orderable-mini-cart-item__remove{border-radius:0}.orderable-drawer__cart .quantity{font-weight:700}.orderable-drawer__cart .orderable-mini-cart__notices{padding:15px 0;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error{margin:0;padding:0;list-style:none}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error li{border:1px solid #E34F4F;background:#fce9e9;color:#dc2323;padding:6px 12px 6px 28px!important;text-align:center;margin:0 0 6px;display:block;border-radius:8px}.orderable-drawer__cart .orderable-mini-cart__buttons .button,.orderable-drawer__cart .orderable-mini-cart__notices .button{display:none}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error li:last-child{margin-bottom:0}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error::before,.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-info::before,.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-message::before{left:12px}.orderable-drawer__cart .orderable-mini-cart__buttons,.orderable-drawer__cart .orderable-mini-cart__total{margin:0;padding:0;text-align:center}.orderable-drawer__cart .orderable-mini-cart__total{padding:15px 0;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout{display:block;width:100%}.orderable-drawer__cart .orderable-mini-cart__empty-message{margin:auto 0;text-align:center}.orderable-drawer__cart .orderable-services-selector__lookup,.orderable-drawer__cart .orderable-services-selector__selected{margin:0 0 15px}.orderable-drawer__cart .orderable-services-selector__lookup input{width:100%;margin:0 0 8px}.orderable-drawer__cart .orderable-services-selector__lookup-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button{display:block;width:100%}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button:first-child{margin-right:4px}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button:last-child{margin-left:4px}.orderable-drawer__actions{bottom:-24px;margin:auto 0 -24px;background:#fff;padding:24px 0;left:0;right:0;border-top:1px solid #F2F2F2}.orderable-drawer__actions--cart{border-top:none;padding-top:10px}.orderable-drawer__close{position:absolute;top:16px;left:24px;font-size:0;text-indent:250%!important;white-space:nowrap!important;overflow:hidden!important;padding:0!important;width:40px;height:40px;margin:0;z-index:100;border-color:#c7d4db}.orderable-drawer__close:after,.orderable-drawer__close:before{position:absolute;left:54%;content:' ';height:18px;width:2px;background-color:#c7d4db;top:50%;margin:-9px 0 0 -2px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;display:block}.orderable-drawer__close:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.orderable-drawer__close:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.orderable-drawer__close:active,.orderable-drawer__close:focus,.orderable-drawer__close:hover{background-color:#c7d4db;border-color:#c7d4db}.orderable-drawer__close:active:after,.orderable-drawer__close:active:before,.orderable-drawer__close:focus:after,.orderable-drawer__close:focus:before,.orderable-drawer__close:hover:after,.orderable-drawer__close:hover:before{background-color:#405763}.orderable-drawer .orderable-product__content{padding:15px 0}.orderable-drawer-overlay--open{-webkit-transition:opacity .2s ease,width 0s;transition:opacity .2s ease,width 0s;opacity:1;width:100%;visibility:visible}.orderable-drawer--open{visibility:visible;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.orderable-floating-cart{position:fixed;z-index:20}.orderable-floating-cart__button{padding:0;width:60px;height:60px;border:none;border-radius:100%;display:block;margin:0;text-align:center;line-height:60px;background:#fff;box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);outline:0!important;-webkit-transition:-webkit-transform 150ms ease-in-out;transition:-webkit-transform 150ms ease-in-out;transition:transform 150ms ease-in-out;transition:transform 150ms ease-in-out,-webkit-transform 150ms ease-in-out}.orderable-floating-cart__button:hover{background:#fff;-webkit-animation:wobble-hor-bottom .8s both;animation:wobble-hor-bottom .8s both;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07)}.orderable-floating-cart__button svg{width:24px;height:24px;display:block;margin:0 auto}.orderable-floating-cart__count{position:absolute;top:0;right:0;white-space:nowrap;padding:0 4px;background:#E52C23;color:#fff;height:22px;line-height:22px;font-size:13px;border-radius:11px;min-width:22px;text-align:center}.orderable-floating-cart--bl,.orderable-floating-cart--br{bottom:40px}.orderable-floating-cart--br,.orderable-floating-cart--tr{right:40px}.orderable-floating-cart--bl,.orderable-floating-cart--tl{left:40px}.orderable-floating-cart--tl,.orderable-floating-cart--tr{top:40px}.orderable-services-selector__selected p{margin:0}.orderable-services-selector__selected-change{padding:0;margin:0;font-size:inherit;background:0 0;display:inline;color:#333;-webkit-transition:none;transition:none;text-transform:none;-webkit-box-shadow:none;box-shadow:none}.orderable-services-selector__selected-change:active,.orderable-services-selector__selected-change:focus,.orderable-services-selector__selected-change:hover{padding:0;margin:0;background:0 0;color:#333;text-decoration:underline;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}.orderable-services-selector--selected .orderable-services-selector__lookup{display:none}.orderable-open-hours__date,.orderable-open-hours__service{margin:0 0 0 6px;padding:2px 6px;background:#000;color:#fff;border-radius:4px;display:inline-block;font-size:80%}.orderable-open-hours__service--closed{background-color:#E34F4F;display:none}.orderable-open-hours__date{margin:0 4px 0 0;text-align:center;min-width:30px;border:1px solid #E6ECEF;background:0 0;color:inherit}.orderable-tabs{margin:0 0 24px;position:relative}.orderable-tabs__list{margin:0 1px 0 0!important;padding:0!important;list-style:none;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;overflow-x:auto;overflow-y:hidden;overflow:-moz-scrollbars-none;scrollbar-base-color:transparent;-webkit-overflow-scrolling:touch}.orderable-tabs__list::-webkit-scrollbar{display:none}.orderable-tabs__item{display:inline-block;margin:0 10px 0 0;padding:0}.orderable-tabs__item:last-child{margin-right:0}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__list{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:auto}.orderable-main--sections-side_tabs .orderable-tabs__item{margin:0 0 12px;display:block}.orderable-main--sections-side_tabs .orderable-tabs__item:last-child{margin:0}}a.orderable-tabs__link{text-decoration:none!important;display:inline-block;padding:0 24px;white-space:nowrap;line-height:40px;color:#405763;font-weight:400;border-radius:20px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;background:#ecf1f3}a.orderable-tabs__link:active,a.orderable-tabs__link:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}a.orderable-tabs__link:active,a.orderable-tabs__link:focus,a.orderable-tabs__link:hover{color:#405763;text-decoration:none;background:#c7d4db}.orderable-tabs__item--active a.orderable-tabs__link{background:#000;color:#fff}.orderable--button-style-square a.orderable-tabs__link{border-radius:0}.orderable-tabs__arrow{background:#fff;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border:none;width:40px!important;height:40px!important;padding:0!important;margin:0!important;border-radius:20px!important;position:absolute;top:0;right:0;text-align:center;line-height:40px;display:none}.orderable-tabs__arrow:active,.orderable-tabs__arrow:focus,.orderable-tabs__arrow:hover{background:#fff;outline:0}.orderable-tabs__arrow svg{width:21px;height:24px;margin:8px 0}.orderable-accordion{margin:24px 0;background:#f6f8f9;padding:0 24px;border-radius:6px}.orderable-product-fields-group-wrap+.orderable-accordion,.orderable-product__options+.orderable-accordion{margin-top:36px}.orderable-accordion__item{border-top:1px solid #E6ECEF}.orderable-accordion__item:first-child{border-top:none}.orderable-accordion__item-link{display:block;padding:18px 0;margin:0;color:inherit;position:relative}.orderable-accordion__item-link--active,.orderable-accordion__item-link:active,.orderable-accordion__item-link:focus,.orderable-accordion__item-link:hover{color:#000;border:none;outline:0}.orderable-accordion__item-link--active:after,.orderable-accordion__item-link--active:before,.orderable-accordion__item-link:active:after,.orderable-accordion__item-link:active:before,.orderable-accordion__item-link:focus:after,.orderable-accordion__item-link:focus:before,.orderable-accordion__item-link:hover:after,.orderable-accordion__item-link:hover:before{background-color:#405763!important}.orderable-accordion__item-link:after,.orderable-accordion__item-link:before{position:absolute;right:5px;content:' ';height:11px;width:2px;background-color:#c7d4db;top:50%;display:block;margin:-4px 0 0}.orderable-accordion__item-link:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.orderable-accordion__item-link:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:12px}.orderable-accordion__item-link--active:before{right:12px}.orderable-accordion__item-link--active:after{right:5px}.orderable-accordion__item-content{display:none}.orderable-accordion__item-content--active{display:block}.orderable-accordion__item-content:after{content:"";display:table;clear:both}.orderable-sb-container{position:relative;overflow:hidden;padding-right:25px}.orderable-sb-content{height:100%;width:120%;padding-right:20%;overflow-y:scroll;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-sb-scrollbar-container{position:absolute;right:0;bottom:10px;top:10px;width:10px}.orderable-sb-container-noscroll .orderable-sb-scrollbar-container{right:-20px}.orderable-sb-scrollbar{position:absolute;right:0;height:30px;width:10px;border-radius:10px;background:#d6e0e5}.orderable-sb-scrollbar:hover{background:#c7d4db}.orderable--button-style-square .orderable-sb-scrollbar{border-radius:0}.orderable-sb-container-noscroll{padding-right:0}.orderable-sb-container-noscroll .orderable-sb-content{width:100%;padding-right:0;overflow:hidden}.orderable-quantity-roller{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-quantity-roller *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-quantity-roller__roller{border:2px solid #c7d4db;border-radius:20px;height:40px;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex}.orderable--button-style-square .orderable-quantity-roller__roller{border-radius:0}.orderable-quantity-roller__button{height:36px;width:24px;background:0 0;border:none;border-radius:0;text-align:center;color:#c7d4db;line-height:36px;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;padding:0 6px;-webkit-box-sizing:content-box;box-sizing:content-box;position:relative;font-size:0;text-indent:250%;overflow:hidden;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out}.orderable-quantity-roller__button:after,.orderable-quantity-roller__button:before{content:"";position:absolute;display:block!important;height:2px;width:12px;background:#c7d4db;top:50%;left:50%;margin:-1px 0 0 -6px;-webkit-transition:background 150ms ease-out;transition:background 150ms ease-out}.orderable-quantity-roller__button:focus,.orderable-quantity-roller__button:hover,.orderable-quantity-roller__button:visited{background-color:#c7d4db;color:#405763;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;outline:0}.orderable-quantity-roller__button:focus:after,.orderable-quantity-roller__button:focus:before,.orderable-quantity-roller__button:hover:after,.orderable-quantity-roller__button:hover:before,.orderable-quantity-roller__button:visited:after,.orderable-quantity-roller__button:visited:before{background:#405763}.orderable-quantity-roller__button--decrease{padding-right:4px}.orderable-quantity-roller__button--decrease:after{display:none!important}.orderable-quantity-roller__button--increase{padding-left:4px}.orderable-quantity-roller__button--increase:after{height:12px;width:2px;margin:-6px 0 0 -1px}.orderable-quantity-roller__quantity{text-align:center;display:inline-block;line-height:36px;padding:0 6px;min-width:24px;outline:0}.orderable-quantity-roller__price{margin-left:8px}.orderable-quantity-roller__price:before{content:"x";margin:0 8px;color:#c7d4db}.orderable-drawer__cart .orderable-quantity-roller{margin:12px 0 6px}1 @-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}@keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}.orderable-main__group{margin:0 0 36px}.orderable-main--sections-tabs .orderable-main__group{display:none}.orderable-main--sections-tabs .orderable-main__group:first-of-type{display:block}@media screen and (min-width:620px){.orderable-main--sections-side_tabs{display:-webkit-box;display:-ms-flexbox;display:flex}.orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 0 0!important}.orderable-main--sections-side_tabs .orderable-main__sections{-webkit-box-flex:1;-ms-flex:1;flex:1}}.orderable-button,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable-drawer__close{display:inline-block;border:2px solid #000;background:0 0;padding:0 24px!important;height:40px;line-height:36px;white-space:nowrap;border-radius:20px;color:#000;text-transform:none;margin:0;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}.orderable-button:active,.orderable-button:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:focus,.orderable-drawer__close:active,.orderable-drawer__close:focus{outline:0}.orderable-button--active,.orderable-button--hover,.orderable-button:active,.orderable-button:focus,.orderable-button:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:hover,.orderable-drawer__close:active,.orderable-drawer__close:focus,.orderable-drawer__close:hover{border-color:#000;background:#000;color:#fff;text-decoration:none;-webkit-box-shadow:none;box-shadow:none}.orderable-button--filled,.orderable-button--filled--hover,.orderable-button--filled:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout:hover{background:#000!important;color:#fff}.orderable-button--full{width:100%}.orderable-button--loading{position:relative;padding-right:48px!important}.orderable-button--loading:after{content:'';display:block;width:16px;height:16px;position:absolute;top:10px;right:22px;background:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:2px solid #000;border-left:2px solid #000;border-right:2px solid transparent;border-bottom:2px solid transparent;border-radius:100%;-webkit-animation:spin .6s ease-out infinite;animation:spin .6s ease-out infinite}.orderable-button--filled .orderable-button--loading:after,.orderable-button--loading.orderable-button--hover:after,.orderable-button--loading:active:after,.orderable-button--loading:focus:after,.orderable-button--loading:hover:after,.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout .orderable-button--loading:after{border-top-color:#fff;border-left-color:#fff}.orderable-button--out-of-stock.orderable-button--hover.orderable-drawer__close,.orderable-button--out-of-stock.orderable-drawer__close,.orderable-button--out-of-stock.orderable-drawer__close:active,.orderable-button--out-of-stock.orderable-drawer__close:focus,.orderable-button--out-of-stock.orderable-drawer__close:hover,.orderable-button.orderable-button--out-of-stock,.orderable-button.orderable-button--out-of-stock.orderable-button--hover,.orderable-button.orderable-button--out-of-stock:active,.orderable-button.orderable-button--out-of-stock:focus,.orderable-button.orderable-button--out-of-stock:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:active,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:focus,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.button.checkout:hover,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable-button--out-of-stock.orderable-button--hover.button.checkout{cursor:not-allowed;border-color:#c7d4db;color:#a8bdc7;background:0 0!important}.orderable--button-style-square .orderable-button,.orderable--button-style-square .orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout,.orderable--button-style-square .orderable-drawer__close,.orderable-drawer__cart .orderable-mini-cart__buttons .orderable--button-style-square .button.checkout{border-radius:0}.orderable-button--icon{padding:10px!important;width:44px;height:44px;line-height:24px;border:none;background:0 0!important}body .orderable-button--icon:active,body .orderable-button--icon:focus,body .orderable-button--icon:hover{background:0 0!important;opacity:.6}.orderable-button--icon svg{width:24px;height:24px;border-radius:12px;overflow:hidden;-webkit-transition:opacity 250ms ease-in-out;transition:opacity 250ms ease-in-out}.orderable-button--icon.orderable-button--loading:after{display:none}.orderable-input--select,select.orderable-input--select{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;padding:10px;border:2px solid #E6ECEF;border-radius:8px;background-color:#fff;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23c1cfd7'><polygon points='0,0 100,0 50,50'/></svg>");background-size:16px;background-position:calc(100% - 14px) 19px;background-repeat:no-repeat;cursor:pointer}.orderable-input--select:focus,select.orderable-input--select:focus{outline:0;border-color:#000;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23000000'><polygon points='0,0 100,0 50,50'/></svg>")}.orderable-input.orderable-input--text{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;padding:10px;border:2px solid #E6ECEF;border-radius:8px;width:100%;background-color:#fff;-webkit-box-shadow:none;box-shadow:none}.orderable-floating-cart__button,.orderable-products-list__item .orderable-product{-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07)}.orderable-input.orderable-input--text:focus{outline:0;border-color:#000;background-color:#fff}.orderable-category-heading{margin:0 0 24px}.orderable-products-list{margin-bottom:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list:last-child{margin-bottom:0}@media screen and (min-width:480px){.orderable-products-list .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 0 200px;flex:0 0 200px}.orderable-products-list .orderable-product__hero{width:200px}.orderable-products-list .orderable-product__image{-o-object-fit:cover;object-fit:cover;width:100%!important;height:100%!important}.orderable-products-list .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column nowrap;flex-flow:column nowrap}}.orderable-products-list .orderable-product__actions{padding:12px 24px 18px;margin-top:auto}.orderable-products-list__item{width:100%;margin:0 0 24px}@media screen and (max-width:480px){.orderable-products-list__item{padding:0 0 24px;border-bottom:1px solid #ecf1f3}.orderable-products-list__item:last-child{border-bottom:none}}@media screen and (min-width:540px){.orderable-products-list--grid{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-12px;margin-right:-12px}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-products-list__item{margin:0 0 24px;padding:0 12px;width:50%}.orderable-products-list--grid .orderable-product{padding:0 0 88px;display:block;margin:0;-webkit-box-flex:0;-ms-flex:none;flex:none}}@media screen and (min-width:1120px){.orderable-products-list--grid .orderable-products-list__item{width:33.33%}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__hero{width:auto}.orderable-products-list--grid .orderable-product__hero img{-o-object-fit:fill;object-fit:fill;width:100%;height:auto}.orderable-products-list--grid .orderable-product__content-wrap{-webkit-box-flex:0;-ms-flex:none;flex:none;display:block}.orderable-products-list--grid .orderable-product__actions{padding:0;margin-top:0;position:absolute;bottom:24px;left:24px;right:24px}}.orderable-product{overflow:hidden;position:relative}.orderable-product__hero{position:relative}.orderable-product__image{border-radius:0;margin:0;display:block;width:100%;height:auto!important;max-width:none!important}.orderable-product__content{padding:18px 24px 12px}.orderable-product__content :last-child{margin-bottom:0}.orderable-product__title{margin:0 0 12px!important}.orderable-product__description{margin:0}.orderable-product__tags{overflow:hidden;margin:0;padding:0;list-style:none}img+.orderable-product__tags{position:absolute;bottom:0;left:0;padding:12px;z-index:20}.orderable-product__tags li{margin:6px 0 0}.orderable-product__options{margin:0 0 24px;padding:0;border-radius:6px}.orderable-product__options td,.orderable-product__options th{background-color:transparent!important;padding:0 0 12px;text-align:left;display:block;margin:0}.orderable-product__options th{line-height:22px}.orderable-product__options td{padding-bottom:24px}.orderable-product__options tr{padding:0;margin:0}.orderable-product__options tr:last-child td{padding-bottom:0}.orderable-product__actions{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-product__actions:last-child{margin-bottom:0}.orderable-product__actions-price{margin:0 4px 0 0}.orderable-product__actions-price .amount{white-space:nowrap;margin:0 6px 0 0;font-weight:700;color:#000;font-size:20px;line-height:24px}.orderable-product__actions-button{margin:0 0 0 auto}.orderable-product__actions-button .orderable-product__cancel-update{background-color:#f2f2f3;border-color:#f2f2f3;margin-right:10px}.orderable-product__tabs{margin:24px 0}.orderable-product__tabs-section{display:none}.orderable-product__tabs-section:first-child{display:block}.orderable-product__tabs-section :last-child{margin-bottom:0}.orderable-product--options{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:visible;height:100%}.orderable-product--options .orderable-product__hero{margin:-24px -24px 0}.orderable-product--options .orderable-product__title{text-align:left;margin:24px 0!important}.orderable-product--options .orderable-product__actions{margin-top:auto;padding-top:24px;border-top:1px solid #E6ECEF;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.orderable-product--add-to-cart,.orderable-product--product-options,.orderable-product--view-product{cursor:pointer}.orderable-product--image-cropped .orderable-product__hero{overflow:hidden;padding:0;text-align:center;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;height:72px}.orderable-product--image-cropped .orderable-product__image{-o-object-fit:cover;object-fit:cover;position:absolute;z-index:-1;width:100%;height:100%!important;left:0;top:0}.orderable-products-list__item .orderable-product{height:100%;width:100%;box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border-radius:6px}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-shadow:none;box-shadow:none;border-radius:0}.orderable-products-list__item .orderable-product__hero{width:100%;min-width:60px;max-width:95px;border-radius:6px;overflow:hidden}.orderable-products-list__item .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1}.orderable-products-list__item .orderable-product__content{padding:0 0 0 24px}.orderable-products-list__item .orderable-product__actions{padding:6px 0 0 24px}.orderable-products-list__item .orderable-product__title{margin:0 0 6px!important}}.orderable-tag{display:inline-block;background:#EDF2F6;border-radius:15px;height:30px;line-height:30px;white-space:nowrap;color:#495568;padding:0 12px;font-size:14px}body.orderable-drawer-open{overflow:hidden}.orderable-drawer-overlay{height:100%;z-index:999998;position:fixed;top:0;left:0;opacity:0;visibility:hidden;background-color:rgba(34,34,34,.6);-webkit-transition:opacity .2s linear,visibility .1s,width 1s ease-in;transition:opacity .2s linear,visibility .1s,width 1s ease-in}.orderable-drawer{width:100%;visibility:hidden;-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transition:all .2s;transition:all .2s;border-radius:0;-webkit-box-shadow:0 4px 56px -2px rgba(0,0,0,.2),0 3px 6px -1px rgba(0,0,0,.4);box-shadow:0 4px 56px -2px rgba(0,0,0,.2),0 3px 6px -1px rgba(0,0,0,.4);display:block;position:fixed;top:0;right:0;height:100%;z-index:999999;background-color:#fff;overflow:hidden;padding:24px}@media screen and (min-width:640px){.orderable-drawer{max-width:600px}}.orderable-drawer h3{margin:0 60px 24px!important;font-size:20px;line-height:24px;text-align:center}.orderable-drawer h4{font-size:18px;line-height:22px}.orderable-drawer__inner{padding:0;height:100%;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.orderable-drawer__cart,.orderable-drawer__cart .orderable-mini-cart-wrapper{display:-webkit-box;display:-ms-flexbox;-webkit-box-orient:vertical;-webkit-box-direction:normal}.orderable-drawer__inner .orderable-sb-container{-ms-flex-preferred-size:100%;flex-basis:100%;margin-bottom:-1px}.orderable-drawer__cart{display:flex;-ms-flex-direction:column;flex-direction:column}.orderable-drawer__cart .orderable-mini-cart-wrapper{height:100%;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart{margin:0;padding:0;list-style:none;overflow:hidden;min-height:100%}.orderable-drawer__cart .orderable-mini-cart-item{margin:0;padding:10px 44px 10px 0;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-bottom:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart-item:last-child{border-bottom:none}.orderable-drawer__cart .orderable-mini-cart-item .variation{margin:7.5px 0}.orderable-drawer__cart .orderable-mini-cart-item .variation dd,.orderable-drawer__cart .orderable-mini-cart-item .variation dt,.orderable-drawer__cart .orderable-mini-cart-item .variation p{margin:0}.orderable-drawer__cart .orderable-mini-cart-item .blockOverlay{background:#fff!important;opacity:.8!important}.orderable-drawer__cart .orderable-mini-cart-item__remove{position:absolute;bottom:16px;right:0;z-index:20;color:#c7d4db;-webkit-box-shadow:none;box-shadow:none;height:40px;width:40px;text-indent:250%;white-space:nowrap;font-size:0;-webkit-transition:none;transition:none;-webkit-box-sizing:border-box;box-sizing:border-box;border:none}.orderable-drawer__cart .orderable-mini-cart-item__remove svg{display:block;height:20px;width:20px;position:absolute;left:50%;top:50%;-webkit-transition:none;transition:none;fill:#c7d4db;margin:-10px 0 0 -10px}.orderable-drawer__cart .orderable-mini-cart-item__remove:hover svg{opacity:.8}.orderable--button-style-square .orderable-drawer__cart .orderable-mini-cart-item__remove{border-radius:0}.orderable-drawer__cart .orderable-edit-cart-item__button{position:absolute;bottom:21px;right:50px;height:30px;line-height:normal;padding:0 13px!important;font-size:14px}.orderable-drawer__cart .orderable-edit-cart-item__button.orderable-button--loading{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-drawer__cart .orderable-edit-cart-item__button.orderable-button--loading::after{position:static;margin-left:5px}.orderable-drawer__cart .quantity{font-weight:700}.orderable-drawer__cart .orderable-mini-cart__notices{padding:15px 0;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error{margin:0;padding:0;list-style:none}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error li{border:1px solid #E34F4F;background:#fce9e9;color:#dc2323;padding:6px 12px 6px 28px!important;text-align:center;margin:0 0 6px;display:block;border-radius:8px}.orderable-drawer__cart .orderable-mini-cart__buttons .button,.orderable-drawer__cart .orderable-mini-cart__notices .button{display:none}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error li:last-child{margin-bottom:0}.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-error::before,.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-info::before,.orderable-drawer__cart .orderable-mini-cart__notices .woocommerce-message::before{left:12px}.orderable-drawer__cart .orderable-mini-cart__buttons,.orderable-drawer__cart .orderable-mini-cart__total{margin:0;padding:0;text-align:center}.orderable-drawer__cart .orderable-mini-cart__total{padding:15px 0;border-top:1px solid #E6ECEF}.orderable-drawer__cart .orderable-mini-cart__buttons .button.checkout{display:block;width:100%}.orderable-drawer__cart .orderable-mini-cart__empty-message{margin:auto 0;text-align:center}.orderable-drawer__cart .orderable-services-selector__lookup,.orderable-drawer__cart .orderable-services-selector__selected{margin:0 0 15px}.orderable-drawer__cart .orderable-services-selector__lookup input{width:100%;margin:0 0 8px}.orderable-drawer__cart .orderable-services-selector__lookup-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button{display:block;width:100%}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button:first-child{margin-right:4px}.orderable-drawer__cart .orderable-services-selector__lookup-buttons button:last-child{margin-left:4px}.orderable-drawer__actions{bottom:-24px;margin:auto 0 -24px;background:#fff;padding:24px 0;left:0;right:0;border-top:1px solid #F2F2F2}.orderable-drawer__actions--cart{border-top:none;padding-top:10px}.orderable-drawer__close{position:absolute;top:16px;left:24px;font-size:0;text-indent:250%!important;white-space:nowrap!important;overflow:hidden!important;padding:0!important;width:40px;height:40px;margin:0;z-index:100;border-color:#c7d4db}.orderable-drawer__close:after,.orderable-drawer__close:before{position:absolute;left:54%;content:' ';height:18px;width:2px;background-color:#c7d4db;top:50%;margin:-9px 0 0 -2px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;display:block}.orderable-drawer__close:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.orderable-drawer__close:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.orderable-drawer__close:active,.orderable-drawer__close:focus,.orderable-drawer__close:hover{background-color:#c7d4db;border-color:#c7d4db}.orderable-drawer__close:active:after,.orderable-drawer__close:active:before,.orderable-drawer__close:focus:after,.orderable-drawer__close:focus:before,.orderable-drawer__close:hover:after,.orderable-drawer__close:hover:before{background-color:#405763}.orderable-drawer .orderable-product__content{padding:15px 0}.orderable-drawer-overlay--open{-webkit-transition:opacity .2s ease,width 0s;transition:opacity .2s ease,width 0s;opacity:1;width:100%;visibility:visible}.orderable-drawer--open{visibility:visible;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.orderable-floating-cart{position:fixed;z-index:20}.orderable-floating-cart__button{padding:0;width:60px;height:60px;border:none;border-radius:100%;display:block;margin:0;text-align:center;line-height:60px;background:#fff;box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);outline:0!important;-webkit-transition:-webkit-transform 150ms ease-in-out;transition:-webkit-transform 150ms ease-in-out;transition:transform 150ms ease-in-out;transition:transform 150ms ease-in-out,-webkit-transform 150ms ease-in-out}.orderable-floating-cart__button:hover{background:#fff;-webkit-animation:wobble-hor-bottom .8s both;animation:wobble-hor-bottom .8s both;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07)}.orderable-floating-cart__button svg{width:24px;height:24px;display:block;margin:0 auto}.orderable-floating-cart__count{position:absolute;top:0;right:0;white-space:nowrap;padding:0 4px;background:#E52C23;color:#fff;height:22px;line-height:22px;font-size:13px;border-radius:11px;min-width:22px;text-align:center}.orderable-floating-cart--bl,.orderable-floating-cart--br{bottom:40px}.orderable-floating-cart--br,.orderable-floating-cart--tr{right:40px}.orderable-floating-cart--bl,.orderable-floating-cart--tl{left:40px}.orderable-floating-cart--tl,.orderable-floating-cart--tr{top:40px}.orderable-services-selector__selected p{margin:0}.orderable-services-selector__selected-change{padding:0;margin:0;font-size:inherit;background:0 0;display:inline;color:#333;-webkit-transition:none;transition:none;text-transform:none;-webkit-box-shadow:none;box-shadow:none}.orderable-services-selector__selected-change:active,.orderable-services-selector__selected-change:focus,.orderable-services-selector__selected-change:hover{padding:0;margin:0;background:0 0;color:#333;text-decoration:underline;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}.orderable-services-selector--selected .orderable-services-selector__lookup{display:none}.orderable-open-hours__date,.orderable-open-hours__service{margin:0 0 0 6px;padding:2px 6px;background:#000;color:#fff;border-radius:4px;display:inline-block;font-size:80%}.orderable-open-hours__service--closed{background-color:#E34F4F;display:none}.orderable-open-hours__date{margin:0 4px 0 0;text-align:center;min-width:30px;border:1px solid #E6ECEF;background:0 0;color:inherit}.orderable-tabs{margin:0 0 24px;position:relative}.orderable-tabs__list{margin:0 1px 0 0!important;padding:0!important;list-style:none;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;overflow-x:auto;overflow-y:hidden;overflow:-moz-scrollbars-none;scrollbar-base-color:transparent;-webkit-overflow-scrolling:touch}.orderable-tabs__list::-webkit-scrollbar{display:none}.orderable-tabs__item{display:inline-block;margin:0 10px 0 0;padding:0}.orderable-tabs__item:last-child{margin-right:0}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__list{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:auto}.orderable-main--sections-side_tabs .orderable-tabs__item{margin:0 0 12px;display:block}.orderable-main--sections-side_tabs .orderable-tabs__item:last-child{margin:0}}a.orderable-tabs__link{text-decoration:none!important;display:inline-block;padding:0 24px;white-space:nowrap;line-height:40px;color:#405763;font-weight:400;border-radius:20px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;background:#ecf1f3}a.orderable-tabs__link:active,a.orderable-tabs__link:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}a.orderable-tabs__link:active,a.orderable-tabs__link:focus,a.orderable-tabs__link:hover{color:#405763;text-decoration:none;background:#c7d4db}.orderable-tabs__item--active a.orderable-tabs__link{background:#000;color:#fff}.orderable--button-style-square a.orderable-tabs__link{border-radius:0}.orderable-tabs__arrow{background:#fff;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border:none;width:40px!important;height:40px!important;padding:0!important;margin:0!important;border-radius:20px!important;position:absolute;top:0;right:0;text-align:center;line-height:40px;display:none}.orderable-tabs__arrow:active,.orderable-tabs__arrow:focus,.orderable-tabs__arrow:hover{background:#fff;outline:0}.orderable-tabs__arrow svg{width:21px;height:24px;margin:8px 0}.orderable-accordion{margin:24px 0;background:#f6f8f9;padding:0 24px;border-radius:6px}.orderable-product-fields-group-wrap+.orderable-accordion,.orderable-product__options+.orderable-accordion{margin-top:36px}.orderable-accordion__item{border-top:1px solid #E6ECEF}.orderable-accordion__item:first-child{border-top:none}.orderable-accordion__item-link{display:block;padding:18px 0;margin:0;color:inherit;position:relative}.orderable-accordion__item-link--active,.orderable-accordion__item-link:active,.orderable-accordion__item-link:focus,.orderable-accordion__item-link:hover{color:#000;border:none;outline:0}.orderable-accordion__item-link--active:after,.orderable-accordion__item-link--active:before,.orderable-accordion__item-link:active:after,.orderable-accordion__item-link:active:before,.orderable-accordion__item-link:focus:after,.orderable-accordion__item-link:focus:before,.orderable-accordion__item-link:hover:after,.orderable-accordion__item-link:hover:before{background-color:#405763!important}.orderable-accordion__item-link:after,.orderable-accordion__item-link:before{position:absolute;right:5px;content:' ';height:11px;width:2px;background-color:#c7d4db;top:50%;display:block;margin:-4px 0 0}.orderable-accordion__item-link:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.orderable-accordion__item-link:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:12px}.orderable-accordion__item-link--active:before{right:12px}.orderable-accordion__item-link--active:after{right:5px}.orderable-accordion__item-content{display:none}.orderable-accordion__item-content--active{display:block}.orderable-accordion__item-content:after{content:"";display:table;clear:both}.orderable-sb-container{position:relative;overflow:hidden;padding-right:25px}.orderable-sb-content{height:100%;width:120%;padding-right:20%;overflow-y:scroll;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-sb-scrollbar-container{position:absolute;right:0;bottom:10px;top:10px;width:10px}.orderable-sb-container-noscroll .orderable-sb-scrollbar-container{right:-20px}.orderable-sb-scrollbar{position:absolute;right:0;height:30px;width:10px;border-radius:10px;background:#d6e0e5}.orderable-sb-scrollbar:hover{background:#c7d4db}.orderable--button-style-square .orderable-sb-scrollbar{border-radius:0}.orderable-sb-container-noscroll{padding-right:0}.orderable-sb-container-noscroll .orderable-sb-content{width:100%;padding-right:0;overflow:hidden}.orderable-quantity-roller{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-quantity-roller *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-quantity-roller__roller{border:2px solid #c7d4db;border-radius:20px;height:40px;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex}.orderable--button-style-square .orderable-quantity-roller__roller{border-radius:0}.orderable-quantity-roller__button{height:36px;width:24px;background:0 0;border:none;border-radius:0;text-align:center;color:#c7d4db;line-height:36px;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;padding:0 6px;-webkit-box-sizing:content-box;box-sizing:content-box;position:relative;font-size:0;text-indent:250%;overflow:hidden;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out}.orderable-quantity-roller__button:after,.orderable-quantity-roller__button:before{content:"";position:absolute;display:block!important;height:2px;width:12px;background:#c7d4db;top:50%;left:50%;margin:-1px 0 0 -6px;-webkit-transition:background 150ms ease-out;transition:background 150ms ease-out}.orderable-quantity-roller__button:focus,.orderable-quantity-roller__button:hover,.orderable-quantity-roller__button:visited{background-color:#c7d4db;color:#405763;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;outline:0}.orderable-quantity-roller__button:focus:after,.orderable-quantity-roller__button:focus:before,.orderable-quantity-roller__button:hover:after,.orderable-quantity-roller__button:hover:before,.orderable-quantity-roller__button:visited:after,.orderable-quantity-roller__button:visited:before{background:#405763}.orderable-quantity-roller__button--decrease{padding-right:4px}.orderable-quantity-roller__button--decrease:after{display:none!important}.orderable-quantity-roller__button--increase{padding-left:4px}.orderable-quantity-roller__button--increase:after{height:12px;width:2px;margin:-6px 0 0 -1px}.orderable-quantity-roller__quantity{text-align:center;display:inline-block;line-height:36px;padding:0 6px;min-width:24px;outline:0}.orderable-quantity-roller__price{margin-left:8px}.orderable-quantity-roller__price:before{content:"x";margin:0 8px;color:#c7d4db}.orderable-drawer__cart .orderable-quantity-roller{margin:12px 0 6px} -
orderable/trunk/assets/frontend/js/main.js
r2709284 r2745279 1 1 2 /** 3 * jQiery scrollBar Plugin 4 * @author Falk Müller (www-falk-m.de) 5 * Thankts to https://codepen.io/IliaSky/pen/obowmv 6 */ 7 ;( function( $, window, document ) { 8 9 "use strict"; 10 11 var pluginName = "scrollBox", 12 defaults = { 13 containerClass: "sb-container", 14 containerNoScrollClass: "sb-container-noscroll", 15 contentClass: "sb-content", 16 scrollbarContainerClass: "sb-scrollbar-container", 17 scrollBarClass: "sb-scrollbar" 18 19 }; 20 21 // plugin constructor 22 function Plugin ( element, options ) { 23 this.element = element; 24 25 this.settings = $.extend( {}, defaults, options ); 26 this._defaults = defaults; 27 this._name = pluginName; 28 this.init(); 29 30 } 31 32 // Avoid Plugin.prototype conflicts 33 $.extend( Plugin.prototype, { 34 init: function() { 35 36 this.addScrollbar(); 37 this.addEvents(); 38 this.onResize(); 39 }, 40 addScrollbar: function() { 41 $( this.element ).addClass(this.settings.containerClass); 42 this.wrapper = $("<div class='" + this.settings.contentClass + "' />"); 43 this.wrapper.append($( this.element ).contents()); 44 $( this.element ).append( this.wrapper ); 45 46 this.scollbarContainer = $("<div class='" + this.settings.scrollbarContainerClass + "' />"); 47 this.scrollBar = $("<div class='" + this.settings.scrollBarClass + "' />"); 48 this.scollbarContainer.append(this.scrollBar); 49 $( this.element ).prepend(this.scollbarContainer); 50 }, 51 addEvents: function(){ 52 53 this.wrapper.on("scroll." + pluginName, $.proxy(this.onScroll, this) ); 54 $(window).on("resize." + pluginName, $.proxy(this.onResize, this) ); 55 56 this.scrollBar.on('mousedown.' + pluginName, $.proxy(this.onMousedown, this)); 57 this.scrollBar.on('touchstart.' + pluginName, $.proxy(this.onTouchstart, this)); 58 }, 59 60 onTouchstart: function(ev){ 61 var me = this; 62 63 ev.preventDefault(); 64 var y = me.scrollBar[0].offsetTop; 65 66 var onMove = function(end){ 67 var delta = end.touches[0].pageY - ev.touches[0].pageY; 68 me.scrollBar[0].style.top = Math.min(me.scollbarContainer[0].clientHeight - me.scrollBar[0].clientHeight, Math.max(0, y + delta)) + 'px'; 69 me.wrapper[0].scrollTop = (me.wrapper[0].scrollHeight * me.scrollBar[0].offsetTop / me.scollbarContainer[0].clientHeight); 70 }; 71 72 $(document).on("touchmove." + pluginName, onMove); 73 $(document).on("touchend." + pluginName, function(){ 74 $(document).off("touchmove." + pluginName); 75 $(document).off("touchend." + pluginName); 76 }); 77 }, 78 79 onMousedown: function(ev){ 80 var me = this; 81 82 ev.preventDefault(); 83 var y = me.scrollBar[0].offsetTop; 84 85 var onMove = function(end){ 86 var delta = end.pageY - ev.pageY; 87 me.scrollBar[0].style.top = Math.min(me.scollbarContainer[0].clientHeight - me.scrollBar[0].clientHeight, Math.max(0, y + delta)) + 'px'; 88 me.wrapper[0].scrollTop = (me.wrapper[0].scrollHeight * me.scrollBar[0].offsetTop / me.scollbarContainer[0].clientHeight); 89 }; 90 91 $(document).on("mousemove." + pluginName, onMove); 92 $(document).on("mouseup." + pluginName, function(){ 93 $(document).off("mousemove." + pluginName); 94 $(document).off("mouseup." + pluginName); 95 }); 96 }, 97 98 onResize: function(){ 99 100 this.wrapper.css("max-height", $(this.element).height()); 101 102 var wrapper_client_height = this.wrapper[0].clientHeight; 103 104 this.scrollBar.css("height", this.scollbarContainer[0].clientHeight * wrapper_client_height / this.wrapper[0].scrollHeight + "px"); 105 if(this.scollbarContainer[0].clientHeight <= this.scrollBar[0].clientHeight){ 106 $( this.element ).addClass(this.settings.containerNoScrollClass); 107 } else { 108 $( this.element ).removeClass(this.settings.containerNoScrollClass); 109 } 110 111 this.onScroll(); 112 }, 113 114 onScroll: function(){ 115 116 this.scrollBar.css("top", Math.min(this.scollbarContainer[0].clientHeight - this.scrollBar[0].clientHeight, this.scollbarContainer[0].clientHeight * this.wrapper[0].scrollTop / this.wrapper[0].scrollHeight) + "px"); 117 118 } 119 } ); 120 121 // A really lightweight plugin wrapper around the constructor, 122 // preventing against multiple instantiations 123 $.fn[pluginName] = function( options ) { 124 return this.each( function() { 125 if ( !$.data( this, "plugin_" + pluginName ) ) { 126 $.data( this, "plugin_" + 127 pluginName, new Plugin( this, options ) ); 128 } 129 } ); 130 }; 131 132 } )( jQuery, window, document ); 133 /*! 134 * swiped-events.js - v1.1.6 135 * Pure JavaScript swipe events 136 * https://github.com/john-doherty/swiped-events 137 * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element 138 * @author John Doherty <www.johndoherty.info> 139 * @license MIT 140 */ 141 !function(t,e){"use strict";"function"!=typeof t.CustomEvent&&(t.CustomEvent=function(t,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var a=e.createEvent("CustomEvent");return a.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),a},t.CustomEvent.prototype=t.Event.prototype),e.addEventListener("touchstart",function(t){if("true"===t.target.getAttribute("data-swipe-ignore"))return;s=t.target,r=Date.now(),n=t.touches[0].clientX,a=t.touches[0].clientY,u=0,i=0},!1),e.addEventListener("touchmove",function(t){if(!n||!a)return;var e=t.touches[0].clientX,r=t.touches[0].clientY;u=n-e,i=a-r},!1),e.addEventListener("touchend",function(t){if(s!==t.target)return;var e=parseInt(l(s,"data-swipe-threshold","20"),10),o=parseInt(l(s,"data-swipe-timeout","500"),10),c=Date.now()-r,d="",p=t.changedTouches||t.touches||[];Math.abs(u)>Math.abs(i)?Math.abs(u)>e&&c<o&&(d=u>0?"swiped-left":"swiped-right"):Math.abs(i)>e&&c<o&&(d=i>0?"swiped-up":"swiped-down");if(""!==d){var b={dir:d.replace(/swiped-/,""),touchType:(p[0]||{}).touchType||"direct",xStart:parseInt(n,10),xEnd:parseInt((p[0]||{}).clientX||-1,10),yStart:parseInt(a,10),yEnd:parseInt((p[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:b})),s.dispatchEvent(new CustomEvent(d,{bubbles:!0,cancelable:!0,detail:b}))}n=null,a=null,r=null},!1);var n=null,a=null,u=null,i=null,r=null,s=null;function l(t,n,a){for(;t&&t!==e.documentElement;){var u=t.getAttribute(n);if(u)return u;t=t.parentNode}return a}}(window,document); 2 142 (function( $, document ) { 3 143 "use strict"; … … 207 347 } ); 208 348 209 $( document.body ).on( 'orderable-increase-quantity', orderable_drawer.cart.click_increase_decrease_quantity ); 210 $( document.body ).on( 'orderable-decrease-quantity', orderable_drawer.cart.click_increase_decrease_quantity ); 349 $( document.body ).on( 'orderable-increase-quantity', orderable_drawer.cart.handle_quantity_change_by_button); 350 $( document.body ).on( 'orderable-decrease-quantity', orderable_drawer.cart.handle_quantity_change_by_button); 351 352 const updateQuantityRequest = orderable_drawer.debounce( orderable_drawer.cart.click_increase_decrease_quantity ); 353 354 $( document.body ).on( 'orderable-increase-quantity', updateQuantityRequest ); 355 $( document.body ).on( 'orderable-decrease-quantity', updateQuantityRequest ); 211 356 212 357 var drawer = document.querySelector( 'body:not( .rtl ) .orderable-drawer' ); … … 279 424 */ 280 425 click_increase_decrease_quantity: function( e, $button ) { 281 var product_id = $button.data( 'orderable-product-id' ), 282 cart_item_key = $button.data( 'orderable-cart-item-key' ), 283 direction = $button.data( 'orderable-trigger' ), 284 quantity = parseInt( $button.data( 'orderable-quantity' ) ); 426 var product_id = $button.attr( 'data-orderable-product-id' ), 427 cart_item_key = $button.attr( 'data-orderable-cart-item-key' ), 428 quantity = $button.attr( 'data-orderable-quantity' ); 285 429 286 430 var data = { … … 288 432 cart_item_key, 289 433 product_id, 290 'quantity': 'increase-quantity' === direction ? quantity + 1 : quantity - 1434 quantity 291 435 }; 292 436 293 jQuery.post( 437 if (this.currentRequest) { 438 this.currentRequest.abort(); 439 this.currentRequest = undefined; 440 } 441 442 this.currentRequest = jQuery.post( 294 443 orderable_vars.ajax_url, 295 444 data, 296 function( response ) {445 (function( response ) { 297 446 if ( ! response ) { 298 447 return; 299 448 } 300 449 301 $( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash, $button ] ); 302 $( document.body ).trigger( 'orderable-drawer.quantity-updated' ); 303 } 304 ); 450 const $quantityElement = $button.siblings('.orderable-quantity-roller__quantity'); 451 452 if (data.quantity === $quantityElement.attr('data-orderable-updating-quantity')) { 453 $( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash, $button ] ); 454 $( document.body ).trigger( 'orderable-drawer.quantity-updated' ); 455 } 456 457 }).bind(this) 458 ) 459 .always((function() { 460 this.currentRequest = undefined; 461 }).bind(this)); 462 }, 463 handle_quantity_change_by_button: function (e, $button) { 464 const direction = $button.data( 'orderable-trigger' ); 465 const quantity = parseInt( $button.attr( 'data-orderable-quantity' ) ); 466 467 const siblingButtonName = 'increase-quantity' === direction ? 'decrease' : 'increase'; 468 469 const $siblingButton = $button.siblings(`.orderable-quantity-roller__button--${siblingButtonName}`); 470 const $quantityElement = $button.siblings('.orderable-quantity-roller__quantity'); 471 472 const newQuantity = 'increase-quantity' === direction ? quantity + 1 : Math.max(0, quantity - 1); 473 474 $button.attr('data-orderable-quantity', newQuantity); 475 $siblingButton.attr('data-orderable-quantity', newQuantity); 476 $quantityElement.attr('data-orderable-updating-quantity', newQuantity); 477 $quantityElement.text(newQuantity); 305 478 } 306 479 } … … 351 524 $( document.body ).on( 'orderable-view-product', orderable_products.view_product ); 352 525 $( document.body ).on( 'mouseenter mouseleave', '.' + orderable_products.vars.classes.clickable_product, orderable_products.simulate_add_to_order_hover ); 526 $( document.body ).on('orderable-edit-cart-item', orderable_products.edit_cart_item); 527 $( document.body ).on( 'orderable-update-cart-item', orderable_products.update_cart_item); 528 $( document.body ).on( 'orderable-show-cart', orderable_products.show_cart); 353 529 }, 354 530 … … 422 598 423 599 /** 600 * Show the cart. 601 */ 602 show_cart: function() { 603 $( document.body ).trigger( 'orderable-drawer.open', { show_cart: true } ); 604 }, 605 606 /** 424 607 * View product. 425 608 * … … 485 668 callback( response ); 486 669 } 670 } 671 ); 672 }, 673 674 /** 675 * Edit cart item. 676 * 677 * @param event 678 * @param $element 679 */ 680 edit_cart_item: function(event, $element) { 681 const cart_item_key = $element.data('orderable-cart-item-key'); 682 683 $element.addClass( orderable_products.vars.classes.button_loading ); 684 685 orderable_products.get_cart_item_options( 686 { 687 cart_item_key 688 }, 689 function(response) { 690 const args = { 691 html: response.html, 692 action: 'update-cart-item' 693 }; 694 695 $( document.body ).trigger( 'orderable-drawer.open', args ); 696 $element.removeClass( orderable_products.vars.classes.button_loading ); 697 } 698 ); 699 }, 700 701 /** 702 * Update cart item. 703 * 704 * @param event 705 * @param $element 706 */ 707 update_cart_item: function(event, $element) { 708 const cart_item_key = $element.data('orderable-cart-item-key'); 709 const product_id = $element.data( 'orderable-product-id' ); 710 const variation_id = $element.data( 'orderable-variation-id' ); 711 const attributes = $element.data( 'orderable-variation-attributes' ); 712 713 $element.addClass( orderable_products.vars.classes.button_loading ); 714 orderable_products.update_cart_item_options( 715 { 716 cart_item_key, 717 product_id, 718 variation_id, 719 attributes, 720 }, 721 function(response) { 722 const args = { 723 show_cart: true, 724 response 725 }; 726 727 $( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash ] ); 728 $(document.body).trigger('orderable-drawer.open', args); 729 $element.removeClass( orderable_products.vars.classes.button_loading ); 487 730 } 488 731 ); … … 539 782 540 783 /** 784 * Get variable product options. 785 * 786 * @param args 787 * @param callback 788 */ 789 get_cart_item_options: function( args, callback ) { 790 if ( typeof args.cart_item_key === 'undefined' ) { 791 return; 792 } 793 794 args.action = 'orderable_get_cart_item_options'; 795 796 jQuery.post( 797 orderable_vars.ajax_url, 798 args, 799 function( response ) { 800 if ( !response.success ) { 801 return; 802 } 803 804 if ( typeof callback === 'function' ) { 805 callback( response.data ); 806 } 807 } 808 ); 809 }, 810 811 /** 812 * Update variable product options. 813 * 814 * @param args 815 * @param callback 816 */ 817 update_cart_item_options: function( args, callback ) { 818 if ( typeof args.cart_item_key === 'undefined' ) { 819 return; 820 } 821 822 args.action = 'orderable_update_cart_item_options'; 823 824 // Prepare addons data. 825 if ( $( '.orderable-product-fields-group' ).length ) { 826 const inputs = jQuery( '.orderable-product-fields-group :input' ).serializeArray(); 827 const addons_data = orderable_products.convert_to_flat_object( inputs ); 828 if ( ! jQuery.isEmptyObject( addons_data ) ) { 829 args = Object.assign( args, addons_data ); // Merge objects. 830 } 831 } 832 833 jQuery.post( 834 orderable_vars.ajax_url, 835 args, 836 function( response ) { 837 if ( !response ) { 838 return; 839 } 840 841 if ( typeof callback === 'function' ) { 842 callback( response ); 843 } 844 } 845 ); 846 }, 847 848 /** 541 849 * Init drawer product options. 542 850 * … … 545 853 */ 546 854 init_product_options: function( event, args ) { 547 if ( typeof args.action === 'undefined' || 'product-options' !== args.action) {855 if ( typeof args.action === 'undefined' || ( 'product-options' !== args.action && 'update-cart-item' !== args.action ) ) { 548 856 return; 549 857 } … … 571 879 */ 572 880 product_options_change: function( $options ) { 573 var $add_to_order_button = $( '.orderable-drawer .orderable-product__add-to-order ' ),881 var $add_to_order_button = $( '.orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item' ), 574 882 options_set = orderable_products.check_options( $options ), 575 883 product_type = $add_to_order_button.data( 'orderable-product-type' ); 576 884 577 $add_to_order_button.attr( 'data-orderable-trigger', 'add-to-cart' ); 885 if ( 'product-options' === $add_to_order_button.attr( 'data-orderable-trigger' )) { 886 $add_to_order_button.attr( 'data-orderable-trigger', 'add-to-cart' ); 887 } 888 578 889 $( '.' + orderable_products.vars.classes.product_messages ).html( '' ); 579 890 … … 626 937 */ 627 938 check_variation: function( $options ) { 628 var $product = $options.closest( '.orderable-drawer' ), 629 variations = $.parseJSON( $product.find( '.orderable-product__variations' ).text() ), 630 selected_options = orderable_products.serialize_object( $options ), 631 matching_variations = orderable_products.find_matching_variations( variations, selected_options ); 939 var $product = $options.closest( '.orderable-drawer' ); 940 941 var variations = $product.find( '.orderable-product__variations' ).text(); 942 943 variations = variations ? JSON.parse( variations) : ''; 944 945 var selected_options = orderable_products.serialize_object( $options ), 946 matching_variations = orderable_products.find_matching_variations( variations, selected_options ); 632 947 633 948 if ( orderable_products.is_empty( matching_variations ) ) { … … 771 1086 // Add delay to ensure invalid class has been assigned to inputs. 772 1087 setTimeout( function () { 773 var $button = $( '.orderable-drawer .orderable-product__add-to-order ' ),1088 var $button = $( '.orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item' ), 774 1089 invalid_fields_count = $( '.orderable-drawer__html .' + orderable_products.vars.classes.invalid_field ).length, 775 1090 product_type = $button.data( 'orderable-product-type' ), … … 1296 1611 $( document ).ready( orderable_triggers.on_ready ); 1297 1612 }( jQuery, document )); 1298 /**1299 * jQiery scrollBar Plugin1300 * @author Falk Müller (www-falk-m.de)1301 * Thankts to https://codepen.io/IliaSky/pen/obowmv1302 */1303 ;( function( $, window, document ) {1304 1305 "use strict";1306 1307 var pluginName = "scrollBox",1308 defaults = {1309 containerClass: "sb-container",1310 containerNoScrollClass: "sb-container-noscroll",1311 contentClass: "sb-content",1312 scrollbarContainerClass: "sb-scrollbar-container",1313 scrollBarClass: "sb-scrollbar"1314 1315 };1316 1317 // plugin constructor1318 function Plugin ( element, options ) {1319 this.element = element;1320 1321 this.settings = $.extend( {}, defaults, options );1322 this._defaults = defaults;1323 this._name = pluginName;1324 this.init();1325 1326 }1327 1328 // Avoid Plugin.prototype conflicts1329 $.extend( Plugin.prototype, {1330 init: function() {1331 1332 this.addScrollbar();1333 this.addEvents();1334 this.onResize();1335 },1336 addScrollbar: function() {1337 $( this.element ).addClass(this.settings.containerClass);1338 this.wrapper = $("<div class='" + this.settings.contentClass + "' />");1339 this.wrapper.append($( this.element ).contents());1340 $( this.element ).append( this.wrapper );1341 1342 this.scollbarContainer = $("<div class='" + this.settings.scrollbarContainerClass + "' />");1343 this.scrollBar = $("<div class='" + this.settings.scrollBarClass + "' />");1344 this.scollbarContainer.append(this.scrollBar);1345 $( this.element ).prepend(this.scollbarContainer);1346 },1347 addEvents: function(){1348 1349 this.wrapper.on("scroll." + pluginName, $.proxy(this.onScroll, this) );1350 $(window).on("resize." + pluginName, $.proxy(this.onResize, this) );1351 1352 this.scrollBar.on('mousedown.' + pluginName, $.proxy(this.onMousedown, this));1353 this.scrollBar.on('touchstart.' + pluginName, $.proxy(this.onTouchstart, this));1354 },1355 1356 onTouchstart: function(ev){1357 var me = this;1358 1359 ev.preventDefault();1360 var y = me.scrollBar[0].offsetTop;1361 1362 var onMove = function(end){1363 var delta = end.touches[0].pageY - ev.touches[0].pageY;1364 me.scrollBar[0].style.top = Math.min(me.scollbarContainer[0].clientHeight - me.scrollBar[0].clientHeight, Math.max(0, y + delta)) + 'px';1365 me.wrapper[0].scrollTop = (me.wrapper[0].scrollHeight * me.scrollBar[0].offsetTop / me.scollbarContainer[0].clientHeight);1366 };1367 1368 $(document).on("touchmove." + pluginName, onMove);1369 $(document).on("touchend." + pluginName, function(){1370 $(document).off("touchmove." + pluginName);1371 $(document).off("touchend." + pluginName);1372 });1373 },1374 1375 onMousedown: function(ev){1376 var me = this;1377 1378 ev.preventDefault();1379 var y = me.scrollBar[0].offsetTop;1380 1381 var onMove = function(end){1382 var delta = end.pageY - ev.pageY;1383 me.scrollBar[0].style.top = Math.min(me.scollbarContainer[0].clientHeight - me.scrollBar[0].clientHeight, Math.max(0, y + delta)) + 'px';1384 me.wrapper[0].scrollTop = (me.wrapper[0].scrollHeight * me.scrollBar[0].offsetTop / me.scollbarContainer[0].clientHeight);1385 };1386 1387 $(document).on("mousemove." + pluginName, onMove);1388 $(document).on("mouseup." + pluginName, function(){1389 $(document).off("mousemove." + pluginName);1390 $(document).off("mouseup." + pluginName);1391 });1392 },1393 1394 onResize: function(){1395 1396 this.wrapper.css("max-height", $(this.element).height());1397 1398 var wrapper_client_height = this.wrapper[0].clientHeight;1399 1400 this.scrollBar.css("height", this.scollbarContainer[0].clientHeight * wrapper_client_height / this.wrapper[0].scrollHeight + "px");1401 if(this.scollbarContainer[0].clientHeight <= this.scrollBar[0].clientHeight){1402 $( this.element ).addClass(this.settings.containerNoScrollClass);1403 } else {1404 $( this.element ).removeClass(this.settings.containerNoScrollClass);1405 }1406 1407 this.onScroll();1408 },1409 1410 onScroll: function(){1411 1412 this.scrollBar.css("top", Math.min(this.scollbarContainer[0].clientHeight - this.scrollBar[0].clientHeight, this.scollbarContainer[0].clientHeight * this.wrapper[0].scrollTop / this.wrapper[0].scrollHeight) + "px");1413 1414 }1415 } );1416 1417 // A really lightweight plugin wrapper around the constructor,1418 // preventing against multiple instantiations1419 $.fn[pluginName] = function( options ) {1420 return this.each( function() {1421 if ( !$.data( this, "plugin_" + pluginName ) ) {1422 $.data( this, "plugin_" +1423 pluginName, new Plugin( this, options ) );1424 }1425 } );1426 };1427 1428 } )( jQuery, window, document );1429 /*!1430 * swiped-events.js - v1.1.61431 * Pure JavaScript swipe events1432 * https://github.com/john-doherty/swiped-events1433 * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element1434 * @author John Doherty <www.johndoherty.info>1435 * @license MIT1436 */1437 !function(t,e){"use strict";"function"!=typeof t.CustomEvent&&(t.CustomEvent=function(t,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var a=e.createEvent("CustomEvent");return a.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),a},t.CustomEvent.prototype=t.Event.prototype),e.addEventListener("touchstart",function(t){if("true"===t.target.getAttribute("data-swipe-ignore"))return;s=t.target,r=Date.now(),n=t.touches[0].clientX,a=t.touches[0].clientY,u=0,i=0},!1),e.addEventListener("touchmove",function(t){if(!n||!a)return;var e=t.touches[0].clientX,r=t.touches[0].clientY;u=n-e,i=a-r},!1),e.addEventListener("touchend",function(t){if(s!==t.target)return;var e=parseInt(l(s,"data-swipe-threshold","20"),10),o=parseInt(l(s,"data-swipe-timeout","500"),10),c=Date.now()-r,d="",p=t.changedTouches||t.touches||[];Math.abs(u)>Math.abs(i)?Math.abs(u)>e&&c<o&&(d=u>0?"swiped-left":"swiped-right"):Math.abs(i)>e&&c<o&&(d=i>0?"swiped-up":"swiped-down");if(""!==d){var b={dir:d.replace(/swiped-/,""),touchType:(p[0]||{}).touchType||"direct",xStart:parseInt(n,10),xEnd:parseInt((p[0]||{}).clientX||-1,10),yStart:parseInt(a,10),yEnd:parseInt((p[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:b})),s.dispatchEvent(new CustomEvent(d,{bubbles:!0,cancelable:!0,detail:b}))}n=null,a=null,r=null},!1);var n=null,a=null,u=null,i=null,r=null,s=null;function l(t,n,a){for(;t&&t!==e.documentElement;){var u=t.getAttribute(n);if(u)return u;t=t.parentNode}return a}}(window,document); -
orderable/trunk/assets/frontend/js/main.min.js
r2709284 r2745279 1 !function(o, s){"use strict";var n={on_ready:function(){n.cache(),n.watch()},cache:function(){n.vars={classes:{parent:"orderable-accordion",link:"orderable-accordion__item-link",content:"orderable-accordion__item-content",link_active:"orderable-accordion__item-link--active",content_active:"orderable-accordion__item-content--active"}}},watch:function(){o(s.body).on("click","."+n.vars.classes.link,function(e){e.preventDefault();var e=o(this),r=e.closest("."+n.vars.classes.parent),t=e.attr("href"),t=o(t),a=e.hasClass(n.vars.classes.link_active);r.find("."+n.vars.classes.link).removeClass(n.vars.classes.link_active),r.find("."+n.vars.classes.content).removeClass(n.vars.classes.content_active),a||(e.addClass(n.vars.classes.link_active),t.addClass(n.vars.classes.content_active)),o(s.body).trigger("orderable-accordion.toggled",{link:e,content:t})}),o(s.body).on("orderable-scrollbar.created",function(e,r){var t=o(".orderable-drawer ."+n.vars.classes.link_active);t.length<=0||(t=(r=r.content).scrollTop()-r.offset().top+t.offset().top,r.scrollTop(t))})}};o(s).ready(n.on_ready)}(jQuery,document),function(n,i){"use strict";var t={debounce:function(r,t=700){let a;return(...e)=>{clearTimeout(a),a=setTimeout(()=>{r.apply(this,e)},t)}},allow_only_numbers:function(e){var r=String.fromCharCode(e.which);/^\d+$/.test(r)||e.preventDefault()},on_change_quantity:function(e){const r=n(e.currentTarget);var e=r.data("orderable-product-id"),t=r.data("orderable-cart-item-key"),a=parseInt(r.text());jQuery.post(orderable_vars.ajax_url,{action:"orderable_cart_quantity",cart_item_key:t,product_id:e,quantity:a},function(e){e&&(n(i.body).trigger("added_to_cart",[e.fragments,e.cart_hash,r]),n(i.body).trigger("orderable-drawer.quantity-updated"))})},on_ready:function(){t.cache(),t.watch(),n(i.body).on("keypress",".orderable-quantity-roller__quantity",t.allow_only_numbers),n(".orderable-drawer__cart").on("input",".orderable-quantity-roller__quantity",t.debounce(t.on_change_quantity)),orderable_vars&&!orderable_vars.woocommerce_enable_ajax_add_to_cart&&n(i.body).off("click",".add_to_cart_button")},cache:function(){t.vars={classes:{overlay:"orderable-drawer-overlay",drawer:"orderable-drawer",drawer_cart:"orderable-drawer__cart",drawer_html:"orderable-drawer__html",overlay_open:"orderable-drawer-overlay--open",drawer_open:"orderable-drawer--open",drawer_open_body:"orderable-drawer-open"}},t.elements={body:n("body"),overlay:n("."+t.vars.classes.overlay),drawer:n("."+t.vars.classes.drawer),drawer_cart:n("."+t.vars.classes.drawer_cart),drawer_html:n("."+t.vars.classes.drawer_html),floating_cart_button_class:".orderable-floating-cart__button"}},watch:function(){var e,r;void 0!==t.elements.drawer&&(n(i.body).on("orderable-drawer.open",t.open),n(i.body).on("orderable-drawer.close",t.close),n(i.body).on("click",t.elements.floating_cart_button_class,function(){n(i.body).trigger("orderable-drawer.open",{show_cart:!0})}),n(i.body).on("orderable-increase-quantity",t.cart.click_increase_decrease_quantity),n(i.body).on("orderable-decrease-quantity",t.cart.click_increase_decrease_quantity),e=i.querySelector("body:not( .rtl ) .orderable-drawer"),r=i.querySelector("body.rtl .orderable-drawer"),e&&e.addEventListener("swiped-right",function(e){t.close()}),r&&r.addEventListener("swiped-left",function(e){t.close()}))},open:function(e,r){r.html=r.html||!1,r.show_cart=r.show_cart||!1,t.elements.drawer_html.hide(),t.elements.drawer_cart.hide(),r.html&&(t.elements.drawer_html.html(r.html),t.elements.drawer_html.show()),r.show_cart&&(t.elements.drawer_html.html(""),t.elements.drawer_cart.show()),t.elements.overlay.addClass(t.vars.classes.overlay_open),t.elements.drawer.addClass(t.vars.classes.drawer_open),t.elements.body.addClass(t.vars.classes.drawer_open_body),n(i.body).trigger("orderable-drawer.opened",r)},close:function(){t.elements.overlay.removeClass(t.vars.classes.overlay_open),t.elements.drawer.removeClass(t.vars.classes.drawer_open),t.elements.body.removeClass(t.vars.classes.drawer_open_body),t.elements.drawer_html.html(""),n(i.body).trigger("orderable-drawer.closed")},cart:{click_increase_decrease_quantity:function(e,r){var t=r.data("orderable-product-id"),a=r.data("orderable-cart-item-key"),o=r.data("orderable-trigger"),s=parseInt(r.data("orderable-quantity"));jQuery.post(orderable_vars.ajax_url,{action:"orderable_cart_quantity",cart_item_key:a,product_id:t,quantity:"increase-quantity"===o?s+1:s-1},function(e){e&&(n(i.body).trigger("added_to_cart",[e.fragments,e.cart_hash,r]),n(i.body).trigger("orderable-drawer.quantity-updated"))})}}};n(i).ready(t.on_ready)}(jQuery,document),function(i,l){"use strict";var d={on_ready:function(){d.cache(),d.watch()},cache:function(){d.vars={classes:{clickable_product:"orderable-product--add-to-cart ",add_to_order_button:"orderable-product__add-to-order",product_messages:"orderable-product__messages",product_price:"orderable-product__actions-price",invalid_field:"orderable-field--invalid",option_select_td:"orderable-product__option-select",button_loading:"orderable-button--loading",out_of_stock:"orderable-button--out-of-stock"},parent_price:null},d.elements={}},watch:function(){i(l.body).on("orderable-drawer.opened",d.init_product_options),i(l.body).on("orderable-add-to-cart",d.click_add_to_order),i(l.body).on("orderable-product-options",d.click_add_to_order),i(l.body).on("orderable-view-product",d.view_product),i(l.body).on("mouseenter mouseleave","."+d.vars.classes.clickable_product,d.simulate_add_to_order_hover)},simulate_add_to_order_hover:function(e){i(this).find("."+d.vars.classes.add_to_order_button).toggleClass("orderable-button--hover","mouseenter"===e.type)},click_add_to_order:function(e,r){var t=(r=void 0!==r?r:i(this)).is("button")?r:r.find("."+d.vars.classes.add_to_order_button),r=t.data("orderable-trigger"),a=t.data("orderable-product-id"),o=t.data("orderable-variation-id"),s=t.data("orderable-variation-attributes"),n={action:r};t.hasClass(d.vars.classes.button_loading)||t.hasClass(d.vars.classes.out_of_stock)||(t.addClass(d.vars.classes.button_loading),"add-to-cart"===r?d.add_to_cart({product_id:a,variation_id:o,attributes:s},function(e){n.show_cart=!0,n.response=e,i(l.body).trigger("orderable-drawer.open",n),t.removeClass(d.vars.classes.button_loading)}):"product-options"===r&&d.get_product_options({product_id:a,focus:t.data("orderable-focus")},function(e){n.html=e.html,i(l.body).trigger("orderable-drawer.open",n),t.removeClass(d.vars.classes.button_loading)}))},view_product:function(e,r){var t=r.data("orderable-product-id"),a={action:"product-options"};d.get_product_options({product_id:t,focus:r.data("orderable-focus")},function(e){a.html=e.html,i(l.body).trigger("orderable-drawer.open",a)})},add_to_cart:function(e,r){var t;void 0!==e.product_id&&(e={action:"orderable_add_to_cart",product_id:e.product_id,variation_id:e.variation_id||!1,attributes:e.attributes||!1},i(".orderable-product-fields-group").length&&(t=jQuery(".orderable-product-fields-group :input").serializeArray(),t=d.convert_to_flat_object(t),jQuery.isEmptyObject(t)||(e=Object.assign(e,t))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&(i(l.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),"function"==typeof r&&r(e))}))},convert_to_flat_object:function(e){var a={};return e.forEach(function(e){var r="[]"===e.name.substr(-2)||Array.isArray(e.name),t=r?e.name.substr(0,e.name.length-2):e.name;r?(a[t]=void 0===a[t]?[]:a[t],a[t].push(e.value)):a[t]=e.value}),a},get_product_options:function(e,r){void 0!==e.product_id&&(e.action="orderable_get_product_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof r&&r(e.data)}))},init_product_options:function(e,r){var t,a,o;void 0!==r.action&&"product-options"===r.action&&(t=i(r=".orderable-drawer .orderable-product__options input, .orderable-drawer .orderable-product__options select"),d.vars.parent_price=i(".orderable-drawer .orderable-product__actions-price").html(),d.product_options_change(t),d.update_button_state(),a=d.debounce(d.update_button_state,500),o=d.debounce(d.product_options_change,500),i(l).on("change keyup",r,function(){o(t),a()}))},product_options_change:function(e){var r=i(".orderable-drawer .orderable-product__add-to-order"),t=d.check_options(e),a=r.data("orderable-product-type");r.attr("data-orderable-trigger","add-to-cart"),i("."+d.vars.classes.product_messages).html(""),"variable"===a&&(t?(a=d.check_variation(e),d.set_variation(r,a)):d.clear_variation(r))},check_options:function(e){if(e.length<=0)return!1;var t=!0;return e.each(function(e,r){i(r).hasClass("orderable-input--validate")&&(""===i(r).val()?(i(r).addClass(d.vars.classes.invalid_field),t=!1):i(r).removeClass(d.vars.classes.invalid_field))}),t},check_variation:function(e){var r=e.closest(".orderable-drawer"),r=i.parseJSON(r.find(".orderable-product__variations").text()),e=d.serialize_object(e),r=d.find_matching_variations(r,e);if(d.is_empty(r))return!1;r=r.shift();return r.attributes=e,r.attributes_json=JSON.stringify(e),void 0!==r&&r},set_variation:function(e,r){var t=r.variation_id||"",a=r.attributes_json||"",o=r.price_html||d.vars.parent_price,s="";r&&""!==r.availability_html&&(s=r.availability_html),r&&!r.is_in_stock&&(s="<p>"+orderable_vars.i18n.out_of_stock+"</p>"),r&&!r.is_purchasable&&(s="<p>"+orderable_vars.i18n.unavailable+"</p>"),!1===r&&(s="<p>"+orderable_vars.i18n.no_exist+"</p>"),!r||r.is_purchasable&&r.is_in_stock||(a=t=""),""!==s&&i("."+d.vars.classes.product_messages).html(s),e.data("orderable-variation-id",t),e.data("orderable-variation-attributes",a),i(".orderable-drawer .orderable-product__actions-price").html(o),e.trigger("orderable_variation_set",{variation:r,variation_id:t,attributes:a,price:o})},clear_variation:function(e){d.set_variation(e,""),d.vars.parent_price&&i(".orderable-drawer .orderable-product__actions-price").html(d.vars.parent_price)},find_matching_variations:function(e,r){for(var t=[],a=0;a<e.length;a++){var o=e[a];d.is_matching_variation(o.attributes,r)&&t.push(o)}return t},is_matching_variation:function(e,r){var t,a,o,s=!0;for(t in e)e.hasOwnProperty(t)&&(a=e[t],o=r[t],void 0!==a&&void 0!==o&&0!==a.length&&0!==o.length&&a!==o&&(s=!1));return s},is_empty:function(e){return void 0===e||!1===e||e.length<=0||!e},serialize_object:function(e){for(var r=e.serializeArray(),t={},a=0;a<r.length;a++)t[r[a].name]=r[a].value;return t},update_button_state:function(){setTimeout(function(){var e=i(".orderable-drawer .orderable-product__add-to-order"),r=i(".orderable-drawer__html ."+d.vars.classes.invalid_field).length,t=!0;"variable"===e.data("orderable-product-type")&&(t=""!==e.data("orderable-variation-id")),e.prop("disabled",r||!t)},50)},debounce:function(a,o,s){var n;return function(){var e=this,r=arguments,t=s&&!n;clearTimeout(n),n=setTimeout(function(){n=null,s||a.apply(e,r)},o),t&&a.apply(e,r)}}};i(l).ready(d.on_ready)}(jQuery,document),function(o,s){"use strict";var n={on_ready:function(){n.cache(),n.watch()},cache:function(){n.vars={top:{}},n.elements={}},watch:function(){o(s.body).on("orderable-drawer.opened",n.trigger),o(s.body).on("orderable-tabs.changed",n.trigger),o(s.body).on("orderable-accordion.toggled",n.trigger),o(s.body).on("wc_fragments_loaded",n.trigger)},trigger:function(){o(".orderable-sb-container").each(function(e,r){var t,r=o(r),a=r.data("orderable-scroll-id");n.has_scrollbar(r)||(r.scrollBox({containerClass:"orderable-sb-container",containerNoScrollClass:"orderable-sb-container-noscroll",contentClass:"orderable-sb-content",scrollbarContainerClass:"orderable-sb-scrollbar-container",scrollBarClass:"orderable-sb-scrollbar"}),0<(t=r.find(".orderable-sb-content")).length&&(t.on("scroll.scrollBox",n.log_top_position),void 0!==n.vars.top[a]&&t.scrollTop(n.vars.top[a])),o(s.body).trigger("orderable-scrollbar.created",{element:r,content:t}))}),o(window).trigger("resize.scrollBox")},has_scrollbar:function(e){return 0<e.find(".orderable-sb-content").length},log_top_position:function(e){var r=o(e.currentTarget).closest(".orderable-sb-container").data("orderable-scroll-id");n.vars.top[r]=o(e.currentTarget).scrollTop()}};o(s).ready(n.on_ready)}(jQuery,document),function(n,e){"use strict";var r={on_ready:function(){r.watch()},watch:function(){n(e.body).on("orderable-show-lookup-services",function(e,r){var t=r.closest(".orderable-services-selector").find(".orderable-services-selector__lookup");r.hide(),t.show()}),n(e.body).on("orderable-lookup-services",function(e,r){var t=r.closest(".orderable-services-selector"),a=t.find(".orderable-services-selector__lookup-message"),o=t.find(".orderable-services-selector__selected-change"),s=t.find(".orderable-services-selector__lookup-city").val(),t=t.find(".orderable-services-selector__lookup-postcode").val(),r=r.data("orderable-service");jQuery.post(orderable_vars.ajax_url,{action:"orderable_lookup_service",postcode:t,city:s,service:r},function(e){e.success?(a.html(""),o.show(),void 0!==e.data.fragments&&n.each(e.data.fragments,function(e,r){n(e).html(r)}),console.log(e)):a.html("<p>"+e.data.message+"</p>")})})}};n(e).ready(r.on_ready)}(jQuery,document),function(n,i){"use strict";var l={on_ready:function(){l.cache(),l.watch(),l.toggle_scroll()},on_resize:function(){l.toggle_scroll()},cache:function(){l.vars={classes:{tabs:"orderable-tabs",tabs_list:"orderable-tabs__list",tab_items:"orderable-tabs__item",tab_item_active:"orderable-tabs__item--active",tab_links:"orderable-tabs__link",tab_arrow:"orderable-tabs__arrow"},dragging:!1},l.elements={}},watch:function(){n("body").on("touchstart",function(){l.vars.dragging=!1}).on("touchmove",function(){l.vars.dragging=!0}),n(i.body).on("click mouseup touchend","."+l.vars.classes.tab_links,function(e){var r,t,a,o,s;l.vars.dragging||(e.preventDefault(),r=(e=n(this)).attr("href"),t=e.closest("."+l.vars.classes.tab_items),a=(s=e.closest("."+l.vars.classes.tabs)).find("."+l.vars.classes.tabs_list),o=s.find("."+l.vars.classes.tab_items),s=s.data("orderable-tabs"),s=(e=e.closest(s.wrapper)).find(s.sections),e=e.find(r),s.hide(),e.show(),o.removeClass(l.vars.classes.tab_item_active),t.addClass(l.vars.classes.tab_item_active),a.animate({scrollLeft:a.scrollLeft()+t.position().left}),n(i.body).trigger("orderable-tabs.changed",{tab:t}))}),n("."+l.vars.classes.tabs_list).on("scroll",function(e){0<n(this).scrollLeft()&&n("."+l.vars.classes.tab_arrow).fadeOut()}),n("."+l.vars.classes.tabs_list).on("wheel DOMMouseScroll mousewheel touchmove",function(){n(this).stop()}),n(i).on("click","."+l.vars.classes.tab_arrow,function(e){e.preventDefault();var e=n(this),r=e.parent(),t=r.find("."+l.vars.classes.tabs_list);t.animate({scrollLeft:t.scrollLeft()+.5*r.width()}),e.fadeOut()})},toggle_scroll:function(){n("."+l.vars.classes.tabs).each(function(e,r){var t=n(this),a=t.data("orderable-tabs"),t=t.closest(a.wrapper),a=t.find("."+l.vars.classes.tabs_list),o=t.find("."+l.vars.classes.tab_arrow);t.outerWidth()<a[0].scrollWidth?o.show():o.hide()})}};n(i).ready(l.on_ready),n(window).on("resize",l.on_resize)}(jQuery,document);var orderable_timings={};!function(i,a){"use strict";orderable_timings={on_ready:function(){orderable_timings.watch(),orderable_timings.set_date_and_time()},set_date_and_time:function(){var e,r=a.querySelector("#orderable-date"),t="";r&&(e=r.options[r.selectedIndex])&&!(t=e.value)&&r.options[r.selectedIndex+1]&&(r.options[r.selectedIndex+1].selected=!0,i(r).change()),"asap"!==t&&(e="",(r=a.querySelector("#orderable-time"))&&(e=r.options[r.selectedIndex])&&r.options[r.selectedIndex+1]&&(e.value||(r.options[r.selectedIndex+1].selected=!0,i(r).change())))},restore:function(){var e=orderable_timings.get_timings();e&&e.date&&(i(".orderable-order-timings__date").val(e.date),i(".orderable-order-timings__date").change(),e.time&&(i(".orderable-order-timings__time").val(e.time),i(".orderable-order-timings__time").change()))},watch:function(){i(a.body).on("wc_fragments_refreshed",function(){orderable_timings.restore(),orderable_timings.set_date_and_time()}),i(a.body).on("updated_checkout",function(){orderable_timings.restore(),orderable_timings.set_date_and_time()}),i(a.body).on("change",".orderable-order-timings__date",function(e){var r=i(this).find("option:selected").data("orderable-slots"),t=i(".orderable-order-timings--time"),a=i(".orderable-order-timings__time"),o=a.find("option").first(),s=a.find('option[value="asap"]').first(),n=orderable_timings.get_timings();if(n.date=i(".orderable-order-timings__date").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(n)),a.html(o),s&&a.append(s),!r)return a.prop("disabled",!0),void t.hide();"all-day"===r[0].value?(t.hide(),a.prop("disabled",!0)):(a.prop("disabled",!1),t.show(),i.each(r,function(e,r){a.append(i("<option />").attr("value",r.value).text(r.formatted))}))}),i(a.body).on("change",".orderable-order-timings__time",function(e){var r=orderable_timings.get_timings();r.time=i(".orderable-order-timings__time").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(r))})},get_timings:function(){return JSON.parse(window.localStorage.getItem("orderable_timings"))||{}}},i(a).ready(orderable_timings.on_ready)}(jQuery,document),function(t,a){"use strict";var e={on_ready:function(){e.watch()},watch:function(){t(a.body).on("click","[data-orderable-trigger]",e.trigger)},trigger:function(e){e.stopImmediatePropagation();var e=t(this),r=e.data("orderable-trigger");t(a.body).trigger("orderable-"+r,[e])}};t(a).ready(e.on_ready)}(jQuery,document),function(o,e,s){"use strict";var n="scrollBox",t={containerClass:"sb-container",containerNoScrollClass:"sb-container-noscroll",contentClass:"sb-content",scrollbarContainerClass:"sb-scrollbar-container",scrollBarClass:"sb-scrollbar"};function r(e,r){this.element=e,this.settings=o.extend({},t,r),this._defaults=t,this._name=n,this.init()}o.extend(r.prototype,{init:function(){this.addScrollbar(),this.addEvents(),this.onResize()},addScrollbar:function(){o(this.element).addClass(this.settings.containerClass),this.wrapper=o("<div class='"+this.settings.contentClass+"' />"),this.wrapper.append(o(this.element).contents()),o(this.element).append(this.wrapper),this.scollbarContainer=o("<div class='"+this.settings.scrollbarContainerClass+"' />"),this.scrollBar=o("<div class='"+this.settings.scrollBarClass+"' />"),this.scollbarContainer.append(this.scrollBar),o(this.element).prepend(this.scollbarContainer)},addEvents:function(){this.wrapper.on("scroll."+n,o.proxy(this.onScroll,this)),o(e).on("resize."+n,o.proxy(this.onResize,this)),this.scrollBar.on("mousedown."+n,o.proxy(this.onMousedown,this)),this.scrollBar.on("touchstart."+n,o.proxy(this.onTouchstart,this))},onTouchstart:function(r){var t=this,a=(r.preventDefault(),t.scrollBar[0].offsetTop);o(s).on("touchmove."+n,function(e){e=e.touches[0].pageY-r.touches[0].pageY;t.scrollBar[0].style.top=Math.min(t.scollbarContainer[0].clientHeight-t.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",t.wrapper[0].scrollTop=t.wrapper[0].scrollHeight*t.scrollBar[0].offsetTop/t.scollbarContainer[0].clientHeight}),o(s).on("touchend."+n,function(){o(s).off("touchmove."+n),o(s).off("touchend."+n)})},onMousedown:function(r){var t=this,a=(r.preventDefault(),t.scrollBar[0].offsetTop);o(s).on("mousemove."+n,function(e){e=e.pageY-r.pageY;t.scrollBar[0].style.top=Math.min(t.scollbarContainer[0].clientHeight-t.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",t.wrapper[0].scrollTop=t.wrapper[0].scrollHeight*t.scrollBar[0].offsetTop/t.scollbarContainer[0].clientHeight}),o(s).on("mouseup."+n,function(){o(s).off("mousemove."+n),o(s).off("mouseup."+n)})},onResize:function(){this.wrapper.css("max-height",o(this.element).height());var e=this.wrapper[0].clientHeight;this.scrollBar.css("height",this.scollbarContainer[0].clientHeight*e/this.wrapper[0].scrollHeight+"px"),this.scollbarContainer[0].clientHeight<=this.scrollBar[0].clientHeight?o(this.element).addClass(this.settings.containerNoScrollClass):o(this.element).removeClass(this.settings.containerNoScrollClass),this.onScroll()},onScroll:function(){this.scrollBar.css("top",Math.min(this.scollbarContainer[0].clientHeight-this.scrollBar[0].clientHeight,this.scollbarContainer[0].clientHeight*this.wrapper[0].scrollTop/this.wrapper[0].scrollHeight)+"px")}}),o.fn[n]=function(e){return this.each(function(){o.data(this,"plugin_"+n)||o.data(this,"plugin_"+n,new r(this,e))})}}(jQuery,window,document),function(e,o){"use strict";"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,r){r=r||{bubbles:!1,cancelable:!1,detail:void 0};var t=o.createEvent("CustomEvent");return t.initCustomEvent(e,r.bubbles,r.cancelable,r.detail),t},e.CustomEvent.prototype=e.Event.prototype),o.addEventListener("touchstart",function(e){"true"!==e.target.getAttribute("data-swipe-ignore")&&(c=e.target,d=Date.now(),s=e.touches[0].clientX,n=e.touches[0].clientY,l=i=0)},!1),o.addEventListener("touchmove",function(e){var r;s&&n&&(r=e.touches[0].clientX,e=e.touches[0].clientY,i=s-r,l=n-e)},!1),o.addEventListener("touchend",function(e){var r,t,a,o;c===e.target&&(o=parseInt(u(c,"data-swipe-threshold","20"),10),r=parseInt(u(c,"data-swipe-timeout","500"),10),t=Date.now()-d,a="",e=e.changedTouches||e.touches||[],Math.abs(i)>Math.abs(l)?Math.abs(i)>o&&t<r&&(a=0<i?"swiped-left":"swiped-right"):Math.abs(l)>o&&t<r&&(a=0<l?"swiped-up":"swiped-down"),""!==a&&(o={dir:a.replace(/swiped-/,""),touchType:(e[0]||{}).touchType||"direct",xStart:parseInt(s,10),xEnd:parseInt((e[0]||{}).clientX||-1,10),yStart:parseInt(n,10),yEnd:parseInt((e[0]||{}).clientY||-1,10)},c.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:o})),c.dispatchEvent(new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:o}))),d=n=s=null)},!1);var s=null,n=null,i=null,l=null,d=null,c=null;function u(e,r,t){for(;e&&e!==o.documentElement;){var a=e.getAttribute(r);if(a)return a;e=e.parentNode}return t}}(window,document);1 !function(o,e,s){"use strict";var n="scrollBox",r={containerClass:"sb-container",containerNoScrollClass:"sb-container-noscroll",contentClass:"sb-content",scrollbarContainerClass:"sb-scrollbar-container",scrollBarClass:"sb-scrollbar"};function t(e,t){this.element=e,this.settings=o.extend({},r,t),this._defaults=r,this._name=n,this.init()}o.extend(t.prototype,{init:function(){this.addScrollbar(),this.addEvents(),this.onResize()},addScrollbar:function(){o(this.element).addClass(this.settings.containerClass),this.wrapper=o("<div class='"+this.settings.contentClass+"' />"),this.wrapper.append(o(this.element).contents()),o(this.element).append(this.wrapper),this.scollbarContainer=o("<div class='"+this.settings.scrollbarContainerClass+"' />"),this.scrollBar=o("<div class='"+this.settings.scrollBarClass+"' />"),this.scollbarContainer.append(this.scrollBar),o(this.element).prepend(this.scollbarContainer)},addEvents:function(){this.wrapper.on("scroll."+n,o.proxy(this.onScroll,this)),o(e).on("resize."+n,o.proxy(this.onResize,this)),this.scrollBar.on("mousedown."+n,o.proxy(this.onMousedown,this)),this.scrollBar.on("touchstart."+n,o.proxy(this.onTouchstart,this))},onTouchstart:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(s).on("touchmove."+n,function(e){e=e.touches[0].pageY-t.touches[0].pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(s).on("touchend."+n,function(){o(s).off("touchmove."+n),o(s).off("touchend."+n)})},onMousedown:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(s).on("mousemove."+n,function(e){e=e.pageY-t.pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(s).on("mouseup."+n,function(){o(s).off("mousemove."+n),o(s).off("mouseup."+n)})},onResize:function(){this.wrapper.css("max-height",o(this.element).height());var e=this.wrapper[0].clientHeight;this.scrollBar.css("height",this.scollbarContainer[0].clientHeight*e/this.wrapper[0].scrollHeight+"px"),this.scollbarContainer[0].clientHeight<=this.scrollBar[0].clientHeight?o(this.element).addClass(this.settings.containerNoScrollClass):o(this.element).removeClass(this.settings.containerNoScrollClass),this.onScroll()},onScroll:function(){this.scrollBar.css("top",Math.min(this.scollbarContainer[0].clientHeight-this.scrollBar[0].clientHeight,this.scollbarContainer[0].clientHeight*this.wrapper[0].scrollTop/this.wrapper[0].scrollHeight)+"px")}}),o.fn[n]=function(e){return this.each(function(){o.data(this,"plugin_"+n)||o.data(this,"plugin_"+n,new t(this,e))})}}(jQuery,window,document),function(e,o){"use strict";"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var r=o.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r},e.CustomEvent.prototype=e.Event.prototype),o.addEventListener("touchstart",function(e){"true"!==e.target.getAttribute("data-swipe-ignore")&&(c=e.target,l=Date.now(),s=e.touches[0].clientX,n=e.touches[0].clientY,d=i=0)},!1),o.addEventListener("touchmove",function(e){var t;s&&n&&(t=e.touches[0].clientX,e=e.touches[0].clientY,i=s-t,d=n-e)},!1),o.addEventListener("touchend",function(e){var t,r,a,o;c===e.target&&(o=parseInt(u(c,"data-swipe-threshold","20"),10),t=parseInt(u(c,"data-swipe-timeout","500"),10),r=Date.now()-l,a="",e=e.changedTouches||e.touches||[],Math.abs(i)>Math.abs(d)?Math.abs(i)>o&&r<t&&(a=0<i?"swiped-left":"swiped-right"):Math.abs(d)>o&&r<t&&(a=0<d?"swiped-up":"swiped-down"),""!==a&&(o={dir:a.replace(/swiped-/,""),touchType:(e[0]||{}).touchType||"direct",xStart:parseInt(s,10),xEnd:parseInt((e[0]||{}).clientX||-1,10),yStart:parseInt(n,10),yEnd:parseInt((e[0]||{}).clientY||-1,10)},c.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:o})),c.dispatchEvent(new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:o}))),l=n=s=null)},!1);var s=null,n=null,i=null,d=null,l=null,c=null;function u(e,t,r){for(;e&&e!==o.documentElement;){var a=e.getAttribute(t);if(a)return a;e=e.parentNode}return r}}(window,document),function(o,s){"use strict";var n={on_ready:function(){n.cache(),n.watch()},cache:function(){n.vars={classes:{parent:"orderable-accordion",link:"orderable-accordion__item-link",content:"orderable-accordion__item-content",link_active:"orderable-accordion__item-link--active",content_active:"orderable-accordion__item-content--active"}}},watch:function(){o(s.body).on("click","."+n.vars.classes.link,function(e){e.preventDefault();var e=o(this),t=e.closest("."+n.vars.classes.parent),r=e.attr("href"),r=o(r),a=e.hasClass(n.vars.classes.link_active);t.find("."+n.vars.classes.link).removeClass(n.vars.classes.link_active),t.find("."+n.vars.classes.content).removeClass(n.vars.classes.content_active),a||(e.addClass(n.vars.classes.link_active),r.addClass(n.vars.classes.content_active)),o(s.body).trigger("orderable-accordion.toggled",{link:e,content:r})}),o(s.body).on("orderable-scrollbar.created",function(e,t){var r=o(".orderable-drawer ."+n.vars.classes.link_active);r.length<=0||(r=(t=t.content).scrollTop()-t.offset().top+r.offset().top,t.scrollTop(r))})}};o(s).ready(n.on_ready)}(jQuery,document),function(o,s){"use strict";var r={debounce:function(t,r=700){let a;return(...e)=>{clearTimeout(a),a=setTimeout(()=>{t.apply(this,e)},r)}},allow_only_numbers:function(e){var t=String.fromCharCode(e.which);/^\d+$/.test(t)||e.preventDefault()},on_change_quantity:function(e){const t=o(e.currentTarget);var e=t.data("orderable-product-id"),r=t.data("orderable-cart-item-key"),a=parseInt(t.text());jQuery.post(orderable_vars.ajax_url,{action:"orderable_cart_quantity",cart_item_key:r,product_id:e,quantity:a},function(e){e&&(o(s.body).trigger("added_to_cart",[e.fragments,e.cart_hash,t]),o(s.body).trigger("orderable-drawer.quantity-updated"))})},on_ready:function(){r.cache(),r.watch(),o(s.body).on("keypress",".orderable-quantity-roller__quantity",r.allow_only_numbers),o(".orderable-drawer__cart").on("input",".orderable-quantity-roller__quantity",r.debounce(r.on_change_quantity)),orderable_vars&&!orderable_vars.woocommerce_enable_ajax_add_to_cart&&o(s.body).off("click",".add_to_cart_button")},cache:function(){r.vars={classes:{overlay:"orderable-drawer-overlay",drawer:"orderable-drawer",drawer_cart:"orderable-drawer__cart",drawer_html:"orderable-drawer__html",overlay_open:"orderable-drawer-overlay--open",drawer_open:"orderable-drawer--open",drawer_open_body:"orderable-drawer-open"}},r.elements={body:o("body"),overlay:o("."+r.vars.classes.overlay),drawer:o("."+r.vars.classes.drawer),drawer_cart:o("."+r.vars.classes.drawer_cart),drawer_html:o("."+r.vars.classes.drawer_html),floating_cart_button_class:".orderable-floating-cart__button"}},watch:function(){var e,t;void 0!==r.elements.drawer&&(o(s.body).on("orderable-drawer.open",r.open),o(s.body).on("orderable-drawer.close",r.close),o(s.body).on("click",r.elements.floating_cart_button_class,function(){o(s.body).trigger("orderable-drawer.open",{show_cart:!0})}),o(s.body).on("orderable-increase-quantity",r.cart.handle_quantity_change_by_button),o(s.body).on("orderable-decrease-quantity",r.cart.handle_quantity_change_by_button),e=r.debounce(r.cart.click_increase_decrease_quantity),o(s.body).on("orderable-increase-quantity",e),o(s.body).on("orderable-decrease-quantity",e),e=s.querySelector("body:not( .rtl ) .orderable-drawer"),t=s.querySelector("body.rtl .orderable-drawer"),e&&e.addEventListener("swiped-right",function(e){r.close()}),t&&t.addEventListener("swiped-left",function(e){r.close()}))},open:function(e,t){t.html=t.html||!1,t.show_cart=t.show_cart||!1,r.elements.drawer_html.hide(),r.elements.drawer_cart.hide(),t.html&&(r.elements.drawer_html.html(t.html),r.elements.drawer_html.show()),t.show_cart&&(r.elements.drawer_html.html(""),r.elements.drawer_cart.show()),r.elements.overlay.addClass(r.vars.classes.overlay_open),r.elements.drawer.addClass(r.vars.classes.drawer_open),r.elements.body.addClass(r.vars.classes.drawer_open_body),o(s.body).trigger("orderable-drawer.opened",t)},close:function(){r.elements.overlay.removeClass(r.vars.classes.overlay_open),r.elements.drawer.removeClass(r.vars.classes.drawer_open),r.elements.body.removeClass(r.vars.classes.drawer_open_body),r.elements.drawer_html.html(""),o(s.body).trigger("orderable-drawer.closed")},cart:{click_increase_decrease_quantity:function(e,r){var t=r.attr("data-orderable-product-id"),a={action:"orderable_cart_quantity",cart_item_key:r.attr("data-orderable-cart-item-key"),product_id:t,quantity:r.attr("data-orderable-quantity")};this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),this.currentRequest=jQuery.post(orderable_vars.ajax_url,a,function(e){if(e){const t=r.siblings(".orderable-quantity-roller__quantity");a.quantity===t.attr("data-orderable-updating-quantity")&&(o(s.body).trigger("added_to_cart",[e.fragments,e.cart_hash,r]),o(s.body).trigger("orderable-drawer.quantity-updated"))}}.bind(this)).always(function(){this.currentRequest=void 0}.bind(this))},handle_quantity_change_by_button:function(e,t){var r=t.data("orderable-trigger"),a=parseInt(t.attr("data-orderable-quantity"));const o=t.siblings(".orderable-quantity-roller__button--"+("increase-quantity"===r?"decrease":"increase")),s=t.siblings(".orderable-quantity-roller__quantity");r="increase-quantity"===r?a+1:Math.max(0,a-1);t.attr("data-orderable-quantity",r),o.attr("data-orderable-quantity",r),s.attr("data-orderable-updating-quantity",r),s.text(r)}}};o(s).ready(r.on_ready)}(jQuery,document),function(i,d){"use strict";var l={on_ready:function(){l.cache(),l.watch()},cache:function(){l.vars={classes:{clickable_product:"orderable-product--add-to-cart ",add_to_order_button:"orderable-product__add-to-order",product_messages:"orderable-product__messages",product_price:"orderable-product__actions-price",invalid_field:"orderable-field--invalid",option_select_td:"orderable-product__option-select",button_loading:"orderable-button--loading",out_of_stock:"orderable-button--out-of-stock"},parent_price:null},l.elements={}},watch:function(){i(d.body).on("orderable-drawer.opened",l.init_product_options),i(d.body).on("orderable-add-to-cart",l.click_add_to_order),i(d.body).on("orderable-product-options",l.click_add_to_order),i(d.body).on("orderable-view-product",l.view_product),i(d.body).on("mouseenter mouseleave","."+l.vars.classes.clickable_product,l.simulate_add_to_order_hover),i(d.body).on("orderable-edit-cart-item",l.edit_cart_item),i(d.body).on("orderable-update-cart-item",l.update_cart_item),i(d.body).on("orderable-show-cart",l.show_cart)},simulate_add_to_order_hover:function(e){i(this).find("."+l.vars.classes.add_to_order_button).toggleClass("orderable-button--hover","mouseenter"===e.type)},click_add_to_order:function(e,t){var r=(t=void 0!==t?t:i(this)).is("button")?t:t.find("."+l.vars.classes.add_to_order_button),t=r.data("orderable-trigger"),a=r.data("orderable-product-id"),o=r.data("orderable-variation-id"),s=r.data("orderable-variation-attributes"),n={action:t};r.hasClass(l.vars.classes.button_loading)||r.hasClass(l.vars.classes.out_of_stock)||(r.addClass(l.vars.classes.button_loading),"add-to-cart"===t?l.add_to_cart({product_id:a,variation_id:o,attributes:s},function(e){n.show_cart=!0,n.response=e,i(d.body).trigger("orderable-drawer.open",n),r.removeClass(l.vars.classes.button_loading)}):"product-options"===t&&l.get_product_options({product_id:a,focus:r.data("orderable-focus")},function(e){n.html=e.html,i(d.body).trigger("orderable-drawer.open",n),r.removeClass(l.vars.classes.button_loading)}))},show_cart:function(){i(d.body).trigger("orderable-drawer.open",{show_cart:!0})},view_product:function(e,t){var r=t.data("orderable-product-id"),a={action:"product-options"};l.get_product_options({product_id:r,focus:t.data("orderable-focus")},function(e){a.html=e.html,i(d.body).trigger("orderable-drawer.open",a)})},add_to_cart:function(e,t){var r;void 0!==e.product_id&&(e={action:"orderable_add_to_cart",product_id:e.product_id,variation_id:e.variation_id||!1,attributes:e.attributes||!1},i(".orderable-product-fields-group").length&&(r=jQuery(".orderable-product-fields-group :input").serializeArray(),r=l.convert_to_flat_object(r),jQuery.isEmptyObject(r)||(e=Object.assign(e,r))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&(i(d.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),"function"==typeof t&&t(e))}))},edit_cart_item:function(e,t){var r=t.data("orderable-cart-item-key");t.addClass(l.vars.classes.button_loading),l.get_cart_item_options({cart_item_key:r},function(e){e={html:e.html,action:"update-cart-item"};i(d.body).trigger("orderable-drawer.open",e),t.removeClass(l.vars.classes.button_loading)})},update_cart_item:function(e,r){var t=r.data("orderable-cart-item-key"),a=r.data("orderable-product-id"),o=r.data("orderable-variation-id"),s=r.data("orderable-variation-attributes");r.addClass(l.vars.classes.button_loading),l.update_cart_item_options({cart_item_key:t,product_id:a,variation_id:o,attributes:s},function(e){var t={show_cart:!0,response:e};i(d.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),i(d.body).trigger("orderable-drawer.open",t),r.removeClass(l.vars.classes.button_loading)})},convert_to_flat_object:function(e){var a={};return e.forEach(function(e){var t="[]"===e.name.substr(-2)||Array.isArray(e.name),r=t?e.name.substr(0,e.name.length-2):e.name;t?(a[r]=void 0===a[r]?[]:a[r],a[r].push(e.value)):a[r]=e.value}),a},get_product_options:function(e,t){void 0!==e.product_id&&(e.action="orderable_get_product_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},get_cart_item_options:function(e,t){void 0!==e.cart_item_key&&(e.action="orderable_get_cart_item_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},update_cart_item_options:function(e,t){var r;void 0!==e.cart_item_key&&(e.action="orderable_update_cart_item_options",i(".orderable-product-fields-group").length&&(r=jQuery(".orderable-product-fields-group :input").serializeArray(),r=l.convert_to_flat_object(r),jQuery.isEmptyObject(r)||(e=Object.assign(e,r))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&"function"==typeof t&&t(e)}))},init_product_options:function(e,t){var r,a,o;void 0===t.action||"product-options"!==t.action&&"update-cart-item"!==t.action||(r=i(t=".orderable-drawer .orderable-product__options input, .orderable-drawer .orderable-product__options select"),l.vars.parent_price=i(".orderable-drawer .orderable-product__actions-price").html(),l.product_options_change(r),l.update_button_state(),a=l.debounce(l.update_button_state,500),o=l.debounce(l.product_options_change,500),i(d).on("change keyup",t,function(){o(r),a()}))},product_options_change:function(e){var t=i(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),r=l.check_options(e),a=t.data("orderable-product-type");"product-options"===t.attr("data-orderable-trigger")&&t.attr("data-orderable-trigger","add-to-cart"),i("."+l.vars.classes.product_messages).html(""),"variable"===a&&(r?(a=l.check_variation(e),l.set_variation(t,a)):l.clear_variation(t))},check_options:function(e){if(e.length<=0)return!1;var r=!0;return e.each(function(e,t){i(t).hasClass("orderable-input--validate")&&(""===i(t).val()?(i(t).addClass(l.vars.classes.invalid_field),r=!1):i(t).removeClass(l.vars.classes.invalid_field))}),r},check_variation:function(e){var t=(t=e.closest(".orderable-drawer").find(".orderable-product__variations").text())?JSON.parse(t):"",e=l.serialize_object(e),t=l.find_matching_variations(t,e);if(l.is_empty(t))return!1;t=t.shift();return t.attributes=e,t.attributes_json=JSON.stringify(e),void 0!==t&&t},set_variation:function(e,t){var r=t.variation_id||"",a=t.attributes_json||"",o=t.price_html||l.vars.parent_price,s="";t&&""!==t.availability_html&&(s=t.availability_html),t&&!t.is_in_stock&&(s="<p>"+orderable_vars.i18n.out_of_stock+"</p>"),t&&!t.is_purchasable&&(s="<p>"+orderable_vars.i18n.unavailable+"</p>"),!1===t&&(s="<p>"+orderable_vars.i18n.no_exist+"</p>"),!t||t.is_purchasable&&t.is_in_stock||(a=r=""),""!==s&&i("."+l.vars.classes.product_messages).html(s),e.data("orderable-variation-id",r),e.data("orderable-variation-attributes",a),i(".orderable-drawer .orderable-product__actions-price").html(o),e.trigger("orderable_variation_set",{variation:t,variation_id:r,attributes:a,price:o})},clear_variation:function(e){l.set_variation(e,""),l.vars.parent_price&&i(".orderable-drawer .orderable-product__actions-price").html(l.vars.parent_price)},find_matching_variations:function(e,t){for(var r=[],a=0;a<e.length;a++){var o=e[a];l.is_matching_variation(o.attributes,t)&&r.push(o)}return r},is_matching_variation:function(e,t){var r,a,o,s=!0;for(r in e)e.hasOwnProperty(r)&&(a=e[r],o=t[r],void 0!==a&&void 0!==o&&0!==a.length&&0!==o.length&&a!==o&&(s=!1));return s},is_empty:function(e){return void 0===e||!1===e||e.length<=0||!e},serialize_object:function(e){for(var t=e.serializeArray(),r={},a=0;a<t.length;a++)r[t[a].name]=t[a].value;return r},update_button_state:function(){setTimeout(function(){var e=i(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),t=i(".orderable-drawer__html ."+l.vars.classes.invalid_field).length,r=!0;"variable"===e.data("orderable-product-type")&&(r=""!==e.data("orderable-variation-id")),e.prop("disabled",t||!r)},50)},debounce:function(a,o,s){var n;return function(){var e=this,t=arguments,r=s&&!n;clearTimeout(n),n=setTimeout(function(){n=null,s||a.apply(e,t)},o),r&&a.apply(e,t)}}};i(d).ready(l.on_ready)}(jQuery,document),function(o,s){"use strict";var n={on_ready:function(){n.cache(),n.watch()},cache:function(){n.vars={top:{}},n.elements={}},watch:function(){o(s.body).on("orderable-drawer.opened",n.trigger),o(s.body).on("orderable-tabs.changed",n.trigger),o(s.body).on("orderable-accordion.toggled",n.trigger),o(s.body).on("wc_fragments_loaded",n.trigger)},trigger:function(){o(".orderable-sb-container").each(function(e,t){var r,t=o(t),a=t.data("orderable-scroll-id");n.has_scrollbar(t)||(t.scrollBox({containerClass:"orderable-sb-container",containerNoScrollClass:"orderable-sb-container-noscroll",contentClass:"orderable-sb-content",scrollbarContainerClass:"orderable-sb-scrollbar-container",scrollBarClass:"orderable-sb-scrollbar"}),0<(r=t.find(".orderable-sb-content")).length&&(r.on("scroll.scrollBox",n.log_top_position),void 0!==n.vars.top[a]&&r.scrollTop(n.vars.top[a])),o(s.body).trigger("orderable-scrollbar.created",{element:t,content:r}))}),o(window).trigger("resize.scrollBox")},has_scrollbar:function(e){return 0<e.find(".orderable-sb-content").length},log_top_position:function(e){var t=o(e.currentTarget).closest(".orderable-sb-container").data("orderable-scroll-id");n.vars.top[t]=o(e.currentTarget).scrollTop()}};o(s).ready(n.on_ready)}(jQuery,document),function(n,e){"use strict";var t={on_ready:function(){t.watch()},watch:function(){n(e.body).on("orderable-show-lookup-services",function(e,t){var r=t.closest(".orderable-services-selector").find(".orderable-services-selector__lookup");t.hide(),r.show()}),n(e.body).on("orderable-lookup-services",function(e,t){var r=t.closest(".orderable-services-selector"),a=r.find(".orderable-services-selector__lookup-message"),o=r.find(".orderable-services-selector__selected-change"),s=r.find(".orderable-services-selector__lookup-city").val(),r=r.find(".orderable-services-selector__lookup-postcode").val(),t=t.data("orderable-service");jQuery.post(orderable_vars.ajax_url,{action:"orderable_lookup_service",postcode:r,city:s,service:t},function(e){e.success?(a.html(""),o.show(),void 0!==e.data.fragments&&n.each(e.data.fragments,function(e,t){n(e).html(t)}),console.log(e)):a.html("<p>"+e.data.message+"</p>")})})}};n(e).ready(t.on_ready)}(jQuery,document),function(n,i){"use strict";var d={on_ready:function(){d.cache(),d.watch(),d.toggle_scroll()},on_resize:function(){d.toggle_scroll()},cache:function(){d.vars={classes:{tabs:"orderable-tabs",tabs_list:"orderable-tabs__list",tab_items:"orderable-tabs__item",tab_item_active:"orderable-tabs__item--active",tab_links:"orderable-tabs__link",tab_arrow:"orderable-tabs__arrow"},dragging:!1},d.elements={}},watch:function(){n("body").on("touchstart",function(){d.vars.dragging=!1}).on("touchmove",function(){d.vars.dragging=!0}),n(i.body).on("click mouseup touchend","."+d.vars.classes.tab_links,function(e){var t,r,a,o,s;d.vars.dragging||(e.preventDefault(),t=(e=n(this)).attr("href"),r=e.closest("."+d.vars.classes.tab_items),a=(s=e.closest("."+d.vars.classes.tabs)).find("."+d.vars.classes.tabs_list),o=s.find("."+d.vars.classes.tab_items),s=s.data("orderable-tabs"),s=(e=e.closest(s.wrapper)).find(s.sections),e=e.find(t),s.hide(),e.show(),o.removeClass(d.vars.classes.tab_item_active),r.addClass(d.vars.classes.tab_item_active),a.animate({scrollLeft:a.scrollLeft()+r.position().left}),n(i.body).trigger("orderable-tabs.changed",{tab:r}))}),n("."+d.vars.classes.tabs_list).on("scroll",function(e){0<n(this).scrollLeft()&&n("."+d.vars.classes.tab_arrow).fadeOut()}),n("."+d.vars.classes.tabs_list).on("wheel DOMMouseScroll mousewheel touchmove",function(){n(this).stop()}),n(i).on("click","."+d.vars.classes.tab_arrow,function(e){e.preventDefault();var e=n(this),t=e.parent(),r=t.find("."+d.vars.classes.tabs_list);r.animate({scrollLeft:r.scrollLeft()+.5*t.width()}),e.fadeOut()})},toggle_scroll:function(){n("."+d.vars.classes.tabs).each(function(e,t){var r=n(this),a=r.data("orderable-tabs"),r=r.closest(a.wrapper),a=r.find("."+d.vars.classes.tabs_list),o=r.find("."+d.vars.classes.tab_arrow);r.outerWidth()<a[0].scrollWidth?o.show():o.hide()})}};n(i).ready(d.on_ready),n(window).on("resize",d.on_resize)}(jQuery,document);var orderable_timings={};!function(i,a){"use strict";orderable_timings={on_ready:function(){orderable_timings.watch(),orderable_timings.set_date_and_time()},set_date_and_time:function(){var e,t=a.querySelector("#orderable-date"),r="";t&&(e=t.options[t.selectedIndex])&&!(r=e.value)&&t.options[t.selectedIndex+1]&&(t.options[t.selectedIndex+1].selected=!0,i(t).change()),"asap"!==r&&(e="",(t=a.querySelector("#orderable-time"))&&(e=t.options[t.selectedIndex])&&t.options[t.selectedIndex+1]&&(e.value||(t.options[t.selectedIndex+1].selected=!0,i(t).change())))},restore:function(){var e=orderable_timings.get_timings();e&&e.date&&(i(".orderable-order-timings__date").val(e.date),i(".orderable-order-timings__date").change(),e.time&&(i(".orderable-order-timings__time").val(e.time),i(".orderable-order-timings__time").change()))},watch:function(){i(a.body).on("wc_fragments_refreshed",function(){orderable_timings.restore(),orderable_timings.set_date_and_time()}),i(a.body).on("updated_checkout",function(){orderable_timings.restore(),orderable_timings.set_date_and_time()}),i(a.body).on("change",".orderable-order-timings__date",function(e){var t=i(this).find("option:selected").data("orderable-slots"),r=i(".orderable-order-timings--time"),a=i(".orderable-order-timings__time"),o=a.find("option").first(),s=a.find('option[value="asap"]').first(),n=orderable_timings.get_timings();if(n.date=i(".orderable-order-timings__date").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(n)),a.html(o),s&&a.append(s),!t)return a.prop("disabled",!0),void r.hide();"all-day"===t[0].value?(r.hide(),a.prop("disabled",!0)):(a.prop("disabled",!1),r.show(),i.each(t,function(e,t){a.append(i("<option />").attr("value",t.value).text(t.formatted))}))}),i(a.body).on("change",".orderable-order-timings__time",function(e){var t=orderable_timings.get_timings();t.time=i(".orderable-order-timings__time").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(t))})},get_timings:function(){return JSON.parse(window.localStorage.getItem("orderable_timings"))||{}}},i(a).ready(orderable_timings.on_ready)}(jQuery,document),function(r,a){"use strict";var e={on_ready:function(){e.watch()},watch:function(){r(a.body).on("click","[data-orderable-trigger]",e.trigger)},trigger:function(e){e.stopImmediatePropagation();var e=r(this),t=e.data("orderable-trigger");r(a.body).trigger("orderable-"+t,[e])}};r(a).ready(e.on_ready)}(jQuery,document); -
orderable/trunk/inc/class-ajax.php
r2709284 r2745279 21 21 'lookup_service' => true, 22 22 'get_onboard_woo_fields' => false, 23 'get_cart_item_options' => true, 23 24 ); 24 25 … … 73 74 'images' => true, 74 75 'focus' => $focus, 76 ); 77 78 ob_start(); 79 80 include ORDERABLE_TEMPLATES_PATH . 'product/options.php'; 81 82 $response['html'] = ob_get_clean(); 83 84 wp_send_json_success( $response ); 85 } 86 87 /** 88 * Get cart item options for a variable product. 89 */ 90 public static function get_cart_item_options() { 91 // phpcs:ignore WordPress.Security.NonceVerification.Missing 92 if ( empty( $_POST['cart_item_key'] ) ) { 93 wp_send_json_error(); 94 } 95 96 // phpcs:ignore WordPress.Security.NonceVerification.Missing 97 $cart_item_key = sanitize_text_field( wp_unslash( $_POST['cart_item_key'] ) ); 98 99 if ( empty( $cart_item_key ) ) { 100 wp_send_json_error(); 101 } 102 103 $cart_item = WC()->cart->get_cart_item( $cart_item_key ); 104 105 if ( empty( $cart_item ) ) { 106 wp_send_json_error(); 107 } 108 109 $product_id = $cart_item['product_id']; 110 $product = wc_get_product( $product_id ); 111 112 $response = array( 113 'product_id' => $product_id, 114 'product' => $product, 115 ); 116 117 if ( 'variable' === $product->get_type() ) { 118 $selected = $cart_item['variation']; 119 $attributes = Orderable_Products::get_available_attributes( $product ); 120 $available_variations = $product->get_available_variations(); 121 $variations_json = html_entity_decode( wp_json_encode( $available_variations ) ); 122 } 123 124 $args = array( 125 'images' => true, 126 ); 127 128 add_filter( 129 'orderable_get_group_data', 130 /** 131 * Fill the value of the fields. 132 * 133 * @param array $field_group The field group data. 134 * 135 * @return array 136 */ 137 function( $field_group ) use ( $cart_item ) { 138 foreach ( $field_group as $key => $value ) { 139 if ( empty( $cart_item['orderable_fields'][ $value['id'] ] ) ) { 140 continue; 141 } 142 143 switch ( $value['type'] ) { 144 case 'text': 145 $field_group[ $key ]['default'] = $cart_item['orderable_fields'][ $value['id'] ]['value']; 146 147 break; 148 149 case 'select': 150 case 'visual_radio': 151 foreach ( $value['options'] as $key_option => $option ) { 152 if ( $option['label'] === $cart_item['orderable_fields'][ $value['id'] ]['value'] ) { 153 $field_group[ $key ]['options'][ $key_option ]['selected'] = '1'; 154 155 break; 156 } 157 } 158 159 break; 160 161 case 'visual_checkbox': 162 foreach ( $value['options'] as $key_option => $option ) { 163 if ( empty( $cart_item['orderable_fields'][ $value['id'] ]['value'] ) ) { 164 continue; 165 } 166 167 $field_value = $cart_item['orderable_fields'][ $value['id'] ]['value']; 168 169 if ( ! is_array( $field_value ) ) { 170 continue; 171 } 172 173 if ( ! in_array( $option['label'], $field_value, true ) ) { 174 continue; 175 } 176 177 $field_group[ $key ]['options'][ $key_option ]['selected'] = '1'; 178 } 179 180 break; 181 } 182 } 183 184 return $field_group; 185 } 75 186 ); 76 187 -
orderable/trunk/inc/class-helpers.php
r2558994 r2745279 132 132 * @return string 133 133 */ 134 public static function kses( $content, $context = '') {134 public static function kses( $content, $context = '' ) { 135 135 if ( empty( $content ) ) { 136 136 return $content; … … 195 195 global $wpdb; 196 196 197 $wpdb->query( "197 $wpdb->query( " 198 198 DELETE FROM $wpdb->options 199 199 WHERE option_name LIKE ('%%\_transient\_timeout\_orderable\_%%') 200 200 OR option_name LIKE ('%%\_transient\_orderable\_%%') 201 " );201 " ); 202 202 } 203 203 … … 210 210 return ! empty( WC()->session->get( 'wc_notices', array() ) ); 211 211 } 212 213 /** 214 * Add image to media library. 215 * 216 * @param string $url URL. 217 * @param int $associated_with_post Post ID if media is associated to post. 218 * @param string $file_name File name. 219 * 220 * @return bool|int|WP_Error 221 */ 222 public static function add_to_media( $url, $associated_with_post = 0, $file_name = '' ) { 223 require_once ABSPATH . 'wp-admin/includes/file.php'; 224 require_once ABSPATH . 'wp-admin/includes/media.php'; 225 require_once ABSPATH . 'wp-admin/includes/image.php'; 226 227 $tmp = download_url( $url ); 228 $post_id = $associated_with_post; 229 $file_array = array(); 230 231 // Set variables for storage. 232 // fix file filename for query strings. 233 preg_match( '/[^\?]+\.(jpg|jpe|jpeg|gif|png|apk)/i', $url, $matches ); 234 235 if ( empty( $matches ) ) { 236 return false; 237 } 238 239 $file_array['name'] = ! empty( $file_name ) ? $file_name : basename( $matches[0] ); 240 $file_array['tmp_name'] = $tmp; 241 242 // If error storing temporarily, unlink. 243 if ( is_wp_error( $tmp ) ) { 244 @unlink( $file_array['tmp_name'] ); 245 246 return false; 247 } 248 249 // do the validation and storage stuff. 250 $id = media_handle_sideload( $file_array, $post_id ); 251 252 // If error storing permanently, unlink. 253 if ( is_wp_error( $id ) ) { 254 @unlink( $file_array['tmp_name'] ); 255 256 return false; 257 } 258 259 return $id; 260 } 212 261 } -
orderable/trunk/inc/class-modules.php
r2709284 r2745279 36 36 'timed-products', 37 37 'custom-order-status', 38 'notifications', 39 'table-ordering', 38 40 ); 39 41 -
orderable/trunk/inc/class-products.php
r2709284 r2745279 333 333 334 334 /** 335 * Get update cart item button. 336 * 337 * @param string $cart_item_key The cart item key. 338 * @param WC_Product $product The product to be edited. 339 * @param string $classes Button classes. 340 * 341 * @return string 342 */ 343 public static function get_update_cart_item_button( $cart_item_key, $product, $classes = '' ) { 344 $cart_item = WC()->cart->get_cart_item( $cart_item_key ); 345 346 $args = array( 347 'trigger' => 'update-cart-item', 348 'product_id' => $cart_item['product_id'], 349 'cart_item_key' => $cart_item_key, 350 'variation_id' => $cart_item['variation_id'], 351 'variation_attributes' => empty( array_filter( $cart_item['variation'] ) ) ? false : wp_json_encode( $cart_item['variation'] ), 352 'product_type' => $product->get_type(), 353 'text' => __( 'Update', 'orderable' ), 354 'classes' => $classes, 355 ); 356 357 /** 358 * Filter arguments used to the update cart item button. 359 * 360 * @param array $args The arguments. 361 * 362 * @return array New arguments 363 * @since 1.4.0 364 * @hook orderable_update_cart_item_button_args 365 */ 366 $args = apply_filters( 'orderable_update_cart_item_button_args', $args, $cart_item_key ); 367 368 ob_start(); 369 ?> 370 <button 371 class="orderable-button orderable-product__cancel-update" 372 data-orderable-trigger="show-cart" 373 > 374 <?php echo esc_html__( 'Cancel', 'orderable' ); ?> 375 </button> 376 <button 377 class="orderable-button <?php echo esc_attr( $args['classes'] ); ?>" 378 data-orderable-trigger="<?php echo esc_attr( $args['trigger'] ); ?>" 379 data-orderable-cart-item-key="<?php echo esc_attr( $args['cart_item_key'] ); ?>" 380 data-orderable-product-id="<?php echo esc_attr( $args['product_id'] ); ?>" 381 data-orderable-variation-id="<?php echo esc_attr( $args['variation_id'] ); ?>" 382 data-orderable-variation-attributes="<?php echo esc_attr( $args['variation_attributes'] ); ?>" 383 data-orderable-product-type="<?php echo esc_attr( $args['product_type'] ); ?>" 384 > 385 <?php echo esc_html( $args['text'] ); ?> 386 </button> 387 <?php 388 389 /** 390 * Filter the Update Cart Item button HTML. 391 * 392 * @param array $update_cart_item_button_html The Update Cart Item button HTML. 393 * 394 * @return array New HTML 395 * @since 1.4.0 396 * @hook orderable_update_cart_item_button_html 397 */ 398 $html = apply_filters( 'orderable_update_cart_item_button_html', ob_get_clean() ); 399 400 return $html; 401 } 402 403 /** 335 404 * Get add to cart trigger value. 336 405 * -
orderable/trunk/inc/modules/drawer/class-drawer-ajax.php
r2709284 r2745279 16 16 */ 17 17 public static function run() { 18 Orderable_Ajax::add_ajax_methods( array( 19 'cart_quantity' => true 20 ), __CLASS__ ); 18 Orderable_Ajax::add_ajax_methods( 19 array( 20 'cart_quantity' => true, 21 'update_cart_item_options' => true, 22 ), 23 __CLASS__ 24 ); 21 25 } 22 26 … … 75 79 WC_AJAX::get_refreshed_fragments(); 76 80 } 81 82 /** 83 * Update cart item attributes and addons. 84 */ 85 public static function update_cart_item_options() { 86 if ( empty( $_POST['cart_item_key'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing 87 wp_send_json_error( null, 400 ); 88 } 89 90 $cart_item_key = sanitize_text_field( wp_unslash( $_POST['cart_item_key'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing 91 $product_id = absint( filter_input( INPUT_POST, 'product_id', FILTER_SANITIZE_NUMBER_INT ) ); 92 $attributes = self::get_attributes(); 93 $variation_id = empty( $attributes ) ? 0 : absint( filter_input( INPUT_POST, 'variation_id', FILTER_SANITIZE_NUMBER_INT ) ); 94 $orderable_fields = self::get_orderable_fields(); 95 96 if ( 97 empty( $cart_item_key ) || 98 ( empty( $attributes ) && empty( $orderable_fields ) ) 99 ) { 100 wp_send_json_error( null, 400 ); 101 } 102 103 $cart_item = WC()->cart->get_cart_item( $cart_item_key ); 104 105 if ( empty( $cart_item ) ) { 106 wp_send_json_error(); 107 } 108 109 $product_data = empty( $variation_id ) ? wc_get_product( $cart_item['product_id'] ) : wc_get_product( $variation_id ); 110 111 if ( ! $product_data ) { 112 wp_send_json_error(); 113 } 114 115 // If the same data is sent (i.e. there is nothing to udpate), return early. 116 if ( 117 WC()->cart->generate_cart_id( 118 $product_id, 119 $variation_id, 120 empty( $attributes ) ? array( false ) : $attributes, 121 array( 'orderable_fields' => $orderable_fields ) 122 ) 123 === 124 $cart_item_key 125 ) { 126 wp_send_json_success(); 127 } 128 129 self::update_cart_item_attributes( $cart_item, $variation_id, $attributes, $orderable_fields ); 130 131 WC()->cart->calculate_totals(); 132 133 WC_AJAX::get_refreshed_fragments(); 134 } 135 136 /** 137 * Get attributes values to update. 138 * 139 * @return array. 140 */ 141 protected static function get_attributes() { 142 if ( empty( $_POST['attributes'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing 143 return array(); 144 } 145 146 $attributes = array_filter( 147 // phpcs:ignore WordPress.Security.NonceVerification.Missing 148 (array) json_decode( sanitize_text_field( wp_unslash( $_POST['attributes'] ) ) ), 149 function( $attribute_value, $attribute_name ) { 150 151 return ! empty( $attribute_value ) && false !== strpos( $attribute_name, 'attribute_' ); 152 }, 153 ARRAY_FILTER_USE_BOTH 154 ); 155 156 return $attributes; 157 } 158 159 /** 160 * Get Orderable Product Addons fields. 161 * 162 * @return array 163 */ 164 protected static function get_orderable_fields() { 165 166 if ( 167 ! class_exists( 'Orderable_Addons_Pro_Field_Groups' ) || 168 ! class_exists( 'Orderable_Addons_Pro_Fees' ) 169 ) { 170 return array(); 171 } 172 173 // phpcs:ignore WordPress.Security.NonceVerification.Missing 174 $orderable_fields = empty( $_POST['orderable_fields'] ) ? array() : map_deep( wp_unslash( $_POST['orderable_fields'] ), 'sanitize_text_field' ); 175 176 if ( empty( $orderable_fields ) || ! is_array( $orderable_fields ) ) { 177 return array(); 178 } 179 180 $orderable_item_data = array(); 181 182 foreach ( $orderable_fields as $group_id => $fields ) { 183 foreach ( $fields as $field_id => $field ) { 184 $field_setting = Orderable_Addons_Pro_Field_Groups::get_field_data( $field_id, $group_id ); 185 $fees = Orderable_Addons_Pro_Fees::calculate_fees( $field, $field_id, $group_id ); 186 187 $orderable_item_data[ $field_id ] = array( 188 'id' => $field_id, 189 'value' => $field, 190 'label' => $field_setting['title'], 191 'group_id' => $group_id, 192 'fees' => $fees, 193 ); 194 } 195 } 196 197 return $orderable_item_data; 198 } 199 200 /** 201 * Update cart item attributes. 202 * 203 * @param array $original_cart_item The cart item to be updated. 204 * @param int $variation_id The new variation ID. 205 * @param array $attributes The new attributes. 206 * @return void 207 */ 208 protected static function update_cart_item_attributes( $original_cart_item, $variation_id, $attributes, $cart_item_data ) { 209 if ( empty( $cart_item_data ) && ! empty( $original_cart_item['orderable_fields'] ) ) { 210 $cart_item_data = $original_cart_item['orderable_fields']; 211 } 212 213 if ( ! empty( $cart_item_data ) ) { 214 $cart_item_data = array( 'orderable_fields' => $cart_item_data ); 215 } 216 217 /** 218 * WooCommerce stores empty attributes ('variation' on the cart item) 219 * as `array( false )`. 220 */ 221 if ( empty( $attributes ) ) { 222 $attributes = array( false ); 223 } 224 225 /** 226 * We update the cart item by adding the updated item to the cart. 227 * This allows 3rd plugins/themes to integrate with the default 228 * WooCommerce hooks. 229 */ 230 $updated_cart_item_key = WC()->cart->add_to_cart( $original_cart_item['product_id'], $original_cart_item['quantity'], $variation_id, $attributes, $cart_item_data ); 231 232 $cart_content = WC()->cart->get_cart(); 233 234 /** 235 * We remove the updated item from the cart to re-insert 236 * at the same position of the original item. 237 */ 238 unset( $cart_content[ $updated_cart_item_key ] ); 239 240 $cart_content_updated = array(); 241 242 foreach ( $cart_content as $key => $item ) { 243 // We re-insert the updated item at the same position of the original item. 244 if ( $key === $original_cart_item['key'] ) { 245 $updated_cart_item = WC()->cart->get_cart_item( $updated_cart_item_key ); 246 247 $cart_content_updated[ $updated_cart_item['key'] ] = $updated_cart_item; 248 } else { 249 $cart_content_updated[ $key ] = $item; 250 } 251 } 252 253 WC()->cart->set_cart_contents( $cart_content_updated ); 254 } 77 255 } -
orderable/trunk/inc/modules/layouts/assets/admin/js/main.min.js
r2709284 r2745279 1 !function(n,l){"use strict";var c={on_ready:function(){c.builder.init()},helpers:{get_field_type:function(e){return"SELECT"===e.get(0).tagName?"select":e.attr("type")},strip_prefix:function(e){return e.replace("orderable_","")}},builder:{init:function(){c.builder.watch()},watch:function(){n(l.body).on("change","#orderable-layout-settings-metabox input, #orderable-layout-settings-metabox select",function(){var e=n(this).closest("#orderable-layout-settings-metabox"),a={},o=!0;e.find(".form-field > input, .form-field > select").each(function(e,t){var t=n(t),r=c.helpers.get_field_type(t),i="";"string"==typeof(i="checkbox"===r?n(this).is(":checked"):("select"===r&&t.attr("multiple"),t.val()))&&0===i.indexOf("pro_")&&(o=!1,n(l.body).trigger("orderable-pro-modal")),a[c.helpers.strip_prefix(this.name.replace("[]",""))]=i}),o&&c.builder.reload_preview(a)})},reload_preview:function(e){n.post(ajaxurl,{action:"orderable_preview",data:e},function(e){e.success&&n("#orderable-layout-preview-metabox .orderable-main-wrap").html(e.data.shortcode)})}}};n(l).ready(c.on_ready)}(jQuery,document);1 !function(n,l){"use strict";var c={on_ready:function(){c.builder.init()},helpers:{get_field_type:function(e){return"SELECT"===e.get(0).tagName?"select":e.attr("type")},strip_prefix:function(e){return e.replace("orderable_","")}},builder:{init:function(){c.builder.watch()},watch:function(){n(l.body).on("change","#orderable-layout-settings-metabox input, #orderable-layout-settings-metabox select",function(){var e=n(this).closest("#orderable-layout-settings-metabox"),a={},o=!0;e.find(".form-field > input, .form-field > select").each(function(e,t){var r=n(t),i=c.helpers.get_field_type(r),t="";"string"==typeof(t="checkbox"===i?n(this).is(":checked"):("select"===i&&r.attr("multiple"),r.val()))&&0===t.indexOf("pro_")&&(o=!1,n(l.body).trigger("orderable-pro-modal")),a[c.helpers.strip_prefix(this.name.replace("[]",""))]=t}),o&&c.builder.reload_preview(a)})},reload_preview:function(e){n.post(ajaxurl,{action:"orderable_preview",data:e},function(e){e.success&&n("#orderable-layout-preview-metabox .orderable-main-wrap").html(e.data.shortcode)})}}};n(l).ready(c.on_ready)}(jQuery,document); -
orderable/trunk/inc/modules/live-view/assets/js/admin.js
r2549156 r2745279 8 8 on_ready: function() { 9 9 orderable_live_view.mute_button(); 10 orderable_live_view.update_url_for_order_status_buttons(); 10 11 }, 11 12 … … 87 88 $button.data( 'orderable-mute-status', mute_status ).data( 'orderable-alt-text', current_text ).text( new_text ); 88 89 } ); 90 }, 91 92 /** 93 * Append '&orderable_live_view' to the order status hyperlinks. 94 */ 95 update_url_for_order_status_buttons: function () { 96 $( '.subsubsub li a' ).each( function () { 97 var href = $( this ).attr( 'href' ); 98 $( this ).attr( 'href', `${href}&orderable_live_view` ); 99 } ); 89 100 } 90 101 }; -
orderable/trunk/inc/modules/live-view/class-live-view.php
r2709284 r2745279 141 141 } 142 142 143 /** 144 * Allows to override the notification audio file. 145 */ 146 $audio_url = apply_filters( 'orderable_live_view_new_order_audio_file_url', esc_url( ORDERABLE_URL ) . 'inc/modules/live-view/assets/audio/ding.wav' ); 143 147 ?> 144 <audio id="orderable_ding" src="<?php echo esc_ url( ORDERABLE_URL ); ?>inc/modules/live-view/assets/audio/ding.wav" type="audio/wav"></audio>148 <audio id="orderable_ding" src="<?php echo esc_attr( $audio_url ); ?>" type="audio/wav"></audio> 145 149 <?php 146 150 } -
orderable/trunk/inc/modules/services/class-services-order.php
r2549156 r2745279 88 88 89 89 if ( empty( $shipping_methods ) ) { 90 return $type;90 return apply_filters( 'orderable_get_service_type', $type, $order ); 91 91 } 92 92 … … 94 94 $shipping_method_id = $shipping_method->get_method_id(); 95 95 96 return Orderable_Services::is_pickup_method( $shipping_method_id ) ? 'pickup' : 'delivery'; 96 $type = Orderable_Services::is_pickup_method( $shipping_method_id ) ? 'pickup' : 'delivery'; 97 98 return apply_filters( 'orderable_get_service_type', $type, $order ); 97 99 } 98 100 … … 118 120 public static function add_admin_order_columns_content( $column_name, $post_id ) { 119 121 if ( 'orderable_service_type' === $column_name ) { 120 $order = wc_get_order( $post_id ); 121 $type = Orderable_Services_Order::get_service_type( $order ); 122 $order = wc_get_order( $post_id ); 123 $type = self::get_service_type( $order ); 124 125 if ( empty( $type ) ) { 126 echo '—'; 127 128 return; 129 } 130 122 131 $background = 'pickup' === $type ? '#C6C7E1' : '#c5e2df'; 123 $color = 'pickup' === $type ? '#6264ac' : '#3e7a74'; 132 $color = 'pickup' === $type ? '#5457a0' : '#356964'; 133 134 $background = apply_filters( 'orderable_service_type_column_background_color', $background, $column_name, $post_id, $order, $type ); 135 $color = apply_filters( 'orderable_service_type_column_text_color', $color, $column_name, $post_id, $order, $type ); 124 136 125 137 printf( '<mark class="order-status order-status--%s" style="background-color: %s; color: %s;"><span>%s</span></mark>', esc_attr( $type ), esc_attr( $background ), esc_attr( $color ), Orderable_Services::get_service_label( $type ) ); -
orderable/trunk/inc/modules/timings/class-timings-order.php
r2709284 r2745279 92 92 cancelLabel: orderable_timings_daterangepicker.clear, 93 93 applyLabel: orderable_timings_daterangepicker.apply, 94 customRangeLabel: orderable_timings_daterangepicker.custom_range, 94 95 daysOfWeek: [ 95 96 '<?php esc_html_e( 'Su', 'orderable' ); ?>', … … 100 101 '<?php esc_html_e( 'Fr', 'orderable' ); ?>', 101 102 '<?php esc_html_e( 'Sa', 'orderable' ); ?>', 103 ], 104 monthNames: [ 105 '<?php esc_html_e( 'January', 'orderable' ); ?>', 106 '<?php esc_html_e( 'February', 'orderable' ); ?>', 107 '<?php esc_html_e( 'March', 'orderable' ); ?>', 108 '<?php esc_html_e( 'April', 'orderable' ); ?>', 109 '<?php esc_html_e( 'May', 'orderable' ); ?>', 110 '<?php esc_html_e( 'June', 'orderable' ); ?>', 111 '<?php esc_html_e( 'July', 'orderable' ); ?>', 112 '<?php esc_html_e( 'August', 'orderable' ); ?>', 113 '<?php esc_html_e( 'September', 'orderable' ); ?>', 114 '<?php esc_html_e( 'October', 'orderable' ); ?>', 115 '<?php esc_html_e( 'November', 'orderable' ); ?>', 116 '<?php esc_html_e( 'December', 'orderable' ); ?>' 102 117 ], 103 118 }, … … 347 362 } 348 363 349 if ( isset( $start ) && ! $return['end']) {364 if ( isset( $start ) && ( ! $return['end'] || $return['end'] === $return['start'] ) ) { 350 365 $start->add( new DateInterval( 'P1D' ) ); 351 366 -
orderable/trunk/inc/modules/timings/class-timings-settings.php
r2666071 r2745279 639 639 640 640 <p id="timezone-description"> 641 <?php echo wp_kses( sprintf( __( "Your store's current timezone is %s."), '<code>' . $tzstring . '</code>' ), array( 'code' => array() ) ); ?> 641 <?php 642 // Translators: %s: Timezone string. 643 echo wp_kses( sprintf( __( "Your store's current timezone is %s.", 'orderable' ), '<code>' . $tzstring . '</code>' ), array( 'code' => array() ) ); 644 ?> 642 645 </p> 643 646 -
orderable/trunk/inc/modules/tip/class-tip.php
r2558994 r2745279 22 22 * Register settings. 23 23 * 24 * @param array $settings 24 * @param array $settings Settings. 25 25 * 26 26 * @return array -
orderable/trunk/languages/orderable.pot
r2709284 r2745279 30 30 msgstr "" 31 31 32 #: inc/class-ajax.php: 13032 #: inc/class-ajax.php:241 33 33 msgid "Sorry, there are no delivery or pickup options available." 34 34 msgstr "" 35 35 36 #: inc/class-ajax.php: 13536 #: inc/class-ajax.php:246 37 37 msgid "pickup" 38 38 msgstr "" 39 39 40 #: inc/class-ajax.php: 13540 #: inc/class-ajax.php:246 41 41 msgid "delivery" 42 42 msgstr "" 43 43 44 #: inc/class-ajax.php: 13844 #: inc/class-ajax.php:249 45 45 msgid "Sorry, there are no %s options available. Please try %s instead." 46 46 msgstr "" 47 47 48 #: inc/class-ajax.php: 232, inc/class-settings.php:38048 #: inc/class-ajax.php:343, inc/class-settings.php:380 49 49 msgid "Country / State" 50 50 msgstr "" … … 164 164 msgstr "" 165 165 166 #: inc/class-products.php:657 166 #: inc/class-products.php:353 167 msgid "Update" 168 msgstr "" 169 170 #: inc/class-products.php:374 171 msgid "Cancel" 172 msgstr "" 173 174 #: inc/class-products.php:726 167 175 msgid "Description" 168 176 msgstr "" … … 380 388 msgstr "" 381 389 382 #: inc/class-settings.php:946, inc/modules/live-view/class-live-view.php:20 1, inc/modules/live-view/class-live-view.php:201390 #: inc/class-settings.php:946, inc/modules/live-view/class-live-view.php:205, inc/modules/live-view/class-live-view.php:205 383 391 msgid "Live Order View" 384 392 msgstr "" … … 484 492 msgstr "" 485 493 494 #: woocommerce/cart/mini-cart.php:48 495 msgid "Edit" 496 msgstr "" 497 486 498 #: inc/modules/addons/class-addons.php:35 487 499 msgid "Addons" 488 500 msgstr "" 489 501 490 #: inc/modules/addons/class-addons.php:35, inc/modules/custom-order-status/class-custom-order-status.php:35, inc/modules/t imed-products/class-timed-products.php:35502 #: inc/modules/addons/class-addons.php:35, inc/modules/custom-order-status/class-custom-order-status.php:35, inc/modules/table-ordering/class-table-ordering.php:35, inc/modules/timed-products/class-timed-products.php:35 491 503 msgid "Pro" 492 504 msgstr "" … … 509 521 510 522 #. translators: %s Product title. 511 #: inc/modules/drawer/class-drawer-ajax.php: 49523 #: inc/modules/drawer/class-drawer-ajax.php:53 512 524 msgid "You can only have 1 %s in your cart." 513 525 msgstr "" … … 645 657 msgstr "" 646 658 647 #: inc/modules/live-view/class-live-view.php:16 2659 #: inc/modules/live-view/class-live-view.php:166 648 660 msgid "Enable Live View" 649 661 msgstr "" 650 662 651 #: inc/modules/live-view/class-live-view.php:1 67663 #: inc/modules/live-view/class-live-view.php:171 652 664 msgid "Exit Live View" 653 665 msgstr "" 654 666 655 #: inc/modules/live-view/class-live-view.php:1 68667 #: inc/modules/live-view/class-live-view.php:172 656 668 msgid "Mute" 657 669 msgstr "" 658 670 659 #: inc/modules/live-view/class-live-view.php:1 68671 #: inc/modules/live-view/class-live-view.php:172 660 672 msgid "Unmute" 661 673 msgstr "" 662 674 663 #: inc/modules/live-view/class-live-view.php:24 3675 #: inc/modules/live-view/class-live-view.php:247 664 676 msgid "order_manager" 665 677 msgstr "" 666 678 667 #: inc/modules/live-view/class-live-view.php:24 3679 #: inc/modules/live-view/class-live-view.php:247 668 680 msgid "Order Manager" 681 msgstr "" 682 683 #: inc/modules/notifications/class-notifications.php:38 684 msgid "Notification Settings" 685 msgstr "" 686 687 #: inc/modules/notifications/class-notifications.php:44 688 msgid "Enable Notifications" 689 msgstr "" 690 691 #: inc/modules/notifications/class-notifications.php:45 692 msgid "Enable SMS/WhatsApp notifications for order statuses." 669 693 msgstr "" 670 694 … … 673 697 msgstr "" 674 698 675 #: inc/modules/services/class-services-order.php:10 7699 #: inc/modules/services/class-services-order.php:109 676 700 msgid "Service" 677 701 msgstr "" … … 683 707 #: inc/modules/services/class-services.php:194 684 708 msgid "Deliveries" 709 msgstr "" 710 711 #: inc/modules/table-ordering/class-table-ordering.php:35, inc/modules/table-ordering/class-table-ordering.php:35 712 msgid "Table Ordering" 685 713 msgstr "" 686 714 … … 747 775 msgstr "" 748 776 749 #: inc/modules/timings/class-timings-order.php:9 5777 #: inc/modules/timings/class-timings-order.php:96 750 778 msgid "Su" 751 779 msgstr "" 752 780 753 #: inc/modules/timings/class-timings-order.php:9 6781 #: inc/modules/timings/class-timings-order.php:97 754 782 msgid "Mo" 755 783 msgstr "" 756 784 757 #: inc/modules/timings/class-timings-order.php:9 7785 #: inc/modules/timings/class-timings-order.php:98 758 786 msgid "Tu" 759 787 msgstr "" 760 788 761 #: inc/modules/timings/class-timings-order.php:9 8789 #: inc/modules/timings/class-timings-order.php:99 762 790 msgid "We" 763 791 msgstr "" 764 792 765 #: inc/modules/timings/class-timings-order.php: 99793 #: inc/modules/timings/class-timings-order.php:100 766 794 msgid "Th" 767 795 msgstr "" 768 796 769 #: inc/modules/timings/class-timings-order.php:10 0797 #: inc/modules/timings/class-timings-order.php:101 770 798 msgid "Fr" 771 799 msgstr "" 772 800 773 #: inc/modules/timings/class-timings-order.php:10 1801 #: inc/modules/timings/class-timings-order.php:102 774 802 msgid "Sa" 775 803 msgstr "" 776 804 777 #: inc/modules/timings/class-timings-order.php:185, inc/modules/timings/class-timings-order.php:223 805 #: inc/modules/timings/class-timings-order.php:105 806 msgid "January" 807 msgstr "" 808 809 #: inc/modules/timings/class-timings-order.php:106 810 msgid "February" 811 msgstr "" 812 813 #: inc/modules/timings/class-timings-order.php:107 814 msgid "March" 815 msgstr "" 816 817 #: inc/modules/timings/class-timings-order.php:108 818 msgid "April" 819 msgstr "" 820 821 #: inc/modules/timings/class-timings-order.php:109 822 msgid "May" 823 msgstr "" 824 825 #: inc/modules/timings/class-timings-order.php:110 826 msgid "June" 827 msgstr "" 828 829 #: inc/modules/timings/class-timings-order.php:111 830 msgid "July" 831 msgstr "" 832 833 #: inc/modules/timings/class-timings-order.php:112 834 msgid "August" 835 msgstr "" 836 837 #: inc/modules/timings/class-timings-order.php:113 838 msgid "September" 839 msgstr "" 840 841 #: inc/modules/timings/class-timings-order.php:114 842 msgid "October" 843 msgstr "" 844 845 #: inc/modules/timings/class-timings-order.php:115 846 msgid "November" 847 msgstr "" 848 849 #: inc/modules/timings/class-timings-order.php:116 850 msgid "December" 851 msgstr "" 852 853 #: inc/modules/timings/class-timings-order.php:200, inc/modules/timings/class-timings-order.php:238 778 854 msgid "Date" 779 855 msgstr "" 780 856 781 #: inc/modules/timings/class-timings-order.php: 189, inc/modules/timings/class-timings-order.php:227857 #: inc/modules/timings/class-timings-order.php:204, inc/modules/timings/class-timings-order.php:242 782 858 msgid "Time" 783 859 msgstr "" 784 860 785 #: inc/modules/timings/class-timings-order.php: 193861 #: inc/modules/timings/class-timings-order.php:208 786 862 msgid "Timestamp" 787 863 msgstr "" 788 864 789 #: inc/modules/timings/class-timings-order.php:2 06865 #: inc/modules/timings/class-timings-order.php:221 790 866 msgid "Due Date/Time" 791 867 msgstr "" 792 868 793 #: inc/modules/timings/class-timings-order.php:3 07869 #: inc/modules/timings/class-timings-order.php:322 794 870 msgid "Filter by due date" 795 871 msgstr "" … … 943 1019 msgstr "" 944 1020 1021 #. translators: %s: Timezone string. 1022 #: inc/modules/timings/class-timings-settings.php:643 1023 msgid "Your store's current timezone is %s." 1024 msgstr "" 1025 945 1026 #: inc/modules/timings/class-timings.php:58 946 1027 msgid "Sun" -
orderable/trunk/orderable.php
r2709284 r2745279 4 4 * Author URI: https://orderable.com 5 5 * Description: Take local online ordering to a whole new level with Orderable. 6 * Version: 1. 3.06 * Version: 1.4.0 7 7 * Author: Orderable 8 8 * Text Domain: orderable 9 9 * WC requires at least: 5.4.0 10 * WC tested up to: 6. 4.010 * WC tested up to: 6.6.0 11 11 */ 12 12 … … 20 20 * @var string Plugin version. 21 21 */ 22 public static $version = '1. 3.0';22 public static $version = '1.4.0'; 23 23 24 24 /** 25 25 * @var string Required pro version. 26 26 */ 27 public static $required_pro_version = '1. 3.0';27 public static $required_pro_version = '1.4.0'; 28 28 29 29 /** … … 168 168 require_once ORDERABLE_INC_PATH . 'class-admin-notices.php'; 169 169 require_once ORDERABLE_INC_PATH . 'class-webhooks.php'; 170 require_once ORDERABLE_INC_PATH . 'class-shortcodes.php'; 170 171 171 172 Orderable_Settings::run(); … … 174 175 Orderable_Products::run(); 175 176 Orderable_Ajax::run(); 176 Orderable_ Admin_Notices::run();177 Orderable_Shortcodes::run(); 177 178 } 178 179 -
orderable/trunk/readme.txt
r2709284 r2745279 3 3 Tags: ecommerce, WooCommerce, local ordering, restaurants 4 4 Requires at least: 5.4 5 Tested up to: 5.95 Tested up to: 6.0 6 6 Requires PHP: 5.6 7 Stable tag: 1. 3.07 Stable tag: 1.4.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 142 142 143 143 == Changelog == 144 145 **v1.4.0** (13 Apr 2022) 146 [new] Edit product after adding to the cart 147 [new] Add shortcode [orderable_add_to_cart] 148 [new] Option to open quickview when card is clicked 149 [new] Allow users to manually change quantity in the side drawer 150 [new] Added filter to allow admin to override the live view audio notification file:`orderable_live_view_new_order_audio_file_url` 151 [new] New filters added for service types 152 [update] Ability to remove/clear any repeatable settings row 153 [update] Add translation for date range picker element in Live Order View 154 [update] Show error on quantity change if the requested quantity is more than available quantity 155 [update] Only modify mini cart in Orderable sidebar 156 [update] Optimized tabbed layout navigation on mobile 157 [update] Remove hidden categories/products from sitemap 158 [update] Add media import helper 159 [fix] Out of stock visibility in Product Layout 160 [fix] Allow order_manager users to place new orders 161 [fix] Increase/decrease quantity on mini cart when "Ajax add to cart" is disabled 162 [fix] Make Weekdays and 'Filter by due date' translatable 163 [fix] Multiple requests on changing the quantity of a product on mini cart 164 [fix] Translation issues in the backend 165 [fix] Clicking on Order status count closes the live order view 166 [fix] Issue where order page filter won't work for same start and end date 144 167 145 168 **v1.3.0** (13 Apr 2022) -
orderable/trunk/templates/product/actions.php
r2549156 r2745279 16 16 </div> 17 17 <div class="orderable-product__actions-button"> 18 <?php echo Orderable_Products::get_add_to_cart_button( $product, 'orderable-product__add-to-order' ); ?> 18 <?php 19 if ( empty( $cart_item_key ) ) { 20 echo Orderable_Products::get_add_to_cart_button( $product, 'orderable-product__add-to-order' ); 21 } else { 22 echo Orderable_Products::get_update_cart_item_button( $cart_item_key, $product, 'orderable-product__update-cart-item orderable-button--filled' ); 23 } 24 ?> 19 25 </div> 20 26 </div> -
orderable/trunk/templates/product/options.php
r2709284 r2745279 37 37 </th> 38 38 <td class="orderable-product__option-select"> 39 <?php wc_dropdown_variation_attribute_options( 40 array( 41 'options' => $options, 42 'attribute' => $attribute_name, 43 'product' => $product, 44 'show_option_none' => wc_attribute_label( $attribute_name ), 45 'class' => 'orderable-input orderable-input--select orderable-input--validate', 46 ) 47 ); ?> 39 <?php 40 wc_dropdown_variation_attribute_options( 41 array( 42 'options' => $options, 43 'attribute' => $attribute_name, 44 'selected' => empty( $selected[ wc_variation_attribute_name( $attribute_name ) ] ) ? false : $selected[ wc_variation_attribute_name( $attribute_name ) ], 45 'product' => $product, 46 'class' => 'orderable-input orderable-input--select orderable-input--validate', 47 ) 48 ); 49 ?> 48 50 </td> 49 51 </tr> … … 56 58 <div class="orderable-product__messages"></div> 57 59 58 < script class="orderable-product__variations" type="application/json">59 <?php echo ! empty( $variations_json ) ? $variations_json : ''; ?>60 </script>60 <?php if ( ! empty( $variations_json ) ) : ?> 61 <script class="orderable-product__variations" type="application/json"><?php echo $variations_json; ?></script> 62 <?php endif; ?> 61 63 </div> 62 64 -
orderable/trunk/woocommerce/cart/mini-cart.php
r2709284 r2745279 40 40 ?> 41 41 <li class="orderable-mini-cart-item <?php echo esc_attr( apply_filters( 'woocommerce_mini_cart_item_class', 'mini_cart_item', $cart_item, $cart_item_key ) ); ?>"> 42 <?php if ( 'variation' === $_product->get_type() || ! empty( $cart_item['orderable_fields'] ) ) : ?> 43 <button 44 class="orderable-button orderable-edit-cart-item__button orderable-button--filled" 45 data-orderable-trigger="edit-cart-item" 46 data-orderable-cart-item-key="<?php echo esc_attr( $cart_item_key ); ?>" 47 > 48 <?php echo esc_html__( 'Edit', 'orderable' ); ?> 49 </button> 50 <?php endif; ?> 42 51 <?php 43 52 echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped … … 55 64 ?> 56 65 <strong><?php echo wp_kses_post( $product_name ); ?></strong> 66 67 57 68 58 69 <?php if ( ! empty( $formatted_cart_data ) ) { ?>
Note: See TracChangeset
for help on using the changeset viewer.