WooCommerce Checkout Manager - Version 5.3.2

Version Description

  • Fix: save button
Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 WooCommerce Checkout Manager
Version 5.3.2
Comparing to
See all releases

Code changes from version 5.3.1 to 5.3.2

assets/backend/css/wooccm-admin.min.css CHANGED
@@ -1,2 +1 @@
1
-
2
- .select2-container{z-index:9999999}.select2-container .select2-selection--single,.select2-container .select2-selection--single .select2-selection__rendered,.select2-container .select2-selection--single .select2-selection__arrow{height:30px!important;line-height:30px!important}.wooccm-premium{opacity:.5;pointer-events:none}.button.fileinput-button{position:relative;overflow:hidden!important}.button.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;-ms-filter:'alpha(opacity=0)';font-size:200px;direction:ltr;cursor:pointer}table.wc_gateways>tbody>tr>td select{line-height:1!important}table.wc_gateways>tbody>tr>td.label{font-weight:600}table.wooccm-enhanced-options{border:0;box-shadow:none}table.wooccm-enhanced-options>thead>th .woocommerce-help-tip{margin:-1px 0 0 .25em}table.wooccm-enhanced-options>tbody>tr>td input.label{width:100%}table.wooccm-enhanced-options>tbody>tr>td select.add-price-type{margin:0 0 0 10px}table.wooccm-enhanced-options>tbody>tr>td input.check{margin:0 9px}table.wooccm-enhanced-options>tbody>tr>td.sort .wc-item-reorder-nav{width:auto}#wooccm_modal.processing{pointer-events:none}#wooccm_modal.processing:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;background-color:#fff;z-index:99999999;opacity:.8}#wooccm_modal select{min-height:30px}#wooccm_modal .form-field .wrap{padding:0}#wooccm_modal .attachment-info .details,#wooccm_modal .attachment-info .settings{width:100%}#wooccm_modal .attachment-info .woocommerce_options_panel label,#wooccm_modal .attachment-info .woocommerce_options_panel legend{width:75px;margin:0 0 0 -90px;font-weight:600}#wooccm_modal .attachment-info .woocommerce_options_panel fieldset.form-field,#wooccm_modal .attachment-info .woocommerce_options_panel p.form-field{padding:0 20px 0 92px!important}#wooccm_modal .attachment-info .woocommerce_options_panel input[type=email],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=number],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=password],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=text],#wooccm_modal .attachment-info .woocommerce_options_panel select,#wooccm_modal .attachment-info .woocommerce_options_panel .select2-container{width:100%!important}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel{width:100%}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .premium{display:block;clear:both}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .woocommerce-help-tip{margin:0 0 0 .5em}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container{width:50%!important;line-height:16px}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection{box-shadow:none;border-radius:3px;padding:0 24px 0 8px}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection--multiple{line-height:16px;min-height:30px}@media only screen and (max-width:1280px){#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container{width:80%!important}}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default .select2-selection--multiple .select2-selection__rendered li{margin:3px 3px 0 0}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default.select2-container--focus .select2-selection--multiple{border-color:#5b9dd9!important;box-shadow:0 0 2px rgba(30,140,190,0.8)!important;outline:2px solid transparent!important}#wooccm-order-files .inside{margin:0;padding:0;background:#fefefe;display:block!important}#wooccm-order-files .handlediv,#wooccm-order-files .hndle{display:none}#wooccm-order-files .wooccm_upload_results{display:inline-block;margin:0 10px}#wooccm-order-files .wooccm_order_attachments_wrapper{margin:0;overflow-x:auto}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments{width:100%;background:#fff}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th:first-child{padding-left:2em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th.sortable{cursor:pointer}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments .item{min-width:200px}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th{text-align:left;padding:1em;font-weight:400;color:#999;background:#f8f8f8;user-select:none}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody#order_line_items tr:first-child td{border-top:0}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody tr:last-child td{border-bottom:1px solid #dfdfdf}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb{text-align:left;width:38px;padding-bottom:1.5em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb .wc-order-item-thumbnail{width:38px;height:38px;border:2px solid #e8e8e8;background:#f8f8f8;color:#ccc;position:relative;font-size:21px;display:block;text-align:center}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th:first-child,#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td:first-child{padding-left:2em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th,#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td{padding:1.5em 1em 1em;text-align:left;line-height:1.5em;vertical-align:top;border-bottom:1px solid #f8f8f8}#wooccm-order-files .wc-order-data-row{border-bottom:1px solid #dfdfdf;padding:1.5em 2em;background:#f8f8f8;line-height:2em;text-align:left}
1
+ .select2-container{z-index:9999999}.select2-container .select2-selection--single,.select2-container .select2-selection--single .select2-selection__arrow,.select2-container .select2-selection--single .select2-selection__rendered{height:30px!important;line-height:30px!important}.wooccm-premium{opacity:.5;pointer-events:none}.button.fileinput-button{position:relative;overflow:hidden!important}.button.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;-ms-filter:'alpha(opacity=0)';font-size:200px;direction:ltr;cursor:pointer}table.wc_gateways>tbody>tr>td select{line-height:1!important}table.wc_gateways>tbody>tr>td.label{font-weight:600}table.wooccm-enhanced-options{border:none;box-shadow:none}table.wooccm-enhanced-options>thead>th .woocommerce-help-tip{margin:-1px 0 0 .25em}table.wooccm-enhanced-options>tbody>tr>td input.label{width:100%}table.wooccm-enhanced-options>tbody>tr>td select.add-price-type{margin:0 0 0 10px}table.wooccm-enhanced-options>tbody>tr>td input.check{margin:0 9px}table.wooccm-enhanced-options>tbody>tr>td.sort .wc-item-reorder-nav{width:auto}#wooccm_modal.processing{pointer-events:none}#wooccm_modal.processing:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;background-color:#fff;z-index:99999999;opacity:.8}#wooccm_modal select{min-height:30px}#wooccm_modal .form-field .wrap{padding:0}#wooccm_modal .attachment-info .details,#wooccm_modal .attachment-info .settings{width:100%}#wooccm_modal .attachment-info .woocommerce_options_panel label,#wooccm_modal .attachment-info .woocommerce_options_panel legend{width:75px;margin:0 0 0 -90px;font-weight:600}#wooccm_modal .attachment-info .woocommerce_options_panel fieldset.form-field,#wooccm_modal .attachment-info .woocommerce_options_panel p.form-field{padding:0 20px 0 92px!important}#wooccm_modal .attachment-info .woocommerce_options_panel .select2-container,#wooccm_modal .attachment-info .woocommerce_options_panel input[type=email],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=number],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=password],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=text],#wooccm_modal .attachment-info .woocommerce_options_panel select{width:100%!important}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel{width:100%}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .premium{display:block;clear:both}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .woocommerce-help-tip{margin:0 0 0 .5em}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container{width:50%!important;line-height:16px}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection{box-shadow:none;border-radius:3px;padding:0 24px 0 8px}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection--multiple{line-height:16px;min-height:30px}@media only screen and (max-width:1280px){#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container{width:80%!important}}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default .select2-selection--multiple .select2-selection__rendered li{margin:3px 3px 0 0}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default.select2-container--focus .select2-selection--multiple{border-color:#5b9dd9!important;box-shadow:0 0 2px rgba(30,140,190,.8)!important;outline:2px solid transparent!important}#wooccm-order-files .inside{margin:0;padding:0;background:#fefefe;display:block!important}#wooccm-order-files .handlediv,#wooccm-order-files .hndle{display:none}#wooccm-order-files .wooccm_upload_results{display:inline-block;margin:0 10px}#wooccm-order-files .wooccm_order_attachments_wrapper{margin:0;overflow-x:auto}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments{width:100%;background:#fff}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th:first-child{padding-left:2em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th.sortable{cursor:pointer}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments .item{min-width:200px}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th{text-align:left;padding:1em;font-weight:400;color:#999;background:#f8f8f8;user-select:none}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody#order_line_items tr:first-child td{border-top:none}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody tr:last-child td{border-bottom:1px solid #dfdfdf}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb{text-align:left;width:38px;padding-bottom:1.5em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb .wc-order-item-thumbnail{width:38px;height:38px;border:2px solid #e8e8e8;background:#f8f8f8;color:#ccc;position:relative;font-size:21px;display:block;text-align:center}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th:first-child,#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td:first-child{padding-left:2em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th,#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td{padding:1.5em 1em 1em;text-align:left;line-height:1.5em;vertical-align:top;border-bottom:1px solid #f8f8f8}#wooccm-order-files .wc-order-data-row{border-bottom:1px solid #dfdfdf;padding:1.5em 2em;background:#f8f8f8;line-height:2em;text-align:left}
 
assets/backend/js/wooccm-admin-field.js CHANGED
@@ -86,9 +86,7 @@
86
  var modal = this,
87
  $form = modal.$el.find('#wooccm_modal').find('form');
88
  var model = _.getFormData($form);
89
- console.log('model1', model)
90
  this.model.set(model);
91
- console.log('model2', this.model.attributes)
92
  },
