WooCommerce Checkout Manager - Version 4.6.0

Version Description

  • Improvement: woocommerce checkout manager admin panel rebuilt
  • Improvement: woocommerce checkout manager field conditional rebuilt
  • Improvement: woocommerce checkout manager field options rebuilt
  • Fix: woocommerce multicheckbox default value
Download this release

Release Info

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

Code changes from version 4.5.6 to 4.6.0

Files changed (136) hide show
  1. assets/{css → backend/css}/wooccm-admin.css +57 -0
  2. assets/backend/css/wooccm-admin.css.map +1 -0
  3. assets/{img → backend/img}/logo.jpg +0 -0
  4. assets/{js/wooccm-field.js → backend/js/wooccm-admin-field.js} +75 -28
  5. assets/backend/js/wooccm-admin-field.min.js +1 -0
  6. assets/{js → backend/js}/wooccm-admin.js +35 -0
  7. assets/backend/js/wooccm-admin.min.js +1 -0
  8. assets/css/wooccm-admin.css.map +0 -1
  9. assets/css/wooccm.css.map +0 -1
  10. assets/{css → frontend/css}/wooccm.css +7 -7
  11. assets/frontend/css/wooccm.css.map +1 -0
  12. assets/{css → frontend/css}/wooccm.min.css +0 -0
  13. assets/{js → frontend/js}/wooccm-checkout.js +16 -16
  14. assets/frontend/js/wooccm-checkout.min.js +1 -0
  15. assets/{js → frontend/js}/wooccm-order-upload.js +0 -0
  16. assets/{js → frontend/js}/wooccm-order-upload.min.js +0 -0
  17. assets/{timepicker → frontend/timepicker}/i18n/i18n.html +0 -0
  18. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-cs.js +0 -0
  19. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-de.js +0 -0
  20. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-es.js +0 -0
  21. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-fr.js +0 -0
  22. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-hr.js +0 -0
  23. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-it.js +0 -0
  24. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-ja.js +0 -0
  25. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-nl.js +0 -0
  26. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-pl.js +0 -0
  27. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-pt.js +0 -0
  28. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-sl.js +0 -0
  29. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-sv.js +0 -0
  30. assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-tr.js +0 -0
  31. assets/{timepicker → frontend/timepicker}/jquery.ui.timepicker.css +0 -0
  32. assets/{timepicker → frontend/timepicker}/jquery.ui.timepicker.js +0 -0
  33. assets/js/wooccm-admin.min.js +0 -1
  34. assets/js/wooccm-checkout.min.js +0 -1
  35. assets/js/wooccm-field.min.js +0 -1
  36. assets/less/wooccm-admin.less +0 -130
  37. assets/less/wooccm.less +0 -119
  38. assets/old/backend_css.css +0 -370
  39. assets/old/billing_script_wccs.js +0 -106
  40. assets/old/edit-order-uploads-button_style.css +0 -66
  41. assets/old/edit-order-uploads-file_editing_table.css +0 -144
  42. assets/old/script_wccs.js +0 -318
  43. assets/old/shipping_script_wccs.js +0 -106
  44. assets/old/woocheckout-export.css +0 -72
  45. changelog.txt +0 -25
  46. includes/admin.php +0 -1441
  47. includes/class-wooccm-admin.php +118 -0
  48. new/model/class-wooccm-field-old.php → includes/class-wooccm-compatibility.php +90 -264
  49. includes/class-wooccm-install.php +92 -0
  50. {new → includes}/class-wooccm-notices.php +54 -9
  51. {new → includes}/class-wooccm.php +39 -37
  52. includes/classes/import.php +0 -187
  53. includes/classes/main.php +0 -472
  54. new/controller/class-wooccm-checkout-advanced-controller.php → includes/controller/class-wooccm-checkout-advanced.php +13 -10
  55. new/controller/class-wooccm-checkout-controller.php → includes/controller/class-wooccm-checkout.php +13 -10
  56. {new → includes}/controller/class-wooccm-field-upload.php +18 -19
  57. new/controller/class-wooccm-field-controller.php → includes/controller/class-wooccm-field.php +188 -117
  58. includes/controller/class-wooccm-order.php +340 -0
  59. includes/export.php +0 -961
  60. includes/formatting.php +0 -24
  61. includes/functions.php +0 -14
  62. includes/install.php +0 -249
  63. {new → includes}/model/class-wooccm-field-additional.php +3 -3
  64. {new → includes}/model/class-wooccm-field-billing.php +4 -3
  65. {new → includes}/model/class-wooccm-field-shipping.php +2 -2
  66. includes/model/class-wooccm-field.php +466 -0
  67. includes/templates/admin/clean/woocheckout-billing-clone.php +0 -159
  68. includes/templates/admin/clean/woocheckout-billing-tbody.php +0 -273
  69. includes/templates/admin/clean/woocheckout-billing-thead.php +0 -131
  70. includes/templates/admin/woocheckout-additional-clone.php +0 -167
  71. includes/templates/admin/woocheckout-additional-tbody.php +0 -285
  72. includes/templates/admin/woocheckout-additional-thead.php +0 -154
  73. includes/templates/admin/woocheckout-additional.php +0 -65
  74. includes/templates/admin/woocheckout-billing-clone.php +0 -160
  75. includes/templates/admin/woocheckout-billing-tbody.php +0 -272
  76. includes/templates/admin/woocheckout-billing-thead.php +0 -130
  77. includes/templates/admin/woocheckout-billing.php +0 -75
  78. includes/templates/admin/woocheckout-general-address-fields.php +0 -16
  79. includes/templates/admin/woocheckout-general-advanced.php +0 -29
  80. includes/templates/admin/woocheckout-general-checkout-notices.php +0 -82
  81. includes/templates/admin/woocheckout-general-custom-css.php +0 -28
  82. includes/templates/admin/woocheckout-general-order-notes.php +0 -150
  83. includes/templates/admin/woocheckout-general-switches.php +0 -186
  84. includes/templates/admin/woocheckout-general-uploads.php +0 -153
  85. includes/templates/admin/woocheckout-general.php +0 -57
  86. includes/templates/admin/woocheckout-shipping-clone.php +0 -160
  87. includes/templates/admin/woocheckout-shipping-tbody.php +0 -272
  88. includes/templates/admin/woocheckout-shipping-thead.php +0 -128
  89. includes/templates/admin/woocheckout-shipping.php +0 -73
  90. {new → includes}/view/backend/meta-boxes/html-order-uploads.php +0 -0
  91. {new → includes}/view/backend/pages/additional.php +4 -4
  92. {new → includes}/view/backend/pages/advanced.php +6 -6
  93. {new → includes}/view/backend/pages/billing.php +4 -5
  94. {new → includes}/view/backend/pages/checkout.php +1 -1
  95. new/view/backend/pages/modals/edit.php → includes/view/backend/pages/modals/modal-field.php +19 -11
  96. includes/view/backend/pages/modals/parts/field-info.php +74 -0
  97. includes/view/backend/pages/modals/parts/field-tabs.php +37 -0
  98. {new → includes}/view/backend/pages/modals/parts/panel-advanced.php +4 -4
  99. {new → includes}/view/backend/pages/modals/parts/panel-datepicker.php +2 -2
  100. {new → includes}/view/backend/pages/modals/parts/panel-display.php +8 -12
  101. {new → includes}/view/backend/pages/modals/parts/panel-general.php +18 -17
  102. includes/view/backend/pages/modals/parts/panel-options.php +63 -0
  103. includes/view/backend/pages/modals/parts/panel-price.php +38 -0
  104. {new → includes}/view/backend/pages/modals/parts/panel-suggestions.php +1 -1
  105. {new → includes}/view/backend/pages/modals/parts/panel-timepicker.php +1 -5
  106. {new → includes}/view/backend/pages/order.php +1 -1
  107. {new → includes}/view/backend/pages/parts/actions.php +0 -0
  108. {new → includes}/view/backend/pages/parts/header.php +2 -7
  109. {new → includes}/view/backend/pages/parts/loop.php +9 -11
  110. {new → includes}/view/backend/pages/shipping.php +4 -4
  111. includes/view/frontend/class-wooccm-fields-additional.php +132 -0
  112. includes/view/frontend/class-wooccm-fields-conditional.php +63 -0
  113. includes/view/frontend/class-wooccm-fields-display.php +188 -0
  114. includes/view/frontend/class-wooccm-fields-filters.php +305 -0
  115. includes/view/frontend/class-wooccm-fields-handler.php +277 -0
  116. includes/view/frontend/class-wooccm-fields-register.php +59 -0
  117. new/class-wooccm-admin.php +0 -127
  118. new/class-wooccm-install.php +0 -19
  119. new/controller/class-wooccm-order-controller.php +0 -342
  120. new/install.php +0 -147
  121. new/model/class-wooccm-field.php +0 -229
  122. new/view/backend/pages/modals/parts/edit-info.php +0 -45
  123. new/view/backend/pages/modals/parts/edit-info_1.php +0 -77
  124. new/view/backend/pages/modals/parts/edit-tabs.php +0 -30
  125. new/view/backend/pages/modals/parts/panel-amount.php +0 -38
  126. new/view/backend/pages/modals/parts/panel-conditional.php +0 -24
  127. new/view/frontend/class-wooccm-fields-additional.php +0 -135
  128. new/view/frontend/class-wooccm-fields-conditional.php +0 -59
  129. new/view/frontend/class-wooccm-fields-display.php +0 -197
  130. new/view/frontend/class-wooccm-fields-handler.php +0 -148
  131. new/view/frontend/class-wooccm-fields-register.php +0 -213
  132. new/view/frontend/filters.php +0 -269
  133. readme.txt +11 -2
  134. templates/order/order-custom-fields.php +25 -24
  135. templates/order/order-upload-files.php +1 -1
  136. woocommerce-checkout-manager.php +8 -5
assets/{css → backend/css}/wooccm-admin.css RENAMED
@@ -1,3 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  .woocommerce_options_panel .woocommerce-help-tip {
2
  margin: 0 0 0 0.5em;
3
  }
@@ -5,11 +51,22 @@
5
  width: 50%!important;
6
  line-height: 16px;
7
  }
 
 
 
 
 
 
8
  .woocommerce_options_panel .select2-container .select2-selection--multiple {
9
  line-height: 16px;
10
  min-height: 30px;
11
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
12
  }
 
 
 
 
 
13
  .woocommerce_options_panel .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
14
  margin: 3px 3px 0 0;
15
  }
1
+ table.wc_gateways > tbody > tr > td.label {
2
+ font-weight: 600;
3
+ }
4
+ table.wooccm-enhanced-options {
5
+ border: none;
6
+ box-shadow: none;
7
+ }
8
+ table.wooccm-enhanced-options > tbody > tr > td input.label {
9
+ width: 100%;
10
+ }
11
+ table.wooccm-enhanced-options > tbody > tr > td select.add-price-type {
12
+ margin: 0 0 0 10px;
13
+ }
14
+ table.wooccm-enhanced-options > tbody > tr > td input.check {
15
+ margin: 0 9px;
16
+ }
17
+ table.wooccm-enhanced-options > tbody > tr > td.sort .wc-item-reorder-nav {
18
+ width: auto;
19
+ }
20
+ .attachment-info .details,
21
+ .attachment-info .settings {
22
+ width: 100%;
23
+ }
24
+ .attachment-info .woocommerce_options_panel label,
25
+ .attachment-info .woocommerce_options_panel legend {
26
+ width: 75px;
27
+ margin: 0 0 0 -90px;
28
+ font-weight: 600;
29
+ }
30
+ .attachment-info .woocommerce_options_panel fieldset.form-field,
31
+ .attachment-info .woocommerce_options_panel p.form-field {
32
+ padding: 0 20px 0 92px!important;
33
+ }
34
+ .attachment-info .woocommerce_options_panel input[type=email],
35
+ .attachment-info .woocommerce_options_panel input[type=number],
36
+ .attachment-info .woocommerce_options_panel input[type=password],
37
+ .attachment-info .woocommerce_options_panel input[type=text],
38
+ .attachment-info .woocommerce_options_panel select,
39
+ .attachment-info .woocommerce_options_panel .select2-container {
40
+ width: 100%!important;
41
+ }
42
+ .woocommerce_options_panel input,
43
+ .woocommerce_options_panel select,
44
+ .woocommerce_options_panel textarea {
45
+ margin: 0;
46
+ }
47
  .woocommerce_options_panel .woocommerce-help-tip {
48
  margin: 0 0 0 0.5em;
49
  }
51
  width: 50%!important;
52
  line-height: 16px;
53
  }
54
+ .woocommerce_options_panel .select2-container span {
55
+ width: auto;
56
+ float: none;
57
+ margin: auto;
58
+ padding: auto;
59
+ }
60
  .woocommerce_options_panel .select2-container .select2-selection--multiple {
61
  line-height: 16px;
62
  min-height: 30px;
63
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
64
  }
