Changeset 2819211
- Timestamp:
- 11/16/2022 04:44:18 PM (3 years ago)
- Location:
- orderable
- Files:
-
- 4 added
- 30 edited
- 1 copied
-
tags/1.7.0 (copied) (copied from orderable/trunk)
-
tags/1.7.0/assets/admin/js/main.min.js (modified) (1 diff)
-
tags/1.7.0/docs/actions.json (modified) (1 diff)
-
tags/1.7.0/inc/class-modules.php (modified) (1 diff)
-
tags/1.7.0/inc/modules/layouts/assets/admin/js/main.js (modified) (1 diff)
-
tags/1.7.0/inc/modules/layouts/assets/admin/js/main.min.js (modified) (1 diff)
-
tags/1.7.0/inc/modules/layouts/class-layouts.php (modified) (1 diff)
-
tags/1.7.0/inc/modules/layouts/source/admin/js/layouts.js (modified) (1 diff)
-
tags/1.7.0/inc/modules/layouts/templates/admin/layout-settings-metabox.php (modified) (1 diff)
-
tags/1.7.0/inc/modules/layouts/templates/products-list.php (modified) (1 diff)
-
tags/1.7.0/inc/modules/live-view/class-live-view.php (modified) (1 diff)
-
tags/1.7.0/inc/modules/product-labels (added)
-
tags/1.7.0/inc/modules/product-labels/class-product-labels.php (added)
-
tags/1.7.0/languages/orderable.pot (modified) (1 diff)
-
tags/1.7.0/orderable.php (modified) (2 diffs)
-
tags/1.7.0/readme.txt (modified) (2 diffs)
-
tags/1.7.0/templates/product/actions.php (modified) (1 diff)
-
tags/1.7.0/templates/product/card-content.php (modified) (1 diff)
-
trunk/assets/admin/js/main.min.js (modified) (1 diff)
-
trunk/docs/actions.json (modified) (1 diff)
-
trunk/inc/class-modules.php (modified) (1 diff)
-
trunk/inc/modules/layouts/assets/admin/js/main.js (modified) (1 diff)
-
trunk/inc/modules/layouts/assets/admin/js/main.min.js (modified) (1 diff)
-
trunk/inc/modules/layouts/class-layouts.php (modified) (1 diff)
-
trunk/inc/modules/layouts/source/admin/js/layouts.js (modified) (1 diff)
-
trunk/inc/modules/layouts/templates/admin/layout-settings-metabox.php (modified) (1 diff)
-
trunk/inc/modules/layouts/templates/products-list.php (modified) (1 diff)
-
trunk/inc/modules/live-view/class-live-view.php (modified) (1 diff)
-
trunk/inc/modules/product-labels (added)
-
trunk/inc/modules/product-labels/class-product-labels.php (added)
-
trunk/languages/orderable.pot (modified) (1 diff)
-
trunk/orderable.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/product/actions.php (modified) (1 diff)
-
trunk/templates/product/card-content.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
orderable/tags/1.7.0/assets/admin/js/main.min.js
r2745279 r2819211 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);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); -
orderable/tags/1.7.0/docs/actions.json
r2795616 r2819211 94 94 "doc": { 95 95 "description": "Plugin Name: Orderable - Local Ordering System Author URI: https://orderable.com Description: Take local online ordering to a whole new level with Orderable.", 96 "long_description": "Version: 1.6. 0 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 6.9.3",97 "tags": [], 98 "long_description_html": "<p>Version: 1.6. 0 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 6.9.3</p>"96 "long_description": "Version: 1.6.1 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 6.9.4", 97 "tags": [], 98 "long_description_html": "<p>Version: 1.6.1 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 6.9.4</p>" 99 99 }, 100 100 "args": 0 -
orderable/tags/1.7.0/inc/class-modules.php
r2745279 r2819211 38 38 'notifications', 39 39 'table-ordering', 40 'product-labels', 40 41 ); 41 42 -
orderable/tags/1.7.0/inc/modules/layouts/assets/admin/js/main.js
r2637423 r2819211 58 58 reload_preview = true; 59 59 60 $parent.find( '.form-field > input, .form-field > select ' ).each( function( index, field ) {60 $parent.find( '.form-field > input, .form-field > select:enabled' ).each( function( index, field ) { 61 61 var $field = $( field ), 62 62 type = orderable_layouts.helpers.get_field_type( $field ), -
orderable/tags/1.7.0/inc/modules/layouts/assets/admin/js/main.min.js
r2745279 r2819211 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);1 !function(n,l){"use strict";var d={on_ready:function(){d.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(){d.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"),i={},o=!0;e.find(".form-field > input, .form-field > select:enabled").each(function(e,t){var t=n(t),r=d.helpers.get_field_type(t),a="";"string"==typeof(a="checkbox"===r?n(this).is(":checked"):("select"===r&&t.attr("multiple"),t.val()))&&0===a.indexOf("pro_")&&(o=!1,n(l.body).trigger("orderable-pro-modal")),i[d.helpers.strip_prefix(this.name.replace("[]",""))]=a}),o&&d.builder.reload_preview(i)})},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(d.on_ready)}(jQuery,document); -
orderable/tags/1.7.0/inc/modules/layouts/class-layouts.php
r2765631 r2819211 182 182 } 183 183 184 $layout_settings = apply_filters( 'orderable_layout_settings_save_data', array( 185 'categories' => (array) filter_input( INPUT_POST, 'orderable_categories', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ), 186 'layout' => filter_input( INPUT_POST, 'orderable_layout', FILTER_SANITIZE_STRING ), 187 'images' => 'yes' === filter_input( INPUT_POST, 'orderable_images', FILTER_SANITIZE_STRING ), 188 'card_click' => filter_input( INPUT_POST, 'orderable_card_click', FILTER_SANITIZE_STRING ), 189 ) ); 184 /** 185 * Filter the layout settings to be saved. 186 * 187 * @since 1.0.0 188 * @hook orderable_layout_settings_save_data 189 * @param array $data The data to be saved. 190 * @return array New value 191 */ 192 $layout_settings = apply_filters( 193 'orderable_layout_settings_save_data', 194 array( 195 'categories' => (array) filter_input( INPUT_POST, 'orderable_categories', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ), 196 'layout' => filter_input( INPUT_POST, 'orderable_layout', FILTER_SANITIZE_STRING ), 197 'images' => 'yes' === filter_input( INPUT_POST, 'orderable_images', FILTER_SANITIZE_STRING ), 198 'card_click' => filter_input( INPUT_POST, 'orderable_card_click', FILTER_SANITIZE_STRING ), 199 ) 200 ); 190 201 191 202 update_post_meta( $post_id, self::$layout_settings_key, $layout_settings ); -
orderable/tags/1.7.0/inc/modules/layouts/source/admin/js/layouts.js
r2637423 r2819211 58 58 reload_preview = true; 59 59 60 $parent.find( '.form-field > input, .form-field > select ' ).each( function( index, field ) {60 $parent.find( '.form-field > input, .form-field > select:enabled' ).each( function( index, field ) { 61 61 var $field = $( field ), 62 62 type = orderable_layouts.helpers.get_field_type( $field ), -
orderable/tags/1.7.0/inc/modules/layouts/templates/admin/layout-settings-metabox.php
r2709284 r2819211 113 113 </div> 114 114 115 <?php 116 /** 117 * Fires after the layout settings fields. 118 * 119 * @since 1.7.0 120 * @hook orderable_after_layout_settings_fields 121 * @param array $layout_settings The layout settings. 122 */ 123 do_action( 'orderable_after_layout_settings_fields', $layout_settings ); 124 ?> 115 125 </div> 116 126 </div> -
orderable/tags/1.7.0/inc/modules/layouts/templates/products-list.php
r2765631 r2819211 24 24 <?php foreach ( $products as $product ) { ?> 25 25 <div class="orderable-products-list__item"> 26 <?php 27 /** 28 * Fires before product card. 29 * 30 * @since 1.7.0 31 * @hook orderable_before_product_card 32 * @param WC_Product $product The product. 33 * @param array $args Layout settings. 34 */ 35 do_action( 'orderable_before_product_card', $product, $args ); 36 ?> 37 26 38 <?php include Orderable_Helpers::get_template_path( 'product.php', 'layouts' ); ?> 27 39 </div> -
orderable/tags/1.7.0/inc/modules/live-view/class-live-view.php
r2789129 r2819211 260 260 $userdata = get_userdata( get_current_user_id() ); 261 261 262 if ( ! is_array( $userdata->roles ) || ! in_array( 'order_manager', $userdata->roles, true ) ) {262 if ( ! $userdata || ! is_array( $userdata->roles ) || ! in_array( 'order_manager', $userdata->roles, true ) ) { 263 263 return; 264 264 } -
orderable/tags/1.7.0/languages/orderable.pot
r2795616 r2819211 7 7 "Content-Type: text/plain; charset=UTF-8\n" 8 8 "Content-Transfer-Encoding: 8bit\n" 9 "POT-Creation-Date: 2022- 09-23 07:09+0000\n"9 "POT-Creation-Date: 2022-10-07 12:02+0000\n" 10 10 "X-Poedit-Basepath: ..\n" 11 11 "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" -
orderable/tags/1.7.0/orderable.php
r2795616 r2819211 4 4 * Author URI: https://orderable.com 5 5 * Description: Take local online ordering to a whole new level with Orderable. 6 * Version: 1. 6.16 * Version: 1.7.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.9.410 * WC tested up to: 7.1.0 11 11 */ 12 12 … … 20 20 * @var string Plugin version. 21 21 */ 22 public static $version = '1. 6.1';22 public static $version = '1.7.0'; 23 23 24 24 /** -
orderable/tags/1.7.0/readme.txt
r2795616 r2819211 3 3 Tags: ecommerce, WooCommerce, local ordering, restaurants 4 4 Requires at least: 5.4 5 Tested up to: 6. 05 Tested up to: 6.1 6 6 Requires PHP: 5.6 7 Stable tag: 1. 6.17 Stable tag: 1.7.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 **v1.7.0** (16 Nov 2022) 145 [new] Actions: `orderable_after_layout_settings_fields`, `orderable_before_product_card`, `orderable_before_product_actions`, `orderable_before_product_title` and `orderable_before_product_description` 146 [fix] PHP Warning in Live Order View 147 144 148 **v1.6.1** (07 Oct 2022) 145 149 [fix] Missing jquery-ui.css file -
orderable/tags/1.7.0/templates/product/actions.php
r2765631 r2819211 19 19 ?> 20 20 21 <?php 22 /** 23 * Fires before product actions in the product card. 24 * 25 * @since 1.7.0 26 * @hook orderable_before_product_actions 27 * @param WC_Product $product The product. 28 * @param array $args Layout settings. 29 */ 30 do_action( 'orderable_before_product_actions', $product, $args ); 31 ?> 32 21 33 <div class="orderable-product__actions"> 22 34 <div class="orderable-product__actions-price"> -
orderable/tags/1.7.0/templates/product/card-content.php
r2789129 r2819211 31 31 32 32 <div class="orderable-product__content"> 33 34 <?php 35 /** 36 * Fires before product title in the product card. 37 * 38 * @since 1.7.0 39 * @hook orderable_before_product_title 40 * @param WC_Product $product The product. 41 * @param array $args Layout settings. 42 */ 43 do_action( 'orderable_before_product_title', $product, $args ); 44 ?> 45 33 46 <h2 class="orderable-product__title"><?php echo esc_html( $product->get_name() ); ?></h2> 47 48 <?php 49 /** 50 * Fires before product description in the product card. 51 * 52 * @since 1.7.0 53 * @hook orderable_before_product_description 54 * @param WC_Product $product The product. 55 * @param array $args Layout settings. 56 */ 57 do_action( 'orderable_before_product_description', $product, $args ); 58 ?> 34 59 35 60 <?php if ( ! empty( $short_description ) && ' ' !== $short_description ) { ?> -
orderable/trunk/assets/admin/js/main.min.js
r2745279 r2819211 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);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); -
orderable/trunk/docs/actions.json
r2795616 r2819211 94 94 "doc": { 95 95 "description": "Plugin Name: Orderable - Local Ordering System Author URI: https://orderable.com Description: Take local online ordering to a whole new level with Orderable.", 96 "long_description": "Version: 1.6. 0 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 6.9.3",97 "tags": [], 98 "long_description_html": "<p>Version: 1.6. 0 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 6.9.3</p>"96 "long_description": "Version: 1.6.1 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 6.9.4", 97 "tags": [], 98 "long_description_html": "<p>Version: 1.6.1 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 6.9.4</p>" 99 99 }, 100 100 "args": 0 -
orderable/trunk/inc/class-modules.php
r2745279 r2819211 38 38 'notifications', 39 39 'table-ordering', 40 'product-labels', 40 41 ); 41 42 -
orderable/trunk/inc/modules/layouts/assets/admin/js/main.js
r2637423 r2819211 58 58 reload_preview = true; 59 59 60 $parent.find( '.form-field > input, .form-field > select ' ).each( function( index, field ) {60 $parent.find( '.form-field > input, .form-field > select:enabled' ).each( function( index, field ) { 61 61 var $field = $( field ), 62 62 type = orderable_layouts.helpers.get_field_type( $field ), -
orderable/trunk/inc/modules/layouts/assets/admin/js/main.min.js
r2745279 r2819211 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);1 !function(n,l){"use strict";var d={on_ready:function(){d.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(){d.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"),i={},o=!0;e.find(".form-field > input, .form-field > select:enabled").each(function(e,t){var t=n(t),r=d.helpers.get_field_type(t),a="";"string"==typeof(a="checkbox"===r?n(this).is(":checked"):("select"===r&&t.attr("multiple"),t.val()))&&0===a.indexOf("pro_")&&(o=!1,n(l.body).trigger("orderable-pro-modal")),i[d.helpers.strip_prefix(this.name.replace("[]",""))]=a}),o&&d.builder.reload_preview(i)})},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(d.on_ready)}(jQuery,document); -
orderable/trunk/inc/modules/layouts/class-layouts.php
r2765631 r2819211 182 182 } 183 183 184 $layout_settings = apply_filters( 'orderable_layout_settings_save_data', array( 185 'categories' => (array) filter_input( INPUT_POST, 'orderable_categories', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ), 186 'layout' => filter_input( INPUT_POST, 'orderable_layout', FILTER_SANITIZE_STRING ), 187 'images' => 'yes' === filter_input( INPUT_POST, 'orderable_images', FILTER_SANITIZE_STRING ), 188 'card_click' => filter_input( INPUT_POST, 'orderable_card_click', FILTER_SANITIZE_STRING ), 189 ) ); 184 /** 185 * Filter the layout settings to be saved. 186 * 187 * @since 1.0.0 188 * @hook orderable_layout_settings_save_data 189 * @param array $data The data to be saved. 190 * @return array New value 191 */ 192 $layout_settings = apply_filters( 193 'orderable_layout_settings_save_data', 194 array( 195 'categories' => (array) filter_input( INPUT_POST, 'orderable_categories', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ), 196 'layout' => filter_input( INPUT_POST, 'orderable_layout', FILTER_SANITIZE_STRING ), 197 'images' => 'yes' === filter_input( INPUT_POST, 'orderable_images', FILTER_SANITIZE_STRING ), 198 'card_click' => filter_input( INPUT_POST, 'orderable_card_click', FILTER_SANITIZE_STRING ), 199 ) 200 ); 190 201 191 202 update_post_meta( $post_id, self::$layout_settings_key, $layout_settings ); -
orderable/trunk/inc/modules/layouts/source/admin/js/layouts.js
r2637423 r2819211 58 58 reload_preview = true; 59 59 60 $parent.find( '.form-field > input, .form-field > select ' ).each( function( index, field ) {60 $parent.find( '.form-field > input, .form-field > select:enabled' ).each( function( index, field ) { 61 61 var $field = $( field ), 62 62 type = orderable_layouts.helpers.get_field_type( $field ), -
orderable/trunk/inc/modules/layouts/templates/admin/layout-settings-metabox.php
r2709284 r2819211 113 113 </div> 114 114 115 <?php 116 /** 117 * Fires after the layout settings fields. 118 * 119 * @since 1.7.0 120 * @hook orderable_after_layout_settings_fields 121 * @param array $layout_settings The layout settings. 122 */ 123 do_action( 'orderable_after_layout_settings_fields', $layout_settings ); 124 ?> 115 125 </div> 116 126 </div> -
orderable/trunk/inc/modules/layouts/templates/products-list.php
r2765631 r2819211 24 24 <?php foreach ( $products as $product ) { ?> 25 25 <div class="orderable-products-list__item"> 26 <?php 27 /** 28 * Fires before product card. 29 * 30 * @since 1.7.0 31 * @hook orderable_before_product_card 32 * @param WC_Product $product The product. 33 * @param array $args Layout settings. 34 */ 35 do_action( 'orderable_before_product_card', $product, $args ); 36 ?> 37 26 38 <?php include Orderable_Helpers::get_template_path( 'product.php', 'layouts' ); ?> 27 39 </div> -
orderable/trunk/inc/modules/live-view/class-live-view.php
r2789129 r2819211 260 260 $userdata = get_userdata( get_current_user_id() ); 261 261 262 if ( ! is_array( $userdata->roles ) || ! in_array( 'order_manager', $userdata->roles, true ) ) {262 if ( ! $userdata || ! is_array( $userdata->roles ) || ! in_array( 'order_manager', $userdata->roles, true ) ) { 263 263 return; 264 264 } -
orderable/trunk/languages/orderable.pot
r2795616 r2819211 7 7 "Content-Type: text/plain; charset=UTF-8\n" 8 8 "Content-Transfer-Encoding: 8bit\n" 9 "POT-Creation-Date: 2022- 09-23 07:09+0000\n"9 "POT-Creation-Date: 2022-10-07 12:02+0000\n" 10 10 "X-Poedit-Basepath: ..\n" 11 11 "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" -
orderable/trunk/orderable.php
r2795616 r2819211 4 4 * Author URI: https://orderable.com 5 5 * Description: Take local online ordering to a whole new level with Orderable. 6 * Version: 1. 6.16 * Version: 1.7.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.9.410 * WC tested up to: 7.1.0 11 11 */ 12 12 … … 20 20 * @var string Plugin version. 21 21 */ 22 public static $version = '1. 6.1';22 public static $version = '1.7.0'; 23 23 24 24 /** -
orderable/trunk/readme.txt
r2795616 r2819211 3 3 Tags: ecommerce, WooCommerce, local ordering, restaurants 4 4 Requires at least: 5.4 5 Tested up to: 6. 05 Tested up to: 6.1 6 6 Requires PHP: 5.6 7 Stable tag: 1. 6.17 Stable tag: 1.7.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 **v1.7.0** (16 Nov 2022) 145 [new] Actions: `orderable_after_layout_settings_fields`, `orderable_before_product_card`, `orderable_before_product_actions`, `orderable_before_product_title` and `orderable_before_product_description` 146 [fix] PHP Warning in Live Order View 147 144 148 **v1.6.1** (07 Oct 2022) 145 149 [fix] Missing jquery-ui.css file -
orderable/trunk/templates/product/actions.php
r2765631 r2819211 19 19 ?> 20 20 21 <?php 22 /** 23 * Fires before product actions in the product card. 24 * 25 * @since 1.7.0 26 * @hook orderable_before_product_actions 27 * @param WC_Product $product The product. 28 * @param array $args Layout settings. 29 */ 30 do_action( 'orderable_before_product_actions', $product, $args ); 31 ?> 32 21 33 <div class="orderable-product__actions"> 22 34 <div class="orderable-product__actions-price"> -
orderable/trunk/templates/product/card-content.php
r2789129 r2819211 31 31 32 32 <div class="orderable-product__content"> 33 34 <?php 35 /** 36 * Fires before product title in the product card. 37 * 38 * @since 1.7.0 39 * @hook orderable_before_product_title 40 * @param WC_Product $product The product. 41 * @param array $args Layout settings. 42 */ 43 do_action( 'orderable_before_product_title', $product, $args ); 44 ?> 45 33 46 <h2 class="orderable-product__title"><?php echo esc_html( $product->get_name() ); ?></h2> 47 48 <?php 49 /** 50 * Fires before product description in the product card. 51 * 52 * @since 1.7.0 53 * @hook orderable_before_product_description 54 * @param WC_Product $product The product. 55 * @param array $args Layout settings. 56 */ 57 do_action( 'orderable_before_product_description', $product, $args ); 58 ?> 34 59 35 60 <?php if ( ! empty( $short_description ) && ' ' !== $short_description ) { ?>
Note: See TracChangeset
for help on using the changeset viewer.