93
  reload: function (e) {
94
  if (this.$el.find('#wooccm_modal').hasClass('reload')) {
@@ -109,7 +107,7 @@
109
  return;
110
  },
111
  enableSave: function (e) {
112
- $('.media-modal-submit').removeProp('disabled');
113
  this.updateModel(e);
114
  },
115
  disableSave: function (e) {
86
  var modal = this,
87
  $form = modal.$el.find('#wooccm_modal').find('form');
88
  var model = _.getFormData($form);
 
89
  this.model.set(model);
 
90
  },
91
  reload: function (e) {
92
  if (this.$el.find('#wooccm_modal').hasClass('reload')) {
107
  return;
108
  },
109
  enableSave: function (e) {
110
+ $('.media-modal-submit').prop('disabled', false);
111
  this.updateModel(e);
112
  },
113
  disableSave: function (e) {
assets/backend/js/wooccm-admin-field.min.js CHANGED
@@ -1 +1 @@
1
- !function($){"use strict";var count=0,timer,is_blocked=function($node){return $node.is(".processing")||$node.parents(".processing").length},block=function(){$("#wooccm_modal").addClass("processing")},unblock=function(){$("#wooccm_modal").removeClass("processing")};_.mixin({sortOptions:function(object){return _.sortBy(object,(function(o){return o.order}))},escapeHtml:function(attribute){return attribute.replace("&amp;",/&/g).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},getFormData:function($form){let form=$form.serializeJSON({checkboxUncheckedValue:"false",parseBooleans:!0,parseNulls:!0}),defaults=Object.assign({},wooccm_field.args),merged;return Object.assign(defaults,form)}});var FieldModel=Backbone.Model.extend({defaults:Object.create(wooccm_field.args)}),FieldModal=Backbone.View.extend({initialize:function(e){var $button,field_id=$(e.target).closest("[data-field_id]").data("field_id"),model=new FieldModel;model.set({id:field_id}),new FieldView({model:model}).render()}}),FieldView=Backbone.View.extend({events:{"change input":"enableSave","change textarea":"enableSave","change select":"enableSave","click .media-modal-backdrop":"close","click .media-modal-close":"close","click .media-modal-prev":"edit","click .media-modal-next":"edit","click .media-modal-tab":"tab","change .media-modal-parent":"parent","change .media-modal-render-tabs":"renderTabs","change .media-modal-render-panels":"renderPanels","change .media-modal-render-info":"renderInfo","submit .media-modal-form":"submit"},templates:{},initialize:function(){_.bindAll(this,"open","tab","edit","load","render","close","submit","parent"),this.init(),this.open()},init:function(){this.templates.window=wp.template("wooccm-modal-main")},assign:function(view,selector){view.setElement(this.$(selector)).render()},updateModel:function(e){e.preventDefault();var modal=this,$form=this.$el.find("#wooccm_modal").find("form"),model=_.getFormData($form);console.log("model1",model),this.model.set(model),console.log("model2",this.model.attributes)},reload:function(e){this.$el.find("#wooccm_modal").hasClass("reload")?location.reload():this.remove()},close:function(e){e.preventDefault(),this.undelegateEvents(),$(document).off("focusin"),$("body").removeClass("modal-open"),this.$el.find("#wooccm_modal").addClass("reload"),this.reload(e)},enableSave:function(e){$(".media-modal-submit").removeProp("disabled"),this.updateModel(e)},disableSave:function(e){$(".media-modal-submit").prop("disabled",!0)},tab:function(e){e.preventDefault();var modal=this,$modal=this.$el.find("#wooccm_modal"),$tab=$(e.currentTarget),$tabs=$modal.find("ul.wc-tabs"),panel=$tab.find("a").attr("href").replace("#","");$tabs.find(".active").removeClass("active"),$tab.addClass("active"),this.model.attributes.panel=panel,this.model.changed.panel=panel,this.renderPanels(e)},renderTabs:function(e){this.renderPanels(e),this.tabs.render()},renderPanels:function(e){this.updateModel(e),this.panels.render()},render:function(){var modal=this;this.$el.html(this.templates.window(this.model.attributes)),this.tabs=new FieldViewTabs({model:this.model}),this.panels=new FieldViewPanels({model:this.model}),this.info=new FieldViewInfo({model:this.model}),this.assign(this.tabs,"#wooccm-modal-tabs"),this.assign(this.panels,"#wooccm-modal-panels"),this.assign(this.info,"#wooccm-modal-info")},open:function(e){$("body").addClass("modal-open").append(this.$el),null!=this.model.attributes.id?this.load():_.delay((function(){unblock()}),100)},load:function(){var modal=this;null!=modal.model.attributes.id?$.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_load_field",nonce:wooccm_field.nonce,field_id:this.model.attributes.id},dataType:"json",type:"POST",complete:function(){unblock()},error:function(){alert("Error!")},success:function(response){console.log("response",response),response.success?(modal.model.set(response.data),modal.render()):alert(response.data)}}):modal.render()},edit:function(e){e.preventDefault();var modal=this,$button=$(e.target),field_count=parseInt($(".wc_gateways tr[data-field_id]").length),order=parseInt(modal.model.get("order"));count++,timer&&clearTimeout(timer),timer=setTimeout((function(){order=$button.hasClass("media-modal-next")?Math.min(order+count,field_count):Math.max(order-count,1),modal.model.set({id:parseInt($(".wc_gateways tr[data-field_order="+order+"]").data("field_id"))}),count=0,modal.load()}),300)},submit:function(e){e.preventDefault();var modal=this,$modal=modal.$el.find("#wooccm_modal"),$spinner=$modal.find(".settings-save-status .spinner"),$saved=$modal.find(".settings-save-status .saved");return console.log("modal.model.attributes",modal.model.attributes),$.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_save_field",nonce:wooccm_field.nonce,field_data:JSON.stringify(modal.model.attributes)},dataType:"json",type:"POST",beforeSend:function(){$(".media-modal-submit").prop("disabled",!0),$spinner.addClass("is-active")},complete:function(){$saved.addClass("is-active"),$spinner.removeClass("is-active"),_.delay((function(){$saved.removeClass("is-active")}),1e3)},error:function(response){alert("Error!")},success:function(response){response.success?null==modal.model.attributes.id&&($modal.addClass("reload"),modal.reload(e),modal.close(e)):alert(response.data)}}),!1},renderInfo:function(){this.info.render()},parent:function(e){e.preventDefault();var modal=this,$modal,$details=modal.$el.find("#wooccm_modal").find(".attachment-details");return this.updateModel(e),$.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_load_parent",nonce:wooccm_field.nonce,conditional_parent_key:modal.model.attributes.conditional_parent_key},dataType:"json",type:"POST",beforeSend:function(){modal.disableSave(),$details.addClass("save-waiting")},complete:function(){$details.addClass("save-complete"),$details.removeClass("save-waiting"),modal.enableSave()},error:function(){alert("Error!")},success:function(response){response.success?(modal.model.attributes.parent=response.data,modal.model.changed.parent=response.data,modal.renderInfo()):alert(response.data)}}),!1}}),FieldViewTabs=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("wooccm-modal-tabs")},render:function(){this.model.attributes.panel="general",this.$el.html(this.templates.window(this.model.attributes))}}),FieldViewPanels=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("wooccm-modal-panels")},render:function(){this.$el.html(this.templates.window(this.model.attributes)),this.$el.trigger("wooccm-enhanced-options"),this.$el.trigger("wooccm-enhanced-select"),this.$el.trigger("init_tooltips")}}),FieldViewInfo=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("wooccm-modal-info")},render:function(){this.$el.html(this.templates.window(this.model.attributes)),this.$el.trigger("wooccm-enhanced-select"),this.$el.trigger("init_tooltips")}});$("#wooccm_billing_settings_add, #wooccm_shipping_settings_add, #wooccm_additional_settings_add").on("click",(function(e){e.preventDefault(),new FieldModal(e)})),$("#wooccm_billing_settings_reset, #wooccm_shipping_settings_reset, #wooccm_additional_settings_reset").on("click",(function(e){e.preventDefault();var $button=$(e.target),c;return!!confirm(wooccm_field.message.reset)&&($.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_reset_fields",nonce:wooccm_field.nonce},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(response){response.success?location.reload():alert(response.data)}}),!1)})),$(".wooccm_billing_settings_edit, .wooccm_shipping_settings_edit, .wooccm_additional_settings_edit").on("click",(function(e){e.preventDefault(),new FieldModal(e)})),$(".wooccm_billing_settings_delete, .wooccm_shipping_settings_delete, .wooccm_additional_settings_delete").on("click",(function(e){e.preventDefault();var $button,$field=$(e.target).closest("[data-field_id]"),field_id=$field.data("field_id"),c;return!!confirm(wooccm_field.message.remove)&&($.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_delete_field",nonce:wooccm_field.nonce,field_id:field_id},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(response){response.success?$field.remove():alert(response.data)}}),!1)})),$(document).on("click",".wooccm-field-toggle-attribute",(function(e){e.preventDefault();var $link=$(this),$tr=$link.closest("tr"),$toggle=$link.find(".woocommerce-input-toggle");return $.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_toggle_field_attribute",nonce:wooccm_field.nonce,field_attr:$(this).data("field_attr"),field_id:$tr.data("field_id")},dataType:"json",type:"POST",beforeSend:function(response){$toggle.addClass("woocommerce-input-toggle--loading")},success:function(response){!0===response.data?($toggle.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled"),$toggle.addClass("woocommerce-input-toggle--enabled"),$toggle.removeClass("woocommerce-input-toggle--loading")):!0!==response.data&&($toggle.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled"),$toggle.addClass("woocommerce-input-toggle--disabled"),$toggle.removeClass("woocommerce-input-toggle--loading"))}}),!1})),$(document).on("change",".wooccm-field-change-attribute",(function(e){e.preventDefault();var $change=$(this),$tr=$change.closest("tr");return $.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_change_field_attribute",nonce:wooccm_field.nonce,field_attr:$change.data("field_attr"),field_value:$change.val(),field_id:$tr.data("field_id")},dataType:"json",type:"POST",beforeSend:function(response){$change.prop("disabled",!0)},success:function(response){console.log(response.data)},complete:function(response){$change.prop("disabled",!1)}}),!1}))}(jQuery);
1
+ !function($){"use strict";var count=0,timer,is_blocked=function($node){return $node.is(".processing")||$node.parents(".processing").length},block=function(){$("#wooccm_modal").addClass("processing")},unblock=function(){$("#wooccm_modal").removeClass("processing")};_.mixin({sortOptions:function(object){return _.sortBy(object,(function(o){return o.order}))},escapeHtml:function(attribute){return attribute.replace("&amp;",/&/g).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},getFormData:function($form){let form=$form.serializeJSON({checkboxUncheckedValue:"false",parseBooleans:!0,parseNulls:!0}),defaults=Object.assign({},wooccm_field.args),merged;return Object.assign(defaults,form)}});var FieldModel=Backbone.Model.extend({defaults:Object.create(wooccm_field.args)}),FieldModal=Backbone.View.extend({initialize:function(e){var $button,field_id=$(e.target).closest("[data-field_id]").data("field_id"),model=new FieldModel;model.set({id:field_id}),new FieldView({model:model}).render()}}),FieldView=Backbone.View.extend({events:{"change input":"enableSave","change textarea":"enableSave","change select":"enableSave","click .media-modal-backdrop":"close","click .media-modal-close":"close","click .media-modal-prev":"edit","click .media-modal-next":"edit","click .media-modal-tab":"tab","change .media-modal-parent":"parent","change .media-modal-render-tabs":"renderTabs","change .media-modal-render-panels":"renderPanels","change .media-modal-render-info":"renderInfo","submit .media-modal-form":"submit"},templates:{},initialize:function(){_.bindAll(this,"open","tab","edit","load","render","close","submit","parent"),this.init(),this.open()},init:function(){this.templates.window=wp.template("wooccm-modal-main")},assign:function(view,selector){view.setElement(this.$(selector)).render()},updateModel:function(e){e.preventDefault();var modal=this,$form=this.$el.find("#wooccm_modal").find("form"),model=_.getFormData($form);this.model.set(model)},reload:function(e){this.$el.find("#wooccm_modal").hasClass("reload")?location.reload():this.remove()},close:function(e){e.preventDefault(),this.undelegateEvents(),$(document).off("focusin"),$("body").removeClass("modal-open"),this.$el.find("#wooccm_modal").addClass("reload"),this.reload(e)},enableSave:function(e){$(".media-modal-submit").prop("disabled",!1),this.updateModel(e)},disableSave:function(e){$(".media-modal-submit").prop("disabled",!0)},tab:function(e){e.preventDefault();var modal=this,$modal=this.$el.find("#wooccm_modal"),$tab=$(e.currentTarget),$tabs=$modal.find("ul.wc-tabs"),panel=$tab.find("a").attr("href").replace("#","");$tabs.find(".active").removeClass("active"),$tab.addClass("active"),this.model.attributes.panel=panel,this.model.changed.panel=panel,this.renderPanels(e)},renderTabs:function(e){this.renderPanels(e),this.tabs.render()},renderPanels:function(e){this.updateModel(e),this.panels.render()},render:function(){var modal=this;this.$el.html(this.templates.window(this.model.attributes)),this.tabs=new FieldViewTabs({model:this.model}),this.panels=new FieldViewPanels({model:this.model}),this.info=new FieldViewInfo({model:this.model}),this.assign(this.tabs,"#wooccm-modal-tabs"),this.assign(this.panels,"#wooccm-modal-panels"),this.assign(this.info,"#wooccm-modal-info")},open:function(e){$("body").addClass("modal-open").append(this.$el),null!=this.model.attributes.id?this.load():_.delay((function(){unblock()}),100)},load:function(){var modal=this;null!=modal.model.attributes.id?$.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_load_field",nonce:wooccm_field.nonce,field_id:this.model.attributes.id},dataType:"json",type:"POST",complete:function(){unblock()},error:function(){alert("Error!")},success:function(response){console.log("response",response),response.success?(modal.model.set(response.data),modal.render()):alert(response.data)}}):modal.render()},edit:function(e){e.preventDefault();var modal=this,$button=$(e.target),field_count=parseInt($(".wc_gateways tr[data-field_id]").length),order=parseInt(modal.model.get("order"));count++,timer&&clearTimeout(timer),timer=setTimeout((function(){order=$button.hasClass("media-modal-next")?Math.min(order+count,field_count):Math.max(order-count,1),modal.model.set({id:parseInt($(".wc_gateways tr[data-field_order="+order+"]").data("field_id"))}),count=0,modal.load()}),300)},submit:function(e){e.preventDefault();var modal=this,$modal=modal.$el.find("#wooccm_modal"),$spinner=$modal.find(".settings-save-status .spinner"),$saved=$modal.find(".settings-save-status .saved");return console.log("modal.model.attributes",modal.model.attributes),$.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_save_field",nonce:wooccm_field.nonce,field_data:JSON.stringify(modal.model.attributes)},dataType:"json",type:"POST",beforeSend:function(){$(".media-modal-submit").prop("disabled",!0),$spinner.addClass("is-active")},complete:function(){$saved.addClass("is-active"),$spinner.removeClass("is-active"),_.delay((function(){$saved.removeClass("is-active")}),1e3)},error:function(response){alert("Error!")},success:function(response){response.success?null==modal.model.attributes.id&&($modal.addClass("reload"),modal.reload(e),modal.close(e)):alert(response.data)}}),!1},renderInfo:function(){this.info.render()},parent:function(e){e.preventDefault();var modal=this,$modal,$details=modal.$el.find("#wooccm_modal").find(".attachment-details");return this.updateModel(e),$.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_load_parent",nonce:wooccm_field.nonce,conditional_parent_key:modal.model.attributes.conditional_parent_key},dataType:"json",type:"POST",beforeSend:function(){modal.disableSave(),$details.addClass("save-waiting")},complete:function(){$details.addClass("save-complete"),$details.removeClass("save-waiting"),modal.enableSave()},error:function(){alert("Error!")},success:function(response){response.success?(modal.model.attributes.parent=response.data,modal.model.changed.parent=response.data,modal.renderInfo()):alert(response.data)}}),!1}}),FieldViewTabs=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("wooccm-modal-tabs")},render:function(){this.model.attributes.panel="general",this.$el.html(this.templates.window(this.model.attributes))}}),FieldViewPanels=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("wooccm-modal-panels")},render:function(){this.$el.html(this.templates.window(this.model.attributes)),this.$el.trigger("wooccm-enhanced-options"),this.$el.trigger("wooccm-enhanced-select"),this.$el.trigger("init_tooltips")}}),FieldViewInfo=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("wooccm-modal-info")},render:function(){this.$el.html(this.templates.window(this.model.attributes)),this.$el.trigger("wooccm-enhanced-select"),this.$el.trigger("init_tooltips")}});$("#wooccm_billing_settings_add, #wooccm_shipping_settings_add, #wooccm_additional_settings_add").on("click",(function(e){e.preventDefault(),new FieldModal(e)})),$("#wooccm_billing_settings_reset, #wooccm_shipping_settings_reset, #wooccm_additional_settings_reset").on("click",(function(e){e.preventDefault();var $button=$(e.target),c;return!!confirm(wooccm_field.message.reset)&&($.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_reset_fields",nonce:wooccm_field.nonce},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(response){response.success?location.reload():alert(response.data)}}),!1)})),$(".wooccm_billing_settings_edit, .wooccm_shipping_settings_edit, .wooccm_additional_settings_edit").on("click",(function(e){e.preventDefault(),new FieldModal(e)})),$(".wooccm_billing_settings_delete, .wooccm_shipping_settings_delete, .wooccm_additional_settings_delete").on("click",(function(e){e.preventDefault();var $button,$field=$(e.target).closest("[data-field_id]"),field_id=$field.data("field_id"),c;return!!confirm(wooccm_field.message.remove)&&($.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_delete_field",nonce:wooccm_field.nonce,field_id:field_id},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(response){response.success?$field.remove():alert(response.data)}}),!1)})),$(document).on("click",".wooccm-field-toggle-attribute",(function(e){e.preventDefault();var $link=$(this),$tr=$link.closest("tr"),$toggle=$link.find(".woocommerce-input-toggle");return $.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_toggle_field_attribute",nonce:wooccm_field.nonce,field_attr:$(this).data("field_attr"),field_id:$tr.data("field_id")},dataType:"json",type:"POST",beforeSend:function(response){$toggle.addClass("woocommerce-input-toggle--loading")},success:function(response){!0===response.data?($toggle.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled"),$toggle.addClass("woocommerce-input-toggle--enabled"),$toggle.removeClass("woocommerce-input-toggle--loading")):!0!==response.data&&($toggle.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled"),$toggle.addClass("woocommerce-input-toggle--disabled"),$toggle.removeClass("woocommerce-input-toggle--loading"))}}),!1})),$(document).on("change",".wooccm-field-change-attribute",(function(e){e.preventDefault();var $change=$(this),$tr=$change.closest("tr");return $.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_change_field_attribute",nonce:wooccm_field.nonce,field_attr:$change.data("field_attr"),field_value:$change.val(),field_id:$tr.data("field_id")},dataType:"json",type:"POST",beforeSend:function(response){$change.prop("disabled",!0)},success:function(response){console.log(response.data)},complete:function(response){$change.prop("disabled",!1)}}),!1}))}(jQuery);
assets/backend/js/wooccm-admin.min.js CHANGED
@@ -1 +1 @@
1
- !function($){"use strict";function date_picker_select(datepicker){var option=$(datepicker).next().is(".hasDatepicker")?"minDate":"maxDate",otherDateField="minDate"===option?$(datepicker).next():$(datepicker).prev(),date=$(datepicker).datepicker("getDate");$(otherDateField).datepicker("option",option,date),$(datepicker).change()}function getEnhancedSelectFormatString(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_searching},inputTooLong:function(args){var overChars=args.input.length-args.maximum;return 1===overChars?wc_enhanced_select_params.i18n_input_too_long_1:wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",overChars)},inputTooShort:function(args){var remainingChars=args.minimum-args.input.length;return 1===remainingChars?wc_enhanced_select_params.i18n_input_too_short_1:wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",remainingChars)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(args){return 1===args.maximum?wc_enhanced_select_params.i18n_selection_too_long_1:wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",args.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}$(".wooccm-premium-field").closest("tr").addClass("wooccm-premium"),$(document).on("wooccm-enhanced-between-dates",(function(e){$(".wooccm-enhanced-between-dates").filter(":not(.enhanced)").each((function(){$(this).find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,onSelect:function(){date_picker_select($(this))}}),$(this).find("input").each((function(){date_picker_select($(this))}))}))})),$(document).on("wooccm-enhanced-options",(function(e){$("table.wc_gateways tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,helper:function(event,ui){return ui.children().each((function(){$(this).width($(this).width())})),ui.css("left","0"),ui},start:function(event,ui){ui.item.css("background-color","#f6f6f6")},stop:function(event,ui){ui.item.removeAttr("style"),ui.item.trigger("updateMoveButtons")},update:function(event,ui){$(this).find("tr").each((function(i,tr){$(tr).find("input.add-order").val(i).trigger("change")}))}}),$(".wooccm-enhanced-options").each((function(){var $table=$(this),$add=$table.find(".add-option"),$remove=$table.find(".remove-options");$add.on("click",(function(e){var $tr=$table.find("tbody > tr"),id=$tr.length,tr=$tr.first().clone().html().replace(/options\[([0-9]+)\]/g,"options["+id+"]").replace('disabled="disabled"',"").replace('checked="checked"',"").replace('<input value="0"','<input value="'+id+'"').replace('<input value="0"','<input value="'+id+'"');$tr.last().after($("<tr>"+tr+"</tr>")).find("input").trigger("change"),$remove.removeProp("disabled")})),$remove.on("click",(function(e){var $tr;$table.find("tr > td.check-column input:checked").closest("tr").remove(),$table.find("tbody > tr").length<2&&$(this).prop("disabled",!0)}))}))})),$(document).on("wooccm-enhanced-select",(function(e){$(".wooccm-enhanced-select").filter(":not(.enhanced)").each((function(){var select2_args=$.extend({minimumResultsForSearch:10,allowClear:!!$(this).data("allow_clear"),placeholder:$(this).data("placeholder")},getEnhancedSelectFormatString()),name;$(this).attr("name").indexOf("[]"),$(this).selectWoo(select2_args).addClass("enhanced")})),$(".wooccm-product-search").filter(":not(.enhanced)").each((function(){var select2_args={allowClear:!!$(this).data("allow_clear"),placeholder:$(this).data("placeholder"),minimumInputLength:$(this).data("minimum_input_length")?$(this).data("minimum_input_length"):"3",escapeMarkup:function(m){return m},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(params){return{term:params.term,action:$(this).data("action")||"wooccm_select_search_products",security:wc_enhanced_select_params.search_products_nonce,selected:$(this).select2("val")||0,exclude:$(this).data("exclude"),include:$(this).data("include"),limit:$(this).data("limit"),display_stock:$(this).data("display_stock")}},processResults:function(data){var terms=[];return data&&$.each(data,(function(id,text){terms.push({id:id,text:text})})),{results:terms}},cache:!0}},name;if(select2_args=$.extend(select2_args,getEnhancedSelectFormatString()),$(this).attr("name").indexOf("[]"),$(this).selectWoo(select2_args).addClass("enhanced"),$(this).data("sortable")){var $select=$(this),$list=$(this).next(".select2-container").find("ul.select2-selection__rendered");$list.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){$($list.find(".select2-selection__choice").get().reverse()).each((function(){var id=$(this).data("data").id,option=$select.find('option[value="'+id+'"]')[0];$select.prepend(option)}))}})}else $(this).prop("multiple")&&$(this).on("change",(function(){var $children=$(this).children();$children.filter("option").sort((function(a,b){var atext=a.text.toLowerCase(),btext=b.text.toLowerCase();return atext>btext?1:atext<btext?-1:0})),$(this).html($children)}))}))})),$(".wooccm-enhanced-search").filter(":not(.enhanced)").each((function(){var select2_args={allowClear:!!$(this).data("allow_clear"),placeholder:$(this).data("placeholder"),minimumInputLength:$(this).data("minimum_input_length")||"3",escapeMarkup:function(m){return m},ajax:{url:wooccm_admin.ajax_url,dataType:"json",cache:!0,delay:250,data:function(params){return{term:params.term,key:$(this).data("key"),action:"wooccm_search_field",nonce:wooccm_admin.nonce}},processResults:function(data,params){var terms=[];return data&&$.each(data,(function(id,text){terms.push({id:id,text:text})})),{results:terms}}}};select2_args=$.extend(select2_args,getEnhancedSelectFormatString()),$(this).select2(select2_args).addClass("enhanced")}))}(jQuery);
1
+ !function($){"use strict";function date_picker_select(datepicker){var option=$(datepicker).next().is(".hasDatepicker")?"minDate":"maxDate",otherDateField="minDate"===option?$(datepicker).next():$(datepicker).prev(),date=$(datepicker).datepicker("getDate");$(otherDateField).datepicker("option",option,date),$(datepicker).change()}function getEnhancedSelectFormatString(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_searching},inputTooLong:function(args){var overChars=args.input.length-args.maximum;return 1===overChars?wc_enhanced_select_params.i18n_input_too_long_1:wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",overChars)},inputTooShort:function(args){var remainingChars=args.minimum-args.input.length;return 1===remainingChars?wc_enhanced_select_params.i18n_input_too_short_1:wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",remainingChars)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(args){return 1===args.maximum?wc_enhanced_select_params.i18n_selection_too_long_1:wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",args.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}$(".wooccm-premium-field").closest("tr").addClass("wooccm-premium"),$(document).on("wooccm-enhanced-between-dates",(function(e){$(".wooccm-enhanced-between-dates").filter(":not(.enhanced)").each((function(){$(this).find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,onSelect:function(){date_picker_select($(this))}}),$(this).find("input").each((function(){date_picker_select($(this))}))}))})),$(document).on("wooccm-enhanced-options",(function(e){$("table.wc_gateways tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,helper:function(event,ui){return ui.children().each((function(){$(this).width($(this).width())})),ui.css("left","0"),ui},start:function(event,ui){ui.item.css("background-color","#f6f6f6")},stop:function(event,ui){ui.item.removeAttr("style"),ui.item.trigger("updateMoveButtons")},update:function(event,ui){$(this).find("tr").each((function(i,tr){$(tr).find("input.add-order").val(i).trigger("change")}))}}),$(".wooccm-enhanced-options").each((function(){var $table=$(this),$add=$table.find(".add-option"),$remove=$table.find(".remove-options");$add.on("click",(function(e){var $tr=$table.find("tbody > tr"),id=$tr.length,tr=$tr.first().clone().html().replace(/options\[([0-9]+)\]/g,"options["+id+"]").replace('disabled="disabled"',"").replace('checked="checked"',"").replace('<input value="0"','<input value="'+id+'"').replace('<input value="0"','<input value="'+id+'"');$tr.last().after($("<tr>"+tr+"</tr>")).find("input").trigger("change"),$remove.removeProp("disabled")})),$remove.on("click",(function(e){var $tr;$table.find("tr > td.check-column input:checked").closest("tr").remove(),$table.find("tbody > tr").length<2&&$(this).prop("disabled",!0)}))}))})),$(document).on("wooccm-enhanced-select",(function(e){$(".wooccm-enhanced-select").filter(":not(.enhanced)").each((function(){var select2_args=$.extend({minimumResultsForSearch:10,allowClear:!!$(this).data("allow_clear"),placeholder:$(this).data("placeholder")},getEnhancedSelectFormatString()),name=$(this).attr("name");$(this).selectWoo(select2_args).addClass("enhanced")})),$(".wooccm-product-search").filter(":not(.enhanced)").each((function(){var select2_args={allowClear:!!$(this).data("allow_clear"),placeholder:$(this).data("placeholder"),minimumInputLength:$(this).data("minimum_input_length")?$(this).data("minimum_input_length"):"3",escapeMarkup:function(m){return m},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(params){return{term:params.term,action:$(this).data("action")||"wooccm_select_search_products",security:wc_enhanced_select_params.search_products_nonce,selected:$(this).select2("val")||0,exclude:$(this).data("exclude"),include:$(this).data("include"),limit:$(this).data("limit"),display_stock:$(this).data("display_stock")}},processResults:function(data){var terms=[];return data&&$.each(data,(function(id,text){terms.push({id:id,text:text})})),{results:terms}},cache:!0}};select2_args=$.extend(select2_args,getEnhancedSelectFormatString());var name=$(this).attr("name");if($(this).selectWoo(select2_args).addClass("enhanced"),$(this).data("sortable")){var $select=$(this),$list=$(this).next(".select2-container").find("ul.select2-selection__rendered");$list.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){$($list.find(".select2-selection__choice").get().reverse()).each((function(){var id=$(this).data("data").id,option=$select.find('option[value="'+id+'"]')[0];$select.prepend(option)}))}})}else $(this).prop("multiple")&&$(this).on("change",(function(){var $children=$(this).children();$children.filter("option").sort((function(a,b){var atext=a.text.toLowerCase(),btext=b.text.toLowerCase();return atext>btext?1:atext<btext?-1:0})),$(this).html($children)}))}))})),$(".wooccm-enhanced-search").filter(":not(.enhanced)").each((function(){var select2_args={allowClear:!!$(this).data("allow_clear"),placeholder:$(this).data("placeholder"),minimumInputLength:$(this).data("minimum_input_length")||"3",escapeMarkup:function(m){return m},ajax:{url:wooccm_admin.ajax_url,dataType:"json",cache:!0,delay:250,data:function(params){return{term:params.term,key:$(this).data("key"),action:"wooccm_search_field",nonce:wooccm_admin.nonce}},processResults:function(data,params){var terms=[];return data&&$.each(data,(function(id,text){terms.push({id:id,text:text})})),{results:terms}}}};select2_args=$.extend(select2_args,getEnhancedSelectFormatString()),$(this).select2(select2_args).addClass("enhanced")}))}(jQuery);
assets/frontend/css/wooccm.css CHANGED
@@ -118,4 +118,11 @@
118
  height: 100%;