65
+ @media only screen and (max-width: 1280px) {
66
+ .woocommerce_options_panel .select2-container {
67
+ width: 80%!important;
68
+ }
69
+ }
70
  .woocommerce_options_panel .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
71
  margin: 3px 3px 0 0;
72
  }
assets/backend/css/wooccm-admin.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["../../less/wooccm-admin.less"],"names":[],"mappings":"AASU,KAPP,YAEC,QAEE,KACE,KAEG;EACC,gBAAA;;AAQV,KAAC;EACC,YAAA;EACA,gBAAA;;AAFF,KAAC,wBAIC,QACE,KACE,KACE,MAAK;EACH,WAAA;;AARV,KAAC,wBAIC,QACE,KACE,KAIE,OAAM;EACJ,kBAAA;;AAXV,KAAC,wBAIC,QACE,KACE,KAOE,MAAK;EACH,aAAA;;AAGF,KAjBP,wBAIC,QACE,KACE,KAWG,KAAM;EACL,WAAA;;AASZ,gBACE;AADF,gBAEE;EACE,WAAA;;AAHJ,gBAME,2BAA2B;AAN7B,gBAOE,2BAA2B;EACzB,WAAA;EACA,mBAAA;EACA,gBAAA;;AAVJ,gBAaE,2BAA2B,SAAQ;AAbrC,gBAcE,2BAA2B,EAAC;EAC1B,gCAAA;;AAfJ,gBAkBE,2BAA2B,MAAK;AAlBlC,gBAmBE,2BAA2B,MAAK;AAnBlC,gBAoBE,2BAA2B,MAAK;AApBlC,gBAqBE,2BAA2B,MAAK;AArBlC,gBAsBE,2BAA2B;AAtB7B,gBAuBE,2BAA2B;EACzB,qBAAA;;AAKJ,0BAEE;AAFF,0BAGE;AAHF,0BAIE;EACE,SAAA;;AALJ,0BAQE;EACE,mBAAA;;AATJ,0BAYE;EACE,oBAAA;EACA,iBAAA;;AAdJ,0BAYE,mBAIE;EACE,WAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;;AApBN,0BAYE,mBAWE;EACE,iBAAA;EACA,gBAAA;EACA,+CAAA;;AAGF,wBAA2C;EAyH9C,0BA1IC;IAkBI,oBAAA;;;AA9BN,0BAkCE,4BAEE,6BAA6B,6BAA6B;EACxD,mBAAA;;AAGF,0BANF,4BAMG,yBAA0B;EACzB,+BAAA;EACA,2CAAA;EACA,wCAAA;;AAMN,kCAAkC,mBAAmB,iEAAkE;AAAmC,kCAAkC,mBAAmB,mEAAoE;AACnR,kCAAkC,mBAAmB,mEAAoE;EACvH,kBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,IAAG;EACzF,YAAA;EACA,SAAA;EACA,mBAAA;EACA,mBAAA;EACA,sBAAA;EACA,cAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC;EACtF,mBAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;EACA,iBAAA;;AAGF,CAAC,mBAAmB;EAClB,sBAAA;EACA,WAAA;EACA,gBAAA;EACA,oBAAA;EACA,oBAAA;EACA,cAAA;EACA,mCAAA;EACA,SAAS,GAAT;EACA,qBAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,sCAAsC,EAAC;EAC9L,qBAAA;EACA,gBAAA;EACA,kBAAA;EACA,SAAA;;AAGF,kCAAkC,mBAAmB;EACnD,YAAA;EACA,0BAAA;EACA,6BAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,sCAAsC;EAC5H,qBAAA;EACA,kBAAA;EACA,QAAA;EACA,WAAA;EACA,gBAAA;;AAEF,CAAC;EACC,YAAA;EACA,gBAAA;EACA,WAAA;;AAGF,kCAAkC,mBAAoB;EACpD,wBAAA;EACA,+BAAA;EACA,uBAAA;EACA,oBAAA;EACA,qBAAA;EACA,aAAA;EACA,4BAAA;EACA,6BAAA;EACA,8BAAA;EACA,sBAAA;EACA,kBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,0CAA0C;EACjM,UAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;EACA,eAAA;EACA,WAAA;;AAGF,mBAAqC;EAEnC,kCAAkC,mBAAoB;IACpD,yBAAA;IACA,2BAAA;IACA,mBAAA;IACA,8BAAA;IACA,6BAAA;IACA,2BAAA;IACA,mBAAA","file":"wooccm-admin.css"}
assets/{img → backend/img}/logo.jpg RENAMED
File without changes
assets/{js/wooccm-field.js → backend/js/wooccm-admin-field.js} RENAMED
@@ -28,24 +28,18 @@
28
  });
29
 
