WooCommerce Checkout Manager - Version 5.4.2

Version Description

  • Fix: order received upload files
Download this release

Release Info

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

Code changes from version 5.4.1 to 5.4.2

assets/backend/css/admin.css CHANGED
@@ -1,198 +1 @@
1
- .select2-container {
2
- z-index: 9999999; }
3
- .select2-container .select2-selection--single,
4
- .select2-container .select2-selection--single .select2-selection__rendered,
5
- .select2-container .select2-selection--single .select2-selection__arrow {
6
- height: 30px !important;
7
- line-height: 30px !important; }
8
-
9
- .wooccm-premium {
10
- opacity: 0.5;
11
- pointer-events: none;
12
- /* .description {
13
- &.premium {
14
- //display: none;
15
- }
16
-
17
- &.hidden {
18
- //display: none;
19
- }
20
- }*/ }
21
-
22
- .button.fileinput-button {
23
- position: relative;
24
- overflow: hidden !important; }
25
- .button.fileinput-button input {
26
- position: absolute;
27
- top: 0;
28
- right: 0;
29
- margin: 0;
30
- opacity: 0;
31
- -ms-filter: 'alpha(opacity=0)';
32
- font-size: 200px;
33
- direction: ltr;
34
- cursor: pointer; }
35
-
36
- table.wc_gateways > tbody > tr > td select {
37
- line-height: 1 !important; }
38
-
39
- table.wc_gateways > tbody > tr > td.label {
40
- font-weight: 600; }
41
-
42
- table.wooccm-enhanced-options {
43
- border: none;
44
- box-shadow: none; }
45
- table.wooccm-enhanced-options > thead > th .woocommerce-help-tip {
46
- margin: -1px 0 0 0.25em; }
47
- table.wooccm-enhanced-options > tbody > tr > td input.label {
48
- width: 100%; }
49
- table.wooccm-enhanced-options > tbody > tr > td select.add-price-type {
50
- margin: 0 0 0 10px; }
51
- table.wooccm-enhanced-options > tbody > tr > td input.check {
52
- margin: 0 9px; }
53
- table.wooccm-enhanced-options > tbody > tr > td.sort .wc-item-reorder-nav {
54
- width: auto; }
55
-
56
- #wooccm_modal.processing {
57
- pointer-events: none; }
58
- #wooccm_modal.processing:before {
59
- content: '';
60
- position: absolute;
61
- top: 0;
62
- bottom: 0;
63
- left: 0;
64
- right: 0;
65
- background-color: #ffffff;
66
- z-index: 99999999;
67
- opacity: 0.8; }
68
-
69
- #wooccm_modal select {
70
- min-height: 30px; }
71
-
72
- #wooccm_modal .form-field .wrap {
73
- padding: 0; }
74
-
75
- #wooccm_modal .attachment-info .details,
76
- #wooccm_modal .attachment-info .settings {
77
- width: 100%; }
78
-
79
- #wooccm_modal .attachment-info .woocommerce_options_panel label,
80
- #wooccm_modal .attachment-info .woocommerce_options_panel legend {
81
- width: 75px;
82
- margin: 0 0 0 -90px;
83
- font-weight: 600; }
84
-
85
- #wooccm_modal .attachment-info .woocommerce_options_panel fieldset.form-field,
86
- #wooccm_modal .attachment-info .woocommerce_options_panel p.form-field {
87
- padding: 0 20px 0 92px !important; }
88
-
89
- #wooccm_modal .attachment-info .woocommerce_options_panel input[type=email],
90
- #wooccm_modal .attachment-info .woocommerce_options_panel input[type=number],
91
- #wooccm_modal .attachment-info .woocommerce_options_panel input[type=password],
92
- #wooccm_modal .attachment-info .woocommerce_options_panel input[type=text],
93
- #wooccm_modal .attachment-info .woocommerce_options_panel select,
94
- #wooccm_modal .attachment-info .woocommerce_options_panel .select2-container {
95
- width: 100% !important; }
96
-
97
- #wooccm_modal #woocommerce-product-data .woocommerce_options_panel {
98
- width: 100%;
99
- /* input,
100
- select,
101
- textarea {
102
- margin: 0;
103
- }*/ }
104
- #wooccm_modal #woocommerce-product-data .woocommerce_options_panel .premium {
105
- display: block;
106
- clear: both; }
107
- #wooccm_modal #woocommerce-product-data .woocommerce_options_panel .woocommerce-help-tip {
108
- margin: 0 0 0 0.5em; }
109
- #wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container {
110
- width: 50% !important;
111
- line-height: 16px; }
112
- #wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection {
113
- box-shadow: none;
114
- border-radius: 3px;
115
- padding: 0 24px 0 8px; }
116
- #wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection--multiple {
117
- line-height: 16px;
118
- min-height: 30px; }
119
- @media only screen and (max-width: 1280px) {
120
- #wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container {
121
- width: 80% !important; } }
122
- #wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
123
- margin: 3px 3px 0 0; }
124
- #wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default.select2-container--focus .select2-selection--multiple {
125
- border-color: #5b9dd9 !important;
126
- box-shadow: 0 0 2px rgba(30, 140, 190, 0.8) !important;
127
- outline: 2px solid transparent !important; }
128
-
129
- #wooccm-order-files .inside {
130
- margin: 0;
131
- padding: 0;
132
- background: #fefefe;
133
- display: block !important; }
134
-
135
- #wooccm-order-files .handlediv,
136
- #wooccm-order-files .hndle {
137
- display: none; }
138
-
139
- #wooccm-order-files .wooccm_upload_results {
140
- display: inline-block;
141
- margin: 0 10px; }
142
-
143
- #wooccm-order-files .wooccm_order_attachments_wrapper {
144
- margin: 0;
145
- overflow-x: auto; }
146
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments {
147
- width: 100%;
148
- background: #fff; }
149
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th:first-child {
150
- padding-left: 2em; }
151
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th.sortable {
152
- cursor: pointer; }
153
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments .item {
154
- min-width: 200px; }
155
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th {
156
- text-align: left;
157
- padding: 1em;
158
- font-weight: 400;
159
- color: #999;
160
- background: #f8f8f8;
161
- user-select: none; }
162
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody#order_line_items tr:first-child td {
163
- border-top: none; }
164
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody tr:last-child td {
165
- border-bottom: 1px solid #dfdfdf; }
166
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb {
167
- text-align: left;
168
- width: 38px;
169
- padding-bottom: 1.5em; }
170
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb .wc-order-item-thumbnail {
171
- width: 38px;
172
- height: 38px;
173
- border: 2px solid #e8e8e8;
174
- background: #f8f8f8;
175
- color: #ccc;
176
- position: relative;
177
- font-size: 21px;
178
- display: block;
179
- text-align: center; }
180
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th:first-child,
181
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td:first-child {
182
- padding-left: 2em; }
183
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th,
184
- #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td {
185
- padding: 1.5em 1em 1em;
186
- text-align: left;
187
- line-height: 1.5em;
188
- vertical-align: top;
189
- border-bottom: 1px solid #f8f8f8; }
190
-
191
- #wooccm-order-files .wc-order-data-row {
192
- border-bottom: 1px solid #dfdfdf;
193
- padding: 1.5em 2em;
194
- background: #f8f8f8;
195
- line-height: 2em;
196
- text-align: left; }
197
-
198
- /*# sourceMappingURL=admin.css.map*/
1
+ .select2-container{z-index:9999999}.select2-container .select2-selection--single,.select2-container .select2-selection--single .select2-selection__rendered,.select2-container .select2-selection--single .select2-selection__arrow{height:30px !important;line-height:30px !important}.wooccm-premium{opacity:0.5;pointer-events:none}.button.fileinput-button{position:relative;overflow:hidden !important}.button.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;-ms-filter:'alpha(opacity=0)';font-size:200px;direction:ltr;cursor:pointer}table.wc_gateways>tbody>tr>td select{line-height:1 !important}table.wc_gateways>tbody>tr>td.label{font-weight:600}table.wooccm-enhanced-options{border:none;box-shadow:none}table.wooccm-enhanced-options>thead>th .woocommerce-help-tip{margin:-1px 0 0 0.25em}table.wooccm-enhanced-options>tbody>tr>td input.label{width:100%}table.wooccm-enhanced-options>tbody>tr>td select.add-price-type{margin:0 0 0 10px}table.wooccm-enhanced-options>tbody>tr>td input.check{margin:0 9px}table.wooccm-enhanced-options>tbody>tr>td.sort .wc-item-reorder-nav{width:auto}#wooccm_modal.processing{pointer-events:none}#wooccm_modal.processing:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;background-color:#ffffff;z-index:99999999;opacity:0.8}#wooccm_modal select{min-height:30px}#wooccm_modal .form-field .wrap{padding:0}#wooccm_modal .attachment-info .details,#wooccm_modal .attachment-info .settings{width:100%}#wooccm_modal .attachment-info .woocommerce_options_panel label,#wooccm_modal .attachment-info .woocommerce_options_panel legend{width:75px;margin:0 0 0 -90px;font-weight:600}#wooccm_modal .attachment-info .woocommerce_options_panel fieldset.form-field,#wooccm_modal .attachment-info .woocommerce_options_panel p.form-field{padding:0 20px 0 92px !important}#wooccm_modal .attachment-info .woocommerce_options_panel input[type=email],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=number],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=password],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=text],#wooccm_modal .attachment-info .woocommerce_options_panel select,#wooccm_modal .attachment-info .woocommerce_options_panel .select2-container{width:100% !important}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel{width:100%}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .premium{display:block;clear:both}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .woocommerce-help-tip{margin:0 0 0 0.5em}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container{width:50% !important;line-height:16px}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection{box-shadow:none;border-radius:3px;padding:0 24px 0 8px}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection--multiple{line-height:16px;min-height:30px}@media only screen and (max-width: 1280px){#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container{width:80% !important}}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default .select2-selection--multiple .select2-selection__rendered li{margin:3px 3px 0 0}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default.select2-container--focus .select2-selection--multiple{border-color:#5b9dd9 !important;box-shadow:0 0 2px rgba(30,140,190,0.8) !important;outline:2px solid transparent !important}#wooccm-order-files .inside{margin:0;padding:0;background:#fefefe;display:block !important}#wooccm-order-files .handlediv,#wooccm-order-files .hndle{display:none}#wooccm-order-files .wooccm_upload_results{display:inline-block;margin:0 10px}#wooccm-order-files .wooccm_order_attachments_wrapper{margin:0;overflow-x:auto}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments{width:100%;background:#fff}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th:first-child{padding-left:2em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th.sortable{cursor:pointer}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments .item{min-width:200px}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th{text-align:left;padding:1em;font-weight:400;color:#999;background:#f8f8f8;user-select:none}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody#order_line_items tr:first-child td{border-top:none}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody tr:last-child td{border-bottom:1px solid #dfdfdf}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb{text-align:left;width:38px;padding-bottom:1.5em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb .wc-order-item-thumbnail{width:38px;height:38px;border:2px solid #e8e8e8;background:#f8f8f8;color:#ccc;position:relative;font-size:21px;display:block;text-align:center}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th:first-child,#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td:first-child{padding-left:2em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th,#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td{padding:1.5em 1em 1em;text-align:left;line-height:1.5em;vertical-align:top;border-bottom:1px solid #f8f8f8}#wooccm-order-files .wc-order-data-row{border-bottom:1px solid #dfdfdf;padding:1.5em 2em;background:#f8f8f8;line-height:2em;text-align:left}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/backend/js/admin-field.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('backbone', 'jquery', 'jquery-ui-datepicker', 'wp-util'), 'version' => 'e3adc601cfa8dccf8153e6a574beb644');
1
+ <?php return array('dependencies' => array('backbone', 'jquery', 'jquery-ui-datepicker', 'wp-util'), 'version' => '3b35ab2a74c16fe901f6d1895971b4b0');
assets/backend/js/admin-field.js CHANGED
@@ -1,653 +1 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // The module cache
3
- /******/ var installedModules = {};
4
- /******/
5
- /******/ // The require function
6
- /******/ function __webpack_require__(moduleId) {
7
- /******/
8
- /******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId]) {
10
- /******/ return installedModules[moduleId].exports;
11
- /******/ }
12
- /******/ // Create a new module (and put it into the cache)
13
- /******/ var module = installedModules[moduleId] = {
14
- /******/ i: moduleId,
15
- /******/ l: false,
16
- /******/ exports: {}
17
- /******/ };
18
- /******/
19
- /******/ // Execute the module function
20
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
- /******/
22
- /******/ // Flag the module as loaded
23
- /******/ module.l = true;
24
- /******/
25
- /******/ // Return the exports of the module
26
- /******/ return module.exports;
27
- /******/ }
28
- /******/
29
- /******/
30
- /******/ // expose the modules object (__webpack_modules__)
31
- /******/ __webpack_require__.m = modules;
32
- /******/
33
- /******/ // expose the module cache
34
- /******/ __webpack_require__.c = installedModules;
35
- /******/
36
- /******/ // define getter function for harmony exports
37
- /******/ __webpack_require__.d = function(exports, name, getter) {
38
- /******/ if(!__webpack_require__.o(exports, name)) {
39
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
40
- /******/ }
41
- /******/ };
42
- /******/
43
- /******/ // define __esModule on exports
44
- /******/ __webpack_require__.r = function(exports) {
45
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47
- /******/ }
48
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
49
- /******/ };
50
- /******/
51
- /******/ // create a fake namespace object
52
- /******/ // mode & 1: value is a module id, require it
53
- /******/ // mode & 2: merge all properties of value into the ns
54
- /******/ // mode & 4: return value when already ns object
55
- /******/ // mode & 8|1: behave like require
56
- /******/ __webpack_require__.t = function(value, mode) {
57
- /******/ if(mode & 1) value = __webpack_require__(value);
58
- /******/ if(mode & 8) return value;
59
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60
- /******/ var ns = Object.create(null);
61
- /******/ __webpack_require__.r(ns);
62
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64
- /******/ return ns;
65
- /******/ };
66
- /******/
67
- /******/ // getDefaultExport function for compatibility with non-harmony modules
68
- /******/ __webpack_require__.n = function(module) {
69
- /******/ var getter = module && module.__esModule ?
70
- /******/ function getDefault() { return module['default']; } :
71
- /******/ function getModuleExports() { return module; };
72
- /******/ __webpack_require__.d(getter, 'a', getter);
73
- /******/ return getter;
74
- /******/ };
75
- /******/
76
- /******/ // Object.prototype.hasOwnProperty.call
77
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78
- /******/
79
- /******/ // __webpack_public_path__
80
- /******/ __webpack_require__.p = "";
81
- /******/
82
- /******/
83
- /******/ // Load entry module and return exports
84
- /******/ return __webpack_require__(__webpack_require__.s = "./src/backend/admin-field.js");
85
- /******/ })
86
- /************************************************************************/
87
- /******/ ({
88
-
89
- /***/ "./src/backend/admin-field.js":
90
- /*!************************************!*\
91
- !*** ./src/backend/admin-field.js ***!
92
- \************************************/
93
- /*! no exports provided */
94
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
95
-
96
- "use strict";
97
- __webpack_require__.r(__webpack_exports__);
98
- /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
99
- /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
100
- /* harmony import */ var wp_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! wp-util */ "wp-util");
101
- /* harmony import */ var wp_util__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(wp_util__WEBPACK_IMPORTED_MODULE_1__);
102
- /* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! backbone */ "backbone");
103
- /* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(backbone__WEBPACK_IMPORTED_MODULE_2__);
104
- /* harmony import */ var jquery_ui_datepicker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! jquery-ui-datepicker */ "jquery-ui-datepicker");
105
- /* harmony import */ var jquery_ui_datepicker__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(jquery_ui_datepicker__WEBPACK_IMPORTED_MODULE_3__);
106
-
107
-
108
-
109
-
110
-
111
- (function ($) {
112
- "use strict";
113
-
114
- var count = 0,
115
- timer;
116
-
117
- var is_blocked = function is_blocked($node) {
118
- return $node.is('.processing') || $node.parents('.processing').length;
119
- };
120
-
121
- var block = function block() {
122
- $('#wooccm_modal').addClass('processing');
123
- };
124
-
125
- var unblock = function unblock() {
126
- $('#wooccm_modal').removeClass('processing');
127
- };
128
-
129
- _.mixin({
130
- sortOptions: function sortOptions(object) {
131
- return _.sortBy(object, function (o) {
132
- return o.order;
133
- });
134
- },
135
- escapeHtml: function escapeHtml(attribute) {
136
- return attribute.replace('&amp;', /&/g).replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&quot;/g, '"').replace(/&#039;/g, "'");
137
- },
138
- getFormData: function getFormData($form) {
139
- var form = $form.serializeJSON({
140
- checkboxUncheckedValue: 'false',
141
- parseBooleans: true,
142
- parseNulls: true
143
- });
144
- var defaults = Object.assign({}, wooccm_field.args);
145
- var merged = Object.assign(defaults, form);
146
- return merged;
147
- }
148
- });
149
-
150
- var FieldModel = Backbone.Model.extend({
151
- defaults: Object.create(wooccm_field.args)
152
- });
153
- var FieldModal = Backbone.View.extend({
154
- initialize: function initialize(e) {
155
- var $button = $(e.target),
156
- field_id = $button.closest('[data-field_id]').data('field_id');
157
- var model = new FieldModel();
158
- model.set({
159
- id: field_id
160
- });
161
- new FieldView({
162
- model: model
163
- }).render();
164
- }
165
- });
166
- var FieldView = Backbone.View.extend({
167
- events: {
168
- 'change input': 'enableSave',
169
- 'change textarea': 'enableSave',
170
- 'change select': 'enableSave',
171
- 'click .media-modal-backdrop': 'close',
172
- 'click .media-modal-close': 'close',
173
- 'click .media-modal-prev': 'edit',
174
- 'click .media-modal-next': 'edit',
175
- 'click .media-modal-tab': 'tab',
176
- 'change .media-modal-parent': 'parent',
177
- 'change .media-modal-render-tabs': 'renderTabs',
178
- 'change .media-modal-render-panels': 'renderPanels',
179
- 'change .media-modal-render-info': 'renderInfo',
180
- 'submit .media-modal-form': 'submit'
181
- },
182
- templates: {},
183
- initialize: function initialize() {
184
- _.bindAll(this, 'open', 'tab', 'edit', 'load', 'render', 'close', 'submit', 'parent');
185
-
186
- this.init();
187
- this.open();
188
- },
189
- init: function init() {
190
- this.templates.window = wp.template('wooccm-modal-main');
191
- },
192
- assign: function assign(view, selector) {
193
- view.setElement(this.$(selector)).render();
194
- },
195
- updateModel: function updateModel(e) {
196
- e.preventDefault();
197
- var modal = this,
198
- $form = modal.$el.find('#wooccm_modal').find('form');
199
-
200
- var model = _.getFormData($form); // console.log('getFormData', model);
201
-
202
-
203
- this.model.set(model);
204
- },
205
- reload: function reload(e) {
206
- if (this.$el.find('#wooccm_modal').hasClass('reload')) {
207
- location.reload();
208
- return;
209
- }
210
-
211
- this.remove();
212
- return;
213
- },
214
- close: function close(e) {
215
- e.preventDefault();
216
- this.undelegateEvents();
217
- $(document).off('focusin');
218
- $('body').removeClass('modal-open'); // if necesary reload...
219
-
220
- this.$el.find('#wooccm_modal').addClass('reload');
221
- this.reload(e);
222
- return;
223
- },
224
- enableSave: function enableSave(e) {
225
- $('.media-modal-submit').prop('disabled', false);
226
- this.updateModel(e);
227
- },
228
- disableSave: function disableSave(e) {
229
- $('.media-modal-submit').prop('disabled', true);
230
- },
231
- tab: function tab(e) {
232
- e.preventDefault();
233
- var modal = this,
234
- $modal = modal.$el.find('#wooccm_modal'),
235
- $tab = $(e.currentTarget),
236
- $tabs = $modal.find('ul.wc-tabs'),
237
- panel = $tab.find('a').attr('href').replace('#', '');
238
- $tabs.find('.active').removeClass('active');
239
- $tab.addClass('active');
240
- this.model.attributes['panel'] = panel;
241
- this.model.changed['panel'] = panel;
242
- this.renderPanels(e);
243
- },
244
- renderTabs: function renderTabs(e) {
245
- this.renderPanels(e);
246
- this.tabs.render();
247
- },
248
- renderPanels: function renderPanels(e) {
249
- this.updateModel(e);
250
- this.panels.render();
251
- },
252
- render: function render() {
253
- var modal = this;
254
- modal.$el.html(modal.templates.window(modal.model.attributes));
255
- this.tabs = new FieldViewTabs({
256
- model: modal.model
257
- });
258
- this.panels = new FieldViewPanels({
259
- model: modal.model
260
- });
261
- this.info = new FieldViewInfo({
262
- model: modal.model
263
- });
264
- this.assign(this.tabs, '#wooccm-modal-tabs');
265
- this.assign(this.panels, '#wooccm-modal-panels');
266
- this.assign(this.info, '#wooccm-modal-info');
267
- },
268
- open: function open(e) {
269
- $('body').addClass('modal-open').append(this.$el);
270
-
271
- if (this.model.attributes.id == undefined) {
272
- _.delay(function () {
273
- unblock();
274
- }, 100);
275
-
276
- return;
277
- }
278
-
279
- this.load();
280
- },
281
- load: function load() {
282
- var modal = this;
283
-
284
- if (modal.model.attributes.id == undefined) {
285
- modal.render();
286
- return;
287
- }
288
-
289
- $.ajax({
290
- url: wooccm_field.ajax_url,
291
- data: {
292
- action: 'wooccm_load_field',
293
- nonce: wooccm_field.nonce,
294
- field_id: this.model.attributes.id
295
- },
296
- dataType: 'json',
297
- type: 'POST',
298
- // beforeSend: function () {
299
- // },
300
- complete: function complete() {
301
- unblock();
302
- },
303
- error: function error() {
304
- alert('Error!');
305
- },
306
- success: function success(response) {
307
- console.log('response', response);
308
-
309
- if (response.success) {
310
- modal.model.set(response.data);
311
- modal.render();
312
- } else {
313
- alert(response.data);
314
- }
315
- }
316
- });
317
- },
318
- edit: function edit(e) {
319
- e.preventDefault();
320
- var modal = this,
321
- $button = $(e.target),
322
- field_count = parseInt($('.wc_gateways tr[data-field_id]').length),
323
- order = parseInt(modal.model.get('order'));
324
- count++;
325
-
326
- if (timer) {
327
- clearTimeout(timer);
328
- }
329
-
330
- timer = setTimeout(function () {
331
- if ($button.hasClass('media-modal-next')) {
332
- order = Math.min(order + count, field_count);
333
- } else {
334
- order = Math.max(order - count, 1);
335
- }
336
-
337
- modal.model.set({
338
- id: parseInt($('.wc_gateways tr[data-field_order=' + order + ']').data('field_id'))
339
- });
340
- count = 0;
341
- modal.load();
342
- }, 300);
343
- },
344
- submit: function submit(e) {
345
- e.preventDefault();
346
- var modal = this,
347
- $modal = modal.$el.find('#wooccm_modal'),
348
- $spinner = $modal.find('.settings-save-status .spinner'),
349
- $saved = $modal.find('.settings-save-status .saved'); // console.log('modal.model.attributes', modal.model.attributes);
350
-
351
- $.ajax({
352
- url: wooccm_field.ajax_url,
353
- data: {
354
- action: 'wooccm_save_field',
355
- nonce: wooccm_field.nonce,
356
- field_data: JSON.stringify(modal.model.attributes)
357
- },
358
- dataType: 'json',
359
- type: 'POST',
360
- beforeSend: function beforeSend() {
361
- $('.media-modal-submit').prop('disabled', true);
362
- $spinner.addClass('is-active');
363
- },
364
- complete: function complete() {
365
- $saved.addClass('is-active');
366
- $spinner.removeClass('is-active');
367
-
368
- _.delay(function () {
369
- $saved.removeClass('is-active');
370
- }, 1000);
371
- },
372
- error: function error(response) {
373
- alert('Error!');
374
- },
375
- success: function success(response) {
376
- if (response.success) {
377
- if (modal.model.attributes.id == undefined) {
378
- $modal.addClass('reload');
379
- modal.reload(e);
380
- modal.close(e);
381
- }
382
- } else {
383
- alert(response.data);
384
- }
385
- }
386
- });
387
- return false;
388
- },
389
- renderInfo: function renderInfo() {
390
- this.info.render();
391
- },
392
- parent: function parent(e) {
393
- e.preventDefault();
394
- var modal = this,
395
- $modal = modal.$el.find('#wooccm_modal'),
396
- $details = $modal.find('.attachment-details');
397
- this.updateModel(e);
398
- $.ajax({
399
- url: wooccm_field.ajax_url,
400
- data: {
401
- action: 'wooccm_load_parent',
402
- nonce: wooccm_field.nonce,
403
- conditional_parent_key: modal.model.attributes.conditional_parent_key
404
- },
405
- dataType: 'json',
406
- type: 'POST',
407
- beforeSend: function beforeSend() {
408
- modal.disableSave();
409
- $details.addClass('save-waiting');
410
- },
411
- complete: function complete() {
412
- $details.addClass('save-complete');
413
- $details.removeClass('save-waiting');
414
- modal.enableSave();
415
- },
416
- error: function error() {
417
- alert('Error!');
418
- },
419
- success: function success(response) {
420
- if (response.success) {
421
- modal.model.attributes['parent'] = response.data;
422
- modal.model.changed['parent'] = response.data;
423
- modal.renderInfo();
424
- } else {
425
- alert(response.data);
426
- }
427
- }
428
- });
429
- return false;
430
- }
431
- }); // Parts
432
- // -------------------------------------------------------------
433
-
434
- var FieldViewTabs = Backbone.View.extend({
435
- templates: {},
436
- initialize: function initialize() {
437
- this.templates.window = wp.template('wooccm-modal-tabs');
438
- },
439
- render: function render() {
440
- this.model.attributes.panel = 'general';
441
- this.$el.html(this.templates.window(this.model.attributes)); //this.$el.trigger('wooccm-tab-panels');
442
- }
443
- });
444
- var FieldViewPanels = Backbone.View.extend({
445
- templates: {},
446
- initialize: function initialize() {
447
- this.templates.window = wp.template('wooccm-modal-panels');
448
- },
449
- render: function render() {
450
- this.$el.html(this.templates.window(this.model.attributes));
451
- this.$el.trigger('wooccm-enhanced-options');
452
- this.$el.trigger('wooccm-enhanced-select');
453
- this.$el.trigger('init_tooltips');
454
- }
455
- });
456
- var FieldViewInfo = Backbone.View.extend({
457
- templates: {},
458
- initialize: function initialize() {
459
- this.templates.window = wp.template('wooccm-modal-info');
460
- },
461
- render: function render() {
462
- this.$el.html(this.templates.window(this.model.attributes));
463
- this.$el.trigger('wooccm-enhanced-select');
464
- this.$el.trigger('init_tooltips');
465
- }
466
- });
467
- $('#wooccm_billing_settings_add, #wooccm_shipping_settings_add, #wooccm_additional_settings_add').on('click', function (e) {
468
- e.preventDefault();
469
- new FieldModal(e);
470
- });
471
- $('#wooccm_billing_settings_reset, #wooccm_shipping_settings_reset, #wooccm_additional_settings_reset').on('click', function (e) {
472
- e.preventDefault();
473
- var $button = $(e.target);
474
- var c = confirm(wooccm_field.message.reset);
475
-
476
- if (!c) {
477
- return false;
478
- }
479
-
480
- $.ajax({
481
- url: wooccm_field.ajax_url,
482
- data: {
483
- action: 'wooccm_reset_fields',
484
- nonce: wooccm_field.nonce
485
- },
486
- dataType: 'json',
487
- type: 'POST',
488
- beforeSend: function beforeSend() {},
489
- complete: function complete() {},
490
- error: function error() {
491
- alert('Error!');
492
- },
493
- success: function success(response) {
494
- if (response.success) {
495
- location.reload();
496
- } else {
497
- alert(response.data);
498
- }
499
- }
500
- });
501
- return false;
502
- });
503
- $('.wooccm_billing_settings_edit, .wooccm_shipping_settings_edit, .wooccm_additional_settings_edit').on('click', function (e) {
504
- e.preventDefault();
505
- new FieldModal(e);
506
- });
507
- $('.wooccm_billing_settings_delete, .wooccm_shipping_settings_delete, .wooccm_additional_settings_delete').on('click', function (e) {
508
- e.preventDefault();
509
- var $button = $(e.target),
510
- $field = $button.closest('[data-field_id]'),
511
- field_id = $field.data('field_id');
512
- var c = confirm(wooccm_field.message.remove);
513
-
514
- if (!c) {
515
- return false;
516
- }
517
-
518
- $.ajax({
519
- url: wooccm_field.ajax_url,
520
- data: {
521
- action: 'wooccm_delete_field',
522
- nonce: wooccm_field.nonce,
523
- field_id: field_id
524
- },
525
- dataType: 'json',
526
- type: 'POST',
527
- beforeSend: function beforeSend() {},
528
- complete: function complete() {},
529
- error: function error() {
530
- alert('Error!');
531
- },
532
- success: function success(response) {
533
- if (response.success) {
534
- $field.remove();
535
- } else {
536
- alert(response.data);
537
- }
538
- }
539
- });
540
- return false;
541
- });
542
- $(document).on('click', '.wooccm-field-toggle-attribute', function (e) {
543
- e.preventDefault();
544
- var $link = $(this),
545
- $tr = $link.closest('tr'),
546
- $toggle = $link.find('.woocommerce-input-toggle');
547
- $.ajax({
548
- url: wooccm_field.ajax_url,
549
- data: {
550
- action: 'wooccm_toggle_field_attribute',
551
- nonce: wooccm_field.nonce,
552
- field_attr: $(this).data('field_attr'),
553
- field_id: $tr.data('field_id')
554
- },
555
- dataType: 'json',
556
- type: 'POST',
557
- beforeSend: function beforeSend(response) {
558
- $toggle.addClass('woocommerce-input-toggle--loading');
559
- },
560
- success: function success(response) {
561
- if (true === response.data) {
562
- $toggle.removeClass('woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled');
563
- $toggle.addClass('woocommerce-input-toggle--enabled');
564
- $toggle.removeClass('woocommerce-input-toggle--loading');
565
- } else if (true !== response.data) {
566
- $toggle.removeClass('woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled');
567
- $toggle.addClass('woocommerce-input-toggle--disabled');
568
- $toggle.removeClass('woocommerce-input-toggle--loading');
569
- } //else if ('needs_setup' === response.data) {
570
- //window.location.href = $link.attr('href');
571
- //}
572
-
573
- }
574
- });
575
- return false;
576
- });
577
- $(document).on('change', '.wooccm-field-change-attribute', function (e) {
578
- e.preventDefault();
579
- var $change = $(this),
580
- $tr = $change.closest('tr');
581
- $.ajax({
582
- url: wooccm_field.ajax_url,
583
- data: {
584
- action: 'wooccm_change_field_attribute',
585
- nonce: wooccm_field.nonce,
586
- field_attr: $change.data('field_attr'),
587
- field_value: $change.val(),
588
- field_id: $tr.data('field_id')
589
- },
590
- dataType: 'json',
591
- type: 'POST',
592
- beforeSend: function beforeSend(response) {
593
- $change.prop('disabled', true);
594
- },
595
- success: function success(response) {
596
- console.log(response.data);
597
- },
598
- complete: function complete(response) {
599
- $change.prop('disabled', false);
600
- }
601
- });
602
- return false;
603
- });
604
- })(jQuery);
605
-
606
- /***/ }),
607
-
608
- /***/ "backbone":
609
- /*!***********************************************!*\
610
- !*** external {"this":["window","Backbone"]} ***!
611
- \***********************************************/
612
- /*! no static exports found */
613
- /***/ (function(module, exports) {
614
-
615
- (function() { module.exports = this["window"]["Backbone"]; }());
616
-
617
- /***/ }),
618
-
619
- /***/ "jquery":
620
- /*!**********************************!*\
621
- !*** external {"this":"jQuery"} ***!
622
- \**********************************/
623
- /*! no static exports found */
624
- /***/ (function(module, exports) {
625
-
626
- (function() { module.exports = this["jQuery"]; }());
627
-
628
- /***/ }),
629
-
630
- /***/ "jquery-ui-datepicker":
631
- /*!***************************************************!*\
632
- !*** external {"this":["window","uiDatepicker"]} ***!
633
- \***************************************************/
634
- /*! no static exports found */
635
- /***/ (function(module, exports) {
636
-
637
- (function() { module.exports = this["window"]["uiDatepicker"]; }());
638
-
639
- /***/ }),
640
-
641
- /***/ "wp-util":
642
- /*!***************************************!*\
643
- !*** external {"this":["wp","util"]} ***!
644
- \***************************************/
645
- /*! no static exports found */
646
- /***/ (function(module, exports) {
647
-
648
- (function() { module.exports = this["wp"]["util"]; }());
649
-
650
- /***/ })
651
-
652
- /******/ });
653
- //# sourceMappingURL=admin-field.js.map
1
+ !function(e){var t={};function o(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,o){"use strict";o.r(t);o(1),o(2),o(3),o(4);!function(e){var t,o=0,n=function(){e("#wooccm_modal").removeClass("processing")};_.mixin({sortOptions:function(e){return _.sortBy(e,(function(e){return e.order}))},escapeHtml:function(e){return e.replace("&amp;",/&/g).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},getFormData:function(e){var t=e.serializeJSON({checkboxUncheckedValue:"false",parseBooleans:!0,parseNulls:!0}),o=Object.assign({},wooccm_field.args);return Object.assign(o,t)}});var a=Backbone.Model.extend({defaults:Object.create(wooccm_field.args)}),i=Backbone.View.extend({initialize:function(t){var o=e(t.target).closest("[data-field_id]").data("field_id"),n=new a;n.set({id:o}),new l({model:n}).render()}}),l=Backbone.View.extend({events:{"change input":"enableSave","change textarea":"enableSave","change select":"enableSave","click .media-modal-backdrop":"close","click .media-modal-close":"close","click .media-modal-prev":"edit","click .media-modal-next":"edit","click .media-modal-tab":"tab","change .media-modal-parent":"parent","change .media-modal-render-tabs":"renderTabs","change .media-modal-render-panels":"renderPanels","change .media-modal-render-info":"renderInfo","submit .media-modal-form":"submit"},templates:{},initialize:function(){_.bindAll(this,"open","tab","edit","load","render","close","submit","parent"),this.init(),this.open()},init:function(){this.templates.window=wp.template("wooccm-modal-main")},assign:function(e,t){e.setElement(this.$(t)).render()},updateModel:function(e){e.preventDefault();var t=this.$el.find("#wooccm_modal").find("form"),o=_.getFormData(t);this.model.set(o)},reload:function(e){this.$el.find("#wooccm_modal").hasClass("reload")?location.reload():this.remove()},close:function(t){t.preventDefault(),this.undelegateEvents(),e(document).off("focusin"),e("body").removeClass("modal-open"),this.$el.find("#wooccm_modal").addClass("reload"),this.reload(t)},enableSave:function(t){e(".media-modal-submit").prop("disabled",!1),this.updateModel(t)},disableSave:function(t){e(".media-modal-submit").prop("disabled",!0)},tab:function(t){t.preventDefault();var o=this.$el.find("#wooccm_modal"),n=e(t.currentTarget),a=o.find("ul.wc-tabs"),i=n.find("a").attr("href").replace("#","");a.find(".active").removeClass("active"),n.addClass("active"),this.model.attributes.panel=i,this.model.changed.panel=i,this.renderPanels(t)},renderTabs:function(e){this.renderPanels(e),this.tabs.render()},renderPanels:function(e){this.updateModel(e),this.panels.render()},render:function(){this.$el.html(this.templates.window(this.model.attributes)),this.tabs=new c({model:this.model}),this.panels=new d({model:this.model}),this.info=new s({model:this.model}),this.assign(this.tabs,"#wooccm-modal-tabs"),this.assign(this.panels,"#wooccm-modal-panels"),this.assign(this.info,"#wooccm-modal-info")},open:function(t){e("body").addClass("modal-open").append(this.$el),null!=this.model.attributes.id?this.load():_.delay((function(){n()}),100)},load:function(){var t=this;null!=t.model.attributes.id?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",complete:function(){n()},error:function(){alert("Error!")},success:function(e){console.log("response",e),e.success?(t.model.set(e.data),t.render()):alert(e.data)}}):t.render()},edit:function(n){n.preventDefault();var a=this,i=e(n.target),l=parseInt(e(".wc_gateways tr[data-field_id]").length),c=parseInt(a.model.get("order"));o++,t&&clearTimeout(t),t=setTimeout((function(){c=i.hasClass("media-modal-next")?Math.min(c+o,l):Math.max(c-o,1),a.model.set({id:parseInt(e(".wc_gateways tr[data-field_order="+c+"]").data("field_id"))}),o=0,a.load()}),300)},submit:function(t){t.preventDefault();var o=this,n=o.$el.find("#wooccm_modal"),a=n.find(".settings-save-status .spinner"),i=n.find(".settings-save-status .saved");return e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_save_field",nonce:wooccm_field.nonce,field_data:JSON.stringify(o.model.attributes)},dataType:"json",type:"POST",beforeSend:function(){e(".media-modal-submit").prop("disabled",!0),a.addClass("is-active")},complete:function(){i.addClass("is-active"),a.removeClass("is-active"),_.delay((function(){i.removeClass("is-active")}),1e3)},error:function(e){alert("Error!")},success:function(e){e.success?null==o.model.attributes.id&&(n.addClass("reload"),o.reload(t),o.close(t)):alert(e.data)}}),!1},renderInfo:function(){this.info.render()},parent:function(t){t.preventDefault();var o=this,n=o.$el.find("#wooccm_modal").find(".attachment-details");return this.updateModel(t),e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_load_parent",nonce:wooccm_field.nonce,conditional_parent_key:o.model.attributes.conditional_parent_key},dataType:"json",type:"POST",beforeSend:function(){o.disableSave(),n.addClass("save-waiting")},complete:function(){n.addClass("save-complete"),n.removeClass("save-waiting"),o.enableSave()},error:function(){alert("Error!")},success:function(e){e.success?(o.model.attributes.parent=e.data,o.model.changed.parent=e.data,o.renderInfo()):alert(e.data)}}),!1}}),c=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("wooccm-modal-tabs")},render:function(){this.model.attributes.panel="general",this.$el.html(this.templates.window(this.model.attributes))}}),d=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("wooccm-modal-panels")},render:function(){this.$el.html(this.templates.window(this.model.attributes)),this.$el.trigger("wooccm-enhanced-options"),this.$el.trigger("wooccm-enhanced-select"),this.$el.trigger("init_tooltips")}}),s=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("wooccm-modal-info")},render:function(){this.$el.html(this.templates.window(this.model.attributes)),this.$el.trigger("wooccm-enhanced-select"),this.$el.trigger("init_tooltips")}});e("#wooccm_billing_settings_add, #wooccm_shipping_settings_add, #wooccm_additional_settings_add").on("click",(function(e){e.preventDefault(),new i(e)})),e("#wooccm_billing_settings_reset, #wooccm_shipping_settings_reset, #wooccm_additional_settings_reset").on("click",(function(t){t.preventDefault();e(t.target);return!!confirm(wooccm_field.message.reset)&&(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(e){e.success?location.reload():alert(e.data)}}),!1)})),e(".wooccm_billing_settings_edit, .wooccm_shipping_settings_edit, .wooccm_additional_settings_edit").on("click",(function(e){e.preventDefault(),new i(e)})),e(".wooccm_billing_settings_delete, .wooccm_shipping_settings_delete, .wooccm_additional_settings_delete").on("click",(function(t){t.preventDefault();var o=e(t.target).closest("[data-field_id]"),n=o.data("field_id");return!!confirm(wooccm_field.message.remove)&&(e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_delete_field",nonce:wooccm_field.nonce,field_id:n},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(e){e.success?o.remove():alert(e.data)}}),!1)})),e(document).on("click",".wooccm-field-toggle-attribute",(function(t){t.preventDefault();var o=e(this),n=o.closest("tr"),a=o.find(".woocommerce-input-toggle");return 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:n.data("field_id")},dataType:"json",type:"POST",beforeSend:function(e){a.addClass("woocommerce-input-toggle--loading")},success:function(e){!0===e.data?(a.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled"),a.addClass("woocommerce-input-toggle--enabled"),a.removeClass("woocommerce-input-toggle--loading")):!0!==e.data&&(a.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled"),a.addClass("woocommerce-input-toggle--disabled"),a.removeClass("woocommerce-input-toggle--loading"))}}),!1})),e(document).on("change",".wooccm-field-change-attribute",(function(t){t.preventDefault();var o=e(this),n=o.closest("tr");return e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_change_field_attribute",nonce:wooccm_field.nonce,field_attr:o.data("field_attr"),field_value:o.val(),field_id:n.data("field_id")},dataType:"json",type:"POST",beforeSend:function(e){o.prop("disabled",!0)},success:function(e){console.log(e.data)},complete:function(e){o.prop("disabled",!1)}}),!1}))}(jQuery)},function(e,t){!function(){e.exports=this.jQuery}()},function(e,t){!function(){e.exports=this.wp.util}()},function(e,t){!function(){e.exports=this.window.Backbone}()},function(e,t){!function(){e.exports=this.window.uiDatepicker}()}]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/backend/js/admin.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('jquery', 'jquery-serializejson'), 'version' => 'b6b4fccea7fc19d92a2bbb32d2ae1248');
1
+ <?php return array('dependencies' => array('jquery', 'jquery-serializejson'), 'version' => 'f389cc2bea7176abd765911bfcb7c116');
assets/backend/js/admin.js CHANGED
@@ -1,416 +1 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // The module cache
3
- /******/ var installedModules = {};
4
- /******/
5
- /******/ // The require function
6
- /******/ function __webpack_require__(moduleId) {
7
- /******/
8
- /******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId]) {
10
- /******/ return installedModules[moduleId].exports;
11
- /******/ }
12
- /******/ // Create a new module (and put it into the cache)
13
- /******/ var module = installedModules[moduleId] = {
14
- /******/ i: moduleId,
15
- /******/ l: false,
16
- /******/ exports: {}
17
- /******/ };
18
- /******/
19
- /******/ // Execute the module function
20
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
- /******/
22
- /******/ // Flag the module as loaded
23
- /******/ module.l = true;
24
- /******/
25
- /******/ // Return the exports of the module
26
- /******/ return module.exports;
27
- /******/ }
28
- /******/
29
- /******/
30
- /******/ // expose the modules object (__webpack_modules__)
31
- /******/ __webpack_require__.m = modules;
32
- /******/
33
- /******/ // expose the module cache
34
- /******/ __webpack_require__.c = installedModules;
35
- /******/
36
- /******/ // define getter function for harmony exports
37
- /******/ __webpack_require__.d = function(exports, name, getter) {
38
- /******/ if(!__webpack_require__.o(exports, name)) {
39
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
40
- /******/ }
41
- /******/ };
42
- /******/
43
- /******/ // define __esModule on exports
44
- /******/ __webpack_require__.r = function(exports) {
45
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47
- /******/ }
48
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
49
- /******/ };
50
- /******/
51
- /******/ // create a fake namespace object
52
- /******/ // mode & 1: value is a module id, require it
53
- /******/ // mode & 2: merge all properties of value into the ns
54
- /******/ // mode & 4: return value when already ns object
55
- /******/ // mode & 8|1: behave like require
56
- /******/ __webpack_require__.t = function(value, mode) {
57
- /******/ if(mode & 1) value = __webpack_require__(value);
58
- /******/ if(mode & 8) return value;
59
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60
- /******/ var ns = Object.create(null);
61
- /******/ __webpack_require__.r(ns);
62
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64
- /******/ return ns;
65
- /******/ };
66
- /******/
67
- /******/ // getDefaultExport function for compatibility with non-harmony modules
68
- /******/ __webpack_require__.n = function(module) {
69
- /******/ var getter = module && module.__esModule ?
70
- /******/ function getDefault() { return module['default']; } :
71
- /******/ function getModuleExports() { return module; };
72
- /******/ __webpack_require__.d(getter, 'a', getter);
73
- /******/ return getter;
74
- /******/ };
75
- /******/
76
- /******/ // Object.prototype.hasOwnProperty.call
77
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78
- /******/
79
- /******/ // __webpack_public_path__
80
- /******/ __webpack_require__.p = "";
81
- /******/
82
- /******/
83
- /******/ // Load entry module and return exports
84
- /******/ return __webpack_require__(__webpack_require__.s = "./src/backend/admin.js");
85
- /******/ })
86
- /************************************************************************/
87
- /******/ ({
88
-
89
- /***/ "./src/backend/admin.js":
90
- /*!******************************!*\
91
- !*** ./src/backend/admin.js ***!
92
- \******************************/
93
- /*! no exports provided */
94
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
95
-
96
- "use strict";
97
- __webpack_require__.r(__webpack_exports__);
98
- /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
99
- /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
100
- /* harmony import */ var _scss_editor_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scss/editor.scss */ "./src/backend/scss/editor.scss");
101
- /* harmony import */ var _scss_editor_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_scss_editor_scss__WEBPACK_IMPORTED_MODULE_1__);
102
- /* harmony import */ var jquery_serializejson__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jquery-serializejson */ "jquery-serializejson");
103
- /* harmony import */ var jquery_serializejson__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jquery_serializejson__WEBPACK_IMPORTED_MODULE_2__);
104
-
105
-
106
-
107
- /* (function ($) {*/
108
-
109
- "use strict";
110
-
111
- jquery__WEBPACK_IMPORTED_MODULE_0___default()('.wooccm-premium-field').closest('tr').addClass('wooccm-premium');
112
-
113
- function date_picker_select(datepicker) {
114
- var option = jquery__WEBPACK_IMPORTED_MODULE_0___default()(datepicker).next().is('.hasDatepicker') ? 'minDate' : 'maxDate',
115
- otherDateField = 'minDate' === option ? jquery__WEBPACK_IMPORTED_MODULE_0___default()(datepicker).next() : jquery__WEBPACK_IMPORTED_MODULE_0___default()(datepicker).prev(),
116
- date = jquery__WEBPACK_IMPORTED_MODULE_0___default()(datepicker).datepicker('getDate');
117
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(otherDateField).datepicker('option', option, date);
118
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(datepicker).change();
119
- }
120
-
121
- function getEnhancedSelectFormatString() {
122
- return {
123
- 'language': {
124
- errorLoading: function errorLoading() {
125
- // Workaround for https://github.com/select2/select2/issues/4355 instead of i18n_ajax_error.
126
- return wc_enhanced_select_params.i18n_searching;
127
- },
128
- inputTooLong: function inputTooLong(args) {
129
- var overChars = args.input.length - args.maximum;
130
-
131
- if (1 === overChars) {
132
- return wc_enhanced_select_params.i18n_input_too_long_1;
133
- }
134
-
135
- return wc_enhanced_select_params.i18n_input_too_long_n.replace('%qty%', overChars);
136
- },
137
- inputTooShort: function inputTooShort(args) {
138
- var remainingChars = args.minimum - args.input.length;
139
-
140
- if (1 === remainingChars) {
141
- return wc_enhanced_select_params.i18n_input_too_short_1;
142
- }
143
-
144
- return wc_enhanced_select_params.i18n_input_too_short_n.replace('%qty%', remainingChars);
145
- },
146
- loadingMore: function loadingMore() {
147
- return wc_enhanced_select_params.i18n_load_more;
148
- },
149
- maximumSelected: function maximumSelected(args) {
150
- if (args.maximum === 1) {
151
- return wc_enhanced_select_params.i18n_selection_too_long_1;
152
- }
153
-
154
- return wc_enhanced_select_params.i18n_selection_too_long_n.replace('%qty%', args.maximum);
155
- },
156
- noResults: function noResults() {
157
- return wc_enhanced_select_params.i18n_no_matches;
158
- },
159
- searching: function searching() {
160
- return wc_enhanced_select_params.i18n_searching;
161
- }
162
- }
163
- };
164
- }
165
-
166
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).on('wooccm-enhanced-between-dates', function (e) {
167
- jquery__WEBPACK_IMPORTED_MODULE_0___default()('.wooccm-enhanced-between-dates').filter(':not(.enhanced)').each(function () {
168
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).find('input').datepicker({
169
- defaultDate: '',
170
- dateFormat: 'yy-mm-dd',
171
- numberOfMonths: 1,
172
- showButtonPanel: true,
173
- onSelect: function onSelect() {
174
- date_picker_select(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this));
175
- }
176
- });
177
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).find('input').each(function () {
178
- date_picker_select(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this));
179
- });
180
- });
181
- });
182
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).on('wooccm-enhanced-options', function (e) {
183
- jquery__WEBPACK_IMPORTED_MODULE_0___default()('table.wc_gateways tbody').sortable({
184
- items: 'tr',
185
- cursor: 'move',
186
- axis: 'y',
187
- handle: 'td.sort',
188
- scrollSensitivity: 40,
189
- helper: function helper(event, ui) {
190
- ui.children().each(function () {
191
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).width(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).width());
192
- });
193
- ui.css('left', '0');
194
- return ui;
195
- },
196
- start: function start(event, ui) {
197
- ui.item.css('background-color', '#f6f6f6');
198
- },
199
- stop: function stop(event, ui) {
200
- ui.item.removeAttr('style');
201
- ui.item.trigger('updateMoveButtons');
202
- },
203
- update: function update(event, ui) {
204
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).find('tr').each(function (i, tr) {
205
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(tr).find('input.add-order').val(i).trigger('change');
206
- });
207
- }
208
- });
209
- jquery__WEBPACK_IMPORTED_MODULE_0___default()('.wooccm-enhanced-options').each(function () {
210
- var $table = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this),
211
- $add = $table.find('.add-option'),
212
- $remove = $table.find('.remove-options');
213
- $add.on('click', function (e) {
214
- var $tr = $table.find('tbody > tr'),
215
- id = $tr.length,
216
- tr = $tr.first().clone().html().replace(/options\[([0-9]+)\]/g, 'options[' + id + ']').replace('disabled="disabled"', '').replace('checked="checked"', '').replace('<input value="0"', '<input value="' + id + '"').replace('<input value="0"', '<input value="' + id + '"');
217
- $tr.last().after(jquery__WEBPACK_IMPORTED_MODULE_0___default()('<tr>' + tr + '</tr>')).find('input').trigger('change');
218
- $remove.removeProp('disabled');
219
- });
220
- $remove.on('click', function (e) {
221
- $table.find('tr > td.check-column input:checked').closest('tr').remove();
222
- var $tr = $table.find('tbody > tr');
223
- $tr.first().find('input').trigger('change');
224
-
225
- if ($tr.length < 2) {
226
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).prop('disabled', true);
227
- }
228
- });
229
- });
230
- });
231
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).on('wooccm-enhanced-select', function (e) {
232
- jquery__WEBPACK_IMPORTED_MODULE_0___default()('.wooccm-enhanced-select').filter(':not(.enhanced)').each(function () {
233
- var select2_args = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({
234
- minimumResultsForSearch: 10,
235
- allowClear: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('allow_clear') ? true : false,
236
- placeholder: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('placeholder')
237
- }, getEnhancedSelectFormatString());
238
- var name = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr('name'); // fix serializeJSON empty select and multiselect
239
- //if (name.indexOf('[]') >= 0) {
240
- // $(this).prepend('<input type="hidden" name="' + name + '" value="[]" />');
241
- //}
242
-
243
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).selectWoo(select2_args).addClass('enhanced');
244
- });
245
- jquery__WEBPACK_IMPORTED_MODULE_0___default()('.wooccm-product-search').filter(':not(.enhanced)').each(function () {
246
- var select2_args = {
247
- allowClear: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('allow_clear') ? true : false,
248
- placeholder: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('placeholder'),
249
- minimumInputLength: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('minimum_input_length') ? jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('minimum_input_length') : '3',
250
- escapeMarkup: function escapeMarkup(m) {
251
- return m;
252
- },
253
- ajax: {
254
- url: wc_enhanced_select_params.ajax_url,
255
- dataType: 'json',
256
- delay: 250,
257
- data: function data(params) {
258
- return {
259
- term: params.term,
260
- action: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('action') || 'wooccm_select_search_products',
261
- //nonce: wooccm_admin.nonce,
262
- security: wc_enhanced_select_params.search_products_nonce,
263
- selected: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).select2('val') || 0,
264
- exclude: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('exclude'),
265
- include: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('include'),
266
- limit: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('limit'),
267
- display_stock: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('display_stock')
268
- };
269
- },
270
- processResults: function processResults(data) {
271
- var terms = [];
272
-
273
- if (data) {
274
- jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(data, function (id, text) {
275
- terms.push({
276
- id: id,
277
- text: text
278
- });
279
- });
280
- }
281
-
282
- return {
283
- results: terms
284
- };
285
- },
286
- cache: true
287
- }
288
- };
289
- select2_args = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend(select2_args, getEnhancedSelectFormatString());
290
- var name = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr('name'); // fix serializeJSON empty select and multiselect
291
- //if (name.indexOf('[]') >= 0) {
292
- // $(this).prepend('<input type="hidden" name="' + name + '" value="[]" />');
293
- //}
294
-
295
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).selectWoo(select2_args).addClass('enhanced');
296
-
297
- if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('sortable')) {
298
- var $select = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this);
299
- var $list = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).next('.select2-container').find('ul.select2-selection__rendered');
300
- $list.sortable({
301
- placeholder: 'ui-state-highlight select2-selection__choice',
302
- forcePlaceholderSize: true,
303
- items: 'li:not(.select2-search__field)',
304
- tolerance: 'pointer',
305
- stop: function stop() {
306
- jquery__WEBPACK_IMPORTED_MODULE_0___default()($list.find('.select2-selection__choice').get().reverse()).each(function () {
307
- var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('data').id;
308
- var option = $select.find('option[value="' + id + '"]')[0];
309
- $select.prepend(option);
310
- });
311
- }
312
- }); // Keep multiselects ordered alphabetically if they are not sortable.
313
- } else if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).prop('multiple')) {
314
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).on('change', function () {
315
- var $children = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).children(); //filter option fix appended input hidden
316
-
317
- $children.filter('option').sort(function (a, b) {
318
- var atext = a.text.toLowerCase();
319
- var btext = b.text.toLowerCase();
320
-
321
- if (atext > btext) {
322
- return 1;
323
- }
324
-
325
- if (atext < btext) {
326
- return -1;
327
- }
328
-
329
- return 0;
330
- });
331
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).html($children);
332
- });
333
- }
334
- });
335
- });
336
- jquery__WEBPACK_IMPORTED_MODULE_0___default()('.wooccm-enhanced-search').filter(':not(.enhanced)').each(function () {
337
- var select2_args = {
338
- allowClear: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('allow_clear') ? true : false,
339
- placeholder: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('placeholder'),
340
- minimumInputLength: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('minimum_input_length') || '3',
341
- escapeMarkup: function escapeMarkup(m) {
342
- return m;
343
- },
344
- ajax: {
345
- url: wooccm_admin.ajax_url,
346
- dataType: 'json',
347
- cache: true,
348
- delay: 250,
349
- data: function data(params) {
350
- return {
351
- term: params.term,
352
- key: jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('key'),
353
- action: 'wooccm_search_field',
354
- nonce: wooccm_admin.nonce
355
- };
356
- },
357
- processResults: function processResults(data, params) {
358
- var terms = [];
359
-
360
- if (data) {
361
- jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(data, function (id, text) {
362
- terms.push({
363
- id: id,
364
- text: text
365
- });
366
- });
367
- }
368
-
369
- return {
370
- results: terms
371
- };
372
- }
373
- }
374
- };
375
- select2_args = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend(select2_args, getEnhancedSelectFormatString());
376
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).select2(select2_args).addClass('enhanced');
377
- });
378
- /* })(jQuery); */
379
-
380
- /***/ }),
381
-
382
- /***/ "./src/backend/scss/editor.scss":
383
- /*!**************************************!*\
384
- !*** ./src/backend/scss/editor.scss ***!
385
- \**************************************/
386
- /*! no static exports found */
387
- /***/ (function(module, exports) {
388
-
389
- // removed by extract-text-webpack-plugin
390
-
391
- /***/ }),
392
-
393
- /***/ "jquery":
394
- /*!**********************************!*\
395
- !*** external {"this":"jQuery"} ***!
396
- \**********************************/
397
- /*! no static exports found */
398
- /***/ (function(module, exports) {
399
-
400
- (function() { module.exports = this["jQuery"]; }());
401
-
402
- /***/ }),
403
-
404
- /***/ "jquery-serializejson":
405
- /*!****************************************************!*\
406
- !*** external {"this":["window","serializeJSON"]} ***!
407
- \****************************************************/
408
- /*! no static exports found */
409
- /***/ (function(module, exports) {
410
-
411
- (function() { module.exports = this["window"]["serializeJSON"]; }());
412
-
413
- /***/ })
414
-
415
- /******/ });
416
- //# sourceMappingURL=admin.js.map
1
+ !function(e){var t={};function n(a){if(t[a])return t[a].exports;var c=t[a]={i:a,l:!1,exports:{}};return e[a].call(c.exports,c,c.exports,n),c.l=!0,c.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(a,c,function(t){return e[t]}.bind(null,c));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){!function(){e.exports=this.jQuery}()},function(e,t,n){"use strict";n.r(t);var a=n(0),c=n.n(a);n(3),n(2);function i(e){var t=c()(e).next().is(".hasDatepicker")?"minDate":"maxDate",n="minDate"===t?c()(e).next():c()(e).prev(),a=c()(e).datepicker("getDate");c()(n).datepicker("option",t,a),c()(e).change()}function o(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_searching},inputTooLong:function(e){var t=e.input.length-e.maximum;return 1===t?wc_enhanced_select_params.i18n_input_too_long_1:wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",t)},inputTooShort:function(e){var t=e.minimum-e.input.length;return 1===t?wc_enhanced_select_params.i18n_input_too_short_1:wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",t)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(e){return 1===e.maximum?wc_enhanced_select_params.i18n_selection_too_long_1:wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",e.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}c()(".wooccm-premium-field").closest("tr").addClass("wooccm-premium"),c()(document).on("wooccm-enhanced-between-dates",(function(e){c()(".wooccm-enhanced-between-dates").filter(":not(.enhanced)").each((function(){c()(this).find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,onSelect:function(){i(c()(this))}}),c()(this).find("input").each((function(){i(c()(this))}))}))})),c()(document).on("wooccm-enhanced-options",(function(e){c()("table.wc_gateways tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td.sort",scrollSensitivity:40,helper:function(e,t){return t.children().each((function(){c()(this).width(c()(this).width())})),t.css("left","0"),t},start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style"),t.item.trigger("updateMoveButtons")},update:function(e,t){c()(this).find("tr").each((function(e,t){c()(t).find("input.add-order").val(e).trigger("change")}))}}),c()(".wooccm-enhanced-options").each((function(){var e=c()(this),t=e.find(".add-option"),n=e.find(".remove-options");t.on("click",(function(t){var a=e.find("tbody > tr"),i=a.length,o=a.first().clone().html().replace(/options\[([0-9]+)\]/g,"options["+i+"]").replace('disabled="disabled"',"").replace('checked="checked"',"").replace('<input value="0"','<input value="'+i+'"').replace('<input value="0"','<input value="'+i+'"');a.last().after(c()("<tr>"+o+"</tr>")).find("input").trigger("change"),n.removeProp("disabled")})),n.on("click",(function(t){e.find("tr > td.check-column input:checked").closest("tr").remove();var n=e.find("tbody > tr");n.first().find("input").trigger("change"),n.length<2&&c()(this).prop("disabled",!0)}))}))})),c()(document).on("wooccm-enhanced-select",(function(e){c()(".wooccm-enhanced-select").filter(":not(.enhanced)").each((function(){var e=c.a.extend({minimumResultsForSearch:10,allowClear:!!c()(this).data("allow_clear"),placeholder:c()(this).data("placeholder")},o());c()(this).attr("name");c()(this).selectWoo(e).addClass("enhanced")})),c()(".wooccm-product-search").filter(":not(.enhanced)").each((function(){var e={allowClear:!!c()(this).data("allow_clear"),placeholder:c()(this).data("placeholder"),minimumInputLength:c()(this).data("minimum_input_length")?c()(this).data("minimum_input_length"):"3",escapeMarkup:function(e){return e},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(e){return{term:e.term,action:c()(this).data("action")||"wooccm_select_search_products",security:wc_enhanced_select_params.search_products_nonce,selected:c()(this).select2("val")||0,exclude:c()(this).data("exclude"),include:c()(this).data("include"),limit:c()(this).data("limit"),display_stock:c()(this).data("display_stock")}},processResults:function(e){var t=[];return e&&c.a.each(e,(function(e,n){t.push({id:e,text:n})})),{results:t}},cache:!0}};e=c.a.extend(e,o());c()(this).attr("name");if(c()(this).selectWoo(e).addClass("enhanced"),c()(this).data("sortable")){var t=c()(this),n=c()(this).next(".select2-container").find("ul.select2-selection__rendered");n.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){c()(n.find(".select2-selection__choice").get().reverse()).each((function(){var e=c()(this).data("data").id,n=t.find('option[value="'+e+'"]')[0];t.prepend(n)}))}})}else c()(this).prop("multiple")&&c()(this).on("change",(function(){var e=c()(this).children();e.filter("option").sort((function(e,t){var n=e.text.toLowerCase(),a=t.text.toLowerCase();return n>a?1:n<a?-1:0})),c()(this).html(e)}))}))})),c()(".wooccm-enhanced-search").filter(":not(.enhanced)").each((function(){var e={allowClear:!!c()(this).data("allow_clear"),placeholder:c()(this).data("placeholder"),minimumInputLength:c()(this).data("minimum_input_length")||"3",escapeMarkup:function(e){return e},ajax:{url:wooccm_admin.ajax_url,dataType:"json",cache:!0,delay:250,data:function(e){return{term:e.term,key:c()(this).data("key"),action:"wooccm_search_field",nonce:wooccm_admin.nonce}},processResults:function(e,t){var n=[];return e&&c.a.each(e,(function(e,t){n.push({id:e,text:t})})),{results:n}}}};e=c.a.extend(e,o()),c()(this).select2(e).addClass("enhanced")}))},function(e,t){!function(){e.exports=this.window.serializeJSON}()},function(e,t){}]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/frontend/css/checkout.css CHANGED
@@ -1,116 +1 @@
1
- .woocommerce form {
2
- /* @media (min-width: 768px) {
3
- .wooccm-field {
4
- &.form-row-first {
5
- width: 47.0588235294%;
6
- float: left;
7
- margin-right: 5.8823529412%;
8
- clear: both;
9
- }
10
- &.form-row-last {
11
- width: 45.4545454545%;
12
- float: right;
13
- margin-right: 0;
14
- }
15
- }
16
- }*/ }
17
- .woocommerce form .wooccm-clearfix:before, .woocommerce form .wooccm-clearfix:after {
18
- content: "";
19
- display: table; }
20
- .woocommerce form .wooccm-clearfix:after {
21
- clear: both; }
22
- .woocommerce form .wooccm-conditional-child {
23
- display: none; }
24
- .woocommerce form .wooccm-type-hidden {
25
- display: none; }
26
- .woocommerce form .wooccm-type-radio .woocommerce-radio-wrapper label {
27
- display: inline-block; }
28
- .woocommerce form .wooccm-colorpicker-iris .iris-picker {
29
- display: none; }
30
- .woocommerce form .wooccm-colorpicker-iris.active .iris-picker {
31
- display: block; }
32
-
33
- .button.fileinput-button {
34
- position: relative;
35
- overflow: hidden !important; }
36
- .button.fileinput-button input {
37
- position: absolute;
38
- top: 0;
39
- right: 0;
40
- margin: 0;
41
- opacity: 0;
42
- -ms-filter: "alpha(opacity=0)";
43
- font-size: 200px;
44
- direction: ltr;
45
- cursor: pointer; }
46
-
47
- .wooccm-file-list {
48
- margin: 0 -5px;
49
- padding: 0;
50
- display: flex;
51
- flex-wrap: wrap;
52
- align-items: center;
53
- justify-content: start; }
54
- .wooccm-file-list .wooccm-file-file {
55
- display: flex;
56
- justify-content: center;
57
- align-items: stretch;
58
- box-sizing: border-box;
59
- padding: 10px 5px 0 5px;
60
- width: 25%;
61
- position: relative; }
62
- .wooccm-file-list .wooccm-file-file .wooccm-file-list-delete {
63
- z-index: 1;
64
- position: absolute;
65
- top: 2px;
66
- right: -3px;
67
- width: 16px;
68
- height: 16px;
69
- background-color: #222;
70
- display: block;
71
- line-height: 16px;
72
- text-align: center;
73
- color: #fefefe;
74
- font-weight: 900;
75
- border-radius: 50%;
76
- font-size: 12px;
77
- cursor: pointer;
78
- font-family: code;
79
- text-decoration: none !important; }
80
- .wooccm-file-list .wooccm-file-file .wooccm-file-list-container {
81
- width: 100%;
82
- overflow: hidden; }
83
- .wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container {
84
- display: flex;
85
- justify-content: center;
86
- align-items: center;
87
- overflow: hidden;
88
- width: 100%;
89
- padding-top: 100%;
90
- position: relative;
91
- background: #eee; }
92
- .wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container > img {
93
- overflow: hidden;
94
- object-fit: cover;
95
- position: absolute;
96
- top: 30%;
97
- bottom: auto;
98
- height: 40%;
99
- opacity: 0.8; }
100
- .wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container > img.image {
101
- top: 0;
102
- bottom: 0;
103
- left: 0;
104
- right: 0;
105
- max-height: 100%;
106
- max-height: 100%;
107
- height: 100%;
108
- width: 100%; }
109
- .wooccm-file-list .ui-timepicker-table a {
110
- word-break: normal; }
111
- .wooccm-file-list .ui-state-disabled,
112
- .wooccm-file-list .ui-widget-content .ui-state-disabled,
113
- .wooccm-file-list .ui-widget-header .ui-state-disabled {
114
- width: 100%; }
115
-
116
- /*# sourceMappingURL=checkout.css.map*/