119
  width: 100%;
120
  }
 
 
 
 
 
 
 
121
  /*# sourceMappingURL=wooccm.css.map */
118
  height: 100%;
119
  width: 100%;
120
  }
121
+
122
+ .ui-timepicker-table a {
123
+ word-break: normal;
124
+ }
125
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled{
126
+ width: 100%;
127
+ }
128
  /*# sourceMappingURL=wooccm.css.map */
assets/frontend/css/wooccm.min.css CHANGED
@@ -1 +1 @@
1
- .woocommerce form .wooccm-clearfix:after,.woocommerce form .wooccm-clearfix:before{content:'';display:table}.woocommerce form .wooccm-clearfix:after{clear:both}.woocommerce form .wooccm-conditional-child{display:none}.woocommerce form .wooccm-type-radio .woocommerce-radio-wrapper label{display:inline-block}.woocommerce form .wooccm-colorpicker-iris .iris-picker{display:none}.woocommerce form .wooccm-colorpicker-iris.active .iris-picker{display:block}.button.fileinput-button{position:relative;overflow:hidden!important}.button.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;-ms-filter:'alpha(opacity=0)';font-size:200px;direction:ltr;cursor:pointer}.wooccm-file-list{margin:0 -5px;padding:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:start}.wooccm-file-list .wooccm-file-file{display:flex;justify-content:center;align-items:stretch;box-sizing:border-box;padding:10px 5px 0 5px;width:25%;position:relative}.wooccm-file-list .wooccm-file-file .wooccm-file-list-delete{z-index:1;position:absolute;top:2px;right:-3px;width:16px;height:16px;background-color:#222;display:block;line-height:16px;text-align:center;color:#fefefe;font-weight:900;border-radius:50%;font-size:12px;cursor:pointer;font-family:code;text-decoration:none!important}.wooccm-file-list .wooccm-file-file .wooccm-file-list-container{width:100%;overflow:hidden}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container{display:flex;justify-content:center;align-items:center;overflow:hidden;width:100%;padding-top:100%;position:relative;background:#eee}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container>img{overflow:hidden;object-fit:cover;position:absolute;top:30%;bottom:auto;height:40%;opacity:.8}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container>img.image{top:0;bottom:0;left:0;right:0;max-height:100%;height:100%;width:100%}
1
+ .woocommerce form .wooccm-clearfix:after,.woocommerce form .wooccm-clearfix:before{content:'';display:table}.woocommerce form .wooccm-clearfix:after{clear:both}.woocommerce form .wooccm-conditional-child{display:none}.woocommerce form .wooccm-type-radio .woocommerce-radio-wrapper label{display:inline-block}.woocommerce form .wooccm-colorpicker-iris .iris-picker{display:none}.woocommerce form .wooccm-colorpicker-iris.active .iris-picker{display:block}.button.fileinput-button{position:relative;overflow:hidden!important}.button.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;-ms-filter:'alpha(opacity=0)';font-size:200px;direction:ltr;cursor:pointer}.wooccm-file-list{margin:0 -5px;padding:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:start}.wooccm-file-list .wooccm-file-file{display:flex;justify-content:center;align-items:stretch;box-sizing:border-box;padding:10px 5px 0 5px;width:25%;position:relative}.wooccm-file-list .wooccm-file-file .wooccm-file-list-delete{z-index:1;position:absolute;top:2px;right:-3px;width:16px;height:16px;background-color:#222;display:block;line-height:16px;text-align:center;color:#fefefe;font-weight:900;border-radius:50%;font-size:12px;cursor:pointer;font-family:code;text-decoration:none!important}.wooccm-file-list .wooccm-file-file .wooccm-file-list-container{width:100%;overflow:hidden}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container{display:flex;justify-content:center;align-items:center;overflow:hidden;width:100%;padding-top:100%;position:relative;background:#eee}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container>img{overflow:hidden;object-fit:cover;position:absolute;top:30%;bottom:auto;height:40%;opacity:.8}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container>img.image{top:0;bottom:0;left:0;right:0;max-height:100%;height:100%;width:100%}.ui-timepicker-table a{word-break:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{width:100%}
assets/frontend/js/wooccm-checkout.js CHANGED
@@ -475,23 +475,24 @@
475
  var $input = $(this);
476
 
477
  if ($.isFunction($.fn.timepicker)) {
 
478
 
479
  $input.timepicker({
480
- //timeFormat: 'HH:mm:ss',
481
- showPeriod: true,
482
  showLeadingZero: true,
483
- hours: $input.data('hours') || undefined,
484
- minutes: $input.data('minutes') || undefined,
485
  /* hours: {
486
  starts: 9, // First displayed hour
487
  ends: 21 // Last displayed hour
488
- },
489
  minutes: {
490
  starts: 5, // First displayed minute
491
  ends: 55, // Last displayed minute
492
  interval: 5, // Interval of displayed minutes
493
  manual: [] // Optional extra entries for minutes
494
- }, */
495
  });
496
  }
497
 
475
  var $input = $(this);
476
 
477
  if ($.isFunction($.fn.timepicker)) {
478
+ console.log($input.data('format-ampm'));
479
 
480
  $input.timepicker({
481
+ showPeriodLabels: !!$input.data('format-ampm'),
482
+ showPeriod: !!$input.data('format-ampm'),
483
  showLeadingZero: true,
484
+ hours: $input.data('hours') || undefined ,
485
+ minutes: $input.data('minutes') || undefined
486
  /* hours: {
487
  starts: 9, // First displayed hour
488
  ends: 21 // Last displayed hour
489
+ },/*
490
  minutes: {
491
  starts: 5, // First displayed minute
492
  ends: 55, // Last displayed minute
493
  interval: 5, // Interval of displayed minutes
494
  manual: [] // Optional extra entries for minutes
495
+ }, */
496
  });
497
  }
498
 
assets/frontend/js/wooccm-checkout.min.js CHANGED
@@ -1 +1 @@
1
- !function($){"use strict";var is_blocked=function($node){return $node.is(".processing")||$node.parents(".processing").length},block=function($node){is_blocked($node)||$node.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock=function($node){$node.removeClass("processing").unblock()},append_image=function(list,i,source,name,filetype){var $field_list=$(list),source_class;filetype.match("image.*")?source_class="image":filetype.match("application/ms.*")?(source=wooccm_upload.icons.spreadsheet,source_class="spreadsheet"):filetype.match("application/x.*")?(source=wooccm_upload.icons.archive,source_class="application"):filetype.match("audio.*")?(source=wooccm_upload.icons.audio,source_class="audio"):filetype.match("text.*")?(source=wooccm_upload.icons.text,source_class="text"):filetype.match("video.*")?(source=wooccm_upload.icons.video,source_class="video"):(source=wooccm_upload.icons.interactive,source_class="interactive");var html='<span data-file_id="'+i+'" title="'+name+'" class="wooccm-file-file">\n <span class="wooccm-file-list-container">\n <a title="'+name+'" class="wooccm-file-list-delete">×</a>\n <span class="wooccm-file-list-image-container">\n <img class="'+source_class+'" alt="'+name+'" src="'+source+'"/>\n </span>\n </span>\n </span>';$field_list.append(html).fadeIn()};function field_is_required(field,is_required){is_required?(field.find("label .optional").remove(),field.addClass("validate-required"),0===field.find("label .required").length&&field.find("label").append('<abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>'),field.show(),field.find("input[type=hidden]").prop("type","text")):(field.find("label .required").remove(),field.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field"),0===field.find("label .optional").length&&field.find("label").append('<span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>"))}$(document).on("country_to_state_changing",(function(event,country,wrapper){var thisform=wrapper,thislocale,locale_fields=$.parseJSON(wc_address_i18n_params.locale_fields);$.each(locale_fields,(function(key,value){var field=thisform.find(value),required=field.find("[data-required]").data("required")||field.find(".wooccm-required-field").length;field_is_required(field,required)}))}));var fileList={};if($(".wooccm-type-file").each((function(i,field){var $field=$(field),$button_file=$field.find("[type=file]"),$button_click=$field.find(".wooccm-file-button"),$field_list=$field.find(".wooccm-file-list");fileList[$field.attr("id")]=[],$button_click.on("click",(function(e){e.preventDefault(),$button_file.trigger("click")})),$field_list.on("click",".wooccm-file-list-delete",(function(e){var $file=$(this).closest(".wooccm-file-file"),file_id=$(this).closest("[data-file_id]").data("file_id");fileList[$field.attr("id")]=$.grep(fileList[$field.attr("id")],(function(value,index){return index!=file_id})),$file.remove(),$("#order_review").trigger("wooccm_upload")})),$button_file.on("change",(function(e){var files=$(this)[0].files;files.length&&window.FileReader&&$.each(files,(function(i,file){var count;if($field_list.find("span[data-file_id]").length+i>=wooccm_upload.limit.max_files)return alert("Exeeds max files limit of "+wooccm_upload.limit.max_files),!1;if(file.size>wooccm_upload.limit.max_file_size)return alert("Exeeds max file size of "+wooccm_upload.limit.max_file_size),!0;var reader=new FileReader,theFile;reader.onload=(theFile=file,function(e){setTimeout((function(){append_image($field_list,fileList[$field.attr("id")].push(file)-1,e.target.result,theFile.name,theFile.type),$("#order_review").trigger("wooccm_upload")}),200)}),reader.readAsDataURL(file)}))}))})),$("#order_review").on("ajaxSuccess wooccm_upload",(function(e,xhr,settings){var $order_review,$place_order=$(e.target).find("#place_order"),$fields,fields;$(".wooccm-type-file").length?$place_order.addClass("wooccm-upload-process"):$place_order.removeClass("wooccm-upload-process")})),$(document).on("click","#place_order.wooccm-upload-process",(function(e){e.preventDefault();var $form=$("form.checkout"),$place_order=$(this),$fields;$(".wooccm-type-file").length&&window.FormData&&Object.keys(fileList).length&&(is_blocked($form)||($place_order.html(wooccm_upload.message.uploading),block($form)),$.each(fileList,(function(field_id,files){var $field,$attachment_ids=$("#"+field_id).find(".wooccm-file-field"),data=new FormData;$.each(files,(function(file_id,file){return file_id>wooccm_upload.limit.max_files?(console.log("Exeeds max files limit of "+wooccm_upload.limit.max_files),!1):file.size>wooccm_upload.limit.max_file_size?(console.log("Exeeds max file size of "+wooccm_upload.limit.max_files),!0):(console.log("We're ready to upload "+file.name),void data.append("wooccm_checkout_attachment_upload[]",file))})),data.append("action","wooccm_checkout_attachment_upload"),data.append("nonce",wooccm_upload.nonce),$.ajax({async:!1,url:wooccm_upload.ajax_url,type:"POST",cache:!1,data:data,processData:!1,contentType:!1,beforeSend:function(response){},success:function(response){response.success?$attachment_ids.val(response.data):$("body").trigger("update_checkout")},complete:function(response){}})})),unblock($form),$place_order.removeClass("wooccm-upload-process").trigger("click"))})),$(document).on("change",".wooccm-add-price",(function(e){$("body").trigger("update_checkout")})),$(".wooccm-field").each((function(i,field){$(field).find("input,textarea,select").on("change keyup wooccm_change",(function(e){var name=$(e.target).attr("name").replace("[]",""),type=$(e.target).prop("type"),value=$(e.target).val();"checkbox"==type&&(value=-1!==$(e.target).attr("name").indexOf("[]")?$(e.target).closest(".wooccm-field").find("input:checked").map((function(i,e){return e.value})).toArray():$(e.target).is(":checked")),$("*[data-conditional-parent="+name+"]").closest(".wooccm-field").hide(),$("*[data-conditional-parent="+name+"]").each((function(i,child){var $child=$(child),condition=$child&&$child.data("conditional-parent-value");(value==condition||$.isArray(value)&&value.indexOf(condition)>-1)&&$child.closest(".wooccm-field").fadeIn()}))}))})),$(".wooccm-conditional-child").each((function(i,field){var $field=$(field),$parent=$("#"+$field.find("[data-conditional-parent]").data("conditional-parent")+"_field");$parent.find("select:first").trigger("wooccm_change"),$parent.find("textarea:first").trigger("wooccm_change"),$parent.find("input[type=button]:first").trigger("wooccm_change"),$parent.find("input[type=radio]:checked:first").trigger("wooccm_change"),$parent.find("input[type=checkbox]:checked:first").trigger("wooccm_change"),$parent.find("input[type=color]:first").trigger("wooccm_change"),$parent.find("input[type=date]:first").trigger("wooccm_change"),$parent.find("input[type=datetime-local]:first").trigger("wooccm_change"),$parent.find("input[type=email]:first").trigger("wooccm_change"),$parent.find("input[type=file]:first").trigger("wooccm_change"),$parent.find("input[type=hidden]:first").trigger("wooccm_change"),$parent.find("input[type=image]:first").trigger("wooccm_change"),$parent.find("input[type=month]:first").trigger("wooccm_change"),$parent.find("input[type=number]:first").trigger("wooccm_change"),$parent.find("input[type=password]:first").trigger("wooccm_change"),$parent.find("input[type=range]:first").trigger("wooccm_change"),$parent.find("input[type=reset]:first").trigger("wooccm_change"),$parent.find("input[type=search]:first").trigger("wooccm_change"),$parent.find("input[type=submit]:first").trigger("wooccm_change"),$parent.find("input[type=tel]:first").trigger("wooccm_change"),$parent.find("input[type=text]:first").trigger("wooccm_change"),$parent.find("input[type=time]:first").trigger("wooccm_change"),$parent.find("input[type=url]:first").trigger("wooccm_change"),$parent.find("input[type=week]:first").trigger("wooccm_change")})),$(".wooccm-enhanced-datepicker").each((function(i,field){var $input=$(this),disable=$input.data("disable")||!1;$.isFunction($.fn.datepicker)&&$input.datepicker({dateFormat:$input.data("formatdate")||"dd-mm-yy",minDate:$input.data("mindate"),maxDate:$input.data("maxdate"),beforeShowDay:function(date){var day=null!=date.getDay()&&date.getDay().toString();return disable?[-1===$.inArray(day,disable)]:[!0]}})})),$(".wooccm-enhanced-timepicker").each((function(i,field){var $input=$(this);$.isFunction($.fn.timepicker)&&$input.timepicker({showPeriod:!0,showLeadingZero:!0,hours:$input.data("hours")||void 0,minutes:$input.data("minutes")||void 0})})),$(".wooccm-colorpicker-farbtastic").each((function(i,field){var $field=$(field),$input=$field.find("input[type=text]"),$container=$field.find(".wooccmcolorpicker_container");$input.hide(),$.isFunction($.fn.farbtastic)&&($container.farbtastic("#"+$input.attr("id")),$container.on("click",(function(e){$input.fadeIn()})))})),$(".wooccm-colorpicker-iris").each((function(i,field){var $field=$(field),$input=$field.find("input[type=text]");$input.css("background",$input.val()),$input.on("click",(function(e){$field.toggleClass("active")})),$input.iris({class:$input.attr("id"),palettes:!0,color:"",hide:!1,change:function(event,ui){$input.css("background",ui.color.toString()).fadeIn()}})})),$(document).on("click",(function(e){0===$(e.target).closest(".iris-picker").length&&$(".wooccm-colorpicker-iris").removeClass("active")})),"undefined"==typeof wc_country_select_params)return!1;if($().selectWoo){var getEnhancedSelectFormatString=function(){return{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(args){var overChars=args.input.length-args.maximum;return 1===overChars?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",overChars)},inputTooShort:function(args){var remainingChars=args.minimum-args.input.length;return 1===remainingChars?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",remainingChars)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(args){return 1===args.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",args.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}}},wooccm_enhanced_select;(function(){$("select.wooccm-enhanced-select").each((function(){var select2_args=$.extend({width:"100%",placeholder:$(this).data("placeholder")||"",allowClear:$(this).data("allowclear")||!1,selectOnClose:$(this).data("selectonclose")||!1,closeOnSelect:$(this).data("closeonselect")||!1,minimumResultsForSearch:$(this).data("search")||-1},getEnhancedSelectFormatString());$(this).on("select2:select",(function(){$(this).focus()})).selectWoo(select2_args)}))})()}}(jQuery);
1
+ !function($){"use strict";var is_blocked=function($node){return $node.is(".processing")||$node.parents(".processing").length},block=function($node){is_blocked($node)||$node.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock=function($node){$node.removeClass("processing").unblock()},append_image=function(list,i,source,name,filetype){var $field_list=$(list),source_class;filetype.match("image.*")?source_class="image":filetype.match("application/ms.*")?(source=wooccm_upload.icons.spreadsheet,source_class="spreadsheet"):filetype.match("application/x.*")?(source=wooccm_upload.icons.archive,source_class="application"):filetype.match("audio.*")?(source=wooccm_upload.icons.audio,source_class="audio"):filetype.match("text.*")?(source=wooccm_upload.icons.text,source_class="text"):filetype.match("video.*")?(source=wooccm_upload.icons.video,source_class="video"):(source=wooccm_upload.icons.interactive,source_class="interactive");var html='<span data-file_id="'+i+'" title="'+name+'" class="wooccm-file-file">\n <span class="wooccm-file-list-container">\n <a title="'+name+'" class="wooccm-file-list-delete">×</a>\n <span class="wooccm-file-list-image-container">\n <img class="'+source_class+'" alt="'+name+'" src="'+source+'"/>\n </span>\n </span>\n </span>';$field_list.append(html).fadeIn()};function field_is_required(field,is_required){is_required?(field.find("label .optional").remove(),field.addClass("validate-required"),0===field.find("label .required").length&&field.find("label").append('<abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>'),field.show(),field.find("input[type=hidden]").prop("type","text")):(field.find("label .required").remove(),field.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field"),0===field.find("label .optional").length&&field.find("label").append('<span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>"))}$(document).on("country_to_state_changing",(function(event,country,wrapper){var thisform=wrapper,thislocale,locale_fields=$.parseJSON(wc_address_i18n_params.locale_fields);$.each(locale_fields,(function(key,value){var field=thisform.find(value),required=field.find("[data-required]").data("required")||field.find(".wooccm-required-field").length;field_is_required(field,required)}))}));var fileList={};if($(".wooccm-type-file").each((function(i,field){var $field=$(field),$button_file=$field.find("[type=file]"),$button_click=$field.find(".wooccm-file-button"),$field_list=$field.find(".wooccm-file-list");fileList[$field.attr("id")]=[],$button_click.on("click",(function(e){e.preventDefault(),$button_file.trigger("click")})),$field_list.on("click",".wooccm-file-list-delete",(function(e){var $file=$(this).closest(".wooccm-file-file"),file_id=$(this).closest("[data-file_id]").data("file_id");fileList[$field.attr("id")]=$.grep(fileList[$field.attr("id")],(function(value,index){return index!=file_id})),$file.remove(),$("#order_review").trigger("wooccm_upload")})),$button_file.on("change",(function(e){var files=$(this)[0].files;files.length&&window.FileReader&&$.each(files,(function(i,file){var count;if($field_list.find("span[data-file_id]").length+i>=wooccm_upload.limit.max_files)return alert("Exeeds max files limit of "+wooccm_upload.limit.max_files),!1;if(file.size>wooccm_upload.limit.max_file_size)return alert("Exeeds max file size of "+wooccm_upload.limit.max_file_size),!0;var reader=new FileReader,theFile;reader.onload=(theFile=file,function(e){setTimeout((function(){append_image($field_list,fileList[$field.attr("id")].push(file)-1,e.target.result,theFile.name,theFile.type),$("#order_review").trigger("wooccm_upload")}),200)}),reader.readAsDataURL(file)}))}))})),$("#order_review").on("ajaxSuccess wooccm_upload",(function(e,xhr,settings){var $order_review,$place_order=$(e.target).find("#place_order"),$fields,fields;$(".wooccm-type-file").length?$place_order.addClass("wooccm-upload-process"):$place_order.removeClass("wooccm-upload-process")})),$(document).on("click","#place_order.wooccm-upload-process",(function(e){e.preventDefault();var $form=$("form.checkout"),$place_order=$(this),$fields;$(".wooccm-type-file").length&&window.FormData&&Object.keys(fileList).length&&(is_blocked($form)||($place_order.html(wooccm_upload.message.uploading),block($form)),$.each(fileList,(function(field_id,files){var $field,$attachment_ids=$("#"+field_id).find(".wooccm-file-field"),data=new FormData;$.each(files,(function(file_id,file){return file_id>wooccm_upload.limit.max_files?(console.log("Exeeds max files limit of "+wooccm_upload.limit.max_files),!1):file.size>wooccm_upload.limit.max_file_size?(console.log("Exeeds max file size of "+wooccm_upload.limit.max_files),!0):(console.log("We're ready to upload "+file.name),void data.append("wooccm_checkout_attachment_upload[]",file))})),data.append("action","wooccm_checkout_attachment_upload"),data.append("nonce",wooccm_upload.nonce),$.ajax({async:!1,url:wooccm_upload.ajax_url,type:"POST",cache:!1,data:data,processData:!1,contentType:!1,beforeSend:function(response){},success:function(response){response.success?$attachment_ids.val(response.data):$("body").trigger("update_checkout")},complete:function(response){}})})),unblock($form),$place_order.removeClass("wooccm-upload-process").trigger("click"))})),$(document).on("change",".wooccm-add-price",(function(e){$("body").trigger("update_checkout")})),$(".wooccm-field").each((function(i,field){$(field).find("input,textarea,select").on("change keyup wooccm_change",(function(e){var name=$(e.target).attr("name").replace("[]",""),type=$(e.target).prop("type"),value=$(e.target).val();"checkbox"==type&&(value=-1!==$(e.target).attr("name").indexOf("[]")?$(e.target).closest(".wooccm-field").find("input:checked").map((function(i,e){return e.value})).toArray():$(e.target).is(":checked")),$("*[data-conditional-parent="+name+"]").closest(".wooccm-field").hide(),$("*[data-conditional-parent="+name+"]").each((function(i,child){var $child=$(child),condition=$child&&$child.data("conditional-parent-value");(value==condition||$.isArray(value)&&value.indexOf(condition)>-1)&&$child.closest(".wooccm-field").fadeIn()}))}))})),$(".wooccm-conditional-child").each((function(i,field){var $field=$(field),$parent=$("#"+$field.find("[data-conditional-parent]").data("conditional-parent")+"_field");$parent.find("select:first").trigger("wooccm_change"),$parent.find("textarea:first").trigger("wooccm_change"),$parent.find("input[type=button]:first").trigger("wooccm_change"),$parent.find("input[type=radio]:checked:first").trigger("wooccm_change"),$parent.find("input[type=checkbox]:checked:first").trigger("wooccm_change"),$parent.find("input[type=color]:first").trigger("wooccm_change"),$parent.find("input[type=date]:first").trigger("wooccm_change"),$parent.find("input[type=datetime-local]:first").trigger("wooccm_change"),$parent.find("input[type=email]:first").trigger("wooccm_change"),$parent.find("input[type=file]:first").trigger("wooccm_change"),$parent.find("input[type=hidden]:first").trigger("wooccm_change"),$parent.find("input[type=image]:first").trigger("wooccm_change"),$parent.find("input[type=month]:first").trigger("wooccm_change"),$parent.find("input[type=number]:first").trigger("wooccm_change"),$parent.find("input[type=password]:first").trigger("wooccm_change"),$parent.find("input[type=range]:first").trigger("wooccm_change"),$parent.find("input[type=reset]:first").trigger("wooccm_change"),$parent.find("input[type=search]:first").trigger("wooccm_change"),$parent.find("input[type=submit]:first").trigger("wooccm_change"),$parent.find("input[type=tel]:first").trigger("wooccm_change"),$parent.find("input[type=text]:first").trigger("wooccm_change"),$parent.find("input[type=time]:first").trigger("wooccm_change"),$parent.find("input[type=url]:first").trigger("wooccm_change"),$parent.find("input[type=week]:first").trigger("wooccm_change")})),$(".wooccm-enhanced-datepicker").each((function(i,field){var $input=$(this),disable=$input.data("disable")||!1;$.isFunction($.fn.datepicker)&&$input.datepicker({dateFormat:$input.data("formatdate")||"dd-mm-yy",minDate:$input.data("mindate"),maxDate:$input.data("maxdate"),beforeShowDay:function(date){var day=null!=date.getDay()&&date.getDay().toString();return disable?[-1===$.inArray(day,disable)]:[!0]}})})),$(".wooccm-enhanced-timepicker").each((function(i,field){var $input=$(this);$.isFunction($.fn.timepicker)&&(console.log($input.data("format-ampm")),$input.timepicker({showPeriodLabels:!!$input.data("format-ampm"),showPeriod:!!$input.data("format-ampm"),showLeadingZero:!0,hours:$input.data("hours")||void 0,minutes:$input.data("minutes")||void 0}))})),$(".wooccm-colorpicker-farbtastic").each((function(i,field){var $field=$(field),$input=$field.find("input[type=text]"),$container=$field.find(".wooccmcolorpicker_container");$input.hide(),$.isFunction($.fn.farbtastic)&&($container.farbtastic("#"+$input.attr("id")),$container.on("click",(function(e){$input.fadeIn()})))})),$(".wooccm-colorpicker-iris").each((function(i,field){var $field=$(field),$input=$field.find("input[type=text]");$input.css("background",$input.val()),$input.on("click",(function(e){$field.toggleClass("active")})),$input.iris({class:$input.attr("id"),palettes:!0,color:"",hide:!1,change:function(event,ui){$input.css("background",ui.color.toString()).fadeIn()}})})),$(document).on("click",(function(e){0===$(e.target).closest(".iris-picker").length&&$(".wooccm-colorpicker-iris").removeClass("active")})),"undefined"==typeof wc_country_select_params)return!1;if($().selectWoo){var getEnhancedSelectFormatString=function(){return{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(args){var overChars=args.input.length-args.maximum;return 1===overChars?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",overChars)},inputTooShort:function(args){var remainingChars=args.minimum-args.input.length;return 1===remainingChars?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",remainingChars)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(args){return 1===args.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",args.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}}},wooccm_enhanced_select;(function(){$("select.wooccm-enhanced-select").each((function(){var select2_args=$.extend({width:"100%",placeholder:$(this).data("placeholder")||"",allowClear:$(this).data("allowclear")||!1,selectOnClose:$(this).data("selectonclose")||!1,closeOnSelect:$(this).data("closeonselect")||!1,minimumResultsForSearch:$(this).data("search")||-1},getEnhancedSelectFormatString());$(this).on("select2:select",(function(){$(this).focus()})).selectWoo(select2_args)}))})()}}(jQuery);
includes/model/class-wooccm-field.php CHANGED
@@ -188,6 +188,7 @@ class WOOCCM_Field extends WOOCCM_Model
188
  'hide_invoice' => false,
189
  // Pickers
190
  // -------------------------------------------------------------------
 
191
  'time_limit_start' => null,
192
  'time_limit_end' => null,
193
  'time_limit_interval' => null,
188
  'hide_invoice' => false,
189
  // Pickers
190
  // -------------------------------------------------------------------
191
+ 'time_format_ampm' => true,
192
  'time_limit_start' => null,
193
  'time_limit_end' => null,
194
  'time_limit_interval' => null,
includes/view/backend/pages/modals/parts/panel-timepicker.php CHANGED
@@ -25,5 +25,13 @@
25
  <span class="description premium">(<?php esc_html_e('This is a premium feature', 'woocommerce-checkout-manager'); ?>)</span>
26
  </p>
27
  </div>
 
 
 
 
 
 
 
 
28
  </div>
29
  <# } #>
25
  <span class="description premium">(<?php esc_html_e('This is a premium feature', 'woocommerce-checkout-manager'); ?>)</span>
26
  </p>
27
  </div>
28
+ <div class="options_group wooccm-premium">
29
+ <p class="form-field">
30
+ <label><?php esc_html_e('format 24hs', 'woocommerce-checkout-manager'); ?></label>
31
+ <input <# if ( data.time_format_ampm ) { #>checked="checked"<# } #> class="media-modal-render-panels" type="checkbox" name="time_format_ampm" value="1" >
32
+ <span class="description hidden"><?php esc_html_e('Time Format AM/PM', 'woocommerce-checkout-manager'); ?></span>
33
+ <span class="description premium">(<?php esc_html_e('This is a premium feature', 'woocommerce-checkout-manager'); ?>)</span>
34
+ </p>
35
+ </div>
36
  </div>
37
  <# } #>
includes/view/backend/pages/parts/loop.php CHANGED
@@ -8,7 +8,7 @@
8
  <th class="sort" style="width:1%"></th>
9
  <th class="required" style="width:1%"><?php esc_html_e('Required', 'woocommerce-checkout-manager'); ?></th>
10
  <th class="position" style="width:1%;min-width: 100px;"><?php esc_html_e('Position', 'woocommerce-checkout-manager'); ?></th>
11
- <th class="clear"><?php esc_html_e('Clear', 'woocommerce-checkout-manager'); ?><span class="woocommerce-help-tip" data-tip="<?php esc_html_e('Disallow floating elements on the left and right side of this field.', 'woocommerce-checkout-manager'); ?>"></span></th>
12
  <th class="type" style="width:1%"><?php esc_html_e('Type', 'woocommerce-checkout-manager'); ?></th>
13
  <th class="label" style="width:1%;min-width: 100px;"><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></th>
14
  <th class="placeholder"><?php esc_html_e('Placeholder', 'woocommerce-checkout-manager'); ?></th>
8
  <th class="sort" style="width:1%"></th>
9
  <th class="required" style="width:1%"><?php esc_html_e('Required', 'woocommerce-checkout-manager'); ?></th>
10
  <th class="position" style="width:1%;min-width: 100px;"><?php esc_html_e('Position', 'woocommerce-checkout-manager'); ?></th>
11
+ <th class="clear"><?php esc_html_e('Clear', 'woocommerce-checkout-manager'); ?><span class="woocommerce-help-tip" style="position:absolute;top:50%;margin-top:-0.5em;" data-tip="<?php esc_html_e('Disallow floating elements on the left and right side of this field.', 'woocommerce-checkout-manager'); ?>"></span></th>
12
  <th class="type" style="width:1%"><?php esc_html_e('Type', 'woocommerce-checkout-manager'); ?></th>
13
  <th class="label" style="width:1%;min-width: 100px;"><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></th>
14
  <th class="placeholder"><?php esc_html_e('Placeholder', 'woocommerce-checkout-manager'); ?></th>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/
4
  Tags: woocommerce, woocommerce checkout, field manager, checkout editor, checkout field, shipping field, billing field, order field, additional field
5
  Requires at least: 3.4
6
  Tested up to: 5.5.3
7
- Stable tag: 5.3.1
8
  WC requires at least: 3.1.0
9
  WC tested up to: 4.6.3
10
  License: GPLv3
@@ -107,6 +107,9 @@ Your Order data can be reviewed in each order within the default WooCommerce Ord
107
 
108
  == Changelog ==
109
 
 
 
 
110
  = 5.3.1 =
111
  * Fix: woocommerce phone field type
112
 
4
  Tags: woocommerce, woocommerce checkout, field manager, checkout editor, checkout field, shipping field, billing field, order field, additional field
5
  Requires at least: 3.4
6
  Tested up to: 5.5.3
7
+ Stable tag: 5.3.2
8
  WC requires at least: 3.1.0
9
  WC tested up to: 4.6.3
10
  License: GPLv3
107
 
108
  == Changelog ==
109
 
110
+ = 5.3.2 =
111
+ * Fix: save button
112
+
113
  = 5.3.1 =
114
  * Fix: woocommerce phone field type
115
 
woocommerce-checkout-manager.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Checkout Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manages WooCommerce Checkout, the advanced way.
7
- * Version: 5.3.1
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
@@ -20,7 +20,7 @@ if (!defined('WOOCCM_PLUGIN_NAME')) {
20
  define('WOOCCM_PLUGIN_NAME', 'Checkout Manager for WooCommerce');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
23
- define('WOOCCM_PLUGIN_VERSION', '5.3.1');
24
  }
25
  if (!defined('WOOCCM_PLUGIN_FILE')) {
26
  define('WOOCCM_PLUGIN_FILE', __FILE__);
@@ -53,7 +53,7 @@ if (!defined('WOOCCM_GROUP_URL')) {
53
  define('WOOCCM_GROUP_URL', 'https://www.facebook.com/groups/quadlayers');
54
  }
55
  if (!defined('WOOCCM_DEVELOPER')) {
56
- define('WOOCCM_DEVELOPER', true);
57
  }
58
 
59
  if (!class_exists('WOOCCM', false)) {
4
  * Plugin Name: Checkout Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manages WooCommerce Checkout, the advanced way.
7
+ * Version: 5.3.2
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
20
  define('WOOCCM_PLUGIN_NAME', 'Checkout Manager for WooCommerce');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
23
+ define('WOOCCM_PLUGIN_VERSION', '5.3.2');
24
  }
25
  if (!defined('WOOCCM_PLUGIN_FILE')) {
26
  define('WOOCCM_PLUGIN_FILE', __FILE__);
53
  define('WOOCCM_GROUP_URL', 'https://www.facebook.com/groups/quadlayers');
54
  }
55
  if (!defined('WOOCCM_DEVELOPER')) {
56
+ define('WOOCCM_DEVELOPER', false);
57
  }
58
 
59
  if (!class_exists('WOOCCM', false)) {