30
  var FieldView = Backbone.View.extend({
31
- //id: 'wooccm_modal_js',
32
  events: {
33
  'click .media-modal-backdrop': 'close',
34
  'click .media-modal-close': 'close',
35
- //'click .media-modal-delete': 'delete',
36
  'click .media-modal-prev': 'edit',
37
  'click .media-modal-next': 'edit',
38
- //'click .media-modal-tab': 'tab',
39
- 'change input': 'change',
40
- 'change textarea': 'change',
41
- 'change select': 'change',
42
- //render before change and update model
43
- 'change .media-modal-change': 'render',
44
- 'submit .media-modal-form': 'save',
45
  },
46
  templates: {},
47
  initialize: function () {
48
- _.bindAll(this, 'open', 'edit', 'change', 'load', 'render', 'close', 'save');
49
  this.init();
50
  this.open();
51
  },
@@ -63,6 +57,7 @@
63
 
64
  _.delay(function () {
65
 
 
66
  modal.$el.trigger('wooccm-enhanced-select');
67
  modal.$el.trigger('wooccm-tab-panels', tab);
68
  modal.$el.trigger('init_tooltips');
@@ -98,9 +93,8 @@
98
  },
99
  success: function (response) {
100
  if (response.success) {
101
- console.log(response.data);
102
- //console.log(this.model.attributes);
103
  modal.model.set(response.data);
 
104
  modal.render();
105
  } else {
106
  alert(response.data);
@@ -149,8 +143,6 @@
149
  /*tab: function (e) {
150
  e.preventDefault();
151
 
152
- //console.log(e);
153
-
154
  var $modal = this.$el,
155
  $tab = $(e.target),
156
  $tabs = $modal.find('ul.wc-tabs'),
@@ -166,7 +158,7 @@
166
  $panel.show();
167
 
168
  },*/
169
- change: function (e) {
170
 
171
  e.preventDefault();
172
 
@@ -178,13 +170,31 @@
178
  value = $field.prop('checked') === true ? 1 : 0;
179
  }
180
 
181
- //alert(value);
182
-
183
  this.model.attributes[name] = value;
184
  this.model.changed[name] = value;
185
 
186
- //this.render();
187
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  close: function (e) {
189
  e.preventDefault();
190
  this.undelegateEvents();
@@ -192,17 +202,57 @@
192
  $('body').removeClass('modal-open');
193
  this.remove();
194
  },
195
- save: function (e) {
196
  e.preventDefault();
197
 
198
  var modal = this,
199
- //$form = $(e.target),
200
  $modal = modal.$el.find('#wooccm_modal'),
201
  $details = $modal.find('.attachment-details');
202
 
203
- //console.log($form.serializeArrayAll());
204
- //console.log($form.serialize());
205
- console.log(modal.model.attributes);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
 
207
  $.ajax({
208
  url: wooccm_field.ajax_url,
@@ -210,7 +260,7 @@
210
  action: 'wooccm_save_field',
211
  nonce: wooccm_field.nonce,
212
  field_id: modal.model.attributes.id,
213
- field_data: modal.model.attributes//$form.serializeArrayAll()
214
  },
215
  dataType: 'json',
216
  type: 'POST',
@@ -228,16 +278,13 @@
228
  },
229
  success: function (response) {
230
  if (response.success) {
231
- //console.log(response.data);
232
 
233
  if (response.data.id != modal.model.attributes.id) {
234
  location.reload();
235
  return;
236
  }
237
-
238
  //re-render dont load select2 saved options
239
- //modal.model.set(response.data);
240
- //modal.render();
241
 
242
  } else {
243
  alert(response.data);
28
  });
29
 
30
  var FieldView = Backbone.View.extend({
 
31
  events: {
32
  'click .media-modal-backdrop': 'close',
33
  'click .media-modal-close': 'close',
 
34
  'click .media-modal-prev': 'edit',
35
  'click .media-modal-next': 'edit',
36
+ 'change .media-modal-change': 'change',
37
+ 'change .media-modal-parent': 'parent',
38
+ 'submit .media-modal-form': 'submit',
 
 
 
 
39
  },
40
  templates: {},
41
  initialize: function () {
42
+ _.bindAll(this, 'open', 'edit', 'parent', 'change', 'load', 'render', 'close', 'submit');
43
  this.init();
44
  this.open();
45
  },
57
 
58
  _.delay(function () {
59
 
60
+ modal.$el.trigger('wooccm-enhanced-options');
61
  modal.$el.trigger('wooccm-enhanced-select');
62
  modal.$el.trigger('wooccm-tab-panels', tab);
63
  modal.$el.trigger('init_tooltips');
93
  },
94
  success: function (response) {
95
  if (response.success) {
 
 
96
  modal.model.set(response.data);
97
+ console.log(response.data)
98
  modal.render();
99
  } else {
100
  alert(response.data);
143
  /*tab: function (e) {
144
  e.preventDefault();
145
 
 
 
146
  var $modal = this.$el,
147
  $tab = $(e.target),
148
  $tabs = $modal.find('ul.wc-tabs'),
158
  $panel.show();
159
 
160
  },*/
161
+ update: function (e) {
162
 
163
  e.preventDefault();
164
 
170
  value = $field.prop('checked') === true ? 1 : 0;
171
  }
172
 
 
 
173
  this.model.attributes[name] = value;
174
  this.model.changed[name] = value;
175
 
 
176
  },
177
+ change: function (e) {
178
+ e.preventDefault();
179
+
180
+ this.update(e);
181
+ this.render();
182
+
183
+ },
184
+ // table: function (e) {
185
+ // e.preventDefault();
186
+ //
187
+ // var $field = $(e.target),
188
+ // name = $field.attr('name'),
189
+ // value = $field.val();
190
+ //
191
+ // if (e.target.type === 'checkbox') {
192
+ // value = $field.prop('checked') === true ? 1 : 0;
193
+ // }
194
+ //
195
+ // //$('tr[data-field_id="' + this.model.attributes.id + '"]').find('td.' + name).html(value);
196
+ //
197
+ // },
198
  close: function (e) {
199
  e.preventDefault();
200
  this.undelegateEvents();
202
  $('body').removeClass('modal-open');
203
  this.remove();
204
  },
205
+ parent: function (e) {
206
  e.preventDefault();
207
 
208
  var modal = this,
 
209
  $modal = modal.$el.find('#wooccm_modal'),
210
  $details = $modal.find('.attachment-details');
211
 
212
+ this.update(e);
213
+
214
+ $.ajax({
215
+ url: wooccm_field.ajax_url,
216
+ data: {
217
+ action: 'wooccm_load_parent',
218
+ nonce: wooccm_field.nonce,
219
+ conditional_parent_key: modal.model.attributes.conditional_parent_key
220
+ },
221
+ dataType: 'json',
222
+ type: 'POST',
223
+ beforeSend: function () {
224
+ $details.addClass('save-waiting');
225
+ //block($details);
226
+ },
227
+ complete: function () {
228
+ $details.addClass('save-complete');
229
+ $details.removeClass('save-waiting');
230
+ //unblock($details);
231
+ },
232
+ error: function () {
233
+ alert('Error!');
234
+ },
235
+ success: function (response) {
236
+ if (response.success) {
237
+ modal.model.attributes['parent'] = response.data;
238
+ modal.model.changed['parent'] = response.data;
239
+ modal.render();
240
+
241
+ } else {
242
+ alert(response.data);
243
+ }
244
+ }
245
+ });
246
+
247
+ return false;
248
+
249
+ },
250
+ submit: function (e) {
251
+ e.preventDefault();
252
+
253
+ var modal = this,
254
+ $modal = modal.$el.find('#wooccm_modal'),
255
+ $details = $modal.find('.attachment-details');
256
 
257
  $.ajax({
258
  url: wooccm_field.ajax_url,
260
  action: 'wooccm_save_field',
261
  nonce: wooccm_field.nonce,
262
  field_id: modal.model.attributes.id,
263
+ field_data: $('form', this.$el).serialize()
264
  },
265
  dataType: 'json',
266
  type: 'POST',
278
  },
279
  success: function (response) {
280
  if (response.success) {
 
281
 
282
  if (response.data.id != modal.model.attributes.id) {
283
  location.reload();
284
  return;
285
  }
 
286
  //re-render dont load select2 saved options
287
+ modal.model.set(response.data);
 
288
 
289
  } else {
290
  alert(response.data);
assets/backend/js/wooccm-admin-field.min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(e){var g=0,b;var d=function(j){return j.is(".processing")||j.parents(".processing").length};var c=function(j){if(!d(j)){j.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var f=function(j){j.removeClass("processing").unblock()};var h=Backbone.Model.extend({defaults:wooccm_field.args});var i=Backbone.View.extend({events:{"click .media-modal-backdrop":"close","click .media-modal-close":"close","click .media-modal-prev":"edit","click .media-modal-next":"edit","change .media-modal-change":"change","change .media-modal-parent":"parent","submit .media-modal-form":"submit",},templates:{},initialize:function(){_.bindAll(this,"open","edit","parent","change","load","render","close","submit");this.init();this.open()},init:function(){this.templates.window=wp.template("wooccm-modal-window")},render:function(){var k=this;var j=this.$el.find("ul.wc-tabs li.active a").attr("href");k.$el.html(k.templates.window(k.model.attributes));_.delay(function(){k.$el.trigger("wooccm-enhanced-options");k.$el.trigger("wooccm-enhanced-select");k.$el.trigger("wooccm-tab-panels",j);k.$el.trigger("init_tooltips")},100)},load:function(){var j=this;if(j.model.attributes.id==undefined){j.render();return}e.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",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(k){if(k.success){j.model.set(k.data);console.log(k.data);j.render()}else{alert(k.data)}}})},edit:function(n){n.preventDefault();var l=this,m=e(n.target),k=parseInt(e(".wc_gateways tr[data-field_id]").length-1),j=parseInt(l.model.get("id"));g++;if(b){clearTimeout(b)}b=setTimeout(function(){if(m.hasClass("media-modal-next")){j=Math.min(j+g,k)}else{j=Math.max(j-g,0)}l.model.set({id:j});g=0;l.load()},300)},open:function(j){this.load();e("body").addClass("modal-open").append(this.$el)},update:function(m){m.preventDefault();var k=e(m.target),j=k.attr("name"),l=k.val();if(m.target.type==="checkbox"){l=k.prop("checked")===true?1:0}this.model.attributes[j]=l;this.model.changed[j]=l},change:function(j){j.preventDefault();this.update(j);this.render()},close:function(j){j.preventDefault();this.undelegateEvents();e(document).off("focusin");e("body").removeClass("modal-open");this.remove()},parent:function(m){m.preventDefault();var l=this,k=l.$el.find("#wooccm_modal"),j=k.find(".attachment-details");this.update(m);e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_load_parent",nonce:wooccm_field.nonce,conditional_parent_key:l.model.attributes.conditional_parent_key},dataType:"json",type:"POST",beforeSend:function(){j.addClass("save-waiting")},complete:function(){j.addClass("save-complete");j.removeClass("save-waiting")},error:function(){alert("Error!")},success:function(n){if(n.success){l.model.attributes.parent=n.data;l.model.changed.parent=n.data;l.render()}else{alert(n.data)}}});return false},submit:function(m){m.preventDefault();var l=this,k=l.$el.find("#wooccm_modal"),j=k.find(".attachment-details");e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_save_field",nonce:wooccm_field.nonce,field_id:l.model.attributes.id,field_data:e("form",this.$el).serialize()},dataType:"json",type:"POST",beforeSend:function(){j.addClass("save-waiting");c(k)},complete:function(){j.addClass("save-complete");j.removeClass("save-waiting");f(k)},error:function(){alert("Error!")},success:function(n){if(n.success){if(n.data.id!=l.model.attributes.id){location.reload();return}l.model.set(n.data)}else{alert(n.data)}}});return false}});var a=Backbone.View.extend({initialize:function(m){var l=e(m.target),k=l.closest("[data-field_id]").data("field_id");var j=new h();j.set({id:k});new i({model:j})},});e("#wooccm_billing_settings_add, #wooccm_shipping_settings_add, #wooccm_additional_settings_add").on("click",function(j){j.preventDefault();new a(j)});e("#wooccm_billing_settings_reset, #wooccm_shipping_settings_reset, #wooccm_additional_settings_reset").on("click",function(k){k.preventDefault();var j=e(k.target);var l=confirm(wooccm_field.message.reset);if(!l){return false}e.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(m){if(m.success){location.reload()}else{alert(m.data)}}});return false});e(".wooccm_billing_settings_edit, .wooccm_shipping_settings_edit, .wooccm_additional_settings_edit").on("click",function(j){j.preventDefault();new a(j)});e(".wooccm_billing_settings_delete, .wooccm_shipping_settings_delete, .wooccm_additional_settings_delete").on("click",function(m){m.preventDefault();var l=e(m.target),k=l.closest("[data-field_id]"),j=k.data("field_id");var n=confirm(wooccm_field.message.remove);if(!n){return false}e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_delete_field",nonce:wooccm_field.nonce,field_id:j,},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(o){if(o.success){k.remove()}else{alert(o.data)}}});return false});e(document).on("click",".wooccm-field-toggle-attribute",function(m){m.preventDefault();var j=e(this),l=j.closest("tr"),k=j.find(".woocommerce-input-toggle");e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_toggle_field_attribute",nonce:wooccm_field.nonce,field_attr:e(this).data("field_attr"),field_id:l.data("field_id")},dataType:"json",type:"POST",beforeSend:function(n){k.addClass("woocommerce-input-toggle--loading")},success:function(n){if(true===n.data){k.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");k.addClass("woocommerce-input-toggle--enabled");k.removeClass("woocommerce-input-toggle--loading")}else{if(true!==n.data){k.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");k.addClass("woocommerce-input-toggle--disabled");k.removeClass("woocommerce-input-toggle--loading")}}}});return false});e(document).on("change",".wooccm-field-change-attribute",function(l){l.preventDefault();var j=e(this),k=j.closest("tr");e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_change_field_attribute",nonce:wooccm_field.nonce,field_attr:j.data("field_attr"),field_value:j.val(),field_id:k.data("field_id"),},dataType:"json",type:"POST",beforeSend:function(m){j.prop("disabled",true)},success:function(m){console.log(m.data)},complete:function(m){j.prop("disabled",false)},});return false})})(jQuery);
assets/{js → backend/js}/wooccm-admin.js RENAMED
@@ -128,6 +128,41 @@
128
 
129
  });
130
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  $(document).on('wooccm-enhanced-select', function (e) {
132
 
133
  $('.wooccm-enhanced-select').filter(':not(.enhanced)').each(function () {
128
 
129
  });
130
 
131
+ $(document).on('wooccm-enhanced-options', function (e) {
132
+
133
+ $('.wooccm-enhanced-options').each(function () {
134
+
135
+ var $table = $(this),
136
+ $add = $table.find('.add-option'),
137
+ $remove = $table.find('.remove-options');
138
+
139
+ $add.on('click', function (e) {
140
+
141
+ var $tr = $table.find('tbody > tr'),
142
+ id = $tr.length,
143
+ 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 + '"');
144
+
145
+ $tr.last().after($('<tr class="row">' + tr + '</tr>'));
146
+
147
+ $remove.removeProp('disabled');
148
+
149
+ });
150
+
151
+ $remove.on('click', function (e) {
152
+
153
+ $table.find('tr > td.check-column input:checked').closest('tr').remove();
154
+
155
+ var $tr = $table.find('tbody > tr');
156
+
157
+ if ($tr.length < 2) {
158
+ $(this).prop('disabled', true);
159
+ }
160
+ });
161
+
162
+ });
163
+
164
+ });
165
+
166
  $(document).on('wooccm-enhanced-select', function (e) {
167
 
168
  $('.wooccm-enhanced-select').filter(':not(.enhanced)').each(function () {
assets/backend/js/wooccm-admin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(b){b.fn.serializeArrayAll=function(){var f={};var e=this.serializeArray();b.each(e,function(){if(f[this.name]!==undefined){if(!f[this.name].push){f[this.name]=[f[this.name]]}f[this.name].push(this.value||"")}else{f[this.name]=this.value||""}});var d=b("input[type=radio],input[type=checkbox]",this);b.each(d,function(){if(!f.hasOwnProperty(this.name)){f[this.name]=""}});return f};function c(f){var e=b(f).next().is(".hasDatepicker")?"minDate":"maxDate",g="minDate"===e?b(f).next():b(f).prev(),d=b(f).datepicker("getDate");b(g).datepicker("option",e,d);b(f).change()}function a(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_searching},inputTooLong:function(d){var e=d.input.length-d.maximum;if(1===e){return wc_enhanced_select_params.i18n_input_too_long_1}return wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(d){var e=d.minimum-d.input.length;if(1===e){return wc_enhanced_select_params.i18n_input_too_short_1}return wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(d){if(d.maximum===1){return wc_enhanced_select_params.i18n_selection_too_long_1}return wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",d.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}b(document).on("wooccm-tab-panels",function(i,h){var g=b(i.target),f=g.find("ul.wc-tabs"),d=f.find('a[href="'+h+'"]');f.show();f.find("a").click(function(k){k.preventDefault();var j=b(this).closest("div.panel-wrap");f.find("li",j).removeClass("active");b(this).parent().addClass("active");b("div.panel",j).hide();b(b(this).attr("href")).show()});if(d.length&&b(d.attr("href")).length){d.click()}else{f.find("li.active").find("a").click()}});b(document).on("wooccm-enhanced-select",function(d){b(".wooccm-enhanced-between-dates").filter(":not(.enhanced)").each(function(){b(this).find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:true,onSelect:function(){c(b(this))}});b(this).find("input").each(function(){c(b(this))})})});b(document).on("wooccm-enhanced-options",function(d){b(".wooccm-enhanced-options").each(function(){var f=b(this),g=f.find(".add-option"),e=f.find(".remove-options");g.on("click",function(j){var h=f.find("tbody > tr"),k=h.length,i=h.first().clone().html().replace(/options\[([0-9]+)\]/g,"options["+k+"]").replace('disabled="disabled"',"").replace('checked="checked"',"").replace('<input value="0"','<input value="'+k+'"');h.last().after(b('<tr class="row">'+i+"</tr>"));e.removeProp("disabled")});e.on("click",function(i){f.find("tr > td.check-column input:checked").closest("tr").remove();var h=f.find("tbody > tr");if(h.length<2){b(this).prop("disabled",true)}})})});b(document).on("wooccm-enhanced-select",function(d){b(".wooccm-enhanced-select").filter(":not(.enhanced)").each(function(){var e=b.extend({minimumResultsForSearch:10,allowClear:b(this).data("allow_clear")?true:false,placeholder:b(this).data("placeholder")},a());b(this).selectWoo(e).addClass("enhanced")});b(".wooccm-product-search").filter(":not(.enhanced)").each(function(){var g={allowClear:b(this).data("allow_clear")?true:false,placeholder:b(this).data("placeholder"),minimumInputLength:b(this).data("minimum_input_length")?b(this).data("minimum_input_length"):"3",escapeMarkup:function(h){return h},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(h){return{term:h.term,action:b(this).data("action")||"wooccm_select_search_products",security:wc_enhanced_select_params.search_products_nonce,selected:b(this).select2("val")||0,exclude:b(this).data("exclude"),include:b(this).data("include"),limit:b(this).data("limit"),display_stock:b(this).data("display_stock")}},processResults:function(i){var h=[];if(i){b.each(i,function(k,j){h.push({id:k,text:j})})}return{results:h}},cache:true}};g=b.extend(g,a());b(this).selectWoo(g).addClass("enhanced");if(b(this).data("sortable")){var f=b(this);var e=b(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:true,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){b(e.find(".select2-selection__choice").get().reverse()).each(function(){var i=b(this).data("data").id;var h=f.find('option[value="'+i+'"]')[0];f.prepend(h)})}})}else{if(b(this).prop("multiple")){b(this).on("change",function(){var h=b(this).children();h.sort(function(j,i){var l=j.text.toLowerCase();var k=i.text.toLowerCase();if(l>k){return 1}if(l<k){return -1}return 0});b(this).html(h)})}}})})})(jQuery);
assets/css/wooccm-admin.css.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../less/wooccm-admin.less"],"names":[],"mappings":"AAAA,0BAEE;EACE,mBAAA;;AAHJ,0BAME;EACE,oBAAA;EACA,iBAAA;;AARJ,0BAME,mBAKE;EACE,iBAAA;EACA,gBAAA;EACA,+CAAA;;AAdN,0BAkBE,4BAA4B,6BAA6B,6BAA6B;EACpF,mBAAA;;AAnBJ,0BAqBE,4BAA2B,yBAA0B;EACnD,+BAAA;EACA,2CAAA;EACA,wCAAA;;AAIJ,kCAAkC,mBAAmB,iEAAkE;AAAmC,kCAAkC,mBAAmB,mEAAoE;AACnR,kCAAkC,mBAAmB,mEAAoE;EACvH,kBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,IAAG;EACzF,YAAA;EACA,SAAA;EACA,mBAAA;EACA,mBAAA;EACA,sBAAA;EACA,cAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC;EACtF,mBAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;EACA,iBAAA;;AAGF,CAAC,mBAAmB;EAClB,sBAAA;EACA,WAAA;EACA,gBAAA;EACA,oBAAA;EACA,oBAAA;EACA,cAAA;EACA,mCAAA;EACA,SAAS,GAAT;EACA,qBAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,sCAAsC,EAAC;EAC9L,qBAAA;EACA,gBAAA;EACA,kBAAA;EACA,SAAA;;AAGF,kCAAkC,mBAAmB;EACnD,YAAA;EACA,0BAAA;EACA,6BAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,sCAAsC;EAC5H,qBAAA;EACA,kBAAA;EACA,QAAA;EACA,WAAA;EACA,gBAAA;;AAEF,CAAC;EACC,YAAA;EACA,gBAAA;EACA,WAAA;;AAGF,kCAAkC,mBAAoB;EACpD,wBAAA;EACA,+BAAA;EACA,uBAAA;EACA,oBAAA;EACA,qBAAA;EACA,aAAA;EACA,4BAAA;EACA,6BAAA;EACA,8BAAA;EACA,sBAAA;EACA,kBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,0CAA0C;EACjM,UAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;EACA,eAAA;EACA,WAAA;;AAGF,mBAAqC;EAEnC,kCAAkC,mBAAoB;IACpD,yBAAA;IACA,2BAAA;IACA,mBAAA;IACA,8BAAA;IACA,6BAAA;IACA,2BAAA;IACA,mBAAA","file":"wooccm-admin.css"}
 
assets/css/wooccm.css.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../less/wooccm.less"],"names":[],"mappings":"AAKI,YALS,KAEX,iBAGG;AACC,YANO,KAEX,iBAIK;EACD,SAAQ,EAAR;EACA,cAAA;;AAEF,YAVS,KAEX,iBAQG;EACC,WAAA;;AAXN,YAAa,KAeX;EACE,aAAA;;AAMF,OAAC;EACC,kBAAA;EACA,0BAAA;;AAFF,OAAC,iBAIC;EACE,kBAAA;EACA,MAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,YAAW,kBAAX;EACA,gBAAA;EACA,cAAA;EACA,eAAA;;AAMN;EACE,cAAA;EACA,UAAA;EACA,aAAA;EACA,eAAA;EACA,mBAAA;EACA,sBAAA;;AANF,kBAQE;EACE,aAAA;EACA,uBAAA;EACA,oBAAA;EACA,sBAAA;EACA,uBAAA;EACA,UAAA;EAEA,kBAAA;;AAhBJ,kBAQE,mBAWE;EACE,UAAA;EACA,kBAAA;EACA,QAAA;EACA,WAAA;EACA,WAAA;EACA,YAAA;EACA,sBAAA;EACA,cAAA;EACA,iBAAA;EACA,kBAAA;EACA,cAAA;EACA,gBAAA;EACA,kBAAA;EACA,eAAA;EACA,eAAA;EACA,iBAAA;;AAnCN,kBAQE,mBA8BE;EACE,WAAA;EACA,gBAAA;;AAxCN,kBAQE,mBAmCE;EACE,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,gBAAA;EACA,WAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;;AAnDN,kBAQE,mBAmCE,mCAUE;EACE,gBAAA;EACA,iBAAA;EACA,kBAAA;EACA,QAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;;AAEA,kBAtDN,mBAmCE,mCAUE,MASG;EACC,MAAA;EACA,SAAA;EACA,OAAA;EACA,QAAA;EAEA,gBAAA;EACA,YAAA;EACA,WAAA","file":"wooccm.css"}
 
assets/{css → frontend/css}/wooccm.css RENAMED
@@ -24,7 +24,7 @@
24
  direction: ltr;
25
  cursor: pointer;
26
  }
27
- .wooccmupload_list {
28
  margin: 0 -5px;
29
  padding: 0;
30
  display: flex;
@@ -32,7 +32,7 @@
32
  align-items: center;
33
  justify-content: start;
34
  }
35
- .wooccmupload_list .wooccmupload_file {
36
  display: flex;
37
  justify-content: center;
38
  align-items: stretch;
@@ -41,7 +41,7 @@
41
  width: 25%;
42
  position: relative;
43
  }
44
- .wooccmupload_list .wooccmupload_file .wooccmupload_file_delete {
45
  z-index: 1;
46
  position: absolute;
47
  top: 2px;
@@ -59,11 +59,11 @@
59
  cursor: pointer;
60
  font-family: code;
61
  }
62
- .wooccmupload_list .wooccmupload_file .wooccmupload_file_container {
63
  width: 100%;
64
  overflow: hidden;
65
  }
66
- .wooccmupload_list .wooccmupload_file .wooccmupload_file_image_container {
67
  display: flex;
68
  justify-content: center;
69
  align-items: center;
@@ -73,7 +73,7 @@
73
  position: relative;
74
  background: #eee;
75
  }
76
- .wooccmupload_list .wooccmupload_file .wooccmupload_file_image_container > img {
77
  overflow: hidden;
78
  object-fit: cover;
79
  position: absolute;
@@ -82,7 +82,7 @@
82
  height: 40%;
83
  opacity: 0.8;
84
  }
85
- .wooccmupload_list .wooccmupload_file .wooccmupload_file_image_container > img.image {
86
  top: 0;
87
  bottom: 0;
88
  left: 0;
24
  direction: ltr;
25
  cursor: pointer;
26
  }
27
+ .wooccm-file-list {
28
  margin: 0 -5px;
29
  padding: 0;
30
  display: flex;
32
  align-items: center;
33
  justify-content: start;
34
  }
35
+ .wooccm-file-list .wooccm-file-file {
36
  display: flex;
37
  justify-content: center;
38
  align-items: stretch;
41
  width: 25%;
42
  position: relative;
43
  }
44
+ .wooccm-file-list .wooccm-file-file .wooccm-file-list-delete {
45
  z-index: 1;
46
  position: absolute;
47
  top: 2px;
59
  cursor: pointer;
60
  font-family: code;
61
  }
62
+ .wooccm-file-list .wooccm-file-file .wooccm-file-list-container {
63
  width: 100%;
64
  overflow: hidden;
65
  }
66
+ .wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container {
67
  display: flex;
68
  justify-content: center;
69
  align-items: center;
73
  position: relative;
74
  background: #eee;
75
  }
76
+ .wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container > img {
77
  overflow: hidden;
78
  object-fit: cover;
79
  position: absolute;
82
  height: 40%;
83
  opacity: 0.8;
84
  }
85
+ .wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container > img.image {
86
  top: 0;
87
  bottom: 0;
88
  left: 0;
assets/frontend/css/wooccm.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["../../less/wooccm.less"],"names":[],"mappings":"AAKI,YALS,KAEX,iBAGG;AACC,YANO,KAEX,iBAIK;EACD,SAAQ,EAAR;EACA,cAAA;;AAEF,YAVS,KAEX,iBAQG;EACC,WAAA;;AAXN,YAAa,KAeX;EACE,aAAA;;AAMF,OAAC;EACC,kBAAA;EACA,0BAAA;;AAFF,OAAC,iBAIC;EACE,kBAAA;EACA,MAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,YAAW,kBAAX;EACA,gBAAA;EACA,cAAA;EACA,eAAA;;AAMN;EACE,cAAA;EACA,UAAA;EACA,aAAA;EACA,eAAA;EACA,mBAAA;EACA,sBAAA;;AANF,iBAQE;EACE,aAAA;EACA,uBAAA;EACA,oBAAA;EACA,sBAAA;EACA,uBAAA;EACA,UAAA;EAEA,kBAAA;;AAhBJ,iBAQE,kBAWE;EACE,UAAA;EACA,kBAAA;EACA,QAAA;EACA,WAAA;EACA,WAAA;EACA,YAAA;EACA,sBAAA;EACA,cAAA;EACA,iBAAA;EACA,kBAAA;EACA,cAAA;EACA,gBAAA;EACA,kBAAA;EACA,eAAA;EACA,eAAA;EACA,iBAAA;;AAnCN,iBAQE,kBA8BE;EACE,WAAA;EACA,gBAAA;;AAxCN,iBAQE,kBAmCE;EACE,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,gBAAA;EACA,WAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;;AAnDN,iBAQE,kBAmCE,kCAUE;EACE,gBAAA;EACA,iBAAA;EACA,kBAAA;EACA,QAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;;AAEA,iBAtDN,kBAmCE,kCAUE,MASG;EACC,MAAA;EACA,SAAA;EACA,OAAA;EACA,QAAA;EAEA,gBAAA;EACA,YAAA;EACA,WAAA","file":"wooccm.css"}
assets/{css → frontend/css}/wooccm.min.css RENAMED
File without changes
assets/{js → frontend/js}/wooccm-checkout.js RENAMED
@@ -47,10 +47,10 @@
47
  }
48
 
49
 
50
- var html = '<span data-file_id="' + i + '" title="' + name + '" class="wooccmupload_file">\n\
51
- <span class="wooccmupload_file_container">\n\
52
- <a title="' + name + '" class="wooccmupload_file_delete" class="wooccm_dele wooccm-btn wooccm-btn-danger">×</a>\n\
53
- <span class="wooccmupload_file_image_container">\n\
54
  <img class="' + source_class + '" alt="' + name + '" src="' + source + '"/>\n\
55
  </span>\n\
56
  </span>\n\
@@ -101,12 +101,12 @@
101
  // ---------------------------------------------------------------------------
102
 
103
  var fileList = [];
104
- $('.wooccmupload-field').each(function (i, field) {
105
 
106
  var $field = $(field),
107
  $button_file = $field.find('[type=file]'),
108
- $button_click = $field.find('.wooccmupload_button'),
109
- $field_list = $field.find('.wooccmupload_list');
110
  fileList[$field.attr('id')] = [];
111
  // Simulate click
112
  // -------------------------------------------------------------------------
@@ -118,8 +118,8 @@
118
  // Delete images
119
  // ---------------------------------------------------------------------------
120
 
121
- $field_list.on('click', '.wooccmupload_file_delete', function (e) {
122
- $(this).closest('.wooccmupload_file').remove();
123
  });
124
  // Append images
125
  // -------------------------------------------------------------------------
@@ -167,7 +167,7 @@
167
 
168
  var $order_review = $(e.target),
169
  $place_order = $order_review.find('#place_order'),
170
- $fields = $('.wooccmupload-field'),
171
  fields = $fields.length;
172
  if (fields) {
173
  $place_order.addClass('wooccm-upload-process');
@@ -183,13 +183,13 @@
183
  var $form = $('form.checkout'),
184
  $place_order = $(this),
185
  //$results = $('#wooccm_checkout_attachment_results'),
186
- $fields = $('.wooccmupload-field'),
187
  fields = $fields.length;
188
  $fields.each(function (i, field) {
189
 
190
  var $field = $(field),
191
- $attachment_ids = $field.find('.wooccmupload_field'),
192
- $field_list = $field.find('.wooccmupload_list'); //,
193
 
194
  if (window.FormData && fileList[$field.attr('id')].length) {
195
 
@@ -238,7 +238,7 @@
238
  success: function (response) {
239
  //$results.removeClass('woocommerce-message');
240
  if (response.success) {
241
- //console.log(response.data);
242
  $attachment_ids.val(response.data);
243
  } else {
244
  $('body').trigger('update_checkout');
@@ -272,7 +272,7 @@
272
  // Update checkout fees
273
  // ---------------------------------------------------------------------------
274
 
275
- $(document).on('change', '.wooccm-add-checkout-fees', function (e) {
276
  $('body').trigger('update_checkout');
277
  });
278
 
@@ -283,7 +283,7 @@
283
 
284
  var $field = $(field),
285
  $parent = $('#' + $field.find('[data-conditional-parent]').data('conditional-parent') + '_field'),
286
- show_if_value = $field.find('[data-conditional-parent-value]').data('conditional-parent-value');
287
 
288
  if ($parent.length) {
289
 
47
  }
48
 
49
 
50
+ var html = '<span data-file_id="' + i + '" title="' + name + '" class="wooccm-file-file">\n\
51
+ <span class="wooccm-file-list-container">\n\
52
+ <a title="' + name + '" class="wooccm-file-list-delete">×</a>\n\
53
+ <span class="wooccm-file-list-image-container">\n\
54
  <img class="' + source_class + '" alt="' + name + '" src="' + source + '"/>\n\
55
  </span>\n\
56
  </span>\n\
101
  // ---------------------------------------------------------------------------
102
 
103
  var fileList = [];
104
+ $('.wooccm-type-file').each(function (i, field) {
105
 
106
  var $field = $(field),
107
  $button_file = $field.find('[type=file]'),
108
+ $button_click = $field.find('.wooccm-file-button'),
109
+ $field_list = $field.find('.wooccm-file-list');
110
  fileList[$field.attr('id')] = [];
111
  // Simulate click
112
  // -------------------------------------------------------------------------
118
  // Delete images
119
  // ---------------------------------------------------------------------------
120
 
121
+ $field_list.on('click', '.wooccm-file-list-delete', function (e) {
122
+ $(this).closest('.wooccm-file-file').remove();
123
  });
124
  // Append images
125
  // -------------------------------------------------------------------------
167
 
168
  var $order_review = $(e.target),
169
  $place_order = $order_review.find('#place_order'),
170
+ $fields = $('.wooccm-type-file'),
171
  fields = $fields.length;
172
  if (fields) {
173
  $place_order.addClass('wooccm-upload-process');
183
  var $form = $('form.checkout'),
184
  $place_order = $(this),
185
  //$results = $('#wooccm_checkout_attachment_results'),
186
+ $fields = $('.wooccm-type-file'),
187
  fields = $fields.length;
188
  $fields.each(function (i, field) {
189
 
190
  var $field = $(field),
191
+ $attachment_ids = $field.find('.wooccm-file-field'),
192
+ $field_list = $field.find('.wooccm-file-list'); //,
193
 
194
  if (window.FormData && fileList[$field.attr('id')].length) {
195
 
238
  success: function (response) {
239
  //$results.removeClass('woocommerce-message');
240
  if (response.success) {
241
+ //alert(response.data);
242
  $attachment_ids.val(response.data);
243
  } else {
244
  $('body').trigger('update_checkout');
272
  // Update checkout fees
273
  // ---------------------------------------------------------------------------
274
 
275
+ $(document).on('change', '.wooccm-add-price', function (e) {
276
  $('body').trigger('update_checkout');
277
  });
278
 
283
 
284
  var $field = $(field),
285
  $parent = $('#' + $field.find('[data-conditional-parent]').data('conditional-parent') + '_field'),
286
+ show_if_value = $field.find('[data-conditional-parent-value]').data('conditional-parent-value').toString();
287
 
288
  if ($parent.length) {
289
 
assets/frontend/js/wooccm-checkout.min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(e){var f=function(h){return h.is(".processing")||h.parents(".processing").length};var g=function(h){if(!f(h)){h.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var a=function(h){h.removeClass("processing").unblock()};var d=function(n,l,m,h,k){var o=e(n),p;if(k.match("image.*")){p="image"}else{if(k.match("application/ms.*")){m=wooccm_upload.icons.spreadsheet;p="spreadsheet"}else{if(k.match("application/x.*")){m=wooccm_upload.icons.archive;p="application"}else{if(k.match("audio.*")){m=wooccm_upload.icons.audio;p="audio"}else{if(k.match("text.*")){m=wooccm_upload.icons.text;p="text"}else{if(k.match("video.*")){m=wooccm_upload.icons.video;p="video"}else{m=wooccm_upload.icons.interactive;p="interactive"}}}}}}var j='<span data-file_id="'+l+'" title="'+h+'" class="wooccm-file-file">\n <span class="wooccm-file-list-container">\n <a title="'+h+'" class="wooccm-file-list-delete">×</a>\n <span class="wooccm-file-list-image-container">\n <img class="'+p+'" alt="'+h+'" src="'+m+'"/>\n </span>\n </span>\n </span>';o.append(j).fadeIn()};function b(i,h){if(h){i.find("label .optional").remove();i.addClass("validate-required");if(i.find("label .required").length===0){i.find("label").append('&nbsp;<abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>')}}else{i.find("label .required").remove();i.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field");if(i.find("label .optional").length===0){i.find("label").append('&nbsp;<span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>")}}}e(document).on("country_to_state_changing",function(i,k,m){var j=m,h;var l=e.parseJSON(wc_address_i18n_params.locale_fields);e.each(l,function(n,o){var p=j.find(o),q=p.find("[data-required]").data("required")||0;b(p,q)})});var c=[];e(".wooccm-type-file").each(function(j,m){var k=e(m),l=k.find("[type=file]"),h=k.find(".wooccm-file-button"),n=k.find(".wooccm-file-list");c[k.attr("id")]=[];h.on("click",function(i){i.preventDefault();l.trigger("click")});n.on("click",".wooccm-file-list-delete",function(i){e(this).closest(".wooccm-file-file").remove()});l.on("change",function(o){var i=e(this)[0].files;if(i.length){if(window.FileReader){e.each(i,function(q,p){var r=n.find("span[data-file_id]").length+q;if(r>=wooccm_upload.limit.max_files){alert("Exeeds max files limit of "+wooccm_upload.limit.max_files);return false}if(p.size>wooccm_upload.limit.max_file_size){alert("Exeeds max file size of "+wooccm_upload.limit.max_file_size);return true}reader=new FileReader();reader.onload=(function(s){return function(t){setTimeout(function(){d(n,c[k.attr("id")].push(p)-1,t.target.result,s.name,s.type)},200)}})(p);console.log(p.name);reader.readAsDataURL(p)})}}})});e("#order_review").on("ajaxSuccess",function(l){var k=e(l.target),j=k.find("#place_order"),i=e(".wooccm-type-file"),h=i.length;if(h){j.addClass("wooccm-upload-process")}});e(document).on("click","#place_order.wooccm-upload-process",function(l){l.preventDefault();var i=e("form.checkout"),k=e(this),j=e(".wooccm-type-file"),h=j.length;j.each(function(m,p){var n=e(p),r=n.find(".wooccm-file-field"),q=n.find(".wooccm-file-list");if(window.FormData&&c[n.attr("id")].length){if(!f(i)){k.html(wooccm_upload.message.uploading);g(i)}var o=new FormData();q.find("span[data-file_id]").each(function(t,s){var u=e(s).data("file_id");if(t>wooccm_upload.limit.max_files){console.log("Exeeds max files limit of "+wooccm_upload.limit.max_files);return false}if(c[n.attr("id")][u]===undefined){console.log("Undefined "+u);return true}if(c[n.attr("id")][u].size>wooccm_upload.limit.max_file_size){console.log("Exeeds max file size of "+wooccm_upload.limit.max_files);return true}console.log("We're ready to upload "+c[n.attr("id")][u].name);o.append("wooccm_checkout_attachment_upload[]",c[n.attr("id")][u])});o.append("action","wooccm_checkout_attachment_upload");o.append("nonce",wooccm_upload.nonce);e.ajax({async:false,url:wooccm_upload.ajaxurl,type:"POST",cache:false,data:o,processData:false,contentType:false,beforeSend:function(s){},success:function(s){if(s.success){r.val(s.data)}else{e("body").trigger("update_checkout")}},complete:function(s){h=h-1}})}else{h=h-1}if(h==0){a(i);k.removeClass("wooccm-upload-process").trigger("click")}})});e(document).on("change",".wooccm-add-price",function(h){e("body").trigger("update_checkout")});e(".wooccm-conditional-child").each(function(h,m){var j=e(m),l=e("#"+j.find("[data-conditional-parent]").data("conditional-parent")+"_field"),k=j.find("[data-conditional-parent-value]").data("conditional-parent-value").toString();if(l.length){l.on("wooccm_change change keyup",function(o){var n=e(o.target),i=n.val();if(n.hasClass("select2-selection")){return}if(n.prop("type")=="checkbox"){i=n.is(":checked")}if(k==i||(e.isArray(i)&&i.indexOf(k)>-1)){j.fadeIn()}else{j.fadeOut()}n.off("wooccm_change");n.off("change");n.off("keyup")});l.find("select:first").trigger("wooccm_change");l.find("textarea:first").trigger("wooccm_change");l.find("input[type=button]:first").trigger("wooccm_change");l.find("input[type=radio]:checked:first").trigger("wooccm_change");l.find("input[type=checkbox]:checked:first").trigger("wooccm_change");l.find("input[type=color]:first").trigger("wooccm_change");l.find("input[type=date]:first").trigger("wooccm_change");l.find("input[type=datetime-local]:first").trigger("wooccm_change");l.find("input[type=email]:first").trigger("wooccm_change");l.find("input[type=file]:first").trigger("wooccm_change");l.find("input[type=hidden]:first").trigger("wooccm_change");l.find("input[type=image]:first").trigger("wooccm_change");l.find("input[type=month]:first").trigger("wooccm_change");l.find("input[type=number]:first").trigger("wooccm_change");l.find("input[type=password]:first").trigger("wooccm_change");l.find("input[type=range]:first").trigger("wooccm_change");l.find("input[type=reset]:first").trigger("wooccm_change");l.find("input[type=search]:first").trigger("wooccm_change");l.find("input[type=submit]:first").trigger("wooccm_change");l.find("input[type=tel]:first").trigger("wooccm_change");l.find("input[type=text]:first").trigger("wooccm_change");l.find("input[type=time]:first").trigger("wooccm_change");l.find("input[type=url]:first").trigger("wooccm_change");l.find("input[type=week]:first").trigger("wooccm_change")}else{j.show()}});e(".wooccm-type-datepicker").each(function(h,k){var j=e(k),l=j.find("input[type=text]");if(e.isFunction(e.fn.datepicker)){l.datepicker({dateFormat:l.data("formatdate")||"dd-mm-yy",minDate:l.data("mindate")||undefined,maxDate:l.data("maxdate")||undefined,beforeShowDay:function(n){var i=n.getDay(),m=l.data("disable")||false;if(!m){return[true]}else{return[m[i]!==undefined]}}})}});e(".wooccm-type-timepicker").each(function(h,k){var j=e(k),l=j.find("input[type=text]");if(e.isFunction(e.fn.timepicker)){l.timepicker({showPeriod:true,showLeadingZero:true,hours:l.data("hours")||undefined,minutes:l.data("minutes")||undefined,})}});e(".wooccm-colorpicker-farbtastic").each(function(h,k){var j=e(k),m=j.find("input[type=text]"),l=j.find(".wooccmcolorpicker_container");m.hide();if(e.isFunction(e.fn.farbtastic)){l.farbtastic("#"+m.attr("id"));l.on("click",function(i){m.fadeIn()})}});e(".wooccm-colorpicker-iris").each(function(h,k){var j=e(k),l=j.find("input[type=text]");l.css("color","#fff").css("background",l.val()).hide();l.iris({wccmclass:l.attr("id"),palettes:true,color:"",hide:false,change:function(i,m){l.css("color","#000").css("background",m.color.toString()).fadeIn()}})})})(jQuery);
assets/{js → frontend/js}/wooccm-order-upload.js RENAMED
File without changes
assets/{js → frontend/js}/wooccm-order-upload.min.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/i18n.html RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-cs.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-de.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-es.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-fr.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-hr.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-it.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-ja.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-nl.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-pl.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-pt.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-sl.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-sv.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-tr.js RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/jquery.ui.timepicker.css RENAMED
File without changes
assets/{timepicker → frontend/timepicker}/jquery.ui.timepicker.js RENAMED
File without changes
assets/js/wooccm-admin.min.js DELETED
@@ -1 +0,0 @@
1
- (function(b){b.fn.serializeArrayAll=function(){var f={};var e=this.serializeArray();b.each(e,function(){if(f[this.name]!==undefined){if(!f[this.name].push){f[this.name]=[f[this.name]]}f[this.name].push(this.value||"")}else{f[this.name]=this.value||""}});var d=b("input[type=radio],input[type=checkbox]",this);b.each(d,function(){if(!f.hasOwnProperty(this.name)){f[this.name]=""}});return f};function c(f){var e=b(f).next().is(".hasDatepicker")?"minDate":"maxDate",g="minDate"===e?b(f).next():b(f).prev(),d=b(f).datepicker("getDate");b(g).datepicker("option",e,d);b(f).change()}function a(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_searching},inputTooLong:function(d){var e=d.input.length-d.maximum;if(1===e){return wc_enhanced_select_params.i18n_input_too_long_1}return wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(d){var e=d.minimum-d.input.length;if(1===e){return wc_enhanced_select_params.i18n_input_too_short_1}return wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(d){if(d.maximum===1){return wc_enhanced_select_params.i18n_selection_too_long_1}return wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",d.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}b(document).on("wooccm-tab-panels",function(i,h){var g=b(i.target),f=g.find("ul.wc-tabs"),d=f.find('a[href="'+h+'"]');f.show();f.find("a").click(function(k){k.preventDefault();var j=b(this).closest("div.panel-wrap");f.find("li",j).removeClass("active");b(this).parent().addClass("active");b("div.panel",j).hide();b(b(this).attr("href")).show()});if(d.length&&b(d.attr("href")).length){d.click()}else{f.find("li.active").find("a").click()}});b(document).on("wooccm-enhanced-select",function(d){b(".wooccm-enhanced-between-dates").filter(":not(.enhanced)").each(function(){b(this).find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:true,onSelect:function(){c(b(this))}});b(this).find("input").each(function(){c(b(this))})})});b(document).on("wooccm-enhanced-select",function(d){b(".wooccm-enhanced-select").filter(":not(.enhanced)").each(function(){var e=b.extend({minimumResultsForSearch:10,allowClear:b(this).data("allow_clear")?true:false,placeholder:b(this).data("placeholder")},a());b(this).selectWoo(e).addClass("enhanced")});b(".wooccm-product-search").filter(":not(.enhanced)").each(function(){var g={allowClear:b(this).data("allow_clear")?true:false,placeholder:b(this).data("placeholder"),minimumInputLength:b(this).data("minimum_input_length")?b(this).data("minimum_input_length"):"3",escapeMarkup:function(h){return h},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(h){return{term:h.term,action:b(this).data("action")||"wooccm_select_search_products",security:wc_enhanced_select_params.search_products_nonce,selected:b(this).select2("val")||0,exclude:b(this).data("exclude"),include:b(this).data("include"),limit:b(this).data("limit"),display_stock:b(this).data("display_stock")}},processResults:function(i){var h=[];if(i){b.each(i,function(k,j){h.push({id:k,text:j})})}return{results:h}},cache:true}};g=b.extend(g,a());b(this).selectWoo(g).addClass("enhanced");if(b(this).data("sortable")){var f=b(this);var e=b(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:true,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){b(e.find(".select2-selection__choice").get().reverse()).each(function(){var i=b(this).data("data").id;var h=f.find('option[value="'+i+'"]')[0];f.prepend(h)})}})}else{if(b(this).prop("multiple")){b(this).on("change",function(){var h=b(this).children();h.sort(function(j,i){var l=j.text.toLowerCase();var k=i.text.toLowerCase();if(l>k){return 1}if(l<k){return -1}return 0});b(this).html(h)})}}})})})(jQuery);
 
assets/js/wooccm-checkout.min.js DELETED
@@ -1 +0,0 @@
1
- (function(e){var f=function(h){return h.is(".processing")||h.parents(".processing").length};var g=function(h){if(!f(h)){h.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var a=function(h){h.removeClass("processing").unblock()};var d=function(n,l,m,h,k){var o=e(n),p;if(k.match("image.*")){p="image"}else{if(k.match("application/ms.*")){m=wooccm_upload.icons.spreadsheet;p="spreadsheet"}else{if(k.match("application/x.*")){m=wooccm_upload.icons.archive;p="application"}else{if(k.match("audio.*")){m=wooccm_upload.icons.audio;p="audio"}else{if(k.match("text.*")){m=wooccm_upload.icons.text;p="text"}else{if(k.match("video.*")){m=wooccm_upload.icons.video;p="video"}else{m=wooccm_upload.icons.interactive;p="interactive"}}}}}}var j='<span data-file_id="'+l+'" title="'+h+'" class="wooccmupload_file">\n <span class="wooccmupload_file_container">\n <a title="'+h+'" class="wooccmupload_file_delete" class="wooccm_dele wooccm-btn wooccm-btn-danger">×</a>\n <span class="wooccmupload_file_image_container">\n <img class="'+p+'" alt="'+h+'" src="'+m+'"/>\n </span>\n </span>\n </span>';o.append(j).fadeIn()};function b(i,h){if(h){i.find("label .optional").remove();i.addClass("validate-required");if(i.find("label .required").length===0){i.find("label").append('&nbsp;<abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>')}}else{i.find("label .required").remove();i.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field");if(i.find("label .optional").length===0){i.find("label").append('&nbsp;<span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>")}}}e(document).on("country_to_state_changing",function(i,k,m){var j=m,h;var l=e.parseJSON(wc_address_i18n_params.locale_fields);e.each(l,function(n,o){var p=j.find(o),q=p.find("[data-required]").data("required")||0;b(p,q)})});var c=[];e(".wooccmupload-field").each(function(j,m){var k=e(m),l=k.find("[type=file]"),h=k.find(".wooccmupload_button"),n=k.find(".wooccmupload_list");c[k.attr("id")]=[];h.on("click",function(i){i.preventDefault();l.trigger("click")});n.on("click",".wooccmupload_file_delete",function(i){e(this).closest(".wooccmupload_file").remove()});l.on("change",function(o){var i=e(this)[0].files;if(i.length){if(window.FileReader){e.each(i,function(q,p){var r=n.find("span[data-file_id]").length+q;if(r>=wooccm_upload.limit.max_files){alert("Exeeds max files limit of "+wooccm_upload.limit.max_files);return false}if(p.size>wooccm_upload.limit.max_file_size){alert("Exeeds max file size of "+wooccm_upload.limit.max_file_size);return true}reader=new FileReader();reader.onload=(function(s){return function(t){setTimeout(function(){d(n,c[k.attr("id")].push(p)-1,t.target.result,s.name,s.type)},200)}})(p);console.log(p.name);reader.readAsDataURL(p)})}}})});e("#order_review").on("ajaxSuccess",function(l){var k=e(l.target),j=k.find("#place_order"),i=e(".wooccmupload-field"),h=i.length;if(h){j.addClass("wooccm-upload-process")}});e(document).on("click","#place_order.wooccm-upload-process",function(l){l.preventDefault();var i=e("form.checkout"),k=e(this),j=e(".wooccmupload-field"),h=j.length;j.each(function(m,p){var n=e(p),r=n.find(".wooccmupload_field"),q=n.find(".wooccmupload_list");if(window.FormData&&c[n.attr("id")].length){if(!f(i)){k.html(wooccm_upload.message.uploading);g(i)}var o=new FormData();q.find("span[data-file_id]").each(function(t,s){var u=e(s).data("file_id");if(t>wooccm_upload.limit.max_files){console.log("Exeeds max files limit of "+wooccm_upload.limit.max_files);return false}if(c[n.attr("id")][u]===undefined){console.log("Undefined "+u);return true}if(c[n.attr("id")][u].size>wooccm_upload.limit.max_file_size){console.log("Exeeds max file size of "+wooccm_upload.limit.max_files);return true}console.log("We're ready to upload "+c[n.attr("id")][u].name);o.append("wooccm_checkout_attachment_upload[]",c[n.attr("id")][u])});o.append("action","wooccm_checkout_attachment_upload");o.append("nonce",wooccm_upload.nonce);e.ajax({async:false,url:wooccm_upload.ajaxurl,type:"POST",cache:false,data:o,processData:false,contentType:false,beforeSend:function(s){},success:function(s){if(s.success){r.val(s.data)}else{e("body").trigger("update_checkout")}},complete:function(s){h=h-1}})}else{h=h-1}if(h==0){a(i);k.removeClass("wooccm-upload-process").trigger("click")}})});e(document).on("change",".wooccm-add-checkout-fees",function(h){e("body").trigger("update_checkout")});e(".wooccm-conditional-child").each(function(h,m){var j=e(m),l=e("#"+j.find("[data-conditional-parent]").data("conditional-parent")+"_field"),k=j.find("[data-conditional-parent-value]").data("conditional-parent-value");if(l.length){l.on("wooccm_change change keyup",function(o){var n=e(o.target),i=n.val();if(n.hasClass("select2-selection")){return}if(n.prop("type")=="checkbox"){i=n.is(":checked")}if(k==i||(e.isArray(i)&&i.indexOf(k)>-1)){j.fadeIn()}else{j.fadeOut()}n.off("wooccm_change");n.off("change");n.off("keyup")});l.find("select:first").trigger("wooccm_change");l.find("textarea:first").trigger("wooccm_change");l.find("input[type=button]:first").trigger("wooccm_change");l.find("input[type=radio]:checked:first").trigger("wooccm_change");l.find("input[type=checkbox]:checked:first").trigger("wooccm_change");l.find("input[type=color]:first").trigger("wooccm_change");l.find("input[type=date]:first").trigger("wooccm_change");l.find("input[type=datetime-local]:first").trigger("wooccm_change");l.find("input[type=email]:first").trigger("wooccm_change");l.find("input[type=file]:first").trigger("wooccm_change");l.find("input[type=hidden]:first").trigger("wooccm_change");l.find("input[type=image]:first").trigger("wooccm_change");l.find("input[type=month]:first").trigger("wooccm_change");l.find("input[type=number]:first").trigger("wooccm_change");l.find("input[type=password]:first").trigger("wooccm_change");l.find("input[type=range]:first").trigger("wooccm_change");l.find("input[type=reset]:first").trigger("wooccm_change");l.find("input[type=search]:first").trigger("wooccm_change");l.find("input[type=submit]:first").trigger("wooccm_change");l.find("input[type=tel]:first").trigger("wooccm_change");l.find("input[type=text]:first").trigger("wooccm_change");l.find("input[type=time]:first").trigger("wooccm_change");l.find("input[type=url]:first").trigger("wooccm_change");l.find("input[type=week]:first").trigger("wooccm_change")}else{j.show()}});e(".wooccm-type-datepicker").each(function(h,k){var j=e(k),l=j.find("input[type=text]");if(e.isFunction(e.fn.datepicker)){l.datepicker({dateFormat:l.data("formatdate")||"dd-mm-yy",minDate:l.data("mindate")||undefined,maxDate:l.data("maxdate")||undefined,beforeShowDay:function(n){var i=n.getDay(),m=l.data("disable")||false;if(!m){return[true]}else{return[m[i]!==undefined]}}})}});e(".wooccm-type-timepicker").each(function(h,k){var j=e(k),l=j.find("input[type=text]");if(e.isFunction(e.fn.timepicker)){l.timepicker({showPeriod:true,showLeadingZero:true,hours:l.data("hours")||undefined,minutes:l.data("minutes")||undefined,})}});e(".wooccm-colorpicker-farbtastic").each(function(h,k){var j=e(k),m=j.find("input[type=text]"),l=j.find(".wooccmcolorpicker_container");m.hide();if(e.isFunction(e.fn.farbtastic)){l.farbtastic("#"+m.attr("id"));l.on("click",function(i){m.fadeIn()})}});e(".wooccm-colorpicker-iris").each(function(h,k){var j=e(k),l=j.find("input[type=text]");l.css("color","#fff").css("background",l.val()).hide();l.iris({wccmclass:l.attr("id"),palettes:true,color:"",hide:false,change:function(i,m){l.css("color","#000").css("background",m.color.toString()).fadeIn()}})})})(jQuery);
 
assets/js/wooccm-field.min.js DELETED
@@ -1 +0,0 @@
1
- (function(e){var g=0,b;var d=function(j){return j.is(".processing")||j.parents(".processing").length};var c=function(j){if(!d(j)){j.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var f=function(j){j.removeClass("processing").unblock()};var h=Backbone.Model.extend({defaults:wooccm_field.args});var i=Backbone.View.extend({events:{"click .media-modal-backdrop":"close","click .media-modal-close":"close","click .media-modal-prev":"edit","click .media-modal-next":"edit","change input":"change","change textarea":"change","change select":"change","change .media-modal-change":"render","submit .media-modal-form":"save",},templates:{},initialize:function(){_.bindAll(this,"open","edit","change","load","render","close","save");this.init();this.open()},init:function(){this.templates.window=wp.template("wooccm-modal-window")},render:function(){var k=this;var j=this.$el.find("ul.wc-tabs li.active a").attr("href");k.$el.html(k.templates.window(k.model.attributes));_.delay(function(){k.$el.trigger("wooccm-enhanced-select");k.$el.trigger("wooccm-tab-panels",j);k.$el.trigger("init_tooltips")},100)},load:function(){var j=this;if(j.model.attributes.id==undefined){j.render();return}e.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",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(k){if(k.success){console.log(k.data);j.model.set(k.data);j.render()}else{alert(k.data)}}})},edit:function(n){n.preventDefault();var l=this,m=e(n.target),k=parseInt(e(".wc_gateways tr[data-field_id]").length-1),j=parseInt(l.model.get("id"));g++;if(b){clearTimeout(b)}b=setTimeout(function(){if(m.hasClass("media-modal-next")){j=Math.min(j+g,k)}else{j=Math.max(j-g,0)}l.model.set({id:j});g=0;l.load()},300)},open:function(j){this.load();e("body").addClass("modal-open").append(this.$el)},change:function(m){m.preventDefault();var k=e(m.target),j=k.attr("name"),l=k.val();if(m.target.type==="checkbox"){l=k.prop("checked")===true?1:0}this.model.attributes[j]=l;this.model.changed[j]=l},close:function(j){j.preventDefault();this.undelegateEvents();e(document).off("focusin");e("body").removeClass("modal-open");this.remove()},save:function(m){m.preventDefault();var l=this,k=l.$el.find("#wooccm_modal"),j=k.find(".attachment-details");console.log(l.model.attributes);e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_save_field",nonce:wooccm_field.nonce,field_id:l.model.attributes.id,field_data:l.model.attributes},dataType:"json",type:"POST",beforeSend:function(){j.addClass("save-waiting");c(k)},complete:function(){j.addClass("save-complete");j.removeClass("save-waiting");f(k)},error:function(){alert("Error!")},success:function(n){if(n.success){if(n.data.id!=l.model.attributes.id){location.reload();return}}else{alert(n.data)}}});return false}});var a=Backbone.View.extend({initialize:function(m){var l=e(m.target),k=l.closest("[data-field_id]").data("field_id");var j=new h();j.set({id:k});new i({model:j})},});e("#wooccm_billing_settings_add, #wooccm_shipping_settings_add, #wooccm_additional_settings_add").on("click",function(j){j.preventDefault();new a(j)});e("#wooccm_billing_settings_reset, #wooccm_shipping_settings_reset, #wooccm_additional_settings_reset").on("click",function(k){k.preventDefault();var j=e(k.target);var l=confirm(wooccm_field.message.reset);if(!l){return false}e.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(m){if(m.success){location.reload()}else{alert(m.data)}}});return false});e(".wooccm_billing_settings_edit, .wooccm_shipping_settings_edit, .wooccm_additional_settings_edit").on("click",function(j){j.preventDefault();new a(j)});e(".wooccm_billing_settings_delete, .wooccm_shipping_settings_delete, .wooccm_additional_settings_delete").on("click",function(m){m.preventDefault();var l=e(m.target),k=l.closest("[data-field_id]"),j=k.data("field_id");var n=confirm(wooccm_field.message.remove);if(!n){return false}e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_delete_field",nonce:wooccm_field.nonce,field_id:j,},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(o){if(o.success){k.remove()}else{alert(o.data)}}});return false});e(document).on("click",".wooccm-field-toggle-attribute",function(m){m.preventDefault();var j=e(this),l=j.closest("tr"),k=j.find(".woocommerce-input-toggle");e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_toggle_field_attribute",nonce:wooccm_field.nonce,field_attr:e(this).data("field_attr"),field_id:l.data("field_id")},dataType:"json",type:"POST",beforeSend:function(n){k.addClass("woocommerce-input-toggle--loading")},success:function(n){if(true===n.data){k.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");k.addClass("woocommerce-input-toggle--enabled");k.removeClass("woocommerce-input-toggle--loading")}else{if(true!==n.data){k.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");k.addClass("woocommerce-input-toggle--disabled");k.removeClass("woocommerce-input-toggle--loading")}}}});return false});e(document).on("change",".wooccm-field-change-attribute",function(l){l.preventDefault();var j=e(this),k=j.closest("tr");e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_change_field_attribute",nonce:wooccm_field.nonce,field_attr:j.data("field_attr"),field_value:j.val(),field_id:k.data("field_id"),},dataType:"json",type:"POST",beforeSend:function(m){j.prop("disabled",true)},success:function(m){console.log(m.data)},complete:function(m){j.prop("disabled",false)},});return false})})(jQuery);
 
assets/less/wooccm-admin.less DELETED
@@ -1,130 +0,0 @@
1
- .woocommerce_options_panel {
2
-
3
- .woocommerce-help-tip {
4
- margin: 0 0 0 0.5em;
5
- }
6
-
7
- .select2-container {
8
- width: 50%!important;
9
- line-height: 16px;
10
- //box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
11
-
12
- .select2-selection--multiple {
13
- line-height: 16px;
14
- min-height: 30px;
15
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
16
- }
17
- }
18
-
19
- .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
20
- margin: 3px 3px 0 0;
21
- }
22
- .select2-container--default.select2-container--focus .select2-selection--multiple {
23
- border-color: #5b9dd9!important;
24
- box-shadow: 0 0 2px rgba(30, 140, 190, 0.8)!important;
25
- outline: 2px solid transparent!important;
26
- }
27
- }
28
-
29
- .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-body] .marketplace-suggestion-container, .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-footer] .marketplace-suggestion-container,
30
- .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-header] .marketplace-suggestion-container{
31
- padding: 1em 1.5em;
32
- }
33
-
34
- .marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container img.marketplace-suggestion-icon {
35
- height: 40px;
36
- margin: 0;
37
- margin-right: 1.5em;
38
- -webkit-box-flex: 0;
39
- -webkit-flex: 0 0 40px;
40
- flex: 0 0 40px;
41
- }
42
-
43
- .marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container .marketplace-suggestion-container-cta {
44
- -webkit-box-flex: 1;
45
- -webkit-flex: 1 1 30%;
46
- flex: 1 1 30%;
47
- min-width: 160px;
48
- text-align: right;
49
- }
50
-
51
- a.suggestion-dismiss::before {
52
- font-family: Dashicons;
53
- speak: none;
54
- font-weight: 400;
55
- font-variant: normal;
56
- text-transform: none;
57
- line-height: 1;
58
- -webkit-font-smoothing: antialiased;
59
- content: "";
60
- text-decoration: none;
61
- font-size: 1.5em;
62
- }
63
-
64
- .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-body] .marketplace-suggestion-container .marketplace-suggestion-container-cta a.button {
65
- display: inline-block;
66
- min-width: 120px;
67
- text-align: center;
68
- margin: 0;
69
- }
70
-
71
- .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-body] {
72
- border: none;
73
- border-top: 1px solid #eee;
74
- border-bottom: 1px solid #eee;
75
- }
76
-
77
- .marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container .marketplace-suggestion-container-cta .suggestion-dismiss {
78
- text-decoration: none;
79
- position: relative;
80
- top: 5px;
81
- right: auto;
82
- margin-left: 1em;
83
- }
84
- a.suggestion-dismiss {
85
- border: none;
86
- box-shadow: none;
87
- color: #ddd;
88
- }
89
-
90
- .marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container {
91
- -webkit-box-align: start;
92
- -webkit-align-items: flex-start;
93
- align-items: flex-start;
94
- display: -webkit-box;
95
- display: -webkit-flex;
96
- display: flex;
97
- -webkit-box-orient: vertical;
98
- -webkit-box-direction: normal;
99
- -webkit-flex-direction: column;
100
- flex-direction: column;
101
- position: relative;
102
- }
103
-
104
- .marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container .marketplace-suggestion-container-content h4 {
105
- margin: 0;
106
- }
107
-
108
- .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-body] .marketplace-suggestion-container .marketplace-suggestion-container-content p {
109
- padding: 0;
110
- line-height: 1.5;
111
- }
112
-
113
- .marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container .marketplace-suggestion-container-content p {
114
- margin: 0;
115
- margin-top: 4px;
116
- color: #444;
117
- }
118
-
119
- @media screen and (min-width: 600px) {
120
-
121
- .marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container {
122
- -webkit-box-align: center;
123
- -webkit-align-items: center;
124
- align-items: center;
125
- -webkit-box-orient: horizontal;
126
- -webkit-box-direction: normal;
127
- -webkit-flex-direction: row;
128
- flex-direction: row;
129
- }
130
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/less/wooccm.less DELETED
@@ -1,119 +0,0 @@
1
- .woocommerce form {
2
-
3
- .wooccm-clearfix {
4
- //float: none;
5
- //clear:both;
6
- &:before,
7
- &:after{
8
- content:'';
9
- display:table;
10
- }
11
- &:after{
12
- clear: both;
13
- }
14
- }
15
-
16
- .wooccm-conditional-child {
17
- display: none;
18
- }
19
-
20
- }
21
-
22
- .button {
23
- &.fileinput-button {
24
- position: relative;
25
- overflow: hidden!important;
26
-
27
- input {
28
- position: absolute;
29
- top: 0;
30
- right: 0;
31
- margin: 0;
32
- opacity: 0;
33
- -ms-filter:'alpha(opacity=0)';
34
- font-size: 200px;
35
- direction: ltr;
36
- cursor: pointer;
37
- }
38
-
39
- }
40
- }
41
-
42
- .wooccmupload_list {
43
- margin: 0 -5px;
44
- padding: 0;
45
- display: flex;
46
- flex-wrap: wrap;
47
- align-items: center;
48
- justify-content: start;
49
-
50
- .wooccmupload_file {
51
- display: flex;
52
- justify-content: center;
53
- align-items: stretch;
54
- box-sizing: border-box;
55
- padding: 10px 5px 0 5px;
56
- width: 25%;
57
- //max-height: 90px;
58
- position: relative;
59
-
60
-
61
- .wooccmupload_file_delete {
62
- z-index: 1;
63
- position: absolute;
64
- top: 2px;
65
- right: -3px;
66
- width: 16px;
67
- height: 16px;
68
- background-color: #222;
69
- display: block;
70
- line-height: 16px;
71
- text-align: center;
72
- color: #fefefe;
73
- font-weight: 900;
74
- border-radius: 50%;
75
- font-size: 12px;
76
- cursor: pointer;
77
- font-family: code;
78
- }
79
-
80
- .wooccmupload_file_container {
81
- width: 100%;
82
- overflow: hidden;
83
- }
84
-
85
- .wooccmupload_file_image_container {
86
- display: flex;
87
- justify-content: center;
88
- align-items: center;
89
- overflow: hidden;
90
- width: 100%;
91
- padding-top: 100%;
92
- position: relative;
93
- background: #eee;
94
-
95
- > img {
96
- overflow: hidden;
97
- object-fit: cover;
98
- position: absolute;
99
- top: 30%;
100
- bottom: auto;
101
- height: 40%;
102
- opacity: 0.8;
103
-
104
- &.image {
105
- top: 0;
106
- bottom: 0;
107
- left: 0;
108
- right: 0;
109
- max-height: 100%;
110
- max-height: 100%;
111
- height: 100%;
112
- width: 100%;
113
- }
114
-
115
- }
116
- }
117
- }
118
-
119
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/old/backend_css.css DELETED
@@ -1,370 +0,0 @@
1
- /*
2
- .refreshwooccm {
3
- border-top: 10px solid #222;
4
- margin-right: 20px;
5
- }
6
- */
7
- .button.button-hero {
8
- padding: 0px 16px;
9
- }
10
- td.wccs-remove {
11
- text-align: center;
12
- }
13
- td.billing-wccs-remove {
14
- text-align: center;
15
- }
16
- select[readonly] {
17
- background-color: #eee;
18
- color: #333;
19
- }
20
- a.billing-wccs-remove-button,
21
- a.shipping-wccs-remove-button,
22
- a.wccs-remove-button {
23
- font-size: 22px;
24
- text-align: center;
25
- vertical-align: middle;
26
- }
27
- #general-semi-nav {
28
- display: block;
29
- clear: both;
30
- background-color: #f1f1f1;
31
- }
32
- #main-nav-left {
33
- float: left;
34
- position: relative;
35
- }
36
- #main-nav-left li {
37
- margin-bottom: 0;
38
- -moz-box-shadow: inset 0 1px 0 #f9f9f9;
39
- -webkit-box-shadow: inset 0 1px 0 #f9f9f9;
40
- box-shadow: inset 0 1px 0 #f9f9f9;
41
- margin-right: 1px;
42
- border-bottom: 1px solid #d8d8d8;
43
- cursor: pointer;
44
- }
45
- #main-nav-left li.current {
46
- margin-right: 0;
47
- }
48
- #main-nav-left li a,
49
- #main-nav-left ul li a:link,
50
- #main-nav-left ul li a:visited {
51
- display: block;
52
- padding: 10px 10px 10px 10px;
53
- background-repeat: no-repeat;
54
- background-position: 13px 10px;
55
- font-weight: bold;
56
- font-size: 12px;
57
- text-decoration: none;
58
- color: #555;
59
- opacity: 0.5;
60
- outline: none;
61
- }
62
- #main-nav-left ul li.current a {
63
- background-color: #fcfcfc;
64
- color: #646464;
65
- opacity: 1;
66
- }
67
- #content-nav-right h3.heading.address {
68
- border-bottom: 0;
69
- }
70
- #content-nav-right .option.allow {
71
- border-bottom: 0;
72
- }
73
- #content-nav-right .option input,
74
- #content-nav-right .option select,
75
- #content-nav-right .option textarea {
76
- margin-bottom: 9px;
77
- /*
78
- background-color: #f1f1f1;
79
- border: 1px solid;
80
- border-color: #ccc #e6e6e6 #e6e6e6 #ccc;
81
- padding: 4px;
82
- */
83
- width: 340px;
84
- font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;
85
- font-size: inherit;
86
- }
87
- #content-nav-right .option .full-width {
88
- width: 100%;
89
- }
90
- #content-nav-right .section h3.heading.checkbox {
91
- border-bottom: 0;
92
- }
93
- .option {
94
- padding: 10px;
95
- border-width: 1px 0;
96
- border-style: solid;
97
- border-top-color: #fff;
98
- border-bottom-color: #dfdfdf;
99
- background-color: #f5f5f5;
100
- }
101
- #content-nav-right .option input[type="radio"] {
102
- width: 1%;
103
- float:left;
104
- margin-right: 14px;
105
- }
106
- #content-nav-right .option input[type="checkbox"] {
107
- width: 10px;
108
- float:left;
109
- margin-right: 14px;
110
- }
111
- .info-of {
112
- color: #666;
113
- font-size: 12px;
114
- font-weight: 600;
115
- margin-top: -5px;
116
- }
117
- #content-nav-right.general-vibe {
118
- float: left;
119
- margin-top: 1px;
120
- margin-left: -1px;
121
- padding: 0 14px;
122
- padding-bottom: 14px;
123
- font-family: "Lucida Grande", Sans-serif;
124
- background-color: #FCFCFC;
125
- border-left: 1px solid #d8d8d8;
126
- -moz-box-shadow: inset 0 1px 0 #fff;
127
- -webkit-box-shadow: inset 0 1px 0 #fff;
128
- box-shadow: inset 0 1px 0 #fff;
129
- }
130
- #content-nav-right h3.heading {
131
- font-family: Arial, Helvetica, sans-serif;
132
- margin: 10px 0 10px 0;
133
- padding: 7px 0px;
134
- border-bottom: 1px solid #e7e7e7;
135
- font-size: 13px;
136
- font-weight: bold;
137
- }
138
- #main-nav-left ul {
139
- margin-top: 1px;
140
- }
141
- th.wccm_title {
142
- text-align: center;
143
- font-weight: bold;
144
- font-size: 18px;
145
- }
146
- .nav-tab {
147
- cursor: pointer;
148
- }
149
- table.widefat.general-semi thead:first-child {
150
- border-left: 5px solid #278ab7;
151
- }
152
- th.hide_stuff_color.daoo,
153
- th.add_amount,
154
- th.apply_tick {
155
- background: #38B3E4;
156
- cursor: pointer;
157
- }
158
- .hide_stuff_color.daoo.current_opener,
159
- th.add_amount.current_opener,
160
- th.apply_tick.current_opener {
161
- background: #FF2876;
162
- color: #fff;
163
- }
164
- th.hide_stuff_days {
165
- text-align:center;
166
- }
167
- input.wccs_submit_button {
168
- float: left;
169
- margin-bottom: 10px;
170
- margin-left: 15px;
171
- }
172
- .reset_form {
173
- float: left;
174
- }
175
- .import_form,
176
- .reset_form {
177
- margin-top:10px;
178
- }
179
- .import_form {
180
- float: left;
181
- margin-left: 15px;
182
- }
183
- .wccm_importer {
184
- font-size:16px;
185
- }
186
- #wccs_import_submit {
187
- float: left;
188
- margin-right:15px;
189
- }
190
- #wccs_reset_submit {
191
- float: left;
192
- margin-bottom: 10px;
193
- width: inherit;
194
- }
195
- span.heading_smalla {
196
- font-weight:600;
197
- float: left;
198
- padding-left: 12px;
199
- padding-right: 12px;
200
- margin-bottom:0.2em;
201
- }
202
- .updated.jellow p {
203
- margin:1em 0;
204
- padding-top: 0;
205
- }
206
- .updated.jellow {
207
- border-left: none;
208
- text-align: center;
209
- padding: 5px;
210
- }
211
- .button-primary.wccm_importer_submit {
212
- margin-top:0.4em;
213
- margin-left:12px;
214
- display:block;
215
- }
216
-
217
- td.shipping-wccs-order.ui-sortable-handle,
218
- td.billing-wccs-order.ui-sortable-handle,
219
- td.wccs-order.ui-sortable-handle {
220
- width: 3%;
221
- color: #aaa;
222
- text-align: center;
223
- vertical-align: middle;
224
- }
225
-
226
- td.wccs-remove a:hover,
227
- td.billing-wccs-remove a:hover,
228
- td.shipping-wccs-remove a:hover {
229
- color:red;
230
- }
231
- td.wccs-remove a,
232
- td.billing-wccs-remove a,
233
- td.shipping-wccs-remove a {
234
- font-size: 20px;
235
- font-weight: 700;
236
- }
237
- .wccs-clone,
238
- .billing-wccs-clone,
239
- .shipping-wccs-clone {
240
- display:none;
241
- }
242
- #floatright_set .widefat input {
243
- float:right;
244
- }
245
- .wccs_replace {
246
- width: 20%;
247
- }
248
- td.wccs-order,
249
- td.billing-wccs-order,
250
- td.shipping-wccs-order {
251
- cursor:move;
252
- }
253
- .wccs-table > tbody > tr > td,
254
- .billing-wccs-table > tbody > tr > td,
255
- .shipping-wccs-table > tbody > tr > td {
256
- background: #fff;
257
- border: none;
258
- padding: 8px;
259
- position: relative;
260
- vertical-align: middle;
261
- text-align: center;
262
- }
263
-
264
- table.widefat {
265
- background: #FCFCFC;
266
- }
267
-
268
- .wccs-table > tbody > tr:last-child td,
269
- .billing-wccs-table > tbody > tr:last-child td,
270
- .shipping-wccs-table > tbody > tr:last-child td {
271
- border-bottom: 0 none;
272
- }
273
- .wccs-table > tbody > tr td:last-child,
274
- .billing-wccs-table > tbody > tr td:last-child,
275
- .shipping-wccs-table > tbody > tr td:last-child {
276
- border-right: 0 none;
277
- }
278
- .wccs-table > thead > tr > th,
279
- .billing-wccs-table > thead > tr > th,
280
- .shipping-wccs-table > thead > tr > th {
281
- border: none;
282
- text-align: center;
283
- }
284
- .wccs-table > thead > tr > th:last-child,
285
- .billing-wccs-table > thead > tr > th:last-child ,
286
- .shipping-wccs-table > thead > tr > th:last-child {
287
- border-right: 0 none;
288
- }
289
-
290
- .wccs-table tr td.wccs-order,
291
- .wccs-table tr td.billing-wccs-order,
292
- .wccs-table tr th.billing-wccs-order,
293
- .wccs-table tr td.shipping-wccs-order,
294
- .wccs-table tr th.shipping-wccs-order {
295
- width: 16px;
296
- text-align: center;
297
- vertical-align: middle;
298
- color: #aaa;
299
- text-shadow: #fff 0 1px 0;
300
- }
301
-
302
- .wccs-table .wccs-remove,
303
- .billing-wccs-table .wccs-remove,
304
- .shipping-wccs-table .wccs-remove {
305
- width: 16px;
306
- vertical-align: middle;
307
- }
308
- .wccs-table input[type="text"],
309
- .billing-wccs-table input[type="text"],
310
- .shipping-wccs-table input[type="text"] {
311
- width: 100%;
312
- }
313
- .wccs-table tr td.more_toggler1c,
314
- .billing-wccs-table tr td.more_toggler1c,
315
- .shipping-wccs-table tr td.more_toggler1c {
316
- cursor: pointer;
317
- }
318
-
319
- .wccs-table-footer,
320
- .billing-wccs-table-footer,
321
- .shipping-wccs-table-footer {
322
- position: relative;
323
- overflow: hidden;
324
- margin-top: 10px;
325
- padding: 8px 0;
326
- }
327
- .toggle_shower {
328
- color: #278ab7;
329
- font-weight: 700;
330
- }
331
- .current_opener {
332
- color: red;
333
- font-weight: 700;
334
- }
335
- .spongagge {
336
- float: left;
337
- position: relative;
338
- -moz-transform: rotate(270deg); /* FF3.5+ */
339
- -o-transform: rotate(270deg); /* Opera 10.5 */
340
- -webkit-transform: rotate(270deg); /* Saf3.1+, Chrome */
341
- filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* IE6,IE7 */
342
- -ms-filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* IE8 */
343
- margin-top: -25%;
344
- }
345
- a.nav-tab.star {
346
- background: #fff;
347
- }
348
- div#star-five img {
349
- margin-bottom: -5px;
350
- }
351
-
352
- @media screen and (max-width: 680px) {
353
- #main-nav-left {
354
- width: 24%;
355
- min-width:135px;
356
- }
357
- #content-nav-right {
358
- width: 70%;
359
- }
360
- }
361
-
362
- @media screen and (min-width: 681px) {
363
- #main-nav-left {
364
- width: 16%;
365
- min-width:135px;
366
- }
367
- #content-nav-right {
368
- width: 76%;
369
- }
370
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/old/billing_script_wccs.js DELETED
@@ -1,106 +0,0 @@
1
- // Javascript for adding new field
2
- jQuery(document).ready( function() {
3
-
4
- /**
5
- * Credits to the Advanced Custom Fields plugin for this code
6
- */
7
-
8
- // Update Order Numbers
9
- function billing_update_order_numbers(div) {
10
-
11
- count = parseInt(jQuery('.billing-wccs-table').children('tbody').children('tr.billing-wccs-row').length);
12
- div.children('tbody').children('tr.billing-wccs-row').each(function(i) {
13
-
14
- jQuery(this).children('td.billing-wccs-order').html(i+1);
15
-
16
- for( var x = 0; x < count; x++ ) {
17
- jQuery(this).children('td.more_toggler1,td.billing-wccs-order-hidden').find('[name]').each(function(){
18
- var billing_name = jQuery(this).attr('name').replace('['+x+']','[' + i + ']');
19
- jQuery(this).attr('name', billing_name);
20
- });
21
- jQuery(this).children('td.billing-wccs-order-hidden').find('[value]').each(function(){
22
- var billing_name = jQuery(this).attr('value').replace(jQuery(this).val(), i+1);
23
- jQuery(this).attr('value', billing_name);
24
- });
25
- }
26
-
27
- });
28
-
29
- }
30
-
31
- // Make Sortable
32
- function billing_make_sortable(div){
33
-
34
- var billing_fixHelper = function(e, ui) {
35
- ui.children().each(function() {
36
- jQuery(this).width(jQuery(this).width());
37
- });
38
- return ui;
39
- };
40
-
41
- div.children('tbody').unbind('sortable').sortable({
42
- update: function(event, ui){
43
- billing_update_order_numbers(div);
44
- },
45
- handle: 'td.billing-wccs-order',
46
- helper: billing_fixHelper
47
- });
48
- }
49
-
50
- var billingdiv = jQuery('.billing-wccs-table'),
51
- billing_row_count = billingdiv.children('tbody').children('tr.billing-wccs-row').length;
52
-
53
- // Make the table sortable
54
- billing_make_sortable(billingdiv);
55
-
56
- // Add button
57
- jQuery('#billing-wccs-add-button').live('click', function(){
58
-
59
- var billingdiv = jQuery('.billing-wccs-table'),
60
- billing_row_count = billingdiv.children('tbody').children('tr.billing-wccs-row').length,
61
- billing_new_field = billingdiv.children('tbody').children('tr.billing-wccs-clone').clone(false); // Create and add the new field
62
-
63
- billing_new_field.attr( 'class', 'billing-wccs-row' );
64
-
65
- // Update names
66
- billing_new_field.find('[name]').each(function(){
67
- var billing_count = parseInt(billing_row_count);
68
- var billing_name = jQuery(this).attr('name').replace('[999]','[' + billing_count + ']');
69
- jQuery(this).attr('name', billing_name);
70
- });
71
-
72
- billing_new_field.find('[value]').each(function(){
73
- var billing_count = parseInt(billing_row_count);
74
- var billing_name = jQuery(this).attr('value').replace('999', billing_count + 1);
75
- jQuery(this).attr('value', billing_name);
76
- });
77
-
78
- // Add row
79
- billingdiv.children('tbody').append(billing_new_field);
80
- billing_update_order_numbers(billingdiv);
81
-
82
- // There is now 1 more row
83
- billing_row_count ++;
84
-
85
- return false;
86
-
87
- });
88
-
89
- // Remove button
90
- jQuery('.billing-wccs-table .billing-wccs-remove-button').live('click', function(e){
91
-
92
- var billingdiv = jQuery('.billing-wccs-table'),
93
- tr = jQuery(this).closest('tr');
94
- e.preventDefault();
95
- var choice = confirm( 'Are you sure you want to delete this Checkout field?' );
96
- if( choice ) {
97
- tr.animate({'left' : '50px', 'opacity' : 0}, 250, function(){
98
- tr.remove();
99
- billing_update_order_numbers(billingdiv);
100
- });
101
- return false;
102
- }
103
-
104
- });
105
-
106
- });