Easy Digital Downloads - Version 2.9

Version Description

Download this release

Release Info

Developer cklosows
Plugin Icon 128x128 Easy Digital Downloads
Version 2.9
Comparing to
See all releases

Code changes from version 2.8.18 to 2.9

Files changed (40) hide show
  1. assets/css/chosen-sprite.png +0 -0
  2. assets/css/chosen-sprite@2x.png +0 -0
  3. assets/css/chosen.css +141 -81
  4. assets/css/chosen.min.css +10 -2
  5. assets/js/admin-scripts.js +19 -6
  6. assets/js/admin-scripts.min.js +1 -2
  7. assets/js/chosen.jquery.js +1336 -1198
  8. assets/js/chosen.jquery.min.js +3 -2
  9. easy-digital-downloads.php +3 -3
  10. includes/admin/add-ons.php +3 -3
  11. includes/admin/customers/customers.php +3 -3
  12. includes/admin/discounts/add-discount.php +10 -1
  13. includes/admin/discounts/class-discount-codes-table.php +1 -13
  14. includes/admin/discounts/discount-actions.php +3 -3
  15. includes/admin/discounts/edit-discount.php +11 -2
  16. includes/admin/reporting/class-file-downloads-logs-list-table.php +11 -2
  17. includes/admin/reporting/export/class-batch-export-sales.php +9 -0
  18. includes/admin/settings/register-settings.php +15 -1
  19. includes/admin/tracking.php +9 -9
  20. includes/cart/class-edd-cart.php +2 -2
  21. includes/checkout/functions.php +6 -3
  22. includes/checkout/template.php +2 -2
  23. includes/class-edd-discount.php +34 -0
  24. includes/country-functions.php +249 -0
  25. includes/discount-functions.php +14 -0
  26. includes/download-functions.php +31 -19
  27. includes/emails/class-edd-emails.php +2 -0
  28. includes/emails/functions.php +9 -8
  29. includes/gateways/paypal-standard.php +11 -0
  30. includes/payments/class-edd-payment.php +1 -1
  31. includes/payments/functions.php +1 -1
  32. includes/process-download.php +62 -3
  33. includes/process-purchase.php +1 -1
  34. includes/shortcodes.php +17 -0
  35. includes/tax-functions.php +1 -1
  36. includes/template-functions.php +2 -1
  37. includes/user-functions.php +19 -11
  38. includes/widgets.php +30 -9
  39. languages/easy-digital-downloads.pot +493 -454
  40. readme.txt +34 -1
assets/css/chosen-sprite.png CHANGED
Binary file
assets/css/chosen-sprite@2x.png CHANGED
Binary file
assets/css/chosen.css CHANGED
@@ -1,36 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  /* @group Base */
2
  .chosen-container {
3
  position: relative;
4
  display: inline-block;
5
  vertical-align: middle;
6
  font-size: 13px;
7
- zoom: 1;
8
- *display: inline;
9
  -webkit-user-select: none;
10
  -moz-user-select: none;
 
11
  user-select: none;
12
  }
 
 
 
 
 
 
13
  .chosen-container .chosen-drop {
14
  position: absolute;
15
  top: 100%;
16
- left: -9999px;
17
  z-index: 1010;
18
- -webkit-box-sizing: border-box;
19
- -moz-box-sizing: border-box;
20
- box-sizing: border-box;
21
  width: 100%;
22
  border: 1px solid #aaa;
23
  border-top: 0;
24
  background: #fff;
 
25
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
 
26
  }
 
27
  .chosen-container.chosen-with-drop .chosen-drop {
28
- left: 0;
29
  }
 
30
  .chosen-container a {
31
  cursor: pointer;
32
  }
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  /* @end */
35
  /* @group Single Chosen */
36
  .chosen-container-single .chosen-single {
@@ -38,25 +70,25 @@
38
  display: block;
39
  overflow: hidden;
40
  padding: 0 0 0 8px;
41
- height: 23px;
42
  border: 1px solid #aaa;
43
  border-radius: 5px;
44
  background-color: #fff;
45
- background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
46
- background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
47
- background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
48
- background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
49
- background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
50
  background-clip: padding-box;
51
- box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
 
52
  color: #444;
53
  text-decoration: none;
54
  white-space: nowrap;
55
  line-height: 24px;
56
  }
 
57
  .chosen-container-single .chosen-default {
58
  color: #999;
59
  }
 
60
  .chosen-container-single .chosen-single span {
61
  display: block;
62
  overflow: hidden;
@@ -64,9 +96,11 @@
64
  text-overflow: ellipsis;
65
  white-space: nowrap;
66
  }
 
67
  .chosen-container-single .chosen-single-with-deselect span {
68
  margin-right: 38px;
69
  }
 
70
  .chosen-container-single .chosen-single abbr {
71
  position: absolute;
72
  top: 6px;
@@ -74,15 +108,18 @@
74
  display: block;
75
  width: 12px;
76
  height: 12px;
77
- background: url('chosen-sprite.png') -42px 1px no-repeat;
78
  font-size: 1px;
79
  }
 
80
  .chosen-container-single .chosen-single abbr:hover {
81
  background-position: -42px -10px;
82
  }
 
83
  .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
84
  background-position: -42px -10px;
85
  }
 
86
  .chosen-container-single .chosen-single div {
87
  position: absolute;
88
  top: 0;
@@ -91,12 +128,14 @@
91
  width: 18px;
92
  height: 100%;
93
  }
 
94
  .chosen-container-single .chosen-single div b {
95
  display: block;
96
  width: 100%;
97
  height: 100%;
98
- background: url('chosen-sprite.png') no-repeat 0px 2px;
99
  }
 
100
  .chosen-container-single .chosen-search {
101
  position: relative;
102
  z-index: 1010;
@@ -104,40 +143,36 @@
104
  padding: 3px 4px;
105
  white-space: nowrap;
106
  }
 
107
  .chosen-container-single .chosen-search input[type="text"] {
108
- -webkit-box-sizing: border-box;
109
- -moz-box-sizing: border-box;
110
- box-sizing: border-box;
111
  margin: 1px 0;
112
  padding: 4px 20px 4px 5px;
113
  width: 100%;
114
  height: auto;
115
  outline: 0;
116
  border: 1px solid #aaa;
117
- background: white url('chosen-sprite.png') no-repeat 100% -20px;
118
- background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
119
- background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
120
- background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
121
- background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
122
- background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
123
  font-size: 1em;
124
  font-family: sans-serif;
125
  line-height: normal;
126
  border-radius: 0;
127
  }
 
128
  .chosen-container-single .chosen-drop {
129
  margin-top: -1px;
130
  border-radius: 0 0 4px 4px;
131
  background-clip: padding-box;
132
  }
 
133
  .chosen-container-single.chosen-container-single-nosearch .chosen-search {
134
  position: absolute;
135
- left: -9999px;
136
  }
137
 
138
  /* @end */
139
  /* @group Results */
140
  .chosen-container .chosen-results {
 
141
  position: relative;
142
  overflow-x: hidden;
143
  overflow-y: auto;
@@ -146,43 +181,51 @@
146
  max-height: 240px;
147
  -webkit-overflow-scrolling: touch;
148
  }
 
149
  .chosen-container .chosen-results li {
150
  display: none;
151
  margin: 0;
152
  padding: 5px 6px;
153
  list-style: none;
154
  line-height: 15px;
 
 
155
  }
 
156
  .chosen-container .chosen-results li.active-result {
157
  display: list-item;
158
  cursor: pointer;
159
  }
 
160
  .chosen-container .chosen-results li.disabled-result {
161
  display: list-item;
162
  color: #ccc;
163
  cursor: default;
164
  }
 
165
  .chosen-container .chosen-results li.highlighted {
166
  background-color: #3875d7;
167
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
168
- background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
169
- background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
170
- background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
171
  background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
172
  color: #fff;
173
  }
 
174
  .chosen-container .chosen-results li.no-results {
 
175
  display: list-item;
176
  background: #f4f4f4;
177
  }
 
178
  .chosen-container .chosen-results li.group-result {
179
  display: list-item;
180
  font-weight: bold;
181
  cursor: default;
182
  }
 
183
  .chosen-container .chosen-results li.group-option {
184
  padding-left: 15px;
185
  }
 
186
  .chosen-container .chosen-results li em {
187
  font-style: normal;
188
  text-decoration: underline;
@@ -193,67 +236,69 @@
193
  .chosen-container-multi .chosen-choices {
194
  position: relative;
195
  overflow: hidden;
196
- -webkit-box-sizing: border-box;
197
- -moz-box-sizing: border-box;
198
- box-sizing: border-box;
199
  margin: 0;
200
- padding: 0;
201
  width: 100%;
202
- height: auto !important;
203
- height: 1%;
204
  border: 1px solid #aaa;
205
  background-color: #fff;
206
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
207
- background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
208
- background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
209
- background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
210
- background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
211
  cursor: text;
212
  }
 
213
  .chosen-container-multi .chosen-choices li {
214
  float: left;
215
  list-style: none;
216
  }
 
217
  .chosen-container-multi .chosen-choices li.search-field {
218
  margin: 0;
219
  padding: 0;
220
  white-space: nowrap;
221
  }
 
222
  .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
223
  margin: 1px 0;
224
- padding: 5px;
225
- height: 15px;
226
  outline: 0;
227
  border: 0 !important;
228
  background: transparent !important;
 
229
  box-shadow: none;
230
- color: #666;
231
  font-size: 100%;
232
  font-family: sans-serif;
233
  line-height: normal;
234
  border-radius: 0;
 
235
  }
236
- .chosen-container-multi .chosen-choices li.search-field .default {
237
- color: #999;
238
- }
239
  .chosen-container-multi .chosen-choices li.search-choice {
240
  position: relative;
241
- margin: 3px 0 3px 5px;
242
  padding: 3px 20px 3px 5px;
243
  border: 1px solid #aaa;
 
244
  border-radius: 3px;
245
- background-color: #e4e4e4;
246
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
247
- background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
248
- background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
249
- background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
250
- background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
251
  background-clip: padding-box;
252
- box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
 
253
  color: #333;
254
  line-height: 13px;
255
  cursor: default;
256
  }
 
 
 
 
 
257
  .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
258
  position: absolute;
259
  top: 4px;
@@ -261,33 +306,36 @@
261
  display: block;
262
  width: 12px;
263
  height: 12px;
264
- background: url('chosen-sprite.png') -42px 1px no-repeat;
265
  font-size: 1px;
266
  }
 
267
  .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
268
  background-position: -42px -10px;
269
  }
 
270
  .chosen-container-multi .chosen-choices li.search-choice-disabled {
271
  padding-right: 5px;
272
  border: 1px solid #ccc;
273
  background-color: #e4e4e4;
274
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
275
- background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
276
- background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
277
- background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
278
- background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
279
  color: #666;
280
  }
 
281
  .chosen-container-multi .chosen-choices li.search-choice-focus {
282
  background: #d4d4d4;
283
  }
 
284
  .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
285
  background-position: -42px -10px;
286
  }
 
287
  .chosen-container-multi .chosen-results {
288
  margin: 0;
289
  padding: 0;
290
  }
 
291
  .chosen-container-multi .chosen-drop .result-selected {
292
  display: list-item;
293
  color: #ccc;
@@ -298,34 +346,37 @@
298
  /* @group Active */
299
  .chosen-container-active .chosen-single {
300
  border: 1px solid #5897fb;
 
301
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
302
  }
 
303
  .chosen-container-active.chosen-with-drop .chosen-single {
304
  border: 1px solid #aaa;
305
- -moz-border-radius-bottomright: 0;
306
  border-bottom-right-radius: 0;
307
- -moz-border-radius-bottomleft: 0;
308
  border-bottom-left-radius: 0;
309
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
310
- background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%);
311
- background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%);
312
- background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%);
313
- background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
314
  box-shadow: 0 1px 0 #fff inset;
315
  }
 
316
  .chosen-container-active.chosen-with-drop .chosen-single div {
317
  border-left: none;
318
  background: transparent;
319
  }
 
320
  .chosen-container-active.chosen-with-drop .chosen-single div b {
321
  background-position: -18px 2px;
322
  }
 
323
  .chosen-container-active .chosen-choices {
324
  border: 1px solid #5897fb;
 
325
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
326
  }
 
327
  .chosen-container-active .chosen-choices li.search-field input[type="text"] {
328
- color: #111 !important;
329
  }
330
 
331
  /* @end */
@@ -334,9 +385,11 @@
334
  opacity: 0.5 !important;
335
  cursor: default;
336
  }
 
337
  .chosen-disabled .chosen-single {
338
  cursor: default;
339
  }
 
340
  .chosen-disabled .chosen-choices .search-choice .search-choice-close {
341
  cursor: default;
342
  }
@@ -346,75 +399,81 @@
346
  .chosen-rtl {
347
  text-align: right;
348
  }
 
349
  .chosen-rtl .chosen-single {
350
  overflow: visible;
351
  padding: 0 8px 0 0;
352
  }
 
353
  .chosen-rtl .chosen-single span {
354
  margin-right: 0;
355
  margin-left: 26px;
356
  direction: rtl;
357
  }
 
358
  .chosen-rtl .chosen-single-with-deselect span {
359
  margin-left: 38px;
360
  }
 
361
  .chosen-rtl .chosen-single div {
362
  right: auto;
363
  left: 3px;
364
  }
 
365
  .chosen-rtl .chosen-single abbr {
366
  right: auto;
367
  left: 26px;
368
  }
 
369
  .chosen-rtl .chosen-choices li {
370
  float: right;
371
  }
 
372
  .chosen-rtl .chosen-choices li.search-field input[type="text"] {
373
  direction: rtl;
374
  }
 
375
  .chosen-rtl .chosen-choices li.search-choice {
376
  margin: 3px 5px 3px 0;
377
  padding: 3px 5px 3px 19px;
378
  }
 
379
  .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
380
  right: auto;
381
  left: 4px;
382
  }
383
- .chosen-rtl.chosen-container-single-nosearch .chosen-search,
384
- .chosen-rtl .chosen-drop {
385
- left: 9999px;
386
- }
387
  .chosen-rtl.chosen-container-single .chosen-results {
388
  margin: 0 0 4px 4px;
389
  padding: 0 4px 0 0;
390
  }
 
391
  .chosen-rtl .chosen-results li.group-option {
392
  padding-right: 15px;
393
  padding-left: 0;
394
  }
 
395
  .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
396
  border-right: none;
397
  }
 
398
  .chosen-rtl .chosen-search input[type="text"] {
399
  padding: 4px 5px 4px 20px;
400
- background: white url('chosen-sprite.png') no-repeat -30px -20px;
401
- background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
402
- background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
403
- background: url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
404
- background: url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
405
- background: url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
406
  direction: rtl;
407
  }
 
408
  .chosen-rtl.chosen-container-single .chosen-single div b {
409
  background-position: 6px 2px;
410
  }
 
411
  .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
412
  background-position: -12px 2px;
413
  }
414
 
415
  /* @end */
416
  /* @group Retina compatibility */
417
- @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
418
  .chosen-rtl .chosen-search input[type="text"],
419
  .chosen-container-single .chosen-single abbr,
420
  .chosen-container-single .chosen-single div b,
@@ -422,9 +481,10 @@
422
  .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
423
  .chosen-container .chosen-results-scroll-down span,
424
  .chosen-container .chosen-results-scroll-up span {
425
- background-image: url('chosen-sprite@2x.png') !important;
426
  background-size: 52px 37px !important;
427
  background-repeat: no-repeat !important;
428
  }
429
  }
 
430
  /* @end */
1
+ /*!
2
+ Chosen, a Select Box Enhancer for jQuery and Prototype
3
+ by Patrick Filler for Harvest, http://getharvest.com
4
+
5
+ Version 1.8.2
6
+ Full source at https://github.com/harvesthq/chosen
7
+ Copyright (c) 2011-2017 Harvest http://getharvest.com
8
+
9
+ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
+ This file is generated by `grunt build`, do not edit it by hand.
11
+ */
12
+
13
  /* @group Base */
14
  .chosen-container {
15
  position: relative;
16
  display: inline-block;
17
  vertical-align: middle;
18
  font-size: 13px;
 
 
19
  -webkit-user-select: none;
20
  -moz-user-select: none;
21
+ -ms-user-select: none;
22
  user-select: none;
23
  }
24
+
25
+ .chosen-container * {
26
+ -webkit-box-sizing: border-box;
27
+ box-sizing: border-box;
28
+ }
29
+
30
  .chosen-container .chosen-drop {
31
  position: absolute;
32
  top: 100%;
 
33
  z-index: 1010;
 
 
 
34
  width: 100%;
35
  border: 1px solid #aaa;
36
  border-top: 0;
37
  background: #fff;
38
+ -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
39
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
40
+ clip: rect(0, 0, 0, 0);
41
  }
42
+
43
  .chosen-container.chosen-with-drop .chosen-drop {
44
+ clip: auto;
45
  }
46
+
47
  .chosen-container a {
48
  cursor: pointer;
49
  }
50
 
51
+ .chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name {
52
+ margin-right: 4px;
53
+ overflow: hidden;
54
+ white-space: nowrap;
55
+ text-overflow: ellipsis;
56
+ font-weight: normal;
57
+ color: #999999;
58
+ }
59
+
60
+ .chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after {
61
+ content: ":";
62
+ padding-left: 2px;
63
+ vertical-align: top;
64
+ }
65
+
66
  /* @end */
67
  /* @group Single Chosen */
68
  .chosen-container-single .chosen-single {
70
  display: block;
71
  overflow: hidden;
72
  padding: 0 0 0 8px;
73
+ height: 25px;
74
  border: 1px solid #aaa;
75
  border-radius: 5px;
76
  background-color: #fff;
77
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #fff), color-stop(50%, #f6f6f6), color-stop(52%, #eee), to(#f4f4f4));
78
+ background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
 
 
 
79
  background-clip: padding-box;
80
+ -webkit-box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
81
+ box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
82
  color: #444;
83
  text-decoration: none;
84
  white-space: nowrap;
85
  line-height: 24px;
86
  }
87
+
88
  .chosen-container-single .chosen-default {
89
  color: #999;
90
  }
91
+
92
  .chosen-container-single .chosen-single span {
93
  display: block;
94
  overflow: hidden;
96
  text-overflow: ellipsis;
97
  white-space: nowrap;
98
  }
99
+
100
  .chosen-container-single .chosen-single-with-deselect span {
101
  margin-right: 38px;
102
  }
103
+
104
  .chosen-container-single .chosen-single abbr {
105
  position: absolute;
106
  top: 6px;
108
  display: block;
109
  width: 12px;
110
  height: 12px;
111
+ background: url("chosen-sprite.png") -42px 1px no-repeat;
112
  font-size: 1px;
113
  }
114
+
115
  .chosen-container-single .chosen-single abbr:hover {
116
  background-position: -42px -10px;
117
  }
118
+
119
  .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
120
  background-position: -42px -10px;
121
  }
122
+
123
  .chosen-container-single .chosen-single div {
124
  position: absolute;
125
  top: 0;
128
  width: 18px;
129
  height: 100%;
130
  }
131
+
132
  .chosen-container-single .chosen-single div b {
133
  display: block;
134
  width: 100%;
135
  height: 100%;
136
+ background: url("chosen-sprite.png") no-repeat 0px 2px;
137
  }
138
+
139
  .chosen-container-single .chosen-search {
140
  position: relative;
141
  z-index: 1010;
143
  padding: 3px 4px;
144
  white-space: nowrap;
145
  }
146
+
147
  .chosen-container-single .chosen-search input[type="text"] {
 
 
 
148
  margin: 1px 0;
149
  padding: 4px 20px 4px 5px;
150
  width: 100%;
151
  height: auto;
152
  outline: 0;
153
  border: 1px solid #aaa;
154
+ background: url("chosen-sprite.png") no-repeat 100% -20px;
 
 
 
 
 
155
  font-size: 1em;
156
  font-family: sans-serif;
157
  line-height: normal;
158
  border-radius: 0;
159
  }
160
+
161
  .chosen-container-single .chosen-drop {
162
  margin-top: -1px;
163
  border-radius: 0 0 4px 4px;
164
  background-clip: padding-box;
165
  }
166
+
167
  .chosen-container-single.chosen-container-single-nosearch .chosen-search {
168
  position: absolute;
169
+ clip: rect(0, 0, 0, 0);
170
  }
171
 
172
  /* @end */
173
  /* @group Results */
174
  .chosen-container .chosen-results {
175
+ color: #444;
176
  position: relative;
177
  overflow-x: hidden;
178
  overflow-y: auto;
181
  max-height: 240px;
182
  -webkit-overflow-scrolling: touch;
183
  }
184
+
185
  .chosen-container .chosen-results li {
186
  display: none;
187
  margin: 0;
188
  padding: 5px 6px;
189
  list-style: none;
190
  line-height: 15px;
191
+ word-wrap: break-word;
192
+ -webkit-touch-callout: none;
193
  }
194
+
195
  .chosen-container .chosen-results li.active-result {
196
  display: list-item;
197
  cursor: pointer;
198
  }
199
+
200
  .chosen-container .chosen-results li.disabled-result {
201
  display: list-item;
202
  color: #ccc;
203
  cursor: default;
204
  }
205
+
206
  .chosen-container .chosen-results li.highlighted {
207
  background-color: #3875d7;
208
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
 
 
 
209
  background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
210
  color: #fff;
211
  }
212
+
213
  .chosen-container .chosen-results li.no-results {
214
+ color: #777;
215
  display: list-item;
216
  background: #f4f4f4;
217
  }
218
+
219
  .chosen-container .chosen-results li.group-result {
220
  display: list-item;
221
  font-weight: bold;
222
  cursor: default;
223
  }
224
+
225
  .chosen-container .chosen-results li.group-option {
226
  padding-left: 15px;
227
  }
228
+
229
  .chosen-container .chosen-results li em {
230
  font-style: normal;
231
  text-decoration: underline;
236
  .chosen-container-multi .chosen-choices {
237
  position: relative;
238
  overflow: hidden;
 
 
 
239
  margin: 0;
240
+ padding: 0 5px;
241
  width: 100%;
242
+ height: auto;
 
243
  border: 1px solid #aaa;
244
  background-color: #fff;
245
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(1%, #eee), color-stop(15%, #fff));
246
+ background-image: linear-gradient(#eee 1%, #fff 15%);
 
 
 
247
  cursor: text;
248
  }
249
+
250
  .chosen-container-multi .chosen-choices li {
251
  float: left;
252
  list-style: none;
253
  }
254
+
255
  .chosen-container-multi .chosen-choices li.search-field {
256
  margin: 0;
257
  padding: 0;
258
  white-space: nowrap;
259
  }
260
+
261
  .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
262
  margin: 1px 0;
263
+ padding: 0;
264
+ height: 25px;
265
  outline: 0;
266
  border: 0 !important;
267
  background: transparent !important;
268
+ -webkit-box-shadow: none;
269
  box-shadow: none;
270
+ color: #999;
271
  font-size: 100%;
272
  font-family: sans-serif;
273
  line-height: normal;
274
  border-radius: 0;
275
+ width: 25px;
276
  }
277
+
 
 
278
  .chosen-container-multi .chosen-choices li.search-choice {
279
  position: relative;
280
+ margin: 3px 5px 3px 0;
281
  padding: 3px 20px 3px 5px;
282
  border: 1px solid #aaa;
283
+ max-width: 100%;
284
  border-radius: 3px;
285
+ background-color: #eeeeee;
286
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee));
287
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
288
+ background-size: 100% 19px;
289
+ background-repeat: repeat-x;
 
290
  background-clip: padding-box;
291
+ -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
292
+ box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
293
  color: #333;
294
  line-height: 13px;
295
  cursor: default;
296
  }
297
+
298
+ .chosen-container-multi .chosen-choices li.search-choice span {
299
+ word-wrap: break-word;
300
+ }
301
+
302
  .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
303
  position: absolute;
304
  top: 4px;
306
  display: block;
307
  width: 12px;
308
  height: 12px;
309
+ background: url("chosen-sprite.png") -42px 1px no-repeat;
310
  font-size: 1px;
311
  }
312
+
313
  .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
314
  background-position: -42px -10px;
315
  }
316
+
317
  .chosen-container-multi .chosen-choices li.search-choice-disabled {
318
  padding-right: 5px;
319
  border: 1px solid #ccc;
320
  background-color: #e4e4e4;
321
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee));
322
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
 
 
 
323
  color: #666;
324
  }
325
+
326
  .chosen-container-multi .chosen-choices li.search-choice-focus {
327
  background: #d4d4d4;
328
  }
329
+
330
  .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
331
  background-position: -42px -10px;
332
  }
333
+
334
  .chosen-container-multi .chosen-results {
335
  margin: 0;
336
  padding: 0;
337
  }
338
+
339
  .chosen-container-multi .chosen-drop .result-selected {
340
  display: list-item;
341
  color: #ccc;
346
  /* @group Active */
347
  .chosen-container-active .chosen-single {
348
  border: 1px solid #5897fb;
349
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
350
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
351
  }
352
+
353
  .chosen-container-active.chosen-with-drop .chosen-single {
354
  border: 1px solid #aaa;
 
355
  border-bottom-right-radius: 0;
 
356
  border-bottom-left-radius: 0;
357
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #eee), color-stop(80%, #fff));
358
+ background-image: linear-gradient(#eee 20%, #fff 80%);
359
+ -webkit-box-shadow: 0 1px 0 #fff inset;
 
 
360
  box-shadow: 0 1px 0 #fff inset;
361
  }
362
+
363
  .chosen-container-active.chosen-with-drop .chosen-single div {
364
  border-left: none;
365
  background: transparent;
366
  }
367
+
368
  .chosen-container-active.chosen-with-drop .chosen-single div b {
369
  background-position: -18px 2px;
370
  }
371
+
372
  .chosen-container-active .chosen-choices {
373
  border: 1px solid #5897fb;
374
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
375
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
376
  }
377
+
378
  .chosen-container-active .chosen-choices li.search-field input[type="text"] {
379
+ color: #222 !important;
380
  }
381
 
382
  /* @end */
385
  opacity: 0.5 !important;
386
  cursor: default;
387
  }
388
+
389
  .chosen-disabled .chosen-single {
390
  cursor: default;
391
  }
392
+
393
  .chosen-disabled .chosen-choices .search-choice .search-choice-close {
394
  cursor: default;
395
  }
399
  .chosen-rtl {
400
  text-align: right;
401
  }
402
+
403
  .chosen-rtl .chosen-single {
404
  overflow: visible;
405
  padding: 0 8px 0 0;
406
  }
407
+
408
  .chosen-rtl .chosen-single span {
409
  margin-right: 0;
410
  margin-left: 26px;
411
  direction: rtl;
412
  }
413
+
414
  .chosen-rtl .chosen-single-with-deselect span {
415
  margin-left: 38px;
416
  }
417
+
418
  .chosen-rtl .chosen-single div {
419
  right: auto;
420
  left: 3px;
421
  }
422
+
423
  .chosen-rtl .chosen-single abbr {
424
  right: auto;
425
  left: 26px;
426
  }
427
+
428
  .chosen-rtl .chosen-choices li {
429
  float: right;
430
  }
431
+
432
  .chosen-rtl .chosen-choices li.search-field input[type="text"] {
433
  direction: rtl;
434
  }
435
+
436
  .chosen-rtl .chosen-choices li.search-choice {
437
  margin: 3px 5px 3px 0;
438
  padding: 3px 5px 3px 19px;
439
  }
440
+
441
  .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
442
  right: auto;
443
  left: 4px;
444
  }
445
+
 
 
 
446
  .chosen-rtl.chosen-container-single .chosen-results {
447
  margin: 0 0 4px 4px;
448
  padding: 0 4px 0 0;
449
  }
450
+
451
  .chosen-rtl .chosen-results li.group-option {
452
  padding-right: 15px;
453
  padding-left: 0;
454
  }
455
+
456
  .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
457
  border-right: none;
458
  }
459
+
460
  .chosen-rtl .chosen-search input[type="text"] {
461
  padding: 4px 5px 4px 20px;
462
+ background: url("chosen-sprite.png") no-repeat -30px -20px;
 
 
 
 
 
463
  direction: rtl;
464
  }
465
+
466
  .chosen-rtl.chosen-container-single .chosen-single div b {
467
  background-position: 6px 2px;
468
  }
469
+
470
  .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
471
  background-position: -12px 2px;
472
  }
473
 
474
  /* @end */
475
  /* @group Retina compatibility */
476
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
477
  .chosen-rtl .chosen-search input[type="text"],
478
  .chosen-container-single .chosen-single abbr,
479
  .chosen-container-single .chosen-single div b,
481
  .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
482
  .chosen-container .chosen-results-scroll-down span,
483
  .chosen-container .chosen-results-scroll-up span {
484
+ background-image: url("chosen-sprite@2x.png") !important;
485
  background-size: 52px 37px !important;
486
  background-repeat: no-repeat !important;
487
  }
488
  }
489
+
490
  /* @end */
assets/css/chosen.min.css CHANGED
@@ -1,3 +1,11 @@
1
- /* Chosen v1.0.0 | (c) 2011-2013 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
 
 
2
 
3
- .chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;*display:inline;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:23px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:#fff url(chosen-sprite.png) no-repeat 100% -20px;background:url(chosen-sprite.png) no-repeat 100% -20px,-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background:url(chosen-sprite.png) no-repeat 100% -20px,-webkit-linear-gradient(#eee 1%,#fff 15%);background:url(chosen-sprite.png) no-repeat 100% -20px,-moz-linear-gradient(#eee 1%,#fff 15%);background:url(chosen-sprite.png) no-repeat 100% -20px,-o-linear-gradient(#eee 1%,#fff 15%);background:url(chosen-sprite.png) no-repeat 100% -20px,linear-gradient(#eee 1%,#fff 15%);font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:5px;height:15px;outline:0;border:0!important;background:transparent!important;box-shadow:none;color:#666;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-field .default{color:#999}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 0 3px 5px;padding:3px 20px 3px 5px;border:1px solid #aaa;border-radius:3px;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:0;background:transparent}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#111!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single-nosearch .chosen-search,.chosen-rtl .chosen-drop{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:0}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:#fff url(chosen-sprite.png) no-repeat -30px -20px;background:url(chosen-sprite.png) no-repeat -30px -20px,-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background:url(chosen-sprite.png) no-repeat -30px -20px,-webkit-linear-gradient(#eee 1%,#fff 15%);background:url(chosen-sprite.png) no-repeat -30px -20px,-moz-linear-gradient(#eee 1%,#fff 15%);background:url(chosen-sprite.png) no-repeat -30px -20px,-o-linear-gradient(#eee 1%,#fff 15%);background:url(chosen-sprite.png) no-repeat -30px -20px,linear-gradient(#eee 1%,#fff 15%);direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi){.chosen-rtl .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-container-single .chosen-search input[type=text],.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
 
 
 
 
 
 
1
+ /*!
2
+ Chosen, a Select Box Enhancer for jQuery and Prototype
3
+ by Patrick Filler for Harvest, http://getharvest.com
4
 
5
+ Version 1.8.2
6
+ Full source at https://github.com/harvesthq/chosen
7
+ Copyright (c) 2011-2017 Harvest http://getharvest.com
8
+
9
+ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
+ This file is generated by `grunt build`, do not edit it by hand.
11
+ */.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15);clip:rect(0,0,0,0)}.chosen-container.chosen-with-drop .chosen-drop{clip:auto}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),to(#f4f4f4));background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;-webkit-box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0)}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(1%,#eee),color-stop(15%,#fff));background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;-webkit-box-shadow:none;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#eee),color-stop(80%,#fff));background-image:linear-gradient(#eee 20%,#fff 80%);-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
assets/js/admin-scripts.js CHANGED
@@ -31,11 +31,6 @@ jQuery(document).ready(function ($) {
31
 
32
  clone = row.clone();
33
 
34
- /** manually update any select box values */
35
- clone.find( 'select' ).each(function() {
36
- $( this ).val( row.find( 'select[name="' + $( this ).attr( 'name' ) + '"]' ).val() );
37
- });
38
-
39
  clone.removeClass( 'edd_add_blank' );
40
 
41
  clone.attr( 'data-key', key );
@@ -61,6 +56,24 @@ jQuery(document).ready(function ($) {
61
 
62
  });
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  clone.find( 'span.edd_price_id' ).each(function() {
65
  $( this ).text( parseInt( key ) );
66
  });
@@ -1223,7 +1236,7 @@ jQuery(document).ready(function ($) {
1223
  });
1224
 
1225
 
1226
- $('#the-list').on('click', '.editinline', function() {
1227
 
1228
  var post_id = $(this).closest('tr').attr('id');
1229
 
31
 
32
  clone = row.clone();
33
 
 
 
 
 
 
34
  clone.removeClass( 'edd_add_blank' );
35
 
36
  clone.attr( 'data-key', key );
56
 
57
  });
58
 
59
+ /** manually update any select box values */
60
+ clone.find( 'select' ).each(function() {
61
+ $( this ).val( row.find( 'select[name="' + $( this ).attr( 'name' ) + '"]' ).val() );
62
+ });
63
+
64
+ /** manually uncheck any checkboxes */
65
+ clone.find( 'input[type="checkbox"]' ).each(function() {
66
+
67
+ // Make sure checkboxes are unchecked when cloned
68
+ var checked = $(this).is(':checked');
69
+ if ( checked ) {
70
+ $(this).prop('checked', false);
71
+ }
72
+
73
+ // reset the value attribute to 1 in order to properly save the new checked state
74
+ $(this).val(1);
75
+ });
76
+
77
  clone.find( 'span.edd_price_id' ).each(function() {
78
  $( this ).text( parseInt( key ) );
79
  });
1236
  });
1237
 
1238
 
1239
+ $('body').on('click', '#the-list .editinline', function() {
1240
 
1241
  var post_id = $(this).closest('tr').attr('id');
1242
 
assets/js/admin-scripts.min.js CHANGED
@@ -1,2 +1 @@
1
- function edd_attach_tooltips(e){e.tooltip({content:function(){return jQuery(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}})}jQuery(document).ready(function(e){var t=e(".edd-help-tip");edd_attach_tooltips(t);var d={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone_repeatable:function(t){var d=highest=1;return t.parent().find(".edd_repeatable_row").each(function(){var t=e(this).data("key");parseInt(t)>highest&&(highest=t)}),d=highest+=1,clone=t.clone(),clone.find("select").each(function(){e(this).val(t.find('select[name="'+e(this).attr("name")+'"]').val())}),clone.removeClass("edd_add_blank"),clone.attr("data-key",d),clone.find("input, select, textarea").val("").each(function(){var t=e(this).attr("name"),a=e(this).attr("id");t&&(t=t.replace(/\[(\d+)\]/,"["+parseInt(d)+"]"),e(this).attr("name",t)),e(this).attr("data-key",d),"undefined"!=typeof a&&(a=a.replace(/(\d+)/,parseInt(d)),e(this).attr("id",a))}),clone.find("span.edd_price_id").each(function(){e(this).text(parseInt(d))}),clone.find("span.edd_file_id").each(function(){e(this).text(parseInt(d))}),clone.find(".edd_repeatable_default_input").each(function(){e(this).val(parseInt(d)).removeAttr("checked")}),clone.find(".edd_repeatable_condition_field").each(function(){e(this).find("option:eq(0)").prop("selected","selected")}),clone.find(".search-choice").remove(),clone.find(".chosen-container").remove(),edd_attach_tooltips(clone.find(".edd-help-tip")),clone},add:function(){e(document.body).on("click",".submit .edd_add_repeatable",function(t){t.preventDefault();var a=e(this),n=a.parent().parent().prev(".edd_repeatable_row"),i=d.clone_repeatable(n);i.insertAfter(n).find("input, textarea, select").filter(":visible").eq(0).focus(),i.find(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),i.find(".edd-select-chosen").css("width","100%"),i.find(".edd-select-chosen .chosen-search input").attr("placeholder",edd_vars.search_placeholder)})},move:function(){e(".edd_repeatable_table .edd-repeatables-wrap").sortable({handle:".edd-draghandle-anchor",items:".edd_repeatable_row",opacity:.6,cursor:"move",axis:"y",update:function(){var t=0;e(this).find(".edd_repeatable_row").each(function(){e(this).find("input.edd_repeatable_index").each(function(){e(this).val(t)}),t++})}})},remove:function(){e(document.body).on("click",".edd-remove-row, .edd_remove_repeatable",function(t){t.preventDefault();var d,a,n,i=e(this).parents(".edd_repeatable_row"),o=i.parent().find(".edd_repeatable_row").length,r=e(this).data("type"),s="div.edd_repeatable_"+r+"s";if(d=e(this).is(".ui-sortable .edd_repeatable_row:first-child .edd-remove-row, .ui-sortable .edd_repeatable_row:first-child .edd_remove_repeatable")?i.next(".edd_repeatable_row"):i.prev(".edd_repeatable_row"),a=d.find("select, input, textarea, button").filter(":visible"),n=a.eq(0),"price"===r){var c=i.data("key");e('.edd_repeatable_condition_field option[value="'+c+'"]').remove()}if(o>1)e("input, select",i).val(""),i.fadeOut("fast").remove(),n.focus();else switch(r){case"price":alert(edd_vars.one_price_min);break;case"file":e("input, select",i).val("");break;default:alert(edd_vars.one_field_min)}e(s).each(function(t){e(this).find("input, select").each(function(){var d=e(this).attr("name");d=d.replace(/\[(\d+)\]/,"["+t+"]"),e(this).attr("name",d).attr("id",d)})})})},type:function(){e(document.body).on("change","#_edd_product_type",function(t){var d=e("#edd_products"),a=e("#edd_download_files"),n=e("#edd_download_limit_wrap");"bundle"===e(this).val()?(d.show(),a.hide(),n.hide()):(d.hide(),a.show(),n.show())})},prices:function(){e(document.body).on("change","#edd_variable_pricing",function(t){var d=e(this).is(":checked"),a=e("#edd_regular_price_field"),n=e("#edd_variable_price_fields, .edd_repeatable_table .pricing"),i=e(".edd-bundled-product-row, .edd-repeatable-row-standard-fields");d?(a.hide(),n.show(),i.addClass("has-variable-pricing")):(a.show(),n.hide(),i.removeClass("has-variable-pricing"))})},files:function(){var t;window.formfield="",e(document.body).on("click",".edd_upload_file_button",function(a){a.preventDefault();var n=e(this);return window.formfield=e(this).closest(".edd_repeatable_upload_wrapper"),t?void t.open():(t=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:n.data("uploader-title"),button:{text:n.data("uploader-button-text")},multiple:"0"==e(this).data("multiple")?!1:!0}),t.on("menu:render:default",function(e){var t={};e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set(t)}),t.on("insert",function(){var a=t.state().get("selection");a.each(function(t,a){t=t.toJSON();var n="image"===t.type?e(".attachment-display-settings .size option:selected").val():!1,i=t.url,o=t.title.length>0?t.title:t.filename;if(n&&"undefined"!=typeof t.sizes[n]&&(i=t.sizes[n].url),"image"===t.type&&(o=n&&"undefined"!=typeof t.sizes[n]?o+"-"+t.sizes[n].width+"x"+t.sizes[n].height:o+"-"+t.width+"x"+t.height),0===a)window.formfield.find(".edd_repeatable_attachment_id_field").val(t.id),window.formfield.find(".edd_repeatable_thumbnail_size_field").val(n),window.formfield.find(".edd_repeatable_upload_field").val(i),window.formfield.find(".edd_repeatable_name_field").val(o);else{var r=window.formfield,s=d.clone_repeatable(r);s.find(".edd_repeatable_attachment_id_field").val(t.id),s.find(".edd_repeatable_thumbnail_size_field").val(n),s.find(".edd_repeatable_upload_field").val(i),s.find(".edd_repeatable_name_field").val(o),s.insertAfter(r)}})}),void t.open())});var t;window.formfield=""},updatePrices:function(){e("#edd_price_fields").on("keyup",".edd_variable_prices_name",function(){var t=e(this).parents(".edd_repeatable_row").data("key"),d=e(this).val(),a=e(".edd_repeatable_condition_field option[value="+t+"]");a.length>0?a.text(d):e(".edd_repeatable_condition_field").append(e("<option></option>").attr("value",t).text(d))})}};e(document.body).on("click",".toggle-custom-price-option-section",function(t){t.preventDefault();var d=e(this).html()==edd_vars.show_advanced_settings?!0:!1;d?e(this).html(edd_vars.hide_advanced_settings):e(this).html(edd_vars.show_advanced_settings);var a=e(this).parents(".edd-repeatable-row-header");a.siblings(".edd-custom-price-option-sections-wrap").slideToggle();var n;n=d?e(":input:not(input[type=button],input[type=submit],button):visible:first",a.siblings(".edd-custom-price-option-sections-wrap")):e(":input:not(input[type=button],input[type=submit],button):visible:first",a.siblings(".edd-repeatable-row-standard-fields")),n.focus()}),d.init();var a=e(".edd_datepicker");if(a.length>0){var n="mm/dd/yy";a.datepicker({dateFormat:n})}var i={init:function(){this.edit_address(),this.remove_download(),this.add_download(),this.change_customer(),this.new_customer(),this.edit_price(),this.recalculate_total(),this.variable_prices_check(),this.add_note(),this.remove_note(),this.resend_receipt(),this.copy_download_link()},edit_address:function(){e('select[name="edd-payment-address[0][country]"]').change(function(){var t=e(this),d={action:"edd_get_shop_states",country:t.val(),field_name:"edd-payment-address[0][state]"};return e.post(ajaxurl,d,function(t){var d=e("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input");e("#edd-order-address-state-wrap .chosen-container").remove(),"nostates"==t?d.replaceWith('<input type="text" name="edd-payment-address[0][state]" value="" class="edd-edit-toggles medium-text"/>'):d.replaceWith(t)}),!1})},remove_download:function(){e("#edd-purchased-files").on("click",".edd-order-remove-download",function(){var t=e(document.body).find("#edd-purchased-files > .row:not(.header)").length;if(1===t)return alert(edd_vars.one_download_min),!1;if(confirm(edd_vars.delete_payment_download)){var d=e(this).data("key"),a=(e(".edd-payment-id").val(),e('input[name="edd-payment-details-downloads['+d+'][id]"]').val()),n=e('input[name="edd-payment-details-downloads['+d+'][price_id]"]').val(),i=e('input[name="edd-payment-details-downloads['+d+'][quantity]"]').val(),o=e('input[name="edd-payment-details-downloads['+d+'][amount]"]').val();if(e('input[name="edd-payment-details-downloads['+d+'][tax]"]'))var r=e('input[name="edd-payment-details-downloads['+d+'][tax]"]').val();if(e('input[name="edd-payment-details-downloads['+d+'][fees]"]'))var r=e.parseJSON(e('input[name="edd-payment-details-downloads['+d+'][fees]"]').val());var s=e('input[name="edd-payment-removed"]').val();s=e.parseJSON(s),s.length<1&&(s={});var c=[{id:a,price_id:n,quantity:i,amount:o,cart_index:d}];s[d]=c,e('input[name="edd-payment-removed"]').val(JSON.stringify(s)),e(this).parent().parent().remove(),r&&r.length&&e.each(r,function(t,d){e('*li[data-fee-id="'+d+'"]').remove()}),e("#edd-payment-downloads-changed").val(1),e(".edd-order-payment-recalc-totals").show()}return!1})},change_customer:function(){e("#edd-customer-details").on("click",".edd-payment-change-customer, .edd-payment-change-customer-cancel",function(t){t.preventDefault();var d=e(this).hasClass("edd-payment-change-customer"),a=e(this).hasClass("edd-payment-change-customer-cancel");d?(e(".customer-info").hide(),e(".change-customer").show(),e(".edd-payment-change-customer-input").css("width","auto")):a&&(e(".customer-info").show(),e(".change-customer").hide())})},new_customer:function(){e("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(t){t.preventDefault();var d=e(this).hasClass("edd-payment-new-customer"),a=e(this).hasClass("edd-payment-new-customer-cancel");d?(e(".customer-info").hide(),e(".new-customer").show()):a&&(e(".customer-info").show(),e(".new-customer").hide());var d=e("#edd-new-customer");e(".new-customer").is(":visible")?d.val(1):d.val(0)})},add_download:function(){e(".edd-edit-purchase-element").on("click","#edd-order-add-download",function(t){t.preventDefault();var d=e("#edd_order_download_select"),a=e("#edd-order-download-quantity"),n=e("#edd-order-download-price"),i=e("#edd-order-download-tax"),o=e(".edd_price_options_select option:selected"),r=d.val(),s=d.find(":selected").text(),c=a.val(),l=n.val(),p=i.val(),u=o.val(),_=o.text();if(1>r)return!1;if(l||(l=0),l=parseFloat(l),isNaN(l))return alert(edd_vars.numeric_item_price),!1;if(p=parseFloat(p),isNaN(p))return alert(edd_vars.numeric_item_tax),!1;if(isNaN(parseInt(c)))return alert(edd_vars.numeric_quantity),!1;_&&(s=s+" - "+_);var m=e("#edd-purchased-files div.row").length,f=e("#edd-purchased-files div.row:last").clone();f.find(".download span").html('<a href="post.php?post='+r+'&action=edit"></a>'),f.find(".download span a").text(s),f.find(".edd-payment-details-download-item-price").val(l.toFixed(edd_vars.currency_decimals)),f.find(".edd-payment-details-download-item-tax").val(p.toFixed(edd_vars.currency_decimals)),f.find("input.edd-payment-details-download-id").val(r),f.find("input.edd-payment-details-download-price-id").val(u);var h=l*c+p;h=h.toFixed(edd_vars.currency_decimals),f.find("span.edd-payment-details-download-amount").text(h),f.find("input.edd-payment-details-download-amount").val(h),f.find("input.edd-payment-details-download-quantity").val(c),f.find("input.edd-payment-details-download-has-log").val(0),f.find(".edd-copy-download-link-wrapper").remove(),f.find("input").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(m)+"]"),e(this).attr("name",t).attr("id",t)}),f.find("a.edd-order-remove-download").attr("data-key",parseInt(m)),e("#edd-payment-downloads-changed").val(1),e(f).insertAfter("#edd-purchased-files div.row:last"),e(".edd-order-payment-recalc-totals").show(),e(".edd-add-download-field").val("")})},edit_price:function(){e(document.body).on("change keyup",".edd-payment-item-input",function(){var t=e(this).parents("ul.edd-purchased-files-list-wrapper");e(".edd-order-payment-recalc-totals").show();var d=t.find("input.edd-payment-details-download-quantity").val().replace(edd_vars.thousands_separator,""),a=t.find("input.edd-payment-details-download-item-price").val().replace(edd_vars.thousands_separator,""),n=t.find("input.edd-payment-details-download-item-tax").val().replace(edd_vars.thousands_separator,"");if(a=parseFloat(a),isNaN(a))return alert(edd_vars.numeric_item_price),!1;n=parseFloat(n),isNaN(n)&&(n=0),isNaN(parseInt(d))&&(d=1);var i=a*d+n;i=i.toFixed(edd_vars.currency_decimals),t.find("input.edd-payment-details-download-amount").val(i),t.find("span.edd-payment-details-download-amount").text(i)})},recalculate_total:function(){e("#edd-order-recalc-total").on("click",function(t){t.preventDefault();var d=0,a=0,n=e("#edd-purchased-files .row input.edd-payment-details-download-amount"),i=e("#edd-purchased-files .row input.edd-payment-details-download-item-tax");n.length&&n.each(function(){d+=parseFloat(e(this).val())}),i.length&&i.each(function(){a+=parseFloat(e(this).val())}),e(".edd-payment-fees").length&&e(".edd-payment-fees span.fee-amount").each(function(){d+=parseFloat(e(this).data("fee"))}),e("input[name=edd-payment-total]").val(d.toFixed(edd_vars.currency_decimals)),e("input[name=edd-payment-tax]").val(a.toFixed(edd_vars.currency_decimals))})},variable_prices_check:function(){e(".edd-edit-purchase-element").on("change","select#edd_order_download_select",function(){var t=e(this),d=t.val();if(parseInt(d)>0){var a={action:"edd_check_for_download_price_variations",download_id:d};e.ajax({type:"POST",data:a,url:ajaxurl,success:function(d){e(".edd_price_options_select").remove(),e(d).insertAfter(t.next())}}).fail(function(e){window.console&&window.console.log&&console.log(e)})}})},add_note:function(){e("#edd-add-payment-note").on("click",function(t){t.preventDefault();var d={action:"edd_insert_payment_note",payment_id:e(this).data("payment-id"),note:e("#edd-payment-note").val()};if(d.note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-payment-notes-inner").append(t),e(".edd-no-payment-notes").hide(),e("#edd-payment-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var a=e("#edd-payment-note").css("border-color");e("#edd-payment-note").css("border-color","red"),setTimeout(function(){e("#edd-payment-note").css("border-color",a)},500)}})},remove_note:function(){e(document.body).on("click",".edd-delete-payment-note",function(t){if(t.preventDefault(),confirm(edd_vars.delete_payment_note)){var d={action:"edd_delete_payment_note",payment_id:e(this).data("payment-id"),note_id:e(this).data("note-id")};return e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){return e("#edd-payment-note-"+d.note_id).remove(),e(".edd-payment-note").length||e(".edd-no-payment-notes").show(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!0}})},resend_receipt:function(){var t=e(".edd-order-resend-receipt-addresses");e(document.body).on("click","#edd-select-receipt-email",function(e){e.preventDefault(),t.slideDown()}),e(document.body).on("change",".edd-order-resend-receipt-email",function(){var t=e("#edd-select-receipt-email").prop("href")+"&email="+e(this).val();confirm(edd_vars.resend_receipt)&&(window.location=t)}),e(document.body).on("click","#edd-resend-receipt",function(e){return confirm(edd_vars.resend_receipt)})},copy_download_link:function(){e(document.body).on("click",".edd-copy-download-link",function(t){t.preventDefault();var d=e(this),a={action:"edd_get_file_download_link",payment_id:e('input[name="edd_payment_id"]').val(),download_id:d.data("download-id"),price_id:d.data("price-id")};e.ajax({type:"POST",data:a,url:ajaxurl,success:function(t){return e("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+t+"</textarea>"),e("#edd-download-link-textarea").focus().select(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)})})}};i.init();var o={init:function(){this.type_select(),this.product_requirements()},type_select:function(){e("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){var t=e(this).val();e(".edd-amount-description").hide(),e(".edd-amount-description."+t+"-discount").show()})},product_requirements:function(){e("#products").change(function(){var t=e("#edd-discount-product-conditions");e(this).val()?t.show():t.hide()})}};o.init();var r={init:function(){this.date_options(),this.customers_export()},date_options:function(){e("#edd-graphs-date-options").change(function(){var t=e(this),d=e("#edd-date-range-options");"other"===t.val()?d.show():d.hide()})},customers_export:function(){e("#edd_customer_export_download").change(function(){var t=e(this),d=e("option:selected",t).val(),a=e("#edd_customer_export_option");if("0"===t.val()?a.show():a.hide(),0!=parseInt(d)){var n={action:"edd_check_for_download_price_variations",download_id:d,all_prices:!0},i=e(".edd_price_options_select");e.post(ajaxurl,n,function(t){i.remove(),e("#edd_customer_export_download_chosen").after(t)})}else i.remove()})}};r.init();var s={init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){var t=e(".edd-color-picker");if(t.length&&t.wpColorPicker(),"undefined"==typeof wp||"1"!==edd_vars.new_media_ui){var d=e(".edd_settings_upload_button");d.length>0&&(window.formfield="",e(document.body).on("click",d,function(t){t.preventDefault(),window.formfield=e(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),tb_show(edd_vars.add_new_download,"media-upload.php?TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(t){window.formfield?(imgurl=e("a","<div>"+t+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(t),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1})}else{var a;window.formfield="",e(document.body).on("click",".edd_settings_upload_button",function(t){t.preventDefault();var d=e(this);return window.formfield=e(this).parent().prev(),a?void a.open():(a=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:d.data("uploader_title"),button:{text:d.data("uploader_button_text")},multiple:!1}),a.on("menu:render:default",function(e){var t={};e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set(t)}),a.on("insert",function(){var e=a.state().get("selection");e.each(function(e,t){e=e.toJSON(),window.formfield.val(e.url)})}),void a.open())});var a;window.formfield=""}},taxes:function(){var t=e("select.edd-no-states");t.length&&t.closest("tr").addClass("hidden"),e('select[name="edd_settings[base_country]"]').change(function(){var t=e(this),d=t.closest("tr"),a={action:"edd_get_shop_states",country:e(this).val(),field_name:"edd_settings[base_state]"};return e.post(ajaxurl,a,function(e){"nostates"==e?d.next().addClass("hidden"):(d.next().removeClass("hidden"),d.next().find("select").replaceWith(e))}),!1}),e(document.body).on("change","#edd_tax_rates select.edd-tax-country",function(){var t=e(this),d={action:"edd_get_shop_states",country:e(this).val(),field_name:t.attr("name").replace("country","state")};return e.post(ajaxurl,d,function(e){if("nostates"==e){var a='<input type="text" name="'+d.field_name+'" value=""/>';t.parent().next().find("select").replaceWith(a)}else t.parent().next().find("input,select").show(),t.parent().next().find("input,select").replaceWith(e)}),!1}),e("#edd_add_tax_rate").on("click",function(){var t=e("#edd_tax_rates tr:last"),d=t.clone(),a=t.parent().find("tr").length;return d.find("td input").not(":input[type=checkbox]").val(""),d.find('td [type="checkbox"]').attr("checked",!1),d.find("input, select").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(a)+"]"),e(this).attr("name",t).attr("id",t)}),d.find("label").each(function(){var t=e(this).attr("for");t=t.replace(/\[(\d+)\]/,"["+parseInt(a)+"]"),e(this).attr("for",t)}),d.insertAfter(t),!1}),e(document.body).on("click","#edd_tax_rates .edd_remove_tax_rate",function(){if(confirm(edd_vars.delete_tax_rate)){var t=e("#edd_tax_rates tr:visible"),d=t.length;2===d?(e("#edd_tax_rates select").val(""),e('#edd_tax_rates input[type="text"]').val(""),e('#edd_tax_rates input[type="number"]').val(""),e('#edd_tax_rates input[type="checkbox"]').attr("checked",!1)):e(this).closest("tr").remove(),e("#edd_tax_rates tr").each(function(t){e(this).children().find("input, select").each(function(){var d=e(this).attr("name");d=d.replace(/\[(\d+)\]/,"["+(t-1)+"]"),e(this).attr("name",d).attr("id",d)})})}return!1})},emails:function(){var t=e("#email-preview-wrap");if(t.length){var d=e("#email-preview");t.colorbox({inline:!0,href:d,width:"80%",height:"auto"})}},misc:function(){var t=e('select[name="edd_settings[download_method]"]'),d=t.parent().parent().next();"direct"==t.val()&&(d.hide(),d.find("input").prop("checked",!1)),t.on("change",function(){"direct"==e(this).val()?(d.hide(),d.find("input").prop("checked",!1)):d.show()})}};s.init(),e(".download_page_edd-payment-history .row-actions .delete a, a.edd-delete-payment").on("click",function(){return confirm(edd_vars.delete_payment)?!0:!1}),e("#the-list").on("click",".editinline",function(){var t=e(this).closest("tr").attr("id");t=t.replace("post-","");var d=e("#post-"+t),a=d.find(".column-price .downloadprice-"+t).val();a!=e("#post-"+t+".column-price .downloadprice-"+t).val()?e(".regprice","#edd-download-data").val(a).attr("disabled",!1):e(".regprice","#edd-download-data").val(edd_vars.quick_edit_warning).attr("disabled","disabled")}),e(document.body).on("click","#bulk_edit",function(){var t=e("#bulk-edit"),d=new Array;t.find("#bulk-titles").children().each(function(){d.push(e(this).attr("id").replace(/^(ttle)/i,""))});var a=e('#edd-download-data input[name="_edd_regprice"]').val(),n={action:"edd_save_bulk_edit",edd_bulk_nonce:d,post_ids:d,price:a};e.post(ajaxurl,n)}),e(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),e(".edd-select-chosen .chosen-search input").each(function(){var t=e(this).parent().parent().parent().prev("select.edd-select-chosen"),d=(t.data("search-type"),t.data("search-placeholder"));e(this).attr("placeholder",d)}),e(".chosen-choices").on("click",function(){var t=e(this).parent().prev().data("search-placeholder");"undefined"==typeof t&&(t=edd_vars.type_to_search),e(this).children("li").children("input").attr("placeholder",t)});var c,l=342;e(document.body).on("keyup",".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input",function(t){var d=e(this).val(),a=e(this).closest(".edd-select-chosen"),n=(a.attr("id").replace("_chosen",""),a.prev()),i=a.hasClass("no-bundles"),o=a.hasClass("variations"),r=t.which,s="edd_download_search";if(a.prev().data("search-type")){if("no_ajax"==n.data("search-type"))return;s="edd_"+n.data("search-type")+"_search"}d.length<=3&&"edd_download_search"==s||16==r||13==r||91==r||17==r||37==r||38==r||39==r||40==r||(clearTimeout(c),c=setTimeout(function(){e.ajax({type:"GET",url:ajaxurl,data:{action:s,s:d,no_bundles:i,variations:o},dataType:"json",beforeSend:function(){n.closest("ul.chosen-results").empty()},success:function(t){e("option:not(:selected)",n).remove(),e.each(t,function(t,d){e('option[value="'+d.id+'"]',n).length||n.prepend('<option value="'+d.id+'">'+d.name+"</option>")}),e(".edd-select-chosen").trigger("chosen:updated"),n.next().find("input").val(d)}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(e){})},l))}),e("#post").on("click",".edd-thickbox",function(){e(".edd-select-chosen","#choose-download").css("width","100%")});var p={init:function(){this.revoke_api_key(),this.regenerate_api_key(),this.create_api_key(),this.recount_stats()},revoke_api_key:function(){e(document.body).on("click",".edd-revoke-api-key",function(e){return confirm(edd_vars.revoke_api_key)})},regenerate_api_key:function(){e(document.body).on("click",".edd-regenerate-api-key",function(e){return confirm(edd_vars.regenerate_api_key)})},create_api_key:function(){e(document.body).on("submit","#api-key-generate-form",function(t){var d=e('input[type="text"][name="user_id"]');d.css("border-color","#ddd");var a=d.val();return a.length<1||0==a?(d.css("border-color","#ff0000"),!1):void 0})},recount_stats:function(){e(document.body).on("change","#recount-stats-type",function(){var t=e("#edd-tools-recount-form"),d=e("option:selected",this).data("type"),a=e("#recount-stats-submit"),n=e("#tools-product-dropdown");if(t.find(".notice-wrap").remove(),a.removeClass("button-disabled").attr("disabled",!1),n.hide(),e(".edd-recount-stats-descriptions span").hide(),"recount-download"===d)n.show(),n.find(".edd-select-chosen").css("width","auto");else if("reset-stats"===d){t.append('<div class="notice-wrap"></div>');var i=t.find(".notice-wrap");i.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+edd_vars.reset_stats_warn+"</label></p></div>"),e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}else n.hide(),n.val(0);e("#"+d).show()}),e(document.body).on("change","#confirm-reset",function(){var t=e(this).is(":checked");t?e("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),e("#edd-tools-recount-form").submit(function(t){var d=e("#recount-stats-type").val(),a=e(this),n=e("option:selected",this).data("type");if("reset-stats"===n){var i=e("#confirm-reset").is(":checked");if(i)return!0;r=!0}a.find(".notice-wrap").remove(),a.append('<div class="notice-wrap"></div>');var o=a.find(".notice-wrap"),r=!1;if((null===d||0===d)&&(o.html('<div class="updated error"><p>'+edd_vars.batch_export_no_class+"</p></div>"),r=!0),"recount-download"===n){var s=e('select[name="download_id"]').val();0==s&&(o.html('<div class="updated error"><p>'+edd_vars.batch_export_no_reqs+"</p></div>"),r=!0)}return r?(a.find(".button-disabled").removeClass("button-disabled"),!1):void 0})}};p.init();var u={init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;e(document.body).on("submit",".edd-export-form",function(d){d.preventDefault();var a=e(this).find('input[type="submit"]');if(!a.hasClass("button-disabled")){var n=e(this).serialize();a.addClass("button-disabled"),e(this).find(".notice-wrap").remove(),e(this).append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),t.process_step(1,n,t)}})},process_step:function(t,d,a){e.ajax({type:"POST",url:ajaxurl,data:{form:d,action:"edd_do_ajax_export",step:t},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){var n=e(".edd-export-form").find(".edd-progress").parent().parent(),i=n.find(".notice-wrap");if(n.find(".button-disabled").removeClass("button-disabled"),t.error){var o=t.message;i.html('<div class="updated error"><p>'+o+"</p></div>")}else if(t.success){var r=t.message;i.html('<div id="edd-batch-success" class="updated notice is-dismissible"><p>'+r+'<span class="notice-dismiss"></span></p></div>')}else i.remove(),window.location=t.url}else e(".edd-progress div").animate({width:t.percentage+"%"},50,function(){}),a.process_step(parseInt(t.step),d,a)}}).fail(function(e){window.console&&window.console.log&&console.log(e)})},dismiss_message:function(){e(document.body).on("click","#edd-batch-success .notice-dismiss",function(){e("#edd-batch-success").parent().slideUp("fast")})}};u.init();var _={init:function(){this.submit()},submit:function(){var t=this;e(".edd-import-form").ajaxForm({beforeSubmit:t.before_submit,success:t.success,complete:t.complete,dataType:"json",error:t.error})},before_submit:function(t,d,a){if(d.find(".notice-wrap").remove(),d.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),!(window.File&&window.FileReader&&window.FileList&&window.Blob)){var n=e(".edd-import-form").find(".edd-progress").parent().parent(),i=n.find(".notice-wrap");return n.find(".button-disabled").removeClass("button-disabled"),i.html('<div class="update error"><p>'+edd_vars.unsupported_browser+"</p></div>"),!1}},success:function(e,t,d,a){},complete:function(t){var d=jQuery.parseJSON(t.responseText);if(d.success){var a=e(".edd-import-form .notice-wrap").parent();a.find(".edd-import-file-wrap,.notice-wrap").remove(),a.find(".edd-import-options").slideDown();var n=a.find("select.edd-import-csv-column"),i=(n.parent().parent(),""),o=d.data.columns.sort(function(e,t){return t>e?-1:e>t?1:0});e.each(o,function(e,t){i+='<option value="'+t+'">'+t+"</option>"}),n.append(i),n.on("change",function(){var t=e(this).val();t&&0!=d.data.first_row[t]?e(this).parent().next().html(d.data.first_row[t]):e(this).parent().next().html("")}),e(document.body).on("click",".edd-import-proceed",function(e){e.preventDefault(),a.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),d.data.mapping=a.serialize(),_.process_step(1,d.data,self)})}else _.error(t)},error:function(t){var d=jQuery.parseJSON(t.responseText),a=e(".edd-import-form").find(".edd-progress").parent().parent(),n=a.find(".notice-wrap");a.find(".button-disabled").removeClass("button-disabled"),d.data.error?n.html('<div class="update error"><p>'+d.data.error+"</p></div>"):n.remove()},process_step:function(t,d,a){e.ajax({type:"POST",url:ajaxurl,data:{form:d.form,nonce:d.nonce,"class":d["class"],upload:d.upload,mapping:d.mapping,action:"edd_do_ajax_import",step:t},dataType:"json",success:function(t){if("done"==t.data.step||t.data.error){var n=e(".edd-import-form").find(".edd-progress").parent().parent(),i=n.find(".notice-wrap");n.find(".button-disabled").removeClass("button-disabled"),t.data.error?i.html('<div class="update error"><p>'+t.data.error+"</p></div>"):(n.find(".edd-import-options").hide(),e("html, body").animate({scrollTop:n.parent().offset().top},500),i.html('<div class="updated"><p>'+t.data.message+"</p></div>"))}else e(".edd-progress div").animate({width:t.data.percentage+"%"},50,function(){}),_.process_step(parseInt(t.data.step),d,a)}}).fail(function(e){window.console&&window.console.log&&console.log(e)})}};_.init();var m={vars:{customer_card_wrap_editable:e(".edd-customer-card-wrapper .editable"),customer_card_wrap_edit_item:e(".edd-customer-card-wrapper .edit-item"),user_id:e('input[name="customerinfo[user_id]"]'),state_input:e(':input[name="customerinfo[state]"]'),note:e("#customer-note")},init:function(){this.edit_customer(),this.add_email(),this.user_search(),this.remove_user(),this.cancel_edit(),this.change_country(),this.add_note(),this.delete_checked()},edit_customer:function(){e(document.body).on("click","#edit-customer",function(e){e.preventDefault(),m.vars.customer_card_wrap_editable.hide(),m.vars.customer_card_wrap_edit_item.fadeIn().css("display","block")})},add_email:function(){e(document.body).on("click","#add-customer-email",function(t){t.preventDefault();var d=e(this),a=d.parent();a.parent().find(".notice-wrap").remove(),a.find(".spinner").css("visibility","visible"),d.attr("disabled",!0);var n=a.find('input[name="customer-id"]').val(),i=a.find('input[name="additional-email"]').val(),o=a.find('input[name="make-additional-primary"]').is(":checked"),r=a.find('input[name="add_email_nonce"]').val(),s={edd_action:"customer-add-email",customer_id:n,email:i,primary:o,_wpnonce:r};e.post(ajaxurl,s,function(e){!0===e.success?window.location.href=e.redirect:(d.attr("disabled",!1),
2
- a.after('<div class="notice-wrap"><div class="notice notice-error inline"><p>'+e.message+"</p></div></div>"),a.find(".spinner").css("visibility","hidden"))},"json")})},user_search:function(){e(document.body).on("click.eddSelectUser",".edd_user_search_results a",function(t){t.preventDefault();var d=e(this).data("userid");m.vars.user_id.val(d)})},remove_user:function(){e(document.body).on("click","#disconnect-customer",function(t){t.preventDefault();var d=e('input[name="customerinfo[id]"]').val(),a={edd_action:"disconnect-userid",customer_id:d,_wpnonce:e("#edit-customer-info #_wpnonce").val()};e.post(ajaxurl,a,function(e){window.location.href=window.location.href},"json")})},cancel_edit:function(){e(document.body).on("click","#edd-edit-customer-cancel",function(t){t.preventDefault(),m.vars.customer_card_wrap_edit_item.hide(),m.vars.customer_card_wrap_editable.show(),e(".edd_user_search_results").html("")})},change_country:function(){e('select[name="customerinfo[country]"]').change(function(){var t=e(this),d={action:"edd_get_shop_states",country:t.val(),field_name:"customerinfo[state]"};return e.post(ajaxurl,d,function(e){"nostates"==e?m.vars.state_input.replaceWith('<input type="text" name="'+d.field_name+'" value="" class="edd-edit-toggles medium-text"/>'):m.vars.state_input.replaceWith(e)}),!1})},add_note:function(){e(document.body).on("click","#add-customer-note",function(t){t.preventDefault();var d={edd_action:"add-customer-note",customer_id:e("#customer-id").val(),customer_note:m.vars.note.val(),add_customer_note_nonce:e("#add_customer_note_nonce").val()};if(d.customer_note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-customer-notes").prepend(t),e(".edd-no-customer-notes").hide(),m.vars.note.val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var a=m.vars.note.css("border-color");m.vars.note.css("border-color","red"),setTimeout(function(){m.vars.note.css("border-color",a)},500)}})},delete_checked:function(){e("#edd-customer-delete-confirm").change(function(){var t=e("#edd-customer-delete-records"),d=e("#edd-delete-customer");e(this).prop("checked")?(t.attr("disabled",!1),d.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),d.attr("disabled",!0))})}};m.init(),e(".edd-ajax-user-search").keyup(function(){var t=e(this).val(),d="";e(this).data("exclude")&&(d=e(this).data("exclude")),e(".edd-ajax").show();var a={action:"edd_search_users",user_name:t,exclude:d};document.body.style.cursor="wait",e.ajax({type:"POST",data:a,dataType:"json",url:ajaxurl,success:function(t){e(".edd-ajax").hide(),e(".edd_user_search_results").removeClass("hidden"),e(".edd_user_search_results span").html(""),e(t.results).appendTo(".edd_user_search_results span"),document.body.style.cursor="default"}})}),e(document.body).on("click.eddSelectUser",".edd_user_search_results span a",function(t){t.preventDefault();var d=e(this).data("login");e(".edd-ajax-user-search").val(d),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e(document.body).on("click.eddCancelUserSearch",".edd_user_search_results a.edd-ajax-user-cancel",function(t){t.preventDefault(),e(".edd-ajax-user-search").val(""),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e("#edd_dashboard_sales").length&&e.ajax({type:"GET",data:{action:"edd_load_dashboard_widget"},url:ajaxurl,success:function(t){e("#edd_dashboard_sales .inside").html(t)}}),e(document.body).on("keydown",".customer-note-input",function(t){13==t.keyCode&&(t.metaKey||t.ctrlKey)&&e("#add-customer-note").click()})});var eddFormatCurrency=function(e){var t=parseFloat(e),d=edd_vars.currency,a=edd_vars.currency_decimals;return t.toLocaleString(d,{style:"currency",currency:d,minimumFractionDigits:a,maximumFractionDigits:a})},eddFormatNumber=function(e){var t=parseFloat(e),d=edd_vars.currency;edd_vars.currency_decimals;return t.toLocaleString(d,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})},eddLabelFormatter=function(e,t){return'<div style="font-size:12px; text-align:center; padding:2px">'+e+"</div>"},eddLegendFormatterSales=function(e,t){var d=e.toLowerCase().replace(/\s/g,"-"),a='<div class="edd-legend-color" style="background-color: '+t.color+'"></div>',n='<div class="edd-pie-legend-item">'+e+": "+Math.round(t.percent)+"% ("+eddFormatNumber(t.data[0][1])+")</div>",i='<div id="'+t.edd_vars.id+d+'" class="edd-legend-item-wrapper">'+a+n+"</div>";return jQuery("#edd-pie-legend-"+t.edd_vars.id).append(i),i},eddLegendFormatterEarnings=function(e,t){var d=e.toLowerCase().replace(/\s/g,"-"),a='<div class="edd-legend-color" style="background-color: '+t.color+'"></div>',n='<div class="edd-pie-legend-item">'+e+": "+Math.round(t.percent)+"% ("+eddFormatCurrency(t.data[0][1])+")</div>",i='<div id="'+t.edd_vars.id+d+'" class="edd-legend-item-wrapper">'+a+n+"</div>";return jQuery("#edd-pie-legend-"+t.edd_vars.id).append(i),i};
1
+ jQuery(document).ready(function(e){edd_attach_tooltips(e(".edd-help-tip"));var t={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone_repeatable:function(t){var d=highest=1;return t.parent().find(".edd_repeatable_row").each(function(){var t=e(this).data("key");parseInt(t)>highest&&(highest=t)}),d=highest+=1,clone=t.clone(),clone.removeClass("edd_add_blank"),clone.attr("data-key",d),clone.find("input, select, textarea").val("").each(function(){var t=e(this).attr("name"),a=e(this).attr("id");t&&(t=t.replace(/\[(\d+)\]/,"["+parseInt(d)+"]"),e(this).attr("name",t)),e(this).attr("data-key",d),void 0!==a&&(a=a.replace(/(\d+)/,parseInt(d)),e(this).attr("id",a))}),clone.find("select").each(function(){e(this).val(t.find('select[name="'+e(this).attr("name")+'"]').val())}),clone.find('input[type="checkbox"]').each(function(){e(this).is(":checked")&&e(this).prop("checked",!1),e(this).val(1)}),clone.find("span.edd_price_id").each(function(){e(this).text(parseInt(d))}),clone.find("span.edd_file_id").each(function(){e(this).text(parseInt(d))}),clone.find(".edd_repeatable_default_input").each(function(){e(this).val(parseInt(d)).removeAttr("checked")}),clone.find(".edd_repeatable_condition_field").each(function(){e(this).find("option:eq(0)").prop("selected","selected")}),clone.find(".search-choice").remove(),clone.find(".chosen-container").remove(),edd_attach_tooltips(clone.find(".edd-help-tip")),clone},add:function(){e(document.body).on("click",".submit .edd_add_repeatable",function(d){d.preventDefault();var a=e(this).parent().parent().prev(".edd_repeatable_row"),n=t.clone_repeatable(a);n.insertAfter(a).find("input, textarea, select").filter(":visible").eq(0).focus(),n.find(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),n.find(".edd-select-chosen").css("width","100%"),n.find(".edd-select-chosen .chosen-search input").attr("placeholder",edd_vars.search_placeholder)})},move:function(){e(".edd_repeatable_table .edd-repeatables-wrap").sortable({handle:".edd-draghandle-anchor",items:".edd_repeatable_row",opacity:.6,cursor:"move",axis:"y",update:function(){var t=0;e(this).find(".edd_repeatable_row").each(function(){e(this).find("input.edd_repeatable_index").each(function(){e(this).val(t)}),t++})}})},remove:function(){e(document.body).on("click",".edd-remove-row, .edd_remove_repeatable",function(t){t.preventDefault();var d,a=e(this).parents(".edd_repeatable_row"),n=a.parent().find(".edd_repeatable_row").length,i=e(this).data("type"),o="div.edd_repeatable_"+i+"s";if(d=(e(this).is(".ui-sortable .edd_repeatable_row:first-child .edd-remove-row, .ui-sortable .edd_repeatable_row:first-child .edd_remove_repeatable")?a.next(".edd_repeatable_row"):a.prev(".edd_repeatable_row")).find("select, input, textarea, button").filter(":visible").eq(0),"price"===i){var r=a.data("key");e('.edd_repeatable_condition_field option[value="'+r+'"]').remove()}if(n>1)e("input, select",a).val(""),a.fadeOut("fast").remove(),d.focus();else switch(i){case"price":alert(edd_vars.one_price_min);break;case"file":e("input, select",a).val("");break;default:alert(edd_vars.one_field_min)}e(o).each(function(t){e(this).find("input, select").each(function(){var d=e(this).attr("name");d=d.replace(/\[(\d+)\]/,"["+t+"]"),e(this).attr("name",d).attr("id",d)})})})},type:function(){e(document.body).on("change","#_edd_product_type",function(t){var d=e("#edd_products"),a=e("#edd_download_files"),n=e("#edd_download_limit_wrap");"bundle"===e(this).val()?(d.show(),a.hide(),n.hide()):(d.hide(),a.show(),n.show())})},prices:function(){e(document.body).on("change","#edd_variable_pricing",function(t){var d=e(this).is(":checked"),a=e("#edd_regular_price_field"),n=e("#edd_variable_price_fields, .edd_repeatable_table .pricing"),i=e(".edd-bundled-product-row, .edd-repeatable-row-standard-fields");d?(a.hide(),n.show(),i.addClass("has-variable-pricing")):(a.show(),n.hide(),i.removeClass("has-variable-pricing"))})},files:function(){var d;window.formfield="",e(document.body).on("click",".edd_upload_file_button",function(a){a.preventDefault();var n=e(this);window.formfield=e(this).closest(".edd_repeatable_upload_wrapper"),d?d.open():((d=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:n.data("uploader-title"),button:{text:n.data("uploader-button-text")},multiple:"0"!=e(this).data("multiple")})).on("menu:render:default",function(e){e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set({})}),d.on("insert",function(){d.state().get("selection").each(function(d,a){var n="image"===(d=d.toJSON()).type&&e(".attachment-display-settings .size option:selected").val(),i=d.url,o=d.title.length>0?d.title:d.filename;if(n&&void 0!==d.sizes[n]&&(i=d.sizes[n].url),"image"===d.type&&(o=n&&void 0!==d.sizes[n]?o+"-"+d.sizes[n].width+"x"+d.sizes[n].height:o+"-"+d.width+"x"+d.height),0===a)window.formfield.find(".edd_repeatable_attachment_id_field").val(d.id),window.formfield.find(".edd_repeatable_thumbnail_size_field").val(n),window.formfield.find(".edd_repeatable_upload_field").val(i),window.formfield.find(".edd_repeatable_name_field").val(o);else{var r=window.formfield,s=t.clone_repeatable(r);s.find(".edd_repeatable_attachment_id_field").val(d.id),s.find(".edd_repeatable_thumbnail_size_field").val(n),s.find(".edd_repeatable_upload_field").val(i),s.find(".edd_repeatable_name_field").val(o),s.insertAfter(r)}})}),d.open())}),window.formfield=""},updatePrices:function(){e("#edd_price_fields").on("keyup",".edd_variable_prices_name",function(){var t=e(this).parents(".edd_repeatable_row").data("key"),d=e(this).val(),a=e(".edd_repeatable_condition_field option[value="+t+"]");a.length>0?a.text(d):e(".edd_repeatable_condition_field").append(e("<option></option>").attr("value",t).text(d))})}};e(document.body).on("click",".toggle-custom-price-option-section",function(t){t.preventDefault();var d=e(this).html()==edd_vars.show_advanced_settings;d?e(this).html(edd_vars.hide_advanced_settings):e(this).html(edd_vars.show_advanced_settings);var a=e(this).parents(".edd-repeatable-row-header");a.siblings(".edd-custom-price-option-sections-wrap").slideToggle(),e(":input:not(input[type=button],input[type=submit],button):visible:first",d?a.siblings(".edd-custom-price-option-sections-wrap"):a.siblings(".edd-repeatable-row-standard-fields")).focus()}),t.init();var d,a=e(".edd_datepicker");if(a.length>0){a.datepicker({dateFormat:"mm/dd/yy"})}({init:function(){this.edit_address(),this.remove_download(),this.add_download(),this.change_customer(),this.new_customer(),this.edit_price(),this.recalculate_total(),this.variable_prices_check(),this.add_note(),this.remove_note(),this.resend_receipt(),this.copy_download_link()},edit_address:function(){e('select[name="edd-payment-address[0][country]"]').change(function(){var t={action:"edd_get_shop_states",country:e(this).val(),field_name:"edd-payment-address[0][state]"};return e.post(ajaxurl,t,function(t){var d=e("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input");e("#edd-order-address-state-wrap .chosen-container").remove(),"nostates"==t?d.replaceWith('<input type="text" name="edd-payment-address[0][state]" value="" class="edd-edit-toggles medium-text"/>'):d.replaceWith(t)}),!1})},remove_download:function(){e("#edd-purchased-files").on("click",".edd-order-remove-download",function(){if(1===e(document.body).find("#edd-purchased-files > .row:not(.header)").length)return alert(edd_vars.one_download_min),!1;if(confirm(edd_vars.delete_payment_download)){var t=e(this).data("key"),d=(e(".edd-payment-id").val(),e('input[name="edd-payment-details-downloads['+t+'][id]"]').val()),a=e('input[name="edd-payment-details-downloads['+t+'][price_id]"]').val(),n=e('input[name="edd-payment-details-downloads['+t+'][quantity]"]').val(),i=e('input[name="edd-payment-details-downloads['+t+'][amount]"]').val();if(e('input[name="edd-payment-details-downloads['+t+'][tax]"]'))var o=e('input[name="edd-payment-details-downloads['+t+'][tax]"]').val();if(e('input[name="edd-payment-details-downloads['+t+'][fees]"]'))o=e.parseJSON(e('input[name="edd-payment-details-downloads['+t+'][fees]"]').val());var r=e('input[name="edd-payment-removed"]').val();(r=e.parseJSON(r)).length<1&&(r={});var s=[{id:d,price_id:a,quantity:n,amount:i,cart_index:t}];r[t]=s,e('input[name="edd-payment-removed"]').val(JSON.stringify(r)),e(this).parent().parent().remove(),o&&o.length&&e.each(o,function(t,d){e('*li[data-fee-id="'+d+'"]').remove()}),e("#edd-payment-downloads-changed").val(1),e(".edd-order-payment-recalc-totals").show()}return!1})},change_customer:function(){e("#edd-customer-details").on("click",".edd-payment-change-customer, .edd-payment-change-customer-cancel",function(t){t.preventDefault();var d=e(this).hasClass("edd-payment-change-customer"),a=e(this).hasClass("edd-payment-change-customer-cancel");d?(e(".customer-info").hide(),e(".change-customer").show(),e(".edd-payment-change-customer-input").css("width","auto")):a&&(e(".customer-info").show(),e(".change-customer").hide())})},new_customer:function(){e("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(t){t.preventDefault();var d=e(this).hasClass("edd-payment-new-customer"),a=e(this).hasClass("edd-payment-new-customer-cancel");d?(e(".customer-info").hide(),e(".new-customer").show()):a&&(e(".customer-info").show(),e(".new-customer").hide());d=e("#edd-new-customer");e(".new-customer").is(":visible")?d.val(1):d.val(0)})},add_download:function(){e(".edd-edit-purchase-element").on("click","#edd-order-add-download",function(t){t.preventDefault();var d=e("#edd_order_download_select"),a=e("#edd-order-download-quantity"),n=e("#edd-order-download-price"),i=e("#edd-order-download-tax"),o=e(".edd_price_options_select option:selected"),r=d.val(),s=d.find(":selected").text(),c=a.val(),l=n.val(),p=i.val(),u=o.val(),_=o.text();if(r<1)return!1;if(l||(l=0),l=parseFloat(l),isNaN(l))return alert(edd_vars.numeric_item_price),!1;if(p=parseFloat(p),isNaN(p))return alert(edd_vars.numeric_item_tax),!1;if(isNaN(parseInt(c)))return alert(edd_vars.numeric_quantity),!1;_&&(s=s+" - "+_);var m=e("#edd-purchased-files div.row").length,f=e("#edd-purchased-files div.row:last").clone();f.find(".download span").html('<a href="post.php?post='+r+'&action=edit"></a>'),f.find(".download span a").text(s),f.find(".edd-payment-details-download-item-price").val(l.toFixed(edd_vars.currency_decimals)),f.find(".edd-payment-details-download-item-tax").val(p.toFixed(edd_vars.currency_decimals)),f.find("input.edd-payment-details-download-id").val(r),f.find("input.edd-payment-details-download-price-id").val(u);var h=l*c+p;h=h.toFixed(edd_vars.currency_decimals),f.find("span.edd-payment-details-download-amount").text(h),f.find("input.edd-payment-details-download-amount").val(h),f.find("input.edd-payment-details-download-quantity").val(c),f.find("input.edd-payment-details-download-has-log").val(0),f.find(".edd-copy-download-link-wrapper").remove(),f.find("input").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(m)+"]"),e(this).attr("name",t).attr("id",t)}),f.find("a.edd-order-remove-download").attr("data-key",parseInt(m)),e("#edd-payment-downloads-changed").val(1),e(f).insertAfter("#edd-purchased-files div.row:last"),e(".edd-order-payment-recalc-totals").show(),e(".edd-add-download-field").val("")})},edit_price:function(){e(document.body).on("change keyup",".edd-payment-item-input",function(){var t=e(this).parents("ul.edd-purchased-files-list-wrapper");e(".edd-order-payment-recalc-totals").show();var d=t.find("input.edd-payment-details-download-quantity").val().replace(edd_vars.thousands_separator,""),a=t.find("input.edd-payment-details-download-item-price").val().replace(edd_vars.thousands_separator,""),n=t.find("input.edd-payment-details-download-item-tax").val().replace(edd_vars.thousands_separator,"");if(a=parseFloat(a),isNaN(a))return alert(edd_vars.numeric_item_price),!1;n=parseFloat(n),isNaN(n)&&(n=0),isNaN(parseInt(d))&&(d=1);var i=a*d+n;i=i.toFixed(edd_vars.currency_decimals),t.find("input.edd-payment-details-download-amount").val(i),t.find("span.edd-payment-details-download-amount").text(i)})},recalculate_total:function(){e("#edd-order-recalc-total").on("click",function(t){t.preventDefault();var d=0,a=0,n=e("#edd-purchased-files .row input.edd-payment-details-download-amount"),i=e("#edd-purchased-files .row input.edd-payment-details-download-item-tax");n.length&&n.each(function(){d+=parseFloat(e(this).val())}),i.length&&i.each(function(){a+=parseFloat(e(this).val())}),e(".edd-payment-fees").length&&e(".edd-payment-fees span.fee-amount").each(function(){d+=parseFloat(e(this).data("fee"))}),e("input[name=edd-payment-total]").val(d.toFixed(edd_vars.currency_decimals)),e("input[name=edd-payment-tax]").val(a.toFixed(edd_vars.currency_decimals))})},variable_prices_check:function(){e(".edd-edit-purchase-element").on("change","select#edd_order_download_select",function(){var t=e(this),d=t.val();if(parseInt(d)>0){var a={action:"edd_check_for_download_price_variations",download_id:d};e.ajax({type:"POST",data:a,url:ajaxurl,success:function(d){e(".edd_price_options_select").remove(),e(d).insertAfter(t.next())}}).fail(function(e){window.console&&window.console.log&&console.log(e)})}})},add_note:function(){e("#edd-add-payment-note").on("click",function(t){t.preventDefault();var d={action:"edd_insert_payment_note",payment_id:e(this).data("payment-id"),note:e("#edd-payment-note").val()};if(d.note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-payment-notes-inner").append(t),e(".edd-no-payment-notes").hide(),e("#edd-payment-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var a=e("#edd-payment-note").css("border-color");e("#edd-payment-note").css("border-color","red"),setTimeout(function(){e("#edd-payment-note").css("border-color",a)},500)}})},remove_note:function(){e(document.body).on("click",".edd-delete-payment-note",function(t){if(t.preventDefault(),confirm(edd_vars.delete_payment_note)){var d={action:"edd_delete_payment_note",payment_id:e(this).data("payment-id"),note_id:e(this).data("note-id")};return e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){return e("#edd-payment-note-"+d.note_id).remove(),e(".edd-payment-note").length||e(".edd-no-payment-notes").show(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!0}})},resend_receipt:function(){var t=e(".edd-order-resend-receipt-addresses");e(document.body).on("click","#edd-select-receipt-email",function(e){e.preventDefault(),t.slideDown()}),e(document.body).on("change",".edd-order-resend-receipt-email",function(){var t=e("#edd-select-receipt-email").prop("href")+"&email="+e(this).val();confirm(edd_vars.resend_receipt)&&(window.location=t)}),e(document.body).on("click","#edd-resend-receipt",function(e){return confirm(edd_vars.resend_receipt)})},copy_download_link:function(){e(document.body).on("click",".edd-copy-download-link",function(t){t.preventDefault();var d=e(this),a={action:"edd_get_file_download_link",payment_id:e('input[name="edd_payment_id"]').val(),download_id:d.data("download-id"),price_id:d.data("price-id")};e.ajax({type:"POST",data:a,url:ajaxurl,success:function(t){return e("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+t+"</textarea>"),e("#edd-download-link-textarea").focus().select(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)})})}}).init(),{init:function(){this.type_select(),this.product_requirements()},type_select:function(){e("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){var t=e(this).val();e(".edd-amount-description").hide(),e(".edd-amount-description."+t+"-discount").show()})},product_requirements:function(){e("#products").change(function(){var t=e("#edd-discount-product-conditions");e(this).val()?t.show():t.hide()})}}.init(),{init:function(){this.date_options(),this.customers_export()},date_options:function(){e("#edd-graphs-date-options").change(function(){var t=e(this),d=e("#edd-date-range-options");"other"===t.val()?d.show():d.hide()})},customers_export:function(){e("#edd_customer_export_download").change(function(){var t=e(this),d=e("option:selected",t).val(),a=e("#edd_customer_export_option");if("0"===t.val()?a.show():a.hide(),0!=parseInt(d)){var n={action:"edd_check_for_download_price_variations",download_id:d,all_prices:!0},i=e(".edd_price_options_select");e.post(ajaxurl,n,function(t){i.remove(),e("#edd_customer_export_download_chosen").after(t)})}else i.remove()})}}.init(),{init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){var t=e(".edd-color-picker");if(t.length&&t.wpColorPicker(),"undefined"==typeof wp||"1"!==edd_vars.new_media_ui){var d=e(".edd_settings_upload_button");d.length>0&&(window.formfield="",e(document.body).on("click",d,function(t){t.preventDefault(),window.formfield=e(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),tb_show(edd_vars.add_new_download,"media-upload.php?TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(t){window.formfield?(imgurl=e("a","<div>"+t+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(t),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1})}else{var a;window.formfield="",e(document.body).on("click",".edd_settings_upload_button",function(t){t.preventDefault();var d=e(this);window.formfield=e(this).parent().prev(),a?a.open():((a=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:d.data("uploader_title"),button:{text:d.data("uploader_button_text")},multiple:!1})).on("menu:render:default",function(e){e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set({})}),a.on("insert",function(){a.state().get("selection").each(function(e,t){e=e.toJSON(),window.formfield.val(e.url)})}),a.open())}),window.formfield=""}},taxes:function(){var t=e("select.edd-no-states");t.length&&t.closest("tr").addClass("hidden"),e('select[name="edd_settings[base_country]"]').change(function(){var t=e(this).closest("tr"),d={action:"edd_get_shop_states",country:e(this).val(),field_name:"edd_settings[base_state]"};return e.post(ajaxurl,d,function(e){"nostates"==e?t.next().addClass("hidden"):(t.next().removeClass("hidden"),t.next().find("select").replaceWith(e))}),!1}),e(document.body).on("change","#edd_tax_rates select.edd-tax-country",function(){var t=e(this),d={action:"edd_get_shop_states",country:e(this).val(),field_name:t.attr("name").replace("country","state")};return e.post(ajaxurl,d,function(e){if("nostates"==e){var a='<input type="text" name="'+d.field_name+'" value=""/>';t.parent().next().find("select").replaceWith(a)}else t.parent().next().find("input,select").show(),t.parent().next().find("input,select").replaceWith(e)}),!1}),e("#edd_add_tax_rate").on("click",function(){var t=e("#edd_tax_rates tr:last"),d=t.clone(),a=t.parent().find("tr").length;return d.find("td input").not(":input[type=checkbox]").val(""),d.find('td [type="checkbox"]').attr("checked",!1),d.find("input, select").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(a)+"]"),e(this).attr("name",t).attr("id",t)}),d.find("label").each(function(){var t=e(this).attr("for");t=t.replace(/\[(\d+)\]/,"["+parseInt(a)+"]"),e(this).attr("for",t)}),d.insertAfter(t),!1}),e(document.body).on("click","#edd_tax_rates .edd_remove_tax_rate",function(){confirm(edd_vars.delete_tax_rate)&&(2===e("#edd_tax_rates tr:visible").length?(e("#edd_tax_rates select").val(""),e('#edd_tax_rates input[type="text"]').val(""),e('#edd_tax_rates input[type="number"]').val(""),e('#edd_tax_rates input[type="checkbox"]').attr("checked",!1)):e(this).closest("tr").remove(),e("#edd_tax_rates tr").each(function(t){e(this).children().find("input, select").each(function(){var d=e(this).attr("name");d=d.replace(/\[(\d+)\]/,"["+(t-1)+"]"),e(this).attr("name",d).attr("id",d)})}));return!1})},emails:function(){var t=e("#email-preview-wrap");if(t.length){var d=e("#email-preview");t.colorbox({inline:!0,href:d,width:"80%",height:"auto"})}},misc:function(){var t=e('select[name="edd_settings[download_method]"]'),d=t.parent().parent().next();"direct"==t.val()&&(d.hide(),d.find("input").prop("checked",!1)),t.on("change",function(){"direct"==e(this).val()?(d.hide(),d.find("input").prop("checked",!1)):d.show()})}}.init(),e(".download_page_edd-payment-history .row-actions .delete a, a.edd-delete-payment").on("click",function(){return!!confirm(edd_vars.delete_payment)}),e("body").on("click","#the-list .editinline",function(){var t=e(this).closest("tr").attr("id");t=t.replace("post-","");var d=e("#post-"+t).find(".column-price .downloadprice-"+t).val();d!=e("#post-"+t+".column-price .downloadprice-"+t).val()?e(".regprice","#edd-download-data").val(d).attr("disabled",!1):e(".regprice","#edd-download-data").val(edd_vars.quick_edit_warning).attr("disabled","disabled")}),e(document.body).on("click","#bulk_edit",function(){var t=e("#bulk-edit"),d=new Array;t.find("#bulk-titles").children().each(function(){d.push(e(this).attr("id").replace(/^(ttle)/i,""))});var a=e('#edd-download-data input[name="_edd_regprice"]').val(),n={action:"edd_save_bulk_edit",edd_bulk_nonce:d,post_ids:d,price:a};e.post(ajaxurl,n)}),e(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),e(".edd-select-chosen .chosen-search input").each(function(){var t=e(this).parent().parent().parent().prev("select.edd-select-chosen"),d=(t.data("search-type"),t.data("search-placeholder"));e(this).attr("placeholder",d)}),e(".chosen-choices").on("click",function(){var t=e(this).parent().prev().data("search-placeholder");void 0===t&&(t=edd_vars.type_to_search),e(this).children("li").children("input").attr("placeholder",t)});e(document.body).on("keyup",".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input",function(t){var a=e(this).val(),n=e(this).closest(".edd-select-chosen"),i=(n.attr("id").replace("_chosen",""),n.prev()),o=n.hasClass("no-bundles"),r=n.hasClass("variations"),s=t.which,c="edd_download_search";if(n.prev().data("search-type")){if("no_ajax"==i.data("search-type"))return;c="edd_"+i.data("search-type")+"_search"}a.length<=3&&"edd_download_search"==c||16==s||13==s||91==s||17==s||37==s||38==s||39==s||40==s||(clearTimeout(d),d=setTimeout(function(){e.ajax({type:"GET",url:ajaxurl,data:{action:c,s:a,no_bundles:o,variations:r},dataType:"json",beforeSend:function(){i.closest("ul.chosen-results").empty()},success:function(t){e("option:not(:selected)",i).remove(),e.each(t,function(t,d){e('option[value="'+d.id+'"]',i).length||i.prepend('<option value="'+d.id+'">'+d.name+"</option>")}),e(".edd-select-chosen").trigger("chosen:updated"),i.next().find("input").val(a)}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(e){})},342))}),e("#post").on("click",".edd-thickbox",function(){e(".edd-select-chosen","#choose-download").css("width","100%")}),{init:function(){this.revoke_api_key(),this.regenerate_api_key(),this.create_api_key(),this.recount_stats()},revoke_api_key:function(){e(document.body).on("click",".edd-revoke-api-key",function(e){return confirm(edd_vars.revoke_api_key)})},regenerate_api_key:function(){e(document.body).on("click",".edd-regenerate-api-key",function(e){return confirm(edd_vars.regenerate_api_key)})},create_api_key:function(){e(document.body).on("submit","#api-key-generate-form",function(t){var d=e('input[type="text"][name="user_id"]');d.css("border-color","#ddd");var a=d.val();if(a.length<1||0==a)return d.css("border-color","#ff0000"),!1})},recount_stats:function(){e(document.body).on("change","#recount-stats-type",function(){var t=e("#edd-tools-recount-form"),d=e("option:selected",this).data("type"),a=e("#recount-stats-submit"),n=e("#tools-product-dropdown");if(t.find(".notice-wrap").remove(),a.removeClass("button-disabled").attr("disabled",!1),n.hide(),e(".edd-recount-stats-descriptions span").hide(),"recount-download"===d)n.show(),n.find(".edd-select-chosen").css("width","auto");else if("reset-stats"===d){t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+edd_vars.reset_stats_warn+"</label></p></div>"),e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}else n.hide(),n.val(0);e("#"+d).show()}),e(document.body).on("change","#confirm-reset",function(){e(this).is(":checked")?e("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),e("#edd-tools-recount-form").submit(function(t){var d=e("#recount-stats-type").val(),a=e(this),n=e("option:selected",this).data("type");if("reset-stats"===n){if(e("#confirm-reset").is(":checked"))return!0;o=!0}a.find(".notice-wrap").remove(),a.append('<div class="notice-wrap"></div>');var i=a.find(".notice-wrap"),o=!1;(null!==d&&0!==d||(i.html('<div class="updated error"><p>'+edd_vars.batch_export_no_class+"</p></div>"),o=!0),"recount-download"===n)&&(0==e('select[name="download_id"]').val()&&(i.html('<div class="updated error"><p>'+edd_vars.batch_export_no_reqs+"</p></div>"),o=!0));if(o)return a.find(".button-disabled").removeClass("button-disabled"),!1})}}.init(),{init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;e(document.body).on("submit",".edd-export-form",function(d){d.preventDefault();var a=e(this).find('input[type="submit"]');if(!a.hasClass("button-disabled")){var n=e(this).serialize();a.addClass("button-disabled"),e(this).find(".notice-wrap").remove(),e(this).append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),t.process_step(1,n,t)}})},process_step:function(t,d,a){e.ajax({type:"POST",url:ajaxurl,data:{form:d,action:"edd_do_ajax_export",step:t},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){var n=e(".edd-export-form").find(".edd-progress").parent().parent(),i=n.find(".notice-wrap");if(n.find(".button-disabled").removeClass("button-disabled"),t.error){var o=t.message;i.html('<div class="updated error"><p>'+o+"</p></div>")}else if(t.success){var r=t.message;i.html('<div id="edd-batch-success" class="updated notice is-dismissible"><p>'+r+'<span class="notice-dismiss"></span></p></div>')}else i.remove(),window.location=t.url}else e(".edd-progress div").animate({width:t.percentage+"%"},50,function(){}),a.process_step(parseInt(t.step),d,a)}}).fail(function(e){window.console&&window.console.log&&console.log(e)})},dismiss_message:function(){e(document.body).on("click","#edd-batch-success .notice-dismiss",function(){e("#edd-batch-success").parent().slideUp("fast")})}}.init();var n={init:function(){this.submit()},submit:function(){e(".edd-import-form").ajaxForm({beforeSubmit:this.before_submit,success:this.success,complete:this.complete,dataType:"json",error:this.error})},before_submit:function(t,d,a){if(d.find(".notice-wrap").remove(),d.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),!(window.File&&window.FileReader&&window.FileList&&window.Blob)){var n=e(".edd-import-form").find(".edd-progress").parent().parent(),i=n.find(".notice-wrap");return n.find(".button-disabled").removeClass("button-disabled"),i.html('<div class="update error"><p>'+edd_vars.unsupported_browser+"</p></div>"),!1}},success:function(e,t,d,a){},complete:function(t){var d=jQuery.parseJSON(t.responseText);if(d.success){var a=e(".edd-import-form .notice-wrap").parent();a.find(".edd-import-file-wrap,.notice-wrap").remove(),a.find(".edd-import-options").slideDown();var i=a.find("select.edd-import-csv-column"),o=(i.parent().parent(),""),r=d.data.columns.sort(function(e,t){return e<t?-1:e>t?1:0});e.each(r,function(e,t){o+='<option value="'+t+'">'+t+"</option>"}),i.append(o),i.on("change",function(){var t=e(this).val();t&&0!=d.data.first_row[t]?e(this).parent().next().html(d.data.first_row[t]):e(this).parent().next().html("")}),e(document.body).on("click",".edd-import-proceed",function(e){e.preventDefault(),a.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),d.data.mapping=a.serialize(),n.process_step(1,d.data,self)})}else n.error(t)},error:function(t){var d=jQuery.parseJSON(t.responseText),a=e(".edd-import-form").find(".edd-progress").parent().parent(),n=a.find(".notice-wrap");a.find(".button-disabled").removeClass("button-disabled"),d.data.error?n.html('<div class="update error"><p>'+d.data.error+"</p></div>"):n.remove()},process_step:function(t,d,a){e.ajax({type:"POST",url:ajaxurl,data:{form:d.form,nonce:d.nonce,class:d.class,upload:d.upload,mapping:d.mapping,action:"edd_do_ajax_import",step:t},dataType:"json",success:function(t){if("done"==t.data.step||t.data.error){var i=e(".edd-import-form").find(".edd-progress").parent().parent(),o=i.find(".notice-wrap");i.find(".button-disabled").removeClass("button-disabled"),t.data.error?o.html('<div class="update error"><p>'+t.data.error+"</p></div>"):(i.find(".edd-import-options").hide(),e("html, body").animate({scrollTop:i.parent().offset().top},500),o.html('<div class="updated"><p>'+t.data.message+"</p></div>"))}else e(".edd-progress div").animate({width:t.data.percentage+"%"},50,function(){}),n.process_step(parseInt(t.data.step),d,a)}}).fail(function(e){window.console&&window.console.log&&console.log(e)})}};n.init();var i={vars:{customer_card_wrap_editable:e(".edd-customer-card-wrapper .editable"),customer_card_wrap_edit_item:e(".edd-customer-card-wrapper .edit-item"),user_id:e('input[name="customerinfo[user_id]"]'),state_input:e(':input[name="customerinfo[state]"]'),note:e("#customer-note")},init:function(){this.edit_customer(),this.add_email(),this.user_search(),this.remove_user(),this.cancel_edit(),this.change_country(),this.add_note(),this.delete_checked()},edit_customer:function(){e(document.body).on("click","#edit-customer",function(e){e.preventDefault(),i.vars.customer_card_wrap_editable.hide(),i.vars.customer_card_wrap_edit_item.fadeIn().css("display","block")})},add_email:function(){e(document.body).on("click","#add-customer-email",function(t){t.preventDefault();var d=e(this),a=d.parent();a.parent().find(".notice-wrap").remove(),a.find(".spinner").css("visibility","visible"),d.attr("disabled",!0);var n={edd_action:"customer-add-email",customer_id:a.find('input[name="customer-id"]').val(),email:a.find('input[name="additional-email"]').val(),primary:a.find('input[name="make-additional-primary"]').is(":checked"),_wpnonce:a.find('input[name="add_email_nonce"]').val()};e.post(ajaxurl,n,function(e){!0===e.success?window.location.href=e.redirect:(d.attr("disabled",!1),a.after('<div class="notice-wrap"><div class="notice notice-error inline"><p>'+e.message+"</p></div></div>"),a.find(".spinner").css("visibility","hidden"))},"json")})},user_search:function(){e(document.body).on("click.eddSelectUser",".edd_user_search_results a",function(t){t.preventDefault();var d=e(this).data("userid");i.vars.user_id.val(d)})},remove_user:function(){e(document.body).on("click","#disconnect-customer",function(t){t.preventDefault();var d={edd_action:"disconnect-userid",customer_id:e('input[name="customerinfo[id]"]').val(),_wpnonce:e("#edit-customer-info #_wpnonce").val()};e.post(ajaxurl,d,function(e){window.location.href=window.location.href},"json")})},cancel_edit:function(){e(document.body).on("click","#edd-edit-customer-cancel",function(t){t.preventDefault(),i.vars.customer_card_wrap_edit_item.hide(),i.vars.customer_card_wrap_editable.show(),e(".edd_user_search_results").html("")})},change_country:function(){e('select[name="customerinfo[country]"]').change(function(){var t={action:"edd_get_shop_states",country:e(this).val(),field_name:"customerinfo[state]"};return e.post(ajaxurl,t,function(e){"nostates"==e?i.vars.state_input.replaceWith('<input type="text" name="'+t.field_name+'" value="" class="edd-edit-toggles medium-text"/>'):i.vars.state_input.replaceWith(e)}),!1})},add_note:function(){e(document.body).on("click","#add-customer-note",function(t){t.preventDefault();var d={edd_action:"add-customer-note",customer_id:e("#customer-id").val(),customer_note:i.vars.note.val(),add_customer_note_nonce:e("#add_customer_note_nonce").val()};if(d.customer_note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-customer-notes").prepend(t),e(".edd-no-customer-notes").hide(),i.vars.note.val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var a=i.vars.note.css("border-color");i.vars.note.css("border-color","red"),setTimeout(function(){i.vars.note.css("border-color",a)},500)}})},delete_checked:function(){e("#edd-customer-delete-confirm").change(function(){var t=e("#edd-customer-delete-records"),d=e("#edd-delete-customer");e(this).prop("checked")?(t.attr("disabled",!1),d.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),d.attr("disabled",!0))})}};i.init(),e(".edd-ajax-user-search").keyup(function(){var t=e(this).val(),d="";e(this).data("exclude")&&(d=e(this).data("exclude")),e(".edd-ajax").show();var a={action:"edd_search_users",user_name:t,exclude:d};document.body.style.cursor="wait",e.ajax({type:"POST",data:a,dataType:"json",url:ajaxurl,success:function(t){e(".edd-ajax").hide(),e(".edd_user_search_results").removeClass("hidden"),e(".edd_user_search_results span").html(""),e(t.results).appendTo(".edd_user_search_results span"),document.body.style.cursor="default"}})}),e(document.body).on("click.eddSelectUser",".edd_user_search_results span a",function(t){t.preventDefault();var d=e(this).data("login");e(".edd-ajax-user-search").val(d),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e(document.body).on("click.eddCancelUserSearch",".edd_user_search_results a.edd-ajax-user-cancel",function(t){t.preventDefault(),e(".edd-ajax-user-search").val(""),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e("#edd_dashboard_sales").length&&e.ajax({type:"GET",data:{action:"edd_load_dashboard_widget"},url:ajaxurl,success:function(t){e("#edd_dashboard_sales .inside").html(t)}}),e(document.body).on("keydown",".customer-note-input",function(t){13==t.keyCode&&(t.metaKey||t.ctrlKey)&&e("#add-customer-note").click()})});var eddFormatCurrency=function(e){var t=parseFloat(e),d=edd_vars.currency,a=edd_vars.currency_decimals;return t.toLocaleString(d,{style:"currency",currency:d,minimumFractionDigits:a,maximumFractionDigits:a})},eddFormatNumber=function(e){var t=parseFloat(e),d=edd_vars.currency;edd_vars.currency_decimals;return t.toLocaleString(d,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})},eddLabelFormatter=function(e,t){return'<div style="font-size:12px; text-align:center; padding:2px">'+e+"</div>"},eddLegendFormatterSales=function(e,t){var d=e.toLowerCase().replace(/\s/g,"-"),a='<div class="edd-legend-color" style="background-color: '+t.color+'"></div>',n='<div class="edd-pie-legend-item">'+e+": "+Math.round(t.percent)+"% ("+eddFormatNumber(t.data[0][1])+")</div>",i='<div id="'+t.edd_vars.id+d+'" class="edd-legend-item-wrapper">'+a+n+"</div>";return jQuery("#edd-pie-legend-"+t.edd_vars.id).append(i),i},eddLegendFormatterEarnings=function(e,t){var d=e.toLowerCase().replace(/\s/g,"-"),a='<div class="edd-legend-color" style="background-color: '+t.color+'"></div>',n='<div class="edd-pie-legend-item">'+e+": "+Math.round(t.percent)+"% ("+eddFormatCurrency(t.data[0][1])+")</div>",i='<div id="'+t.edd_vars.id+d+'" class="edd-legend-item-wrapper">'+a+n+"</div>";return jQuery("#edd-pie-legend-"+t.edd_vars.id).append(i),i};function edd_attach_tooltips(e){e.tooltip({content:function(){return jQuery(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}})}
 
assets/js/chosen.jquery.js CHANGED
@@ -2,1210 +2,1348 @@
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
- Version 1.1.0
6
  Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011 Harvest http://getharvest.com
8
 
9
  MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
  This file is generated by `grunt build`, do not edit it by hand.
11
  */
12
 
13
  (function() {
14
- var $, AbstractChosen, Chosen, SelectParser, _ref,
15
- __hasProp = {}.hasOwnProperty,
16
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
17
-
18
- SelectParser = (function() {
19
- function SelectParser() {
20
- this.options_index = 0;
21
- this.parsed = [];
22
- }
23
-
24
- SelectParser.prototype.add_node = function(child) {
25
- if (child.nodeName.toUpperCase() === "OPTGROUP") {
26
- return this.add_group(child);
27
- } else {
28
- return this.add_option(child);
29
- }
30
- };
31
-
32
- SelectParser.prototype.add_group = function(group) {
33
- var group_position, option, _i, _len, _ref, _results;
34
- group_position = this.parsed.length;
35
- this.parsed.push({
36
- array_index: group_position,
37
- group: true,
38
- label: this.escapeExpression(group.label),
39
- children: 0,
40
- disabled: group.disabled
41
- });
42
- _ref = group.childNodes;
43
- _results = [];
44
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
45
- option = _ref[_i];
46
- _results.push(this.add_option(option, group_position, group.disabled));
47
- }
48
- return _results;
49
- };
50
-
51
- SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
52
- if (option.nodeName.toUpperCase() === "OPTION") {
53
- if (option.text !== "") {
54
- if (group_position != null) {
55
- this.parsed[group_position].children += 1;
56
- }
57
- this.parsed.push({
58
- array_index: this.parsed.length,
59
- options_index: this.options_index,
60
- value: option.value,
61
- text: option.text,
62
- html: option.innerHTML,
63
- selected: option.selected,
64
- disabled: group_disabled === true ? group_disabled : option.disabled,
65
- group_array_index: group_position,
66
- classes: option.className,
67
- style: option.style.cssText
68
- });
69
- } else {
70
- this.parsed.push({
71
- array_index: this.parsed.length,
72
- options_index: this.options_index,
73
- empty: true
74
- });
75
- }
76
- return this.options_index += 1;
77
- }
78
- };
79
-
80
- SelectParser.prototype.escapeExpression = function(text) {
81
- var map, unsafe_chars;
82
- if ((text == null) || text === false) {
83
- return "";
84
- }
85
- if (!/[\&\<\>\"\'\`]/.test(text)) {
86
- return text;
87
- }
88
- map = {
89
- "<": "&lt;",
90
- ">": "&gt;",
91
- '"': "&quot;",
92
- "'": "&#x27;",
93
- "`": "&#x60;"
94
- };
95
- unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
96
- return text.replace(unsafe_chars, function(chr) {
97
- return map[chr] || "&amp;";
98
- });
99
- };
100
-
101
- return SelectParser;
102
-
103
- })();
104
-
105
- SelectParser.select_to_array = function(select) {
106
- var child, parser, _i, _len, _ref;
107
- parser = new SelectParser();
108
- _ref = select.childNodes;
109
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
110
- child = _ref[_i];
111
- parser.add_node(child);
112
- }
113
- return parser.parsed;
114
- };
115
-
116
- AbstractChosen = (function() {
117
- function AbstractChosen(form_field, options) {
118
- this.form_field = form_field;
119
- this.options = options != null ? options : {};
120
- if (!AbstractChosen.browser_is_supported()) {
121
- return;
122
- }
123
- this.is_multiple = this.form_field.multiple;
124
- this.set_default_text();
125
- this.set_default_values();
126
- this.setup();
127
- this.set_up_html();
128
- this.register_observers();
129
- }
130
-
131
- AbstractChosen.prototype.set_default_values = function() {
132
- var _this = this;
133
- this.click_test_action = function(evt) {
134
- return _this.test_active_click(evt);
135
- };
136
- this.activate_action = function(evt) {
137
- return _this.activate_field(evt);
138
- };
139
- this.active_field = false;
140
- this.mouse_on_container = false;
141
- this.results_showing = false;
142
- this.result_highlighted = null;
143
- this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
144
- this.disable_search_threshold = this.options.disable_search_threshold || 0;
145
- this.disable_search = this.options.disable_search || false;
146
- this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
147
- this.group_search = this.options.group_search != null ? this.options.group_search : true;
148
- this.search_contains = this.options.search_contains || false;
149
- this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
150
- this.max_selected_options = this.options.max_selected_options || Infinity;
151
- this.inherit_select_classes = this.options.inherit_select_classes || false;
152
- this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
153
- return this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
154
- };
155
-
156
- AbstractChosen.prototype.set_default_text = function() {
157
- if (this.form_field.getAttribute("data-placeholder")) {
158
- this.default_text = this.form_field.getAttribute("data-placeholder");
159
- } else if (this.is_multiple) {
160
- this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
161
- } else {
162
- this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
163
- }
164
- return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
165
- };
166
-
167
- AbstractChosen.prototype.mouse_enter = function() {
168
- return this.mouse_on_container = true;
169
- };
170
-
171
- AbstractChosen.prototype.mouse_leave = function() {
172
- return this.mouse_on_container = false;
173
- };
174
-
175
- AbstractChosen.prototype.input_focus = function(evt) {
176
- var _this = this;
177
- if (this.is_multiple) {
178
- if (!this.active_field) {
179
- return setTimeout((function() {
180
- return _this.container_mousedown();
181
- }), 50);
182
- }
183
- } else {
184
- if (!this.active_field) {
185
- return this.activate_field();
186
- }
187
- }
188
- };
189
-
190
- AbstractChosen.prototype.input_blur = function(evt) {
191
- var _this = this;
192
- if (!this.mouse_on_container) {
193
- this.active_field = false;
194
- return setTimeout((function() {
195
- return _this.blur_test();
196
- }), 100);
197
- }
198
- };
199
-
200
- AbstractChosen.prototype.results_option_build = function(options) {
201
- var content, data, _i, _len, _ref;
202
- content = '';
203
- _ref = this.results_data;
204
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
205
- data = _ref[_i];
206
- if (data.group) {
207
- content += this.result_add_group(data);
208
- } else {
209
- content += this.result_add_option(data);
210
- }
211
- if (options != null ? options.first : void 0) {
212
- if (data.selected && this.is_multiple) {
213
- this.choice_build(data);
214
- } else if (data.selected && !this.is_multiple) {
215
- this.single_set_selected_text(data.text);
216
- }
217
- }
218
- }
219
- return content;
220
- };
221
-
222
- AbstractChosen.prototype.result_add_option = function(option) {
223
- var classes, option_el;
224
- if (!option.search_match) {
225
- return '';
226
- }
227
- if (!this.include_option_in_results(option)) {
228
- return '';
229
- }
230
- classes = [];
231
- if (!option.disabled && !(option.selected && this.is_multiple)) {
232
- classes.push("active-result");
233
- }
234
- if (option.disabled && !(option.selected && this.is_multiple)) {
235
- classes.push("disabled-result");
236
- }
237
- if (option.selected) {
238
- classes.push("result-selected");
239
- }
240
- if (option.group_array_index != null) {
241
- classes.push("group-option");
242
- }
243
- if (option.classes !== "") {
244
- classes.push(option.classes);
245
- }
246
- option_el = document.createElement("li");
247
- option_el.className = classes.join(" ");
248
- option_el.style.cssText = option.style;
249
- option_el.setAttribute("data-option-array-index", option.array_index);
250
- option_el.innerHTML = option.search_text;
251
- return this.outerHTML(option_el);
252
- };
253
-
254
- AbstractChosen.prototype.result_add_group = function(group) {
255
- var group_el;
256
- if (!(group.search_match || group.group_match)) {
257
- return '';
258
- }
259
- if (!(group.active_options > 0)) {
260
- return '';
261
- }
262
- group_el = document.createElement("li");
263
- group_el.className = "group-result";
264
- group_el.innerHTML = group.search_text;
265
- return this.outerHTML(group_el);
266
- };
267
-
268
- AbstractChosen.prototype.results_update_field = function() {
269
- this.set_default_text();
270
- if (!this.is_multiple) {
271
- this.results_reset_cleanup();
272
- }
273
- this.result_clear_highlight();
274
- this.results_build();
275
- if (this.results_showing) {
276
- return this.winnow_results();
277
- }
278
- };
279
-
280
- AbstractChosen.prototype.reset_single_select_options = function() {
281
- var result, _i, _len, _ref, _results;
282
- _ref = this.results_data;
283
- _results = [];
284
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
285
- result = _ref[_i];
286
- if (result.selected) {
287
- _results.push(result.selected = false);
288
- } else {
289
- _results.push(void 0);
290
- }
291
- }
292
- return _results;
293
- };
294
-
295
- AbstractChosen.prototype.results_toggle = function() {
296
- if (this.results_showing) {
297
- return this.results_hide();
298
- } else {
299
- return this.results_show();
300
- }
301
- };
302
-
303
- AbstractChosen.prototype.results_search = function(evt) {
304
- if (this.results_showing) {
305
- return this.winnow_results();
306
- } else {
307
- return this.results_show();
308
- }
309
- };
310
-
311
- AbstractChosen.prototype.winnow_results = function() {
312
- var escapedSearchText, option, regex, regexAnchor, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
313
- this.no_results_clear();
314
- results = 0;
315
- searchText = this.get_search_text();
316
- escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
317
- regexAnchor = this.search_contains ? "" : "^";
318
- regex = new RegExp(regexAnchor + escapedSearchText, 'i');
319
- zregex = new RegExp(escapedSearchText, 'i');
320
- _ref = this.results_data;
321
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
322
- option = _ref[_i];
323
- option.search_match = false;
324
- results_group = null;
325
- if (this.include_option_in_results(option)) {
326
- if (option.group) {
327
- option.group_match = false;
328
- option.active_options = 0;
329
- }
330
- if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
331
- results_group = this.results_data[option.group_array_index];
332
- if (results_group.active_options === 0 && results_group.search_match) {
333
- results += 1;
334
- }
335
- results_group.active_options += 1;
336
- }
337
- if (!(option.group && !this.group_search)) {
338
- option.search_text = option.group ? option.label : option.html;
339
- option.search_match = this.search_string_match(option.search_text, regex);
340
- if (option.search_match && !option.group) {
341
- results += 1;
342
- }
343
- if (option.search_match) {
344
- if (searchText.length) {
345
- startpos = option.search_text.search(zregex);
346
- text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
347
- option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
348
- }
349
- if (results_group != null) {
350
- results_group.group_match = true;
351
- }
352
- } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
353
- option.search_match = true;
354
- }
355
- }
356
- }
357
- }
358
- this.result_clear_highlight();
359
- if (results < 1 && searchText.length) {
360
- this.update_results_content("");
361
- return this.no_results(searchText);
362
- } else {
363
- this.update_results_content(this.results_option_build());
364
- return this.winnow_results_set_highlight();
365
- }
366
- };
367
-
368
- AbstractChosen.prototype.search_string_match = function(search_string, regex) {
369
- var part, parts, _i, _len;
370
- if (regex.test(search_string)) {
371
- return true;
372
- } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
373
- parts = search_string.replace(/\[|\]/g, "").split(" ");
374
- if (parts.length) {
375
- for (_i = 0, _len = parts.length; _i < _len; _i++) {
376
- part = parts[_i];
377
- if (regex.test(part)) {
378
- return true;
379
- }
380
- }
381
- }
382
- }
383
- };
384
-
385
- AbstractChosen.prototype.choices_count = function() {
386
- var option, _i, _len, _ref;
387
- if (this.selected_option_count != null) {
388
- return this.selected_option_count;
389
- }
390
- this.selected_option_count = 0;
391
- _ref = this.form_field.options;
392
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
393
- option = _ref[_i];
394
- if (option.selected) {
395
- this.selected_option_count += 1;
396
- }
397
- }
398
- return this.selected_option_count;
399
- };
400
-
401
- AbstractChosen.prototype.choices_click = function(evt) {
402
- evt.preventDefault();
403
- if (!(this.results_showing || this.is_disabled)) {
404
- return this.results_show();
405
- }
406
- };
407
-
408
- AbstractChosen.prototype.keyup_checker = function(evt) {
409
- var stroke, _ref;
410
- stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
411
- this.search_field_scale();
412
- switch (stroke) {
413
- case 8:
414
- if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
415
- return this.keydown_backstroke();
416
- } else if (!this.pending_backstroke) {
417
- this.result_clear_highlight();
418
- return this.results_search();
419
- }
420
- break;
421
- case 13:
422
- evt.preventDefault();
423
- if (this.results_showing) {
424
- return this.result_select(evt);
425
- }
426
- break;
427
- case 27:
428
- if (this.results_showing) {
429
- this.results_hide();
430
- }
431
- return true;
432
- case 9:
433
- case 38:
434
- case 40:
435
- case 16:
436
- case 91:
437
- case 17:
438
- break;
439
- default:
440
- return this.results_search();
441
- }
442
- };
443
-
444
- AbstractChosen.prototype.clipboard_event_checker = function(evt) {
445
- var _this = this;
446
- return setTimeout((function() {
447
- return _this.results_search();
448
- }), 50);
449
- };
450
-
451
- AbstractChosen.prototype.container_width = function() {
452
- if (this.options.width != null) {
453
- return this.options.width;
454
- } else {
455
- return "" + this.form_field.offsetWidth + "px";
456
- }
457
- };
458
-
459
- AbstractChosen.prototype.include_option_in_results = function(option) {
460
- if (this.is_multiple && (!this.display_selected_options && option.selected)) {
461
- return false;
462
- }
463
- if (!this.display_disabled_options && option.disabled) {
464
- return false;
465
- }
466
- if (option.empty) {
467
- return false;
468
- }
469
- return true;
470
- };
471
-
472
- AbstractChosen.prototype.search_results_touchstart = function(evt) {
473
- this.touch_started = true;
474
- return this.search_results_mouseover(evt);
475
- };
476
-
477
- AbstractChosen.prototype.search_results_touchmove = function(evt) {
478
- this.touch_started = false;
479
- return this.search_results_mouseout(evt);
480
- };
481
-
482
- AbstractChosen.prototype.search_results_touchend = function(evt) {
483
- if (this.touch_started) {
484
- return this.search_results_mouseup(evt);
485
- }
486
- };
487
-
488
- AbstractChosen.prototype.outerHTML = function(element) {
489
- var tmp;
490
- if (element.outerHTML) {
491
- return element.outerHTML;
492
- }
493
- tmp = document.createElement("div");
494
- tmp.appendChild(element);
495
- return tmp.innerHTML;
496
- };
497
-
498
- AbstractChosen.browser_is_supported = function() {
499
- if (window.navigator.appName === "Microsoft Internet Explorer") {
500
- return document.documentMode >= 8;
501
- }
502
- if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
503
- return false;
504
- }
505
- if (/Android/i.test(window.navigator.userAgent)) {
506
- if (/Mobile/i.test(window.navigator.userAgent)) {
507
- return false;
508
- }
509
- }
510
- return true;
511
- };
512
-
513
- AbstractChosen.default_multiple_text = "Select Some Options";
514
-
515
- AbstractChosen.default_single_text = "Select an Option";
516
-
517
- AbstractChosen.default_no_result_text = "No results match";
518
-
519
- return AbstractChosen;
520
-
521
- })();
522
-
523
- $ = jQuery;
524
-
525
- $.fn.extend({
526
- chosen: function(options) {
527
- if (!AbstractChosen.browser_is_supported()) {
528
- return this;
529
- }
530
- return this.each(function(input_field) {
531
- var $this, chosen;
532
- $this = $(this);
533
- chosen = $this.data('chosen');
534
- if (options === 'destroy' && chosen) {
535
- chosen.destroy();
536
- } else if (!chosen) {
537
- $this.data('chosen', new Chosen(this, options));
538
- }
539
- });
540
- }
541
- });
542
-
543
- Chosen = (function(_super) {
544
- __extends(Chosen, _super);
545
-
546
- function Chosen() {
547
- _ref = Chosen.__super__.constructor.apply(this, arguments);
548
- return _ref;
549
- }
550
-
551
- Chosen.prototype.setup = function() {
552
- this.form_field_jq = $(this.form_field);
553
- this.current_selectedIndex = this.form_field.selectedIndex;
554
- return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
555
- };
556
-
557
- Chosen.prototype.set_up_html = function() {
558
- var container_classes, container_props;
559
- container_classes = ["chosen-container"];
560
- container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
561
- if (this.inherit_select_classes && this.form_field.className) {
562
- container_classes.push(this.form_field.className);
563
- }
564
- if (this.is_rtl) {
565
- container_classes.push("chosen-rtl");
566
- }
567
- container_props = {
568
- 'class': container_classes.join(' '),
569
- 'style': "width: " + (this.container_width()) + ";",
570
- 'title': this.form_field.title
571
- };
572
- if (this.form_field.id.length) {
573
- container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
574
- }
575
- this.container = $("<div />", container_props);
576
- if (this.is_multiple) {
577
- this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
578
- } else {
579
- this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
580
- }
581
- this.form_field_jq.hide().after(this.container);
582
- this.dropdown = this.container.find('div.chosen-drop').first();
583
- this.search_field = this.container.find('input').first();
584
- this.search_results = this.container.find('ul.chosen-results').first();
585
- this.search_field_scale();
586
- this.search_no_results = this.container.find('li.no-results').first();
587
- if (this.is_multiple) {
588
- this.search_choices = this.container.find('ul.chosen-choices').first();
589
- this.search_container = this.container.find('li.search-field').first();
590
- } else {
591
- this.search_container = this.container.find('div.chosen-search').first();
592
- this.selected_item = this.container.find('.chosen-single').first();
593
- }
594
- this.results_build();
595
- this.set_tab_index();
596
- this.set_label_behavior();
597
- return this.form_field_jq.trigger("chosen:ready", {
598
- chosen: this
599
- });
600
- };
601
-
602
- Chosen.prototype.register_observers = function() {
603
- var _this = this;
604
- this.container.bind('mousedown.chosen', function(evt) {
605
- _this.container_mousedown(evt);
606
- });
607
- this.container.bind('mouseup.chosen', function(evt) {
608
- _this.container_mouseup(evt);
609
- });
610
- this.container.bind('mouseenter.chosen', function(evt) {
611
- _this.mouse_enter(evt);
612
- });
613
- this.container.bind('mouseleave.chosen', function(evt) {
614
- _this.mouse_leave(evt);
615
- });
616
- this.search_results.bind('mouseup.chosen', function(evt) {
617
- _this.search_results_mouseup(evt);
618
- });
619
- this.search_results.bind('mouseover.chosen', function(evt) {
620
- _this.search_results_mouseover(evt);
621
- });
622
- this.search_results.bind('mouseout.chosen', function(evt) {
623
- _this.search_results_mouseout(evt);
624
- });
625
- this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
626
- _this.search_results_mousewheel(evt);
627
- });
628
- this.search_results.bind('touchstart.chosen', function(evt) {
629
- _this.search_results_touchstart(evt);
630
- });
631
- this.search_results.bind('touchmove.chosen', function(evt) {
632
- _this.search_results_touchmove(evt);
633
- });
634
- this.search_results.bind('touchend.chosen', function(evt) {
635
- _this.search_results_touchend(evt);
636
- });
637
- this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
638
- _this.results_update_field(evt);
639
- });
640
- this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
641
- _this.activate_field(evt);
642
- });
643
- this.form_field_jq.bind("chosen:open.chosen", function(evt) {
644
- _this.container_mousedown(evt);
645
- });
646
- this.form_field_jq.bind("chosen:close.chosen", function(evt) {
647
- _this.input_blur(evt);
648
- });
649
- this.search_field.bind('blur.chosen', function(evt) {
650
- _this.input_blur(evt);
651
- });
652
- this.search_field.bind('keyup.chosen', function(evt) {
653
- _this.keyup_checker(evt);
654
- });
655
- this.search_field.bind('keydown.chosen', function(evt) {
656
- _this.keydown_checker(evt);
657
- });
658
- this.search_field.bind('focus.chosen', function(evt) {
659
- _this.input_focus(evt);
660
- });
661
- this.search_field.bind('cut.chosen', function(evt) {
662
- _this.clipboard_event_checker(evt);
663
- });
664
- this.search_field.bind('paste.chosen', function(evt) {
665
- _this.clipboard_event_checker(evt);
666
- });
667
- if (this.is_multiple) {
668
- return this.search_choices.bind('click.chosen', function(evt) {
669
- _this.choices_click(evt);
670
- });
671
- } else {
672
- return this.container.bind('click.chosen', function(evt) {
673
- evt.preventDefault();
674
- });
675
- }
676
- };
677
-
678
- Chosen.prototype.destroy = function() {
679
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
680
- if (this.search_field[0].tabIndex) {
681
- this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
682
- }
683
- this.container.remove();
684
- this.form_field_jq.removeData('chosen');
685
- return this.form_field_jq.show();
686
- };
687
-
688
- Chosen.prototype.search_field_disabled = function() {
689
- this.is_disabled = this.form_field_jq[0].disabled;
690
- if (this.is_disabled) {
691
- this.container.addClass('chosen-disabled');
692
- this.search_field[0].disabled = true;
693
- if (!this.is_multiple) {
694
- this.selected_item.unbind("focus.chosen", this.activate_action);
695
- }
696
- return this.close_field();
697
- } else {
698
- this.container.removeClass('chosen-disabled');
699
- this.search_field[0].disabled = false;
700
- if (!this.is_multiple) {
701
- return this.selected_item.bind("focus.chosen", this.activate_action);
702
- }
703
- }
704
- };
705
-
706
- Chosen.prototype.container_mousedown = function(evt) {
707
- if (!this.is_disabled) {
708
- if (evt && evt.type === "mousedown" && !this.results_showing) {
709
- evt.preventDefault();
710
- }
711
- if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
712
- if (!this.active_field) {
713
- if (this.is_multiple) {
714
- this.search_field.val("");
715
- }
716
- $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
717
- this.results_show();
718
- } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
719
- evt.preventDefault();
720
- this.results_toggle();
721
- }
722
- return this.activate_field();
723
- }
724
- }
725
- };
726
-
727
- Chosen.prototype.container_mouseup = function(evt) {
728
- if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
729
- return this.results_reset(evt);
730
- }
731
- };
732
-
733
- Chosen.prototype.search_results_mousewheel = function(evt) {
734
- var delta;
735
- if (evt.originalEvent) {
736
- delta = -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
737
- }
738
- if (delta != null) {
739
- evt.preventDefault();
740
- if (evt.type === 'DOMMouseScroll') {
741
- delta = delta * 40;
742
- }
743
- return this.search_results.scrollTop(delta + this.search_results.scrollTop());
744
- }
745
- };
746
-
747
- Chosen.prototype.blur_test = function(evt) {
748
- if (!this.active_field && this.container.hasClass("chosen-container-active")) {
749
- return this.close_field();
750
- }
751
- };
752
-
753
- Chosen.prototype.close_field = function() {
754
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
755
- this.active_field = false;
756
- this.results_hide();
757
- this.container.removeClass("chosen-container-active");
758
- this.clear_backstroke();
759
- this.show_search_field_default();
760
- return this.search_field_scale();
761
- };
762
-
763
- Chosen.prototype.activate_field = function() {
764
- this.container.addClass("chosen-container-active");
765
- this.active_field = true;
766
- this.search_field.val(this.search_field.val());
767
- return this.search_field.focus();
768
- };
769
-
770
- Chosen.prototype.test_active_click = function(evt) {
771
- var active_container;
772
- active_container = $(evt.target).closest('.chosen-container');
773
- if (active_container.length && this.container[0] === active_container[0]) {
774
- return this.active_field = true;
775
- } else {
776
- return this.close_field();
777
- }
778
- };
779
-
780
- Chosen.prototype.results_build = function() {
781
- this.parsing = true;
782
- this.selected_option_count = null;
783
- this.results_data = SelectParser.select_to_array(this.form_field);
784
- if (this.is_multiple) {
785
- this.search_choices.find("li.search-choice").remove();
786
- } else if (!this.is_multiple) {
787
- this.single_set_selected_text();
788
- if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
789
- this.search_field[0].readOnly = true;
790
- this.container.addClass("chosen-container-single-nosearch");
791
- } else {
792
- this.search_field[0].readOnly = false;
793
- this.container.removeClass("chosen-container-single-nosearch");
794
- }
795
- }
796
- this.update_results_content(this.results_option_build({
797
- first: true
798
- }));
799
- this.search_field_disabled();
800
- this.show_search_field_default();
801
- this.search_field_scale();
802
- return this.parsing = false;
803
- };
804
-
805
- Chosen.prototype.result_do_highlight = function(el) {
806
- var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
807
- if (el.length) {
808
- this.result_clear_highlight();
809
- this.result_highlight = el;
810
- this.result_highlight.addClass("highlighted");
811
- maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
812
- visible_top = this.search_results.scrollTop();
813
- visible_bottom = maxHeight + visible_top;
814
- high_top = this.result_highlight.position().top + this.search_results.scrollTop();
815
- high_bottom = high_top + this.result_highlight.outerHeight();
816
- if (high_bottom >= visible_bottom) {
817
- return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
818
- } else if (high_top < visible_top) {
819
- return this.search_results.scrollTop(high_top);
820
- }
821
- }
822
- };
823
-
824
- Chosen.prototype.result_clear_highlight = function() {
825
- if (this.result_highlight) {
826
- this.result_highlight.removeClass("highlighted");
827
- }
828
- return this.result_highlight = null;
829
- };
830
-
831
- Chosen.prototype.results_show = function() {
832
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
833
- this.form_field_jq.trigger("chosen:maxselected", {
834
- chosen: this
835
- });
836
- return false;
837
- }
838
- this.container.addClass("chosen-with-drop");
839
- this.results_showing = true;
840
- this.search_field.focus();
841
- this.search_field.val(this.search_field.val());
842
- this.winnow_results();
843
- return this.form_field_jq.trigger("chosen:showing_dropdown", {
844
- chosen: this
845
- });
846
- };
847
-
848
- Chosen.prototype.update_results_content = function(content) {
849
- return this.search_results.html(content);
850
- };
851
-
852
- Chosen.prototype.results_hide = function() {
853
- if (this.results_showing) {
854
- this.result_clear_highlight();
855
- this.container.removeClass("chosen-with-drop");
856
- this.form_field_jq.trigger("chosen:hiding_dropdown", {
857
- chosen: this
858
- });
859
- }
860
- return this.results_showing = false;
861
- };
862
-
863
- Chosen.prototype.set_tab_index = function(el) {
864
- var ti;
865
- if (this.form_field.tabIndex) {
866
- ti = this.form_field.tabIndex;
867
- this.form_field.tabIndex = -1;
868
- return this.search_field[0].tabIndex = ti;
869
- }
870
- };
871
-
872
- Chosen.prototype.set_label_behavior = function() {
873
- var _this = this;
874
- this.form_field_label = this.form_field_jq.parents("label");
875
- if (!this.form_field_label.length && this.form_field.id.length) {
876
- this.form_field_label = $("label[for='" + this.form_field.id + "']");
877
- }
878
- if (this.form_field_label.length > 0) {
879
- return this.form_field_label.bind('click.chosen', function(evt) {
880
- if (_this.is_multiple) {
881
- return _this.container_mousedown(evt);
882
- } else {
883
- return _this.activate_field();
884
- }
885
- });
886
- }
887
- };
888
-
889
- Chosen.prototype.show_search_field_default = function() {
890
- if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
891
- this.search_field.val(this.default_text);
892
- return this.search_field.addClass("default");
893
- } else {
894
- this.search_field.val("");
895
- return this.search_field.removeClass("default");
896
- }
897
- };
898
-
899
- Chosen.prototype.search_results_mouseup = function(evt) {
900
- var target;
901
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
902
- if (target.length) {
903
- this.result_highlight = target;
904
- this.result_select(evt);
905
- return this.search_field.focus();
906
- }
907
- };
908
-
909
- Chosen.prototype.search_results_mouseover = function(evt) {
910
- var target;
911
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
912
- if (target) {
913
- return this.result_do_highlight(target);
914
- }
915
- };
916
-
917
- Chosen.prototype.search_results_mouseout = function(evt) {
918
- if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
919
- return this.result_clear_highlight();
920
- }
921
- };
922
-
923
- Chosen.prototype.choice_build = function(item) {
924
- var choice, close_link,
925
- _this = this;
926
- choice = $('<li />', {
927
- "class": "search-choice"
928
- }).html("<span>" + item.html + "</span>");
929
- if (item.disabled) {
930
- choice.addClass('search-choice-disabled');
931
- } else {
932
- close_link = $('<a />', {
933
- "class": 'search-choice-close',
934
- 'data-option-array-index': item.array_index
935
- });
936
- close_link.bind('click.chosen', function(evt) {
937
- return _this.choice_destroy_link_click(evt);
938
- });
939
- choice.append(close_link);
940
- }
941
- return this.search_container.before(choice);
942
- };
943
-
944
- Chosen.prototype.choice_destroy_link_click = function(evt) {
945
- evt.preventDefault();
946
- evt.stopPropagation();
947
- if (!this.is_disabled) {
948
- return this.choice_destroy($(evt.target));
949
- }
950
- };
951
-
952
- Chosen.prototype.choice_destroy = function(link) {
953
- if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
954
- this.show_search_field_default();
955
- if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
956
- this.results_hide();
957
- }
958
- link.parents('li').first().remove();
959
- return this.search_field_scale();
960
- }
961
- };
962
-
963
- Chosen.prototype.results_reset = function() {
964
- this.reset_single_select_options();
965
- this.form_field.options[0].selected = true;
966
- this.single_set_selected_text();
967
- this.show_search_field_default();
968
- this.results_reset_cleanup();
969
- this.form_field_jq.trigger("change");
970
- if (this.active_field) {
971
- return this.results_hide();
972
- }
973
- };
974
-
975
- Chosen.prototype.results_reset_cleanup = function() {
976
- this.current_selectedIndex = this.form_field.selectedIndex;
977
- return this.selected_item.find("abbr").remove();
978
- };
979
-
980
- Chosen.prototype.result_select = function(evt) {
981
- var high, item;
982
- if (this.result_highlight) {
983
- high = this.result_highlight;
984
- this.result_clear_highlight();
985
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
986
- this.form_field_jq.trigger("chosen:maxselected", {
987
- chosen: this
988
- });
989
- return false;
990
- }
991
- if (this.is_multiple) {
992
- high.removeClass("active-result");
993
- } else {
994
- this.reset_single_select_options();
995
- }
996
- item = this.results_data[high[0].getAttribute("data-option-array-index")];
997
- item.selected = true;
998
- this.form_field.options[item.options_index].selected = true;
999
- this.selected_option_count = null;
1000
- if (this.is_multiple) {
1001
- this.choice_build(item);
1002
- } else {
1003
- this.single_set_selected_text(item.text);
1004
- }
1005
- if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1006
- this.results_hide();
1007
- }
1008
- this.search_field.val("");
1009
- if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1010
- this.form_field_jq.trigger("change", {
1011
- 'selected': this.form_field.options[item.options_index].value
1012
- });
1013
- }
1014
- this.current_selectedIndex = this.form_field.selectedIndex;
1015
- return this.search_field_scale();
1016
- }
1017
- };
1018
-
1019
- Chosen.prototype.single_set_selected_text = function(text) {
1020
- if (text == null) {
1021
- text = this.default_text;
1022
- }
1023
- if (text === this.default_text) {
1024
- this.selected_item.addClass("chosen-default");
1025
- } else {
1026
- this.single_deselect_control_build();
1027
- this.selected_item.removeClass("chosen-default");
1028
- }
1029
- return this.selected_item.find("span").text(text);
1030
- };
1031
-
1032
- Chosen.prototype.result_deselect = function(pos) {
1033
- var result_data;
1034
- result_data = this.results_data[pos];
1035
- if (!this.form_field.options[result_data.options_index].disabled) {
1036
- result_data.selected = false;
1037
- this.form_field.options[result_data.options_index].selected = false;
1038
- this.selected_option_count = null;
1039
- this.result_clear_highlight();
1040
- if (this.results_showing) {
1041
- this.winnow_results();
1042
- }
1043
- this.form_field_jq.trigger("change", {
1044
- deselected: this.form_field.options[result_data.options_index].value
1045
- });
1046
- this.search_field_scale();
1047
- return true;
1048
- } else {
1049
- return false;
1050
- }
1051
- };
1052
-
1053
- Chosen.prototype.single_deselect_control_build = function() {
1054
- if (!this.allow_single_deselect) {
1055
- return;
1056
- }
1057
- if (!this.selected_item.find("abbr").length) {
1058
- this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1059
- }
1060
- return this.selected_item.addClass("chosen-single-with-deselect");
1061
- };
1062
-
1063
- Chosen.prototype.get_search_text = function() {
1064
- if (this.search_field.val() === this.default_text) {
1065
- return "";
1066
- } else {
1067
- return $('<div/>').text($.trim(this.search_field.val())).html();
1068
- }
1069
- };
1070
-
1071
- Chosen.prototype.winnow_results_set_highlight = function() {
1072
- var do_high, selected_results;
1073
- selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1074
- do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1075
- if (do_high != null) {
1076
- return this.result_do_highlight(do_high);
1077
- }
1078
- };
1079
-
1080
- Chosen.prototype.no_results = function(terms) {
1081
- var no_results_html;
1082
- no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1083
- no_results_html.find("span").first().html(terms);
1084
- this.search_results.append(no_results_html);
1085
- return this.form_field_jq.trigger("chosen:no_results", {
1086
- chosen: this
1087
- });
1088
- };
1089
-
1090
- Chosen.prototype.no_results_clear = function() {
1091
- return this.search_results.find(".no-results").remove();
1092
- };
1093
-
1094
- Chosen.prototype.keydown_arrow = function() {
1095
- var next_sib;
1096
- if (this.results_showing && this.result_highlight) {
1097
- next_sib = this.result_highlight.nextAll("li.active-result").first();
1098
- if (next_sib) {
1099
- return this.result_do_highlight(next_sib);
1100
- }
1101
- } else {
1102
- return this.results_show();
1103
- }
1104
- };
1105
-
1106
- Chosen.prototype.keyup_arrow = function() {
1107
- var prev_sibs;
1108
- if (!this.results_showing && !this.is_multiple) {
1109
- return this.results_show();
1110
- } else if (this.result_highlight) {
1111
- prev_sibs = this.result_highlight.prevAll("li.active-result");
1112
- if (prev_sibs.length) {
1113
- return this.result_do_highlight(prev_sibs.first());
1114
- } else {
1115
- if (this.choices_count() > 0) {
1116
- this.results_hide();
1117
- }
1118
- return this.result_clear_highlight();
1119
- }
1120
- }
1121
- };
1122
-
1123
- Chosen.prototype.keydown_backstroke = function() {
1124
- var next_available_destroy;
1125
- if (this.pending_backstroke) {
1126
- this.choice_destroy(this.pending_backstroke.find("a").first());
1127
- return this.clear_backstroke();
1128
- } else {
1129
- next_available_destroy = this.search_container.siblings("li.search-choice").last();
1130
- if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1131
- this.pending_backstroke = next_available_destroy;
1132
- if (this.single_backstroke_delete) {
1133
- return this.keydown_backstroke();
1134
- } else {
1135
- return this.pending_backstroke.addClass("search-choice-focus");
1136
- }
1137
- }
1138
- }
1139
- };
1140
-
1141
- Chosen.prototype.clear_backstroke = function() {
1142
- if (this.pending_backstroke) {
1143
- this.pending_backstroke.removeClass("search-choice-focus");
1144
- }
1145
- return this.pending_backstroke = null;
1146
- };
1147
-
1148
- Chosen.prototype.keydown_checker = function(evt) {
1149
- var stroke, _ref1;
1150
- stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1151
- this.search_field_scale();
1152
- if (stroke !== 8 && this.pending_backstroke) {
1153
- this.clear_backstroke();
1154
- }
1155
- switch (stroke) {
1156
- case 8:
1157
- this.backstroke_length = this.search_field.val().length;
1158
- break;
1159
- case 9:
1160
- if (this.results_showing && !this.is_multiple) {
1161
- this.result_select(evt);
1162
- }
1163
- this.mouse_on_container = false;
1164
- break;
1165
- case 13:
1166
- evt.preventDefault();
1167
- break;
1168
- case 38:
1169
- evt.preventDefault();
1170
- this.keyup_arrow();
1171
- break;
1172
- case 40:
1173
- evt.preventDefault();
1174
- this.keydown_arrow();
1175
- break;
1176
- }
1177
- };
1178
-
1179
- Chosen.prototype.search_field_scale = function() {
1180
- var div, f_width, h, style, style_block, styles, w, _i, _len;
1181
- if (this.is_multiple) {
1182
- h = 0;
1183
- w = 0;
1184
- style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1185
- styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1186
- for (_i = 0, _len = styles.length; _i < _len; _i++) {
1187
- style = styles[_i];
1188
- style_block += style + ":" + this.search_field.css(style) + ";";
1189
- }
1190
- div = $('<div />', {
1191
- 'style': style_block
1192
- });
1193
- div.text(this.search_field.val());
1194
- $('body').append(div);
1195
- w = div.width() + 25;
1196
- div.remove();
1197
- f_width = this.container.outerWidth();
1198
- if (w > f_width - 10) {
1199
- w = f_width - 10;
1200
- }
1201
- return this.search_field.css({
1202
- 'width': w + 'px'
1203
- });
1204
- }
1205
- };
1206
-
1207
- return Chosen;
1208
-
1209
- })(AbstractChosen);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1210
 
1211
  }).call(this);
2
  Chosen, a Select Box Enhancer for jQuery and Prototype
3
  by Patrick Filler for Harvest, http://getharvest.com
4
 
5
+ Version 1.8.2
6
  Full source at https://github.com/harvesthq/chosen
7
+ Copyright (c) 2011-2017 Harvest http://getharvest.com
8
 
9
  MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
  This file is generated by `grunt build`, do not edit it by hand.
11
  */
12
 
13
  (function() {
14
+ var $, AbstractChosen, Chosen, SelectParser,
15
+ bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
16
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
17
+ hasProp = {}.hasOwnProperty;
18
+
19
+ SelectParser = (function() {
20
+ function SelectParser() {
21
+ this.options_index = 0;
22
+ this.parsed = [];
23
+ }
24
+
25
+ SelectParser.prototype.add_node = function(child) {
26
+ if (child.nodeName.toUpperCase() === "OPTGROUP") {
27
+ return this.add_group(child);
28
+ } else {
29
+ return this.add_option(child);
30
+ }
31
+ };
32
+
33
+ SelectParser.prototype.add_group = function(group) {
34
+ var group_position, i, len, option, ref, results1;
35
+ group_position = this.parsed.length;
36
+ this.parsed.push({
37
+ array_index: group_position,
38
+ group: true,
39
+ label: group.label,
40
+ title: group.title ? group.title : void 0,
41
+ children: 0,
42
+ disabled: group.disabled,
43
+ classes: group.className
44
+ });
45
+ ref = group.childNodes;
46
+ results1 = [];
47
+ for (i = 0, len = ref.length; i < len; i++) {
48
+ option = ref[i];
49
+ results1.push(this.add_option(option, group_position, group.disabled));
50
+ }
51
+ return results1;
52
+ };
53
+
54
+ SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
55
+ if (option.nodeName.toUpperCase() === "OPTION") {
56
+ if (option.text !== "") {
57
+ if (group_position != null) {
58
+ this.parsed[group_position].children += 1;
59
+ }
60
+ this.parsed.push({
61
+ array_index: this.parsed.length,
62
+ options_index: this.options_index,
63
+ value: option.value,
64
+ text: option.text,
65
+ html: option.innerHTML,
66
+ title: option.title ? option.title : void 0,
67
+ selected: option.selected,
68
+ disabled: group_disabled === true ? group_disabled : option.disabled,
69
+ group_array_index: group_position,
70
+ group_label: group_position != null ? this.parsed[group_position].label : null,
71
+ classes: option.className,
72
+ style: option.style.cssText
73
+ });
74
+ } else {
75
+ this.parsed.push({
76
+ array_index: this.parsed.length,
77
+ options_index: this.options_index,
78
+ empty: true
79
+ });
80
+ }
81
+ return this.options_index += 1;
82
+ }
83
+ };
84
+
85
+ return SelectParser;
86
+
87
+ })();
88
+
89
+ SelectParser.select_to_array = function(select) {
90
+ var child, i, len, parser, ref;
91
+ parser = new SelectParser();
92
+ ref = select.childNodes;
93
+ for (i = 0, len = ref.length; i < len; i++) {
94
+ child = ref[i];
95
+ parser.add_node(child);
96
+ }
97
+ return parser.parsed;
98
+ };
99
+
100
+ AbstractChosen = (function() {
101
+ function AbstractChosen(form_field, options1) {
102
+ this.form_field = form_field;
103
+ this.options = options1 != null ? options1 : {};
104
+ this.label_click_handler = bind(this.label_click_handler, this);
105
+ if (!AbstractChosen.browser_is_supported()) {
106
+ return;
107
+ }
108
+ this.is_multiple = this.form_field.multiple;
109
+ this.set_default_text();
110
+ this.set_default_values();
111
+ this.setup();
112
+ this.set_up_html();
113
+ this.register_observers();
114
+ this.on_ready();
115
+ }
116
+
117
+ AbstractChosen.prototype.set_default_values = function() {
118
+ this.click_test_action = (function(_this) {
119
+ return function(evt) {
120
+ return _this.test_active_click(evt);
121
+ };
122
+ })(this);
123
+ this.activate_action = (function(_this) {
124
+ return function(evt) {
125
+ return _this.activate_field(evt);
126
+ };
127
+ })(this);
128
+ this.active_field = false;
129
+ this.mouse_on_container = false;
130
+ this.results_showing = false;
131
+ this.result_highlighted = null;
132
+ this.is_rtl = this.options.rtl || /\bchosen-rtl\b/.test(this.form_field.className);
133
+ this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
134
+ this.disable_search_threshold = this.options.disable_search_threshold || 0;
135
+ this.disable_search = this.options.disable_search || false;
136
+ this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
137
+ this.group_search = this.options.group_search != null ? this.options.group_search : true;
138
+ this.search_contains = this.options.search_contains || false;
139
+ this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
140
+ this.max_selected_options = this.options.max_selected_options || Infinity;
141
+ this.inherit_select_classes = this.options.inherit_select_classes || false;
142
+ this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
143
+ this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
144
+ this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
145
+ this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
146
+ this.case_sensitive_search = this.options.case_sensitive_search || false;
147
+ return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;
148
+ };
149
+
150
+ AbstractChosen.prototype.set_default_text = function() {
151
+ if (this.form_field.getAttribute("data-placeholder")) {
152
+ this.default_text = this.form_field.getAttribute("data-placeholder");
153
+ } else if (this.is_multiple) {
154
+ this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
155
+ } else {
156
+ this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
157
+ }
158
+ this.default_text = this.escape_html(this.default_text);
159
+ return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
160
+ };
161
+
162
+ AbstractChosen.prototype.choice_label = function(item) {
163
+ if (this.include_group_label_in_selected && (item.group_label != null)) {
164
+ return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
165
+ } else {
166
+ return item.html;
167
+ }
168
+ };
169
+
170
+ AbstractChosen.prototype.mouse_enter = function() {
171
+ return this.mouse_on_container = true;
172
+ };
173
+
174
+ AbstractChosen.prototype.mouse_leave = function() {
175
+ return this.mouse_on_container = false;
176
+ };
177
+
178
+ AbstractChosen.prototype.input_focus = function(evt) {
179
+ if (this.is_multiple) {
180
+ if (!this.active_field) {
181
+ return setTimeout(((function(_this) {
182
+ return function() {
183
+ return _this.container_mousedown();
184
+ };
185
+ })(this)), 50);
186
+ }
187
+ } else {
188
+ if (!this.active_field) {
189
+ return this.activate_field();
190
+ }
191
+ }
192
+ };
193
+
194
+ AbstractChosen.prototype.input_blur = function(evt) {
195
+ if (!this.mouse_on_container) {
196
+ this.active_field = false;
197
+ return setTimeout(((function(_this) {
198
+ return function() {
199
+ return _this.blur_test();
200
+ };
201
+ })(this)), 100);
202
+ }
203
+ };
204
+
205
+ AbstractChosen.prototype.label_click_handler = function(evt) {
206
+ if (this.is_multiple) {
207
+ return this.container_mousedown(evt);
208
+ } else {
209
+ return this.activate_field();
210
+ }
211
+ };
212
+
213
+ AbstractChosen.prototype.results_option_build = function(options) {
214
+ var content, data, data_content, i, len, ref, shown_results;
215
+ content = '';
216
+ shown_results = 0;
217
+ ref = this.results_data;
218
+ for (i = 0, len = ref.length; i < len; i++) {
219
+ data = ref[i];
220
+ data_content = '';
221
+ if (data.group) {
222
+ data_content = this.result_add_group(data);
223
+ } else {
224
+ data_content = this.result_add_option(data);
225
+ }
226
+ if (data_content !== '') {
227
+ shown_results++;
228
+ content += data_content;
229
+ }
230
+ if (options != null ? options.first : void 0) {
231
+ if (data.selected && this.is_multiple) {
232
+ this.choice_build(data);
233
+ } else if (data.selected && !this.is_multiple) {
234
+ this.single_set_selected_text(this.choice_label(data));
235
+ }
236
+ }
237
+ if (shown_results >= this.max_shown_results) {
238
+ break;
239
+ }
240
+ }
241
+ return content;
242
+ };
243
+
244
+ AbstractChosen.prototype.result_add_option = function(option) {
245
+ var classes, option_el;
246
+ if (!option.search_match) {
247
+ return '';
248
+ }
249
+ if (!this.include_option_in_results(option)) {
250
+ return '';
251
+ }
252
+ classes = [];
253
+ if (!option.disabled && !(option.selected && this.is_multiple)) {
254
+ classes.push("active-result");
255
+ }
256
+ if (option.disabled && !(option.selected && this.is_multiple)) {
257
+ classes.push("disabled-result");
258
+ }
259
+ if (option.selected) {
260
+ classes.push("result-selected");
261
+ }
262
+ if (option.group_array_index != null) {
263
+ classes.push("group-option");
264
+ }
265
+ if (option.classes !== "") {
266
+ classes.push(option.classes);
267
+ }
268
+ option_el = document.createElement("li");
269
+ option_el.className = classes.join(" ");
270
+ option_el.style.cssText = option.style;
271
+ option_el.setAttribute("data-option-array-index", option.array_index);
272
+ option_el.innerHTML = option.highlighted_html || option.html;
273
+ if (option.title) {
274
+ option_el.title = option.title;
275
+ }
276
+ return this.outerHTML(option_el);
277
+ };
278
+
279
+ AbstractChosen.prototype.result_add_group = function(group) {
280
+ var classes, group_el;
281
+ if (!(group.search_match || group.group_match)) {
282
+ return '';
283
+ }
284
+ if (!(group.active_options > 0)) {
285
+ return '';
286
+ }
287
+ classes = [];
288
+ classes.push("group-result");
289
+ if (group.classes) {
290
+ classes.push(group.classes);
291
+ }
292
+ group_el = document.createElement("li");
293
+ group_el.className = classes.join(" ");
294
+ group_el.innerHTML = group.highlighted_html || this.escape_html(group.label);
295
+ if (group.title) {
296
+ group_el.title = group.title;
297
+ }
298
+ return this.outerHTML(group_el);
299
+ };
300
+
301
+ AbstractChosen.prototype.results_update_field = function() {
302
+ this.set_default_text();
303
+ if (!this.is_multiple) {
304
+ this.results_reset_cleanup();
305
+ }
306
+ this.result_clear_highlight();
307
+ this.results_build();
308
+ if (this.results_showing) {
309
+ return this.winnow_results();
310
+ }
311
+ };
312
+
313
+ AbstractChosen.prototype.reset_single_select_options = function() {
314
+ var i, len, ref, result, results1;
315
+ ref = this.results_data;
316
+ results1 = [];
317
+ for (i = 0, len = ref.length; i < len; i++) {
318
+ result = ref[i];
319
+ if (result.selected) {
320
+ results1.push(result.selected = false);
321
+ } else {
322
+ results1.push(void 0);
323
+ }
324
+ }
325
+ return results1;
326
+ };
327
+
328
+ AbstractChosen.prototype.results_toggle = function() {
329
+ if (this.results_showing) {
330
+ return this.results_hide();
331
+ } else {
332
+ return this.results_show();
333
+ }
334
+ };
335
+
336
+ AbstractChosen.prototype.results_search = function(evt) {
337
+ if (this.results_showing) {
338
+ return this.winnow_results();
339
+ } else {
340
+ return this.results_show();
341
+ }
342
+ };
343
+
344
+ AbstractChosen.prototype.winnow_results = function() {
345
+ var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
346
+ this.no_results_clear();
347
+ results = 0;
348
+ query = this.get_search_text();
349
+ escapedQuery = query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
350
+ regex = this.get_search_regex(escapedQuery);
351
+ ref = this.results_data;
352
+ for (i = 0, len = ref.length; i < len; i++) {
353
+ option = ref[i];
354
+ option.search_match = false;
355
+ results_group = null;
356
+ search_match = null;
357
+ option.highlighted_html = '';
358
+ if (this.include_option_in_results(option)) {
359
+ if (option.group) {
360
+ option.group_match = false;
361
+ option.active_options = 0;
362
+ }
363
+ if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
364
+ results_group = this.results_data[option.group_array_index];
365
+ if (results_group.active_options === 0 && results_group.search_match) {
366
+ results += 1;
367
+ }
368
+ results_group.active_options += 1;
369
+ }
370
+ text = option.group ? option.label : option.text;
371
+ if (!(option.group && !this.group_search)) {
372
+ search_match = this.search_string_match(text, regex);
373
+ option.search_match = search_match != null;
374
+ if (option.search_match && !option.group) {
375
+ results += 1;
376
+ }
377
+ if (option.search_match) {
378
+ if (query.length) {
379
+ startpos = search_match.index;
380
+ prefix = text.slice(0, startpos);
381
+ fix = text.slice(startpos, startpos + query.length);
382
+ suffix = text.slice(startpos + query.length);
383
+ option.highlighted_html = (this.escape_html(prefix)) + "<em>" + (this.escape_html(fix)) + "</em>" + (this.escape_html(suffix));
384
+ }
385
+ if (results_group != null) {
386
+ results_group.group_match = true;
387
+ }
388
+ } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
389
+ option.search_match = true;
390
+ }
391
+ }
392
+ }
393
+ }
394
+ this.result_clear_highlight();
395
+ if (results < 1 && query.length) {
396
+ this.update_results_content("");
397
+ return this.no_results(query);
398
+ } else {
399
+ this.update_results_content(this.results_option_build());
400
+ return this.winnow_results_set_highlight();
401
+ }
402
+ };
403
+
404
+ AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
405
+ var regex_flag, regex_string;
406
+ regex_string = this.search_contains ? escaped_search_string : "(^|\\s|\\b)" + escaped_search_string + "[^\\s]*";
407
+ if (!(this.enable_split_word_search || this.search_contains)) {
408
+ regex_string = "^" + regex_string;
409
+ }
410
+ regex_flag = this.case_sensitive_search ? "" : "i";
411
+ return new RegExp(regex_string, regex_flag);
412
+ };
413
+
414
+ AbstractChosen.prototype.search_string_match = function(search_string, regex) {
415
+ var match;
416
+ match = regex.exec(search_string);
417
+ if (!this.search_contains && (match != null ? match[1] : void 0)) {
418
+ match.index += 1;
419
+ }
420
+ return match;
421
+ };
422
+
423
+ AbstractChosen.prototype.choices_count = function() {
424
+ var i, len, option, ref;
425
+ if (this.selected_option_count != null) {
426
+ return this.selected_option_count;
427
+ }
428
+ this.selected_option_count = 0;
429
+ ref = this.form_field.options;
430
+ for (i = 0, len = ref.length; i < len; i++) {
431
+ option = ref[i];
432
+ if (option.selected) {
433
+ this.selected_option_count += 1;
434
+ }
435
+ }
436
+ return this.selected_option_count;
437
+ };
438
+
439
+ AbstractChosen.prototype.choices_click = function(evt) {
440
+ evt.preventDefault();
441
+ this.activate_field();
442
+ if (!(this.results_showing || this.is_disabled)) {
443
+ return this.results_show();
444
+ }
445
+ };
446
+
447
+ AbstractChosen.prototype.keydown_checker = function(evt) {
448
+ var ref, stroke;
449
+ stroke = (ref = evt.which) != null ? ref : evt.keyCode;
450
+ this.search_field_scale();
451
+ if (stroke !== 8 && this.pending_backstroke) {
452
+ this.clear_backstroke();
453
+ }
454
+ switch (stroke) {
455
+ case 8:
456
+ this.backstroke_length = this.get_search_field_value().length;
457
+ break;
458
+ case 9:
459
+ if (this.results_showing && !this.is_multiple) {
460
+ this.result_select(evt);
461
+ }
462
+ this.mouse_on_container = false;
463
+ break;
464
+ case 13:
465
+ if (this.results_showing) {
466
+ evt.preventDefault();
467
+ }
468
+ break;
469
+ case 27:
470
+ if (this.results_showing) {
471
+ evt.preventDefault();
472
+ }
473
+ break;
474
+ case 32:
475
+ if (this.disable_search) {
476
+ evt.preventDefault();
477
+ }
478
+ break;
479
+ case 38:
480
+ evt.preventDefault();
481
+ this.keyup_arrow();
482
+ break;
483
+ case 40:
484
+ evt.preventDefault();
485
+ this.keydown_arrow();
486
+ break;
487
+ }
488
+ };
489
+
490
+ AbstractChosen.prototype.keyup_checker = function(evt) {
491
+ var ref, stroke;
492
+ stroke = (ref = evt.which) != null ? ref : evt.keyCode;
493
+ this.search_field_scale();
494
+ switch (stroke) {
495
+ case 8:
496
+ if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
497
+ this.keydown_backstroke();
498
+ } else if (!this.pending_backstroke) {
499
+ this.result_clear_highlight();
500
+ this.results_search();
501
+ }
502
+ break;
503
+ case 13:
504
+ evt.preventDefault();
505
+ if (this.results_showing) {
506
+ this.result_select(evt);
507
+ }
508
+ break;
509
+ case 27:
510
+ if (this.results_showing) {
511
+ this.results_hide();
512
+ }
513
+ break;
514
+ case 9:
515
+ case 16:
516
+ case 17:
517
+ case 18:
518
+ case 38:
519
+ case 40:
520
+ case 91:
521
+ break;
522
+ default:
523
+ this.results_search();
524
+ break;
525
+ }
526
+ };
527
+
528
+ AbstractChosen.prototype.clipboard_event_checker = function(evt) {
529
+ if (this.is_disabled) {
530
+ return;
531
+ }
532
+ return setTimeout(((function(_this) {
533
+ return function() {
534
+ return _this.results_search();
535
+ };
536
+ })(this)), 50);
537
+ };
538
+
539
+ AbstractChosen.prototype.container_width = function() {
540
+ if (this.options.width != null) {
541
+ return this.options.width;
542
+ } else {
543
+ return this.form_field.offsetWidth + "px";
544
+ }
545
+ };
546
+
547
+ AbstractChosen.prototype.include_option_in_results = function(option) {
548
+ if (this.is_multiple && (!this.display_selected_options && option.selected)) {
549
+ return false;
550
+ }
551
+ if (!this.display_disabled_options && option.disabled) {
552
+ return false;
553
+ }
554
+ if (option.empty) {
555
+ return false;
556
+ }
557
+ return true;
558
+ };
559
+
560
+ AbstractChosen.prototype.search_results_touchstart = function(evt) {
561
+ this.touch_started = true;
562
+ return this.search_results_mouseover(evt);
563
+ };
564
+
565
+ AbstractChosen.prototype.search_results_touchmove = function(evt) {
566
+ this.touch_started = false;
567
+ return this.search_results_mouseout(evt);
568
+ };
569
+
570
+ AbstractChosen.prototype.search_results_touchend = function(evt) {
571
+ if (this.touch_started) {
572
+ return this.search_results_mouseup(evt);
573
+ }
574
+ };
575
+
576
+ AbstractChosen.prototype.outerHTML = function(element) {
577
+ var tmp;
578
+ if (element.outerHTML) {
579
+ return element.outerHTML;
580
+ }
581
+ tmp = document.createElement("div");
582
+ tmp.appendChild(element);
583
+ return tmp.innerHTML;
584
+ };
585
+
586
+ AbstractChosen.prototype.get_single_html = function() {
587
+ return "<a class=\"chosen-single chosen-default\">\n <span>" + this.default_text + "</span>\n <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n <div class=\"chosen-search\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n </div>\n <ul class=\"chosen-results\"></ul>\n</div>";
588
+ };
589
+
590
+ AbstractChosen.prototype.get_multi_html = function() {
591
+ return "<ul class=\"chosen-choices\">\n <li class=\"search-field\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" value=\"" + this.default_text + "\" />\n </li>\n</ul>\n<div class=\"chosen-drop\">\n <ul class=\"chosen-results\"></ul>\n</div>";
592
+ };
593
+
594
+ AbstractChosen.prototype.get_no_results_html = function(terms) {
595
+ return "<li class=\"no-results\">\n " + this.results_none_found + " <span>" + (this.escape_html(terms)) + "</span>\n</li>";
596
+ };
597
+
598
+ AbstractChosen.browser_is_supported = function() {
599
+ if ("Microsoft Internet Explorer" === window.navigator.appName) {
600
+ return document.documentMode >= 8;
601
+ }
602
+ if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {
603
+ return false;
604
+ }
605
+ return true;
606
+ };
607
+
608
+ AbstractChosen.default_multiple_text = "Select Some Options";
609
+
610
+ AbstractChosen.default_single_text = "Select an Option";
611
+
612
+ AbstractChosen.default_no_result_text = "No results match";
613
+
614
+ return AbstractChosen;
615
+
616
+ })();
617
+
618
+ $ = jQuery;
619
+
620
+ $.fn.extend({
621
+ chosen: function(options) {
622
+ if (!AbstractChosen.browser_is_supported()) {
623
+ return this;
624
+ }
625
+ return this.each(function(input_field) {
626
+ var $this, chosen;
627
+ $this = $(this);
628
+ chosen = $this.data('chosen');
629
+ if (options === 'destroy') {
630
+ if (chosen instanceof Chosen) {
631
+ chosen.destroy();
632
+ }
633
+ return;
634
+ }
635
+ if (!(chosen instanceof Chosen)) {
636
+ $this.data('chosen', new Chosen(this, options));
637
+ }
638
+ });
639
+ }
640
+ });
641
+
642
+ Chosen = (function(superClass) {
643
+ extend(Chosen, superClass);
644
+
645
+ function Chosen() {
646
+ return Chosen.__super__.constructor.apply(this, arguments);
647
+ }
648
+
649
+ Chosen.prototype.setup = function() {
650
+ this.form_field_jq = $(this.form_field);
651
+ return this.current_selectedIndex = this.form_field.selectedIndex;
652
+ };
653
+
654
+ Chosen.prototype.set_up_html = function() {
655
+ var container_classes, container_props;
656
+ container_classes = ["chosen-container"];
657
+ container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
658
+ if (this.inherit_select_classes && this.form_field.className) {
659
+ container_classes.push(this.form_field.className);
660
+ }
661
+ if (this.is_rtl) {
662
+ container_classes.push("chosen-rtl");
663
+ }
664
+ container_props = {
665
+ 'class': container_classes.join(' '),
666
+ 'title': this.form_field.title
667
+ };
668
+ if (this.form_field.id.length) {
669
+ container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
670
+ }
671
+ this.container = $("<div />", container_props);
672
+ this.container.width(this.container_width());
673
+ if (this.is_multiple) {
674
+ this.container.html(this.get_multi_html());
675
+ } else {
676
+ this.container.html(this.get_single_html());
677
+ }
678
+ this.form_field_jq.hide().after(this.container);
679
+ this.dropdown = this.container.find('div.chosen-drop').first();
680
+ this.search_field = this.container.find('input').first();
681
+ this.search_results = this.container.find('ul.chosen-results').first();
682
+ this.search_field_scale();
683
+ this.search_no_results = this.container.find('li.no-results').first();
684
+ if (this.is_multiple) {
685
+ this.search_choices = this.container.find('ul.chosen-choices').first();
686
+ this.search_container = this.container.find('li.search-field').first();
687
+ } else {
688
+ this.search_container = this.container.find('div.chosen-search').first();
689
+ this.selected_item = this.container.find('.chosen-single').first();
690
+ }
691
+ this.results_build();
692
+ this.set_tab_index();
693
+ return this.set_label_behavior();
694
+ };
695
+
696
+ Chosen.prototype.on_ready = function() {
697
+ return this.form_field_jq.trigger("chosen:ready", {
698
+ chosen: this
699
+ });
700
+ };
701
+
702
+ Chosen.prototype.register_observers = function() {
703
+ this.container.on('touchstart.chosen', (function(_this) {
704
+ return function(evt) {
705
+ _this.container_mousedown(evt);
706
+ };
707
+ })(this));
708
+ this.container.on('touchend.chosen', (function(_this) {
709
+ return function(evt) {
710
+ _this.container_mouseup(evt);
711
+ };
712
+ })(this));
713
+ this.container.on('mousedown.chosen', (function(_this) {
714
+ return function(evt) {
715
+ _this.container_mousedown(evt);
716
+ };
717
+ })(this));
718
+ this.container.on('mouseup.chosen', (function(_this) {
719
+ return function(evt) {
720
+ _this.container_mouseup(evt);
721
+ };
722
+ })(this));
723
+ this.container.on('mouseenter.chosen', (function(_this) {
724
+ return function(evt) {
725
+ _this.mouse_enter(evt);
726
+ };
727
+ })(this));
728
+ this.container.on('mouseleave.chosen', (function(_this) {
729
+ return function(evt) {
730
+ _this.mouse_leave(evt);
731
+ };
732
+ })(this));
733
+ this.search_results.on('mouseup.chosen', (function(_this) {
734
+ return function(evt) {
735
+ _this.search_results_mouseup(evt);
736
+ };
737
+ })(this));
738
+ this.search_results.on('mouseover.chosen', (function(_this) {
739
+ return function(evt) {
740
+ _this.search_results_mouseover(evt);
741
+ };
742
+ })(this));
743
+ this.search_results.on('mouseout.chosen', (function(_this) {
744
+ return function(evt) {
745
+ _this.search_results_mouseout(evt);
746
+ };
747
+ })(this));
748
+ this.search_results.on('mousewheel.chosen DOMMouseScroll.chosen', (function(_this) {
749
+ return function(evt) {
750
+ _this.search_results_mousewheel(evt);
751
+ };
752
+ })(this));
753
+ this.search_results.on('touchstart.chosen', (function(_this) {
754
+ return function(evt) {
755
+ _this.search_results_touchstart(evt);
756
+ };
757
+ })(this));
758
+ this.search_results.on('touchmove.chosen', (function(_this) {
759
+ return function(evt) {
760
+ _this.search_results_touchmove(evt);
761
+ };
762
+ })(this));
763
+ this.search_results.on('touchend.chosen', (function(_this) {
764
+ return function(evt) {
765
+ _this.search_results_touchend(evt);
766
+ };
767
+ })(this));
768
+ this.form_field_jq.on("chosen:updated.chosen", (function(_this) {
769
+ return function(evt) {
770
+ _this.results_update_field(evt);
771
+ };
772
+ })(this));
773
+ this.form_field_jq.on("chosen:activate.chosen", (function(_this) {
774
+ return function(evt) {
775
+ _this.activate_field(evt);
776
+ };
777
+ })(this));
778
+ this.form_field_jq.on("chosen:open.chosen", (function(_this) {
779
+ return function(evt) {
780
+ _this.container_mousedown(evt);
781
+ };
782
+ })(this));
783
+ this.form_field_jq.on("chosen:close.chosen", (function(_this) {
784
+ return function(evt) {
785
+ _this.close_field(evt);
786
+ };
787
+ })(this));
788
+ this.search_field.on('blur.chosen', (function(_this) {
789
+ return function(evt) {
790
+ _this.input_blur(evt);
791
+ };
792
+ })(this));
793
+ this.search_field.on('keyup.chosen', (function(_this) {
794
+ return function(evt) {
795
+ _this.keyup_checker(evt);
796
+ };
797
+ })(this));
798
+ this.search_field.on('keydown.chosen', (function(_this) {
799
+ return function(evt) {
800
+ _this.keydown_checker(evt);
801
+ };
802
+ })(this));
803
+ this.search_field.on('focus.chosen', (function(_this) {
804
+ return function(evt) {
805
+ _this.input_focus(evt);
806
+ };
807
+ })(this));
808
+ this.search_field.on('cut.chosen', (function(_this) {
809
+ return function(evt) {
810
+ _this.clipboard_event_checker(evt);
811
+ };
812
+ })(this));
813
+ this.search_field.on('paste.chosen', (function(_this) {
814
+ return function(evt) {
815
+ _this.clipboard_event_checker(evt);
816
+ };
817
+ })(this));
818
+ if (this.is_multiple) {
819
+ return this.search_choices.on('click.chosen', (function(_this) {
820
+ return function(evt) {
821
+ _this.choices_click(evt);
822
+ };
823
+ })(this));
824
+ } else {
825
+ return this.container.on('click.chosen', function(evt) {
826
+ evt.preventDefault();
827
+ });
828
+ }
829
+ };
830
+
831
+ Chosen.prototype.destroy = function() {
832
+ $(this.container[0].ownerDocument).off('click.chosen', this.click_test_action);
833
+ if (this.form_field_label.length > 0) {
834
+ this.form_field_label.off('click.chosen');
835
+ }
836
+ if (this.search_field[0].tabIndex) {
837
+ this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
838
+ }
839
+ this.container.remove();
840
+ this.form_field_jq.removeData('chosen');
841
+ return this.form_field_jq.show();
842
+ };
843
+
844
+ Chosen.prototype.search_field_disabled = function() {
845
+ this.is_disabled = this.form_field.disabled || this.form_field_jq.parents('fieldset').is(':disabled');
846
+ this.container.toggleClass('chosen-disabled', this.is_disabled);
847
+ this.search_field[0].disabled = this.is_disabled;
848
+ if (!this.is_multiple) {
849
+ this.selected_item.off('focus.chosen', this.activate_field);
850
+ }
851
+ if (this.is_disabled) {
852
+ return this.close_field();
853
+ } else if (!this.is_multiple) {
854
+ return this.selected_item.on('focus.chosen', this.activate_field);
855
+ }
856
+ };
857
+
858
+ Chosen.prototype.container_mousedown = function(evt) {
859
+ var ref;
860
+ if (this.is_disabled) {
861
+ return;
862
+ }
863
+ if (evt && ((ref = evt.type) === 'mousedown' || ref === 'touchstart') && !this.results_showing) {
864
+ evt.preventDefault();
865
+ }
866
+ if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
867
+ if (!this.active_field) {
868
+ if (this.is_multiple) {
869
+ this.search_field.val("");
870
+ }
871
+ $(this.container[0].ownerDocument).on('click.chosen', this.click_test_action);
872
+ this.results_show();
873
+ } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
874
+ evt.preventDefault();
875
+ this.results_toggle();
876
+ }
877
+ return this.activate_field();
878
+ }
879
+ };
880
+
881
+ Chosen.prototype.container_mouseup = function(evt) {
882
+ if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
883
+ return this.results_reset(evt);
884
+ }
885
+ };
886
+
887
+ Chosen.prototype.search_results_mousewheel = function(evt) {
888
+ var delta;
889
+ if (evt.originalEvent) {
890
+ delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
891
+ }
892
+ if (delta != null) {
893
+ evt.preventDefault();
894
+ if (evt.type === 'DOMMouseScroll') {
895
+ delta = delta * 40;
896
+ }
897
+ return this.search_results.scrollTop(delta + this.search_results.scrollTop());
898
+ }
899
+ };
900
+
901
+ Chosen.prototype.blur_test = function(evt) {
902
+ if (!this.active_field && this.container.hasClass("chosen-container-active")) {
903
+ return this.close_field();
904
+ }
905
+ };
906
+
907
+ Chosen.prototype.close_field = function() {
908
+ $(this.container[0].ownerDocument).off("click.chosen", this.click_test_action);
909
+ this.active_field = false;
910
+ this.results_hide();
911
+ this.container.removeClass("chosen-container-active");
912
+ this.clear_backstroke();
913
+ this.show_search_field_default();
914
+ this.search_field_scale();
915
+ return this.search_field.blur();
916
+ };
917
+
918
+ Chosen.prototype.activate_field = function() {
919
+ if (this.is_disabled) {
920
+ return;
921
+ }
922
+ this.container.addClass("chosen-container-active");
923
+ this.active_field = true;
924
+ this.search_field.val(this.search_field.val());
925
+ return this.search_field.focus();
926
+ };
927
+
928
+ Chosen.prototype.test_active_click = function(evt) {
929
+ var active_container;
930
+ active_container = $(evt.target).closest('.chosen-container');
931
+ if (active_container.length && this.container[0] === active_container[0]) {
932
+ return this.active_field = true;
933
+ } else {
934
+ return this.close_field();
935
+ }
936
+ };
937
+
938
+ Chosen.prototype.results_build = function() {
939
+ this.parsing = true;
940
+ this.selected_option_count = null;
941
+ this.results_data = SelectParser.select_to_array(this.form_field);
942
+ if (this.is_multiple) {
943
+ this.search_choices.find("li.search-choice").remove();
944
+ } else if (!this.is_multiple) {
945
+ this.single_set_selected_text();
946
+ if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
947
+ this.search_field[0].readOnly = true;
948
+ this.container.addClass("chosen-container-single-nosearch");
949
+ } else {
950
+ this.search_field[0].readOnly = false;
951
+ this.container.removeClass("chosen-container-single-nosearch");
952
+ }
953
+ }
954
+ this.update_results_content(this.results_option_build({
955
+ first: true
956
+ }));
957
+ this.search_field_disabled();
958
+ this.show_search_field_default();
959
+ this.search_field_scale();
960
+ return this.parsing = false;
961
+ };
962
+
963
+ Chosen.prototype.result_do_highlight = function(el) {
964
+ var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
965
+ if (el.length) {
966
+ this.result_clear_highlight();
967
+ this.result_highlight = el;
968
+ this.result_highlight.addClass("highlighted");
969
+ maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
970
+ visible_top = this.search_results.scrollTop();
971
+ visible_bottom = maxHeight + visible_top;
972
+ high_top = this.result_highlight.position().top + this.search_results.scrollTop();
973
+ high_bottom = high_top + this.result_highlight.outerHeight();
974
+ if (high_bottom >= visible_bottom) {
975
+ return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
976
+ } else if (high_top < visible_top) {
977
+ return this.search_results.scrollTop(high_top);
978
+ }
979
+ }
980
+ };
981
+
982
+ Chosen.prototype.result_clear_highlight = function() {
983
+ if (this.result_highlight) {
984
+ this.result_highlight.removeClass("highlighted");
985
+ }
986
+ return this.result_highlight = null;
987
+ };
988
+
989
+ Chosen.prototype.results_show = function() {
990
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
991
+ this.form_field_jq.trigger("chosen:maxselected", {
992
+ chosen: this
993
+ });
994
+ return false;
995
+ }
996
+ this.container.addClass("chosen-with-drop");
997
+ this.results_showing = true;
998
+ this.search_field.focus();
999
+ this.search_field.val(this.get_search_field_value());
1000
+ this.winnow_results();
1001
+ return this.form_field_jq.trigger("chosen:showing_dropdown", {
1002
+ chosen: this
1003
+ });
1004
+ };
1005
+
1006
+ Chosen.prototype.update_results_content = function(content) {
1007
+ return this.search_results.html(content);
1008
+ };
1009
+
1010
+ Chosen.prototype.results_hide = function() {
1011
+ if (this.results_showing) {
1012
+ this.result_clear_highlight();
1013
+ this.container.removeClass("chosen-with-drop");
1014
+ this.form_field_jq.trigger("chosen:hiding_dropdown", {
1015
+ chosen: this
1016
+ });
1017
+ }
1018
+ return this.results_showing = false;
1019
+ };
1020
+
1021
+ Chosen.prototype.set_tab_index = function(el) {
1022
+ var ti;
1023
+ if (this.form_field.tabIndex) {
1024
+ ti = this.form_field.tabIndex;
1025
+ this.form_field.tabIndex = -1;
1026
+ return this.search_field[0].tabIndex = ti;
1027
+ }
1028
+ };
1029
+
1030
+ Chosen.prototype.set_label_behavior = function() {
1031
+ this.form_field_label = this.form_field_jq.parents("label");
1032
+ if (!this.form_field_label.length && this.form_field.id.length) {
1033
+ this.form_field_label = $("label[for='" + this.form_field.id + "']");
1034
+ }
1035
+ if (this.form_field_label.length > 0) {
1036
+ return this.form_field_label.on('click.chosen', this.label_click_handler);
1037
+ }
1038
+ };
1039
+
1040
+ Chosen.prototype.show_search_field_default = function() {
1041
+ if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
1042
+ this.search_field.val(this.default_text);
1043
+ return this.search_field.addClass("default");
1044
+ } else {
1045
+ this.search_field.val("");
1046
+ return this.search_field.removeClass("default");
1047
+ }
1048
+ };
1049
+
1050
+ Chosen.prototype.search_results_mouseup = function(evt) {
1051
+ var target;
1052
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
1053
+ if (target.length) {
1054
+ this.result_highlight = target;
1055
+ this.result_select(evt);
1056
+ return this.search_field.focus();
1057
+ }
1058
+ };
1059
+
1060
+ Chosen.prototype.search_results_mouseover = function(evt) {
1061
+ var target;
1062
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
1063
+ if (target) {
1064
+ return this.result_do_highlight(target);
1065
+ }
1066
+ };
1067
+
1068
+ Chosen.prototype.search_results_mouseout = function(evt) {
1069
+ if ($(evt.target).hasClass("active-result") || $(evt.target).parents('.active-result').first()) {
1070
+ return this.result_clear_highlight();
1071
+ }
1072
+ };
1073
+
1074
+ Chosen.prototype.choice_build = function(item) {
1075
+ var choice, close_link;
1076
+ choice = $('<li />', {
1077
+ "class": "search-choice"
1078
+ }).html("<span>" + (this.choice_label(item)) + "</span>");
1079
+ if (item.disabled) {
1080
+ choice.addClass('search-choice-disabled');
1081
+ } else {
1082
+ close_link = $('<a />', {
1083
+ "class": 'search-choice-close',
1084
+ 'data-option-array-index': item.array_index
1085
+ });
1086
+ close_link.on('click.chosen', (function(_this) {
1087
+ return function(evt) {
1088
+ return _this.choice_destroy_link_click(evt);
1089
+ };
1090
+ })(this));
1091
+ choice.append(close_link);
1092
+ }
1093
+ return this.search_container.before(choice);
1094
+ };
1095
+
1096
+ Chosen.prototype.choice_destroy_link_click = function(evt) {
1097
+ evt.preventDefault();
1098
+ evt.stopPropagation();
1099
+ if (!this.is_disabled) {
1100
+ return this.choice_destroy($(evt.target));
1101
+ }
1102
+ };
1103
+
1104
+ Chosen.prototype.choice_destroy = function(link) {
1105
+ if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1106
+ if (this.active_field) {
1107
+ this.search_field.focus();
1108
+ } else {
1109
+ this.show_search_field_default();
1110
+ }
1111
+ if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {
1112
+ this.results_hide();
1113
+ }
1114
+ link.parents('li').first().remove();
1115
+ return this.search_field_scale();
1116
+ }
1117
+ };
1118
+
1119
+ Chosen.prototype.results_reset = function() {
1120
+ this.reset_single_select_options();
1121
+ this.form_field.options[0].selected = true;
1122
+ this.single_set_selected_text();
1123
+ this.show_search_field_default();
1124
+ this.results_reset_cleanup();
1125
+ this.trigger_form_field_change();
1126
+ if (this.active_field) {
1127
+ return this.results_hide();
1128
+ }
1129
+ };
1130
+
1131
+ Chosen.prototype.results_reset_cleanup = function() {
1132
+ this.current_selectedIndex = this.form_field.selectedIndex;
1133
+ return this.selected_item.find("abbr").remove();
1134
+ };
1135
+
1136
+ Chosen.prototype.result_select = function(evt) {
1137
+ var high, item;
1138
+ if (this.result_highlight) {
1139
+ high = this.result_highlight;
1140
+ this.result_clear_highlight();
1141
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1142
+ this.form_field_jq.trigger("chosen:maxselected", {
1143
+ chosen: this
1144
+ });
1145
+ return false;
1146
+ }
1147
+ if (this.is_multiple) {
1148
+ high.removeClass("active-result");
1149
+ } else {
1150
+ this.reset_single_select_options();
1151
+ }
1152
+ high.addClass("result-selected");
1153
+ item = this.results_data[high[0].getAttribute("data-option-array-index")];
1154
+ item.selected = true;
1155
+ this.form_field.options[item.options_index].selected = true;
1156
+ this.selected_option_count = null;
1157
+ this.search_field.val("");
1158
+ if (this.is_multiple) {
1159
+ this.choice_build(item);
1160
+ } else {
1161
+ this.single_set_selected_text(this.choice_label(item));
1162
+ }
1163
+ if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
1164
+ this.winnow_results();
1165
+ } else {
1166
+ this.results_hide();
1167
+ this.show_search_field_default();
1168
+ }
1169
+ if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1170
+ this.trigger_form_field_change({
1171
+ selected: this.form_field.options[item.options_index].value
1172
+ });
1173
+ }
1174
+ this.current_selectedIndex = this.form_field.selectedIndex;
1175
+ evt.preventDefault();
1176
+ return this.search_field_scale();
1177
+ }
1178
+ };
1179
+
1180
+ Chosen.prototype.single_set_selected_text = function(text) {
1181
+ if (text == null) {
1182
+ text = this.default_text;
1183
+ }
1184
+ if (text === this.default_text) {
1185
+ this.selected_item.addClass("chosen-default");
1186
+ } else {
1187
+ this.single_deselect_control_build();
1188
+ this.selected_item.removeClass("chosen-default");
1189
+ }
1190
+ return this.selected_item.find("span").html(text);
1191
+ };
1192
+
1193
+ Chosen.prototype.result_deselect = function(pos) {
1194
+ var result_data;
1195
+ result_data = this.results_data[pos];
1196
+ if (!this.form_field.options[result_data.options_index].disabled) {
1197
+ result_data.selected = false;
1198
+ this.form_field.options[result_data.options_index].selected = false;
1199
+ this.selected_option_count = null;
1200
+ this.result_clear_highlight();
1201
+ if (this.results_showing) {
1202
+ this.winnow_results();
1203
+ }
1204
+ this.trigger_form_field_change({
1205
+ deselected: this.form_field.options[result_data.options_index].value
1206
+ });
1207
+ this.search_field_scale();
1208
+ return true;
1209
+ } else {
1210
+ return false;
1211
+ }
1212
+ };
1213
+
1214
+ Chosen.prototype.single_deselect_control_build = function() {
1215
+ if (!this.allow_single_deselect) {
1216
+ return;
1217
+ }
1218
+ if (!this.selected_item.find("abbr").length) {
1219
+ this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1220
+ }
1221
+ return this.selected_item.addClass("chosen-single-with-deselect");
1222
+ };
1223
+
1224
+ Chosen.prototype.get_search_field_value = function() {
1225
+ return this.search_field.val();
1226
+ };
1227
+
1228
+ Chosen.prototype.get_search_text = function() {
1229
+ return $.trim(this.get_search_field_value());
1230
+ };
1231
+
1232
+ Chosen.prototype.escape_html = function(text) {
1233
+ return $('<div/>').text(text).html();
1234
+ };
1235
+
1236
+ Chosen.prototype.winnow_results_set_highlight = function() {
1237
+ var do_high, selected_results;
1238
+ selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1239
+ do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1240
+ if (do_high != null) {
1241
+ return this.result_do_highlight(do_high);
1242
+ }
1243
+ };
1244
+
1245
+ Chosen.prototype.no_results = function(terms) {
1246
+ var no_results_html;
1247
+ no_results_html = this.get_no_results_html(terms);
1248
+ this.search_results.append(no_results_html);
1249
+ return this.form_field_jq.trigger("chosen:no_results", {
1250
+ chosen: this
1251
+ });
1252
+ };
1253
+
1254
+ Chosen.prototype.no_results_clear = function() {
1255
+ return this.search_results.find(".no-results").remove();
1256
+ };
1257
+
1258
+ Chosen.prototype.keydown_arrow = function() {
1259
+ var next_sib;
1260
+ if (this.results_showing && this.result_highlight) {
1261
+ next_sib = this.result_highlight.nextAll("li.active-result").first();
1262
+ if (next_sib) {
1263
+ return this.result_do_highlight(next_sib);
1264
+ }
1265
+ } else {
1266
+ return this.results_show();
1267
+ }
1268
+ };
1269
+
1270
+ Chosen.prototype.keyup_arrow = function() {
1271
+ var prev_sibs;
1272
+ if (!this.results_showing && !this.is_multiple) {
1273
+ return this.results_show();
1274
+ } else if (this.result_highlight) {
1275
+ prev_sibs = this.result_highlight.prevAll("li.active-result");
1276
+ if (prev_sibs.length) {
1277
+ return this.result_do_highlight(prev_sibs.first());
1278
+ } else {
1279
+ if (this.choices_count() > 0) {
1280
+ this.results_hide();
1281
+ }
1282
+ return this.result_clear_highlight();
1283
+ }
1284
+ }
1285
+ };
1286
+
1287
+ Chosen.prototype.keydown_backstroke = function() {
1288
+ var next_available_destroy;
1289
+ if (this.pending_backstroke) {
1290
+ this.choice_destroy(this.pending_backstroke.find("a").first());
1291
+ return this.clear_backstroke();
1292
+ } else {
1293
+ next_available_destroy = this.search_container.siblings("li.search-choice").last();
1294
+ if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1295
+ this.pending_backstroke = next_available_destroy;
1296
+ if (this.single_backstroke_delete) {
1297
+ return this.keydown_backstroke();
1298
+ } else {
1299
+ return this.pending_backstroke.addClass("search-choice-focus");
1300
+ }
1301
+ }
1302
+ }
1303
+ };
1304
+
1305
+ Chosen.prototype.clear_backstroke = function() {
1306
+ if (this.pending_backstroke) {
1307
+ this.pending_backstroke.removeClass("search-choice-focus");
1308
+ }
1309
+ return this.pending_backstroke = null;
1310
+ };
1311
+
1312
+ Chosen.prototype.search_field_scale = function() {
1313
+ var div, i, len, style, style_block, styles, width;
1314
+ if (!this.is_multiple) {
1315
+ return;
1316
+ }
1317
+ style_block = {
1318
+ position: 'absolute',
1319
+ left: '-1000px',
1320
+ top: '-1000px',
1321
+ display: 'none',
1322
+ whiteSpace: 'pre'
1323
+ };
1324
+ styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];
1325
+ for (i = 0, len = styles.length; i < len; i++) {
1326
+ style = styles[i];
1327
+ style_block[style] = this.search_field.css(style);
1328
+ }
1329
+ div = $('<div />').css(style_block);
1330
+ div.text(this.get_search_field_value());
1331
+ $('body').append(div);
1332
+ width = div.width() + 25;
1333
+ div.remove();
1334
+ if (this.container.is(':visible')) {
1335
+ width = Math.min(this.container.outerWidth() - 10, width);
1336
+ }
1337
+ return this.search_field.width(width);
1338
+ };
1339
+
1340
+ Chosen.prototype.trigger_form_field_change = function(extra) {
1341
+ this.form_field_jq.trigger("input", extra);
1342
+ return this.form_field_jq.trigger("change", extra);
1343
+ };
1344
+
1345
+ return Chosen;
1346
+
1347
+ })(AbstractChosen);
1348
 
1349
  }).call(this);
assets/js/chosen.jquery.min.js CHANGED
@@ -1,2 +1,3 @@
1
- /* Chosen v1.1.0 | (c) 2011-2013 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
- !function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),children:0,disabled:a.disabled}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&amp;"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0},AbstractChosen.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(c.text));return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match?this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,this.outerHTML(c)):"":""},AbstractChosen.prototype.result_add_group=function(a){var b;return a.search_match||a.group_match?a.active_options>0?(b=document.createElement("li"),b.className="group-result",b.innerHTML=a.search_text,this.outerHTML(b)):"":""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;for(this.no_results_clear(),e=0,g=this.get_search_text(),a=g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d=this.search_contains?"":"^",c=new RegExp(d+a,"i"),j=new RegExp(a,"i"),m=this.results_data,k=0,l=m.length;l>k;k++)b=m[k],b.search_match=!1,f=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(f=this.results_data[b.group_array_index],0===f.active_options&&f.search_match&&(e+=1),f.active_options+=1),(!b.group||this.group_search)&&(b.search_text=b.group?b.label:b.html,b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(e+=1),b.search_match?(g.length&&(h=b.search_text.search(j),i=b.search_text.substr(0,h+g.length)+"</em>"+b.search_text.substr(h+g.length),b.search_text=i.substr(0,h)+"<em>"+i.substr(h)),null!=f&&(f.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>e&&g.length?(this.update_results_content(""),this.no_results(g)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(){var a=this;return setTimeout(function(){return a.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(){var c,d;c=a(this),d=c.data("chosen"),"destroy"===b&&d?d.destroy():d||c.data("chosen",new Chosen(this,b))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+b.html+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(c.text),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}.call(this);
 
1
+ /* Chosen v1.8.2 | (c) 2011-2017 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
+
3
+ (function(){var t,e,s,i,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function s(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t},o={}.hasOwnProperty;(i=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,n,r,o;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),o=[],s=0,i=(r=t.childNodes).length;s<i;s++)n=r[s],o.push(this.add_option(n,e,t.disabled));return o},t.prototype.add_option=function(t,e,s){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:!0===s?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t}()).select_to_array=function(t){var e,s,n,r,o;for(r=new i,s=0,n=(o=t.childNodes).length;s<n;s++)e=o[s],r.add_node(e);return r.parsed},e=function(){function t(e,s){this.form_field=e,this.options=null!=s?s:{},this.label_click_handler=n(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){return this.click_test_action=function(t){return function(e){return t.test_active_click(e)}}(this),this.activate_action=function(t){return function(e){return t.activate_field(e)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+t.group_label+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout(function(t){return function(){return t.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(t){return function(){return t.blur_test()}}(this),100)},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,s,i,n,r,o,h;for(e="",h=0,n=0,r=(o=this.results_data).length;n<r&&(s=o[n],i="",""!==(i=s.group?this.result_add_group(s):this.result_add_option(s))&&(h++,e+=i),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(h>=this.max_shown_results));n++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.style.cssText=t.style,s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.highlighted_html||t.html,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,s,i,n;for(n=[],t=0,e=(s=this.results_data).length;t<e;t++)(i=s[t]).selected?n.push(i.selected=!1):n.push(void 0);return n},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(){var t,e,s,i,n,r,o,h,l,c,_,a,u,d,p;for(this.no_results_clear(),c=0,t=(o=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),l=this.get_search_regex(t),s=0,i=(h=this.results_data).length;s<i;s++)(n=h[s]).search_match=!1,_=null,a=null,n.highlighted_html="",this.include_option_in_results(n)&&(n.group&&(n.group_match=!1,n.active_options=0),null!=n.group_array_index&&this.results_data[n.group_array_index]&&(0===(_=this.results_data[n.group_array_index]).active_options&&_.search_match&&(c+=1),_.active_options+=1),p=n.group?n.label:n.text,n.group&&!this.group_search||(a=this.search_string_match(p,l),n.search_match=null!=a,n.search_match&&!n.group&&(c+=1),n.search_match?(o.length&&(u=a.index,r=p.slice(0,u),e=p.slice(u,u+o.length),d=p.slice(u+o.length),n.highlighted_html=this.escape_html(r)+"<em>"+this.escape_html(e)+"</em>"+this.escape_html(d)),null!=_&&(_.group_match=!0)):null!=n.group_array_index&&this.results_data[n.group_array_index].search_match&&(n.search_match=!0)));return this.result_clear_highlight(),c<1&&o.length?(this.update_results_content(""),this.no_results(o)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,s;return s=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),e=this.case_sensitive_search?"":"i",new RegExp(s,e)},t.prototype.search_string_match=function(t,e){var s;return s=e.exec(t),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},t.prototype.choices_count=function(){var t,e,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(s=this.form_field.options).length;t<e;t++)s[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},t.prototype.keydown_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),8!==s&&this.pending_backstroke&&this.clear_backstroke(),s){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},t.prototype.keyup_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),s){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){if(!this.is_disabled)return setTimeout(function(t){return function(){return t.results_search()}}(this),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_no_results_html=function(t){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(t)+"</span>\n</li>"},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(i){return e.browser_is_supported()?this.each(function(e){var n,r;r=(n=t(this)).data("chosen"),"destroy"!==i?r instanceof s||n.data("chosen",new s(this,i)):r instanceof s&&r.destroy()}):this}}),s=function(s){function n(){return n.__super__.constructor.apply(this,arguments)}return r(n,e),n.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},n.prototype.set_up_html=function(){var e,s;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),s={"class":e.join(" "),title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",s),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){return this.container.on("touchstart.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},n.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},n.prototype.container_mousedown=function(e){var s;if(!this.is_disabled)return!e||"mousedown"!==(s=e.type)&&"touchstart"!==s||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},n.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},n.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},n.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},n.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(e){var s;return(s=t(e.target).closest(".chosen-container")).length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(t){var e,s,i,n,r;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),r=this.search_results.scrollTop(),n=i+r,s=this.result_highlight.position().top+this.search_results.scrollTop(),(e=s+this.result_highlight.outerHeight())>=n)return this.search_results.scrollTop(e-i>0?e-i:0);if(s<r)return this.search_results.scrollTop(s)}},n.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},n.prototype.update_results_content=function(t){return this.search_results.html(t)},n.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},n.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(e){var s;if((s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=s,this.result_select(e),this.search_field.focus()},n.prototype.search_results_mouseover=function(e){var s;if(s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(s)},n.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},n.prototype.choice_build=function(e){var s,i;return s=t("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?s.addClass("search-choice-disabled"):((i=t("<a />",{"class":"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",function(t){return function(e){return t.choice_destroy_link_click(e)}}(this)),s.append(i)),this.search_container.before(s)},n.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},n.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},n.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(t){var e,s;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),s=this.results_data[e[0].getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.search_field.val(""),this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?this.winnow_results():(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},n.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},n.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},n.prototype.get_search_field_value=function(){return this.search_field.val()},n.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},n.prototype.escape_html=function(e){return t("<div/>").text(e).html()},n.prototype.winnow_results_set_highlight=function(){var t,e;if(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),null!=(t=e.length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},n.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.search_field_scale=function(){var e,s,i,n,r,o,h;if(this.is_multiple){for(r={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s<i;s++)r[n=o[s]]=this.search_field.css(n);return(e=t("<div />").css(r)).text(this.get_search_field_value()),t("body").append(e),h=e.width()+25,e.remove(),this.container.is(":visible")&&(h=Math.min(this.container.outerWidth()-10,h)),this.search_field.width(h)}},n.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},n}()}).call(this);
easy-digital-downloads.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The easiest way to sell digital products with WordPress.
6
  * Author: Easy Digital Downloads
7
  * Author URI: https://easydigitaldownloads.com
8
- * Version: 2.8.18
9
  * Text Domain: easy-digital-downloads
10
  * Domain Path: languages
11
  *
@@ -25,7 +25,7 @@
25
  * @package EDD
26
  * @category Core
27
  * @author Pippin Williamson
28
- * @version 2.8.18
29
  */
30
 
31
  // Exit if accessed directly.
@@ -206,7 +206,7 @@ final class Easy_Digital_Downloads {
206
 
207
  // Plugin version.
208
  if ( ! defined( 'EDD_VERSION' ) ) {
209
- define( 'EDD_VERSION', '2.8.18' );
210
  }
211
 
212
  // Plugin Folder Path.
5
  * Description: The easiest way to sell digital products with WordPress.
6
  * Author: Easy Digital Downloads
7
  * Author URI: https://easydigitaldownloads.com
8
+ * Version: 2.9
9
  * Text Domain: easy-digital-downloads
10
  * Domain Path: languages
11
  *
25
  * @package EDD
26
  * @category Core
27
  * @author Pippin Williamson
28
+ * @version 2.9
29
  */
30
 
31
  // Exit if accessed directly.
206
 
207
  // Plugin version.
208
  if ( ! defined( 'EDD_VERSION' ) ) {
209
+ define( 'EDD_VERSION', '2.9' );
210
  }
211
 
212
  // Plugin Folder Path.
includes/admin/add-ons.php CHANGED
@@ -36,7 +36,7 @@ function edd_add_ons_page() {
36
  <h2>
37
  <?php _e( 'Apps and Integrations for Easy Digital Downloads', 'easy-digital-downloads' ); ?>
38
  <span>
39
- &nbsp;&nbsp;<a href="http://easydigitaldownloads.com/extensions/?utm_source=plugin-addons-page&utm_medium=plugin&utm_campaign=<?php echo $campaign; ?>&utm_content=All%20Extensions" class="button-primary" target="_blank"><?php _e( 'Browse All Integrations', 'easy-digital-downloads' ); ?></a>
40
  </span>
41
  </h2>
42
  <p><?php _e( 'These <em><strong>add functionality</strong></em> to your Easy Digital Downloads powered store.', 'easy-digital-downloads' ); ?></p>
@@ -53,7 +53,7 @@ function edd_add_ons_page() {
53
  ) );
54
 
55
  if ( 'all' === $tab_id ) {
56
- $tab_url = 'http://easydigitaldownloads.com/extensions/?utm_source=plugin-addons-page&utm_medium=plugin&utm_campaign=' . $campaign . '&utm_content=All%20Extensions';
57
  }
58
 
59
  $active = $active_tab == $tab_id ? 'current' : '';
@@ -85,7 +85,7 @@ function edd_add_ons_page() {
85
  <?php echo edd_add_ons_get_feed( $active_tab ); ?>
86
  <div class="clear"></div>
87
  <div class="edd-add-ons-footer">
88
- <a href="http://easydigitaldownloads.com/extensions/?utm_source=plugin-addons-page&utm_medium=plugin&utm_campaign=<?php echo $campaign; ?>&utm_content=All%20Extensions" class="button-primary" target="_blank"><?php _e( 'Browse All Integrations', 'easy-digital-downloads' ); ?></a>
89
  </div>
90
  </div><!-- #tab_container-->
91
  </div>
36
  <h2>
37
  <?php _e( 'Apps and Integrations for Easy Digital Downloads', 'easy-digital-downloads' ); ?>
38
  <span>
39
+ &nbsp;&nbsp;<a href="https://easydigitaldownloads.com/downloads/?utm_source=plugin-addons-page&utm_medium=plugin&utm_campaign=<?php echo $campaign; ?>&utm_content=All%20Extensions" class="button-primary" target="_blank"><?php _e( 'Browse All Integrations', 'easy-digital-downloads' ); ?></a>
40
  </span>
41
  </h2>
42
  <p><?php _e( 'These <em><strong>add functionality</strong></em> to your Easy Digital Downloads powered store.', 'easy-digital-downloads' ); ?></p>
53
  ) );
54
 
55
  if ( 'all' === $tab_id ) {
56
+ $tab_url = 'https://easydigitaldownloads.com/downloads/?utm_source=plugin-addons-page&utm_medium=plugin&utm_campaign=' . $campaign . '&utm_content=All%20Extensions';
57
  }
58
 
59
  $active = $active_tab == $tab_id ? 'current' : '';
85
  <?php echo edd_add_ons_get_feed( $active_tab ); ?>
86
  <div class="clear"></div>
87
  <div class="edd-add-ons-footer">
88
+ <a href="https://easydigitaldownloads.com/downloads/?utm_source=plugin-addons-page&utm_medium=plugin&utm_campaign=<?php echo $campaign; ?>&utm_content=All%20Extensions" class="button-primary" target="_blank"><?php _e( 'Browse All Integrations', 'easy-digital-downloads' ); ?></a>
89
  </div>
90
  </div><!-- #tab_container-->
91
  </div>
includes/admin/customers/customers.php CHANGED
@@ -231,8 +231,8 @@ function edd_customers_view( $customer ) {
231
  <span class="info-item" data-key="line1"><?php echo $address['line1']; ?></span>
232
  <span class="info-item" data-key="line2"><?php echo $address['line2']; ?></span>
233
  <span class="info-item" data-key="city"><?php echo $address['city']; ?></span>
234
- <span class="info-item" data-key="state"><?php echo $address['state']; ?></span>
235
- <span class="info-item" data-key="country"><?php echo $address['country']; ?></span>
236
  <span class="info-item" data-key="zip"><?php echo $address['zip']; ?></span>
237
  </span>
238
 
@@ -266,7 +266,7 @@ function edd_customers_view( $customer ) {
266
  ?>
267
  </select>
268
  <?php else : ?>
269
- <input type="text" size="6" data-key="state" name="customerinfo[state]" id="card_state" class="card_state edd-input info-item" placeholder="<?php _e( 'State / Province', 'easy-digital-downloads' ); ?>"/>
270
  <?php endif; ?>
271
  <input class="info-item" type="text" data-key="zip" name="customerinfo[zip]" placeholder="<?php _e( 'Postal', 'easy-digital-downloads' ); ?>" value="<?php echo $address['zip']; ?>" />
272
  </span>
231
  <span class="info-item" data-key="line1"><?php echo $address['line1']; ?></span>
232
  <span class="info-item" data-key="line2"><?php echo $address['line2']; ?></span>
233
  <span class="info-item" data-key="city"><?php echo $address['city']; ?></span>
234
+ <span class="info-item" data-key="state"><?php echo edd_get_state_name( $address['country'], $address['state'] ); ?></span>
235
+ <span class="info-item" data-key="country"><?php echo edd_get_country_name( $address['country'] ); ?></span>
236
  <span class="info-item" data-key="zip"><?php echo $address['zip']; ?></span>
237
  </span>
238
 
266
  ?>
267
  </select>
268
  <?php else : ?>
269
+ <input type="text" data-key="state" name="customerinfo[state]" id="card_state" class="card_state edd-input info-item" placeholder="<?php _e( 'State / Province', 'easy-digital-downloads' ); ?>" value="<?php echo $address['state']; ?>"/>
270
  <?php endif; ?>
271
  <input class="info-item" type="text" data-key="zip" name="customerinfo[zip]" placeholder="<?php _e( 'Postal', 'easy-digital-downloads' ); ?>" value="<?php echo $address['zip']; ?>" />
272
  </span>
includes/admin/discounts/add-discount.php CHANGED
@@ -12,7 +12,16 @@
12
  // Exit if accessed directly
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
  ?>
15
- <h2><?php _e( 'Add New Discount', 'easy-digital-downloads' ); ?> - <a href="<?php echo admin_url( 'edit.php?post_type=download&page=edd-discounts' ); ?>" class="button-secondary"><?php _e( 'Go Back', 'easy-digital-downloads' ); ?></a></h2>
 
 
 
 
 
 
 
 
 
16
  <form id="edd-add-discount" action="" method="POST">
17
  <?php do_action( 'edd_add_discount_form_top' ); ?>
18
  <table class="form-table">
12
  // Exit if accessed directly
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
  ?>
15
+ <h2><?php _e( 'Add New Discount', 'easy-digital-downloads' ); ?></h2>
16
+
17
+ <?php if ( isset( $_GET['edd_discount_added'] ) ) : ?>
18
+ <div id="message" class="updated">
19
+ <p><strong><?php _e( 'Discount code created.', 'easy-digital-downloads' ); ?></strong></p>
20
+
21
+ <p><a href="<?php echo esc_url( admin_url( 'edit.php?post_type=download&page=edd-discounts' ) ); ?>"><?php _e( '&larr; Back to Discounts' ); ?></a></p>
22
+ </div>
23
+ <?php endif; ?>
24
+
25
  <form id="edd-add-discount" action="" method="POST">
26
  <?php do_action( 'edd_add_discount_form_top' ); ?>
27
  <table class="form-table">
includes/admin/discounts/class-discount-codes-table.php CHANGED
@@ -250,19 +250,7 @@ class EDD_Discount_Codes_Table extends WP_List_Table {
250
  * @return string Displays the discount status
251
  */
252
  function column_status( $item ) {
253
- switch( $item['status'] ){
254
- case 'expired' :
255
- $status = __( 'Expired', 'easy-digital-downloads' );
256
- break;
257
- case 'inactive' :
258
- $status = __( 'Inactive', 'easy-digital-downloads' );
259
- break;
260
- case 'active' :
261
- default :
262
- $status = __( 'Active', 'easy-digital-downloads' );
263
- break;
264
- }
265
- return $status;
266
  }
267
 
268
  /**
250
  * @return string Displays the discount status
251
  */
252
  function column_status( $item ) {
253
+ return edd_get_discount_status_label( $item['ID'] );
 
 
 
 
 
 
 
 
 
 
 
 
254
  }
255
 
256
  /**
includes/admin/discounts/discount-actions.php CHANGED
@@ -78,7 +78,7 @@ function edd_add_discount( $data ) {
78
 
79
  if ( edd_store_discount( $posted ) ) {
80
 
81
- wp_redirect( add_query_arg( 'edd-message', 'discount_added', $data['edd-redirect'] ) ); edd_die();
82
 
83
  } else {
84
 
@@ -141,12 +141,12 @@ function edd_edit_discount( $data ) {
141
 
142
  }
143
 
144
- $old_discount = edd_get_discount_by( 'code', $data['code'] );
145
  $discount['uses'] = edd_get_discount_uses( $old_discount->ID );
146
 
147
  if ( edd_store_discount( $discount, $data['discount-id'] ) ) {
148
 
149
- wp_redirect( add_query_arg( 'edd-message', 'discount_updated', $data['edd-redirect'] ) ); edd_die();
150
 
151
  } else {
152
 
78
 
79
  if ( edd_store_discount( $posted ) ) {
80
 
81
+ wp_redirect( add_query_arg( 'edd_discount_added', '1', $data['edd-redirect'] ) ); edd_die();
82
 
83
  } else {
84
 
141
 
142
  }
143
 
144
+ $old_discount = new EDD_Discount( (int) $data['discount-id'] );
145
  $discount['uses'] = edd_get_discount_uses( $old_discount->ID );
146
 
147
  if ( edd_store_discount( $discount, $data['discount-id'] ) ) {
148
 
149
+ wp_redirect( add_query_arg( 'edd_discount_updated', '1', $data['edd-redirect'] ) ); edd_die();
150
 
151
  } else {
152
 
includes/admin/discounts/edit-discount.php CHANGED
@@ -26,7 +26,16 @@ $flat_display = edd_get_discount_type( $discount_id ) == 'flat' ? '' : ' st
26
  $percent_display = edd_get_discount_type( $discount_id ) == 'percent' ? '' : ' style="display:none;"';
27
  $condition_display = empty( $product_reqs ) ? ' style="display:none;"' : '';
28
  ?>
29
- <h2><?php _e( 'Edit Discount', 'easy-digital-downloads' ); ?> - <a href="<?php echo admin_url( 'edit.php?post_type=download&page=edd-discounts' ); ?>" class="button-secondary"><?php _e( 'Go Back', 'easy-digital-downloads' ); ?></a></h2>
 
 
 
 
 
 
 
 
 
30
  <form id="edd-edit-discount" action="" method="post">
31
  <?php do_action( 'edd_edit_discount_form_top', $discount_id, $discount ); ?>
32
  <table class="form-table">
@@ -198,7 +207,7 @@ $condition_display = empty( $product_reqs ) ? ' style="display:none;"' : '';
198
  <p class="submit">
199
  <input type="hidden" name="edd-action" value="edit_discount"/>
200
  <input type="hidden" name="discount-id" value="<?php echo absint( $_GET['discount'] ); ?>"/>
201
- <input type="hidden" name="edd-redirect" value="<?php echo esc_url( admin_url( 'edit.php?post_type=download&page=edd-discounts' ) ); ?>"/>
202
  <input type="hidden" name="edd-discount-nonce" value="<?php echo wp_create_nonce( 'edd_discount_nonce' ); ?>"/>
203
  <input type="submit" value="<?php _e( 'Update Discount Code', 'easy-digital-downloads' ); ?>" class="button-primary"/>
204
  </p>
26
  $percent_display = edd_get_discount_type( $discount_id ) == 'percent' ? '' : ' style="display:none;"';
27
  $condition_display = empty( $product_reqs ) ? ' style="display:none;"' : '';
28
  ?>
29
+ <h2><?php _e( 'Edit Discount', 'easy-digital-downloads' ); ?></h2>
30
+
31
+ <?php if ( isset( $_GET['edd_discount_updated'] ) ) : ?>
32
+ <div id="message" class="updated">
33
+ <p><strong><?php _e( 'Discount code updated.', 'easy-digital-downloads' ); ?></strong></p>
34
+
35
+ <p><a href="<?php echo esc_url( admin_url( 'edit.php?post_type=download&page=edd-discounts' ) ); ?>"><?php _e( '&larr; Back to Discounts' ); ?></a></p>
36
+ </div>
37
+ <?php endif; ?>
38
+
39
  <form id="edd-edit-discount" action="" method="post">
40
  <?php do_action( 'edd_edit_discount_form_top', $discount_id, $discount ); ?>
41
  <table class="form-table">
207
  <p class="submit">
208
  <input type="hidden" name="edd-action" value="edit_discount"/>
209
  <input type="hidden" name="discount-id" value="<?php echo absint( $_GET['discount'] ); ?>"/>
210
+ <input type="hidden" name="edd-redirect" value="<?php echo esc_url( admin_url( 'edit.php?post_type=download&page=edd-discounts&edd-action=edit_discount&discount=' . $discount_id ) ); ?>"/>
211
  <input type="hidden" name="edd-discount-nonce" value="<?php echo wp_create_nonce( 'edd_discount_nonce' ); ?>"/>
212
  <input type="submit" value="<?php _e( 'Update Discount Code', 'easy-digital-downloads' ); ?>" class="button-primary"/>
213
  </p>
includes/admin/reporting/class-file-downloads-logs-list-table.php CHANGED
@@ -122,13 +122,20 @@ class EDD_File_Downloads_Log_Table extends WP_List_Table {
122
  public function column_default( $item, $column_name ) {
123
  switch ( $column_name ) {
124
  case 'download' :
125
- return '<a href="' . add_query_arg( 'download', $item[ $column_name ] ) . '" >' . get_the_title( $item[ $column_name ] ) . '</a>';
 
 
 
 
 
 
 
126
  case 'customer' :
127
  return '<a href="' . add_query_arg( 'user', $item[ 'customer' ]->email ) . '">' . $item['customer']->name . '</a>';
128
  case 'payment_id' :
129
  return $item['payment_id'] !== false ? '<a href="' . admin_url( 'edit.php?post_type=download&page=edd-payment-history&view=view-order-details&id=' . $item['payment_id'] ) . '">' . edd_get_payment_number( $item['payment_id'] ) . '</a>' : '';
130
  case 'ip' :
131
- return '<a href="https://ipinfo.io/' . $item['ip'] . '" target="_blank" rel="noopener noreferrer">' . $item['ip'] . '</a>';
132
  default:
133
  return $item[ $column_name ];
134
  }
@@ -393,6 +400,7 @@ class EDD_File_Downloads_Log_Table extends WP_List_Table {
393
  $ip = $meta['_edd_log_ip'][0];
394
  $user_id = isset( $user_info['id'] ) ? $user_info['id'] : false;
395
  $customer_id = edd_get_payment_customer_id( $payment_id );
 
396
 
397
  if( ! array_key_exists( $log->post_parent, $this->queried_files ) ) {
398
  $files = maybe_unserialize( $wpdb->get_var( $wpdb->prepare( "SELECT meta_value from $wpdb->postmeta WHERE post_id = %d and meta_key = 'edd_download_files'", $log->post_parent ) ) );
@@ -416,6 +424,7 @@ class EDD_File_Downloads_Log_Table extends WP_List_Table {
416
  $logs_data[] = array(
417
  'ID' => $log->ID,
418
  'download' => $log->post_parent,
 
419
  'customer' => new EDD_Customer( $customer_id ),
420
  'payment_id' => $payment_id,
421
  'file' => $file_name,
122
  public function column_default( $item, $column_name ) {
123
  switch ( $column_name ) {
124
  case 'download' :
125
+ $download = new EDD_Download( $item[ $column_name ] );
126
+ $column_value = $download->get_name();
127
+
128
+ if ( false !== $item['price_id'] ) {
129
+ $column_value .= ' &mdash; ' . edd_get_price_option_name( $download->ID, $item['price_id'] );
130
+ }
131
+
132
+ return '<a href="' . add_query_arg( 'download', $download->ID ) . '" >' . $column_value . '</a>';
133
  case 'customer' :
134
  return '<a href="' . add_query_arg( 'user', $item[ 'customer' ]->email ) . '">' . $item['customer']->name . '</a>';
135
  case 'payment_id' :
136
  return $item['payment_id'] !== false ? '<a href="' . admin_url( 'edit.php?post_type=download&page=edd-payment-history&view=view-order-details&id=' . $item['payment_id'] ) . '">' . edd_get_payment_number( $item['payment_id'] ) . '</a>' : '';
137
  case 'ip' :
138
+ return '<a href="https://ipinfo.io/' . $item['ip'] . '" target="_blank" rel="noopener noreferrer">' . $item['ip'] . '</a>';
139
  default:
140
  return $item[ $column_name ];
141
  }
400
  $ip = $meta['_edd_log_ip'][0];
401
  $user_id = isset( $user_info['id'] ) ? $user_info['id'] : false;
402
  $customer_id = edd_get_payment_customer_id( $payment_id );
403
+ $price_id = edd_has_variable_prices( $log->post_parent ) ? get_post_meta( $log->ID, '_edd_log_price_id', true ) : false;
404
 
405
  if( ! array_key_exists( $log->post_parent, $this->queried_files ) ) {
406
  $files = maybe_unserialize( $wpdb->get_var( $wpdb->prepare( "SELECT meta_value from $wpdb->postmeta WHERE post_id = %d and meta_key = 'edd_download_files'", $log->post_parent ) ) );
424
  $logs_data[] = array(
425
  'ID' => $log->ID,
426
  'download' => $log->post_parent,
427
+ 'price_id' => $price_id,
428
  'customer' => new EDD_Customer( $customer_id ),
429
  'payment_id' => $payment_id,
430
  'file' => $file_name,
includes/admin/reporting/export/class-batch-export-sales.php CHANGED
@@ -40,9 +40,13 @@ class EDD_Batch_Sales_Export extends EDD_Batch_Export {
40
  'ID' => __( 'Log ID', 'easy-digital-downloads' ),
41
  'user_id' => __( 'User', 'easy-digital-downloads' ),
42
  'customer_id' => __( 'Customer ID', 'easy-digital-downloads' ),
 
 
 
43
  'download' => edd_get_label_singular(),
44
  'amount' => __( 'Item Amount', 'easy-digital-downloads' ),
45
  'payment_id' => __( 'Payment ID', 'easy-digital-downloads' ),
 
46
  'date' => __( 'Date', 'easy-digital-downloads' ),
47
  );
48
 
@@ -99,6 +103,7 @@ class EDD_Batch_Sales_Export extends EDD_Batch_Export {
99
 
100
  if ( is_array( $cart_items ) ) {
101
  foreach ( $cart_items as $item ) {
 
102
  if ( $item['id'] == $log->post_parent ) {
103
  if ( isset( $item['item_number']['options']['price_id'] ) ) {
104
  $log_price_id = get_post_meta( $log->ID, '_edd_log_price_id', true );
@@ -118,9 +123,13 @@ class EDD_Batch_Sales_Export extends EDD_Batch_Export {
118
  'ID' => $log->ID,
119
  'user_id' => $customer->user_id,
120
  'customer_id' => $customer->id,
 
 
 
121
  'download' => $download->post_title,
122
  'amount' => $amount,
123
  'payment_id' => $payment->ID,
 
124
  'date' => get_post_field( 'post_date', $payment_id ),
125
  );
126
  }
40
  'ID' => __( 'Log ID', 'easy-digital-downloads' ),
41
  'user_id' => __( 'User', 'easy-digital-downloads' ),
42
  'customer_id' => __( 'Customer ID', 'easy-digital-downloads' ),
43
+ 'email' => __( 'Email', 'easy-digital-downloads' ),
44
+ 'first_name' => __( 'First Name', 'easy-digital-downloads' ),
45
+ 'last_name' => __( 'Last Name', 'easy-digital-downloads' ),
46
  'download' => edd_get_label_singular(),
47
  'amount' => __( 'Item Amount', 'easy-digital-downloads' ),
48
  'payment_id' => __( 'Payment ID', 'easy-digital-downloads' ),
49
+ 'price_id' => __( 'Price ID', 'easy-digital-downloads' ),
50
  'date' => __( 'Date', 'easy-digital-downloads' ),
51
  );
52
 
103
 
104
  if ( is_array( $cart_items ) ) {
105
  foreach ( $cart_items as $item ) {
106
+ $log_price_id = null;
107
  if ( $item['id'] == $log->post_parent ) {
108
  if ( isset( $item['item_number']['options']['price_id'] ) ) {
109
  $log_price_id = get_post_meta( $log->ID, '_edd_log_price_id', true );
123
  'ID' => $log->ID,
124
  'user_id' => $customer->user_id,
125
  'customer_id' => $customer->id,
126
+ 'email' => $payment->email,
127
+ 'first_name' => $payment->first_name,
128
+ 'last_name' => $payment->last_name,
129
  'download' => $download->post_title,
130
  'amount' => $amount,
131
  'payment_id' => $payment->ID,
132
+ 'price_id' => $log_price_id,
133
  'date' => get_post_field( 'post_date', $payment_id ),
134
  );
135
  }
includes/admin/settings/register-settings.php CHANGED
@@ -259,7 +259,7 @@ function edd_get_registered_settings() {
259
  ),
260
  'purchase_page' => array(
261
  'id' => 'purchase_page',
262
- 'name' => __( 'Checkout Page', 'easy-digital-downloads' ),
263
  'desc' => __( 'This is the checkout page where buyers will complete their purchases. The [download_checkout] shortcode must be on this page.', 'easy-digital-downloads' ),
264
  'type' => 'select',
265
  'options' => edd_get_pages(),
@@ -521,6 +521,13 @@ function edd_get_registered_settings() {
521
  'type' => 'text',
522
  'std' => 'New download purchase - Order #{payment_id}',
523
  ),
 
 
 
 
 
 
 
524
  'sale_notification' => array(
525
  'id' => 'sale_notification',
526
  'name' => __( 'Sale Notification', 'easy-digital-downloads' ),
@@ -750,6 +757,13 @@ function edd_get_registered_settings() {
750
  'type' => 'text',
751
  'std' => __( 'Add to Cart', 'easy-digital-downloads' ),
752
  ),
 
 
 
 
 
 
 
753
  'buy_now_text' => array(
754
  'id' => 'buy_now_text',
755
  'name' => __( 'Buy Now Text', 'easy-digital-downloads' ),
259
  ),
260
  'purchase_page' => array(
261
  'id' => 'purchase_page',
262
+ 'name' => __( 'Primary Checkout Page', 'easy-digital-downloads' ),
263
  'desc' => __( 'This is the checkout page where buyers will complete their purchases. The [download_checkout] shortcode must be on this page.', 'easy-digital-downloads' ),
264
  'type' => 'select',
265
  'options' => edd_get_pages(),
521
  'type' => 'text',
522
  'std' => 'New download purchase - Order #{payment_id}',
523
  ),
524
+ 'sale_notification_heading' => array(
525
+ 'id' => 'sale_notification_heading',
526
+ 'name' => __( 'Sale Notification Heading', 'easy-digital-downloads' ),
527
+ 'desc' => __( 'Enter the heading for the sale notification email.', 'easy-digital-downloads' ),
528
+ 'type' => 'text',
529
+ 'std' => __( 'New Sale!', 'easy-digital-downloads' ),
530
+ ),
531
  'sale_notification' => array(
532
  'id' => 'sale_notification',
533
  'name' => __( 'Sale Notification', 'easy-digital-downloads' ),
757
  'type' => 'text',
758
  'std' => __( 'Add to Cart', 'easy-digital-downloads' ),
759
  ),
760
+ 'checkout_button_text' => array(
761
+ 'id' => 'checkout_button_text',
762
+ 'name' => __( 'Checkout Button Text', 'easy-digital-downloads' ),
763
+ 'desc' => __( 'Text shown on the Add to Cart Button when the product is already in the cart.', 'easy-digital-downloads' ),
764
+ 'type' => 'text',
765
+ 'std' => _x( 'Checkout', 'text shown on the Add to Cart Button when the product is already in the cart', 'easy-digital-downloads' ),
766
+ ),
767
  'buy_now_text' => array(
768
  'id' => 'buy_now_text',
769
  'name' => __( 'Buy Now Text', 'easy-digital-downloads' ),
includes/admin/tracking.php CHANGED
@@ -101,7 +101,7 @@ class EDD_Tracking {
101
  $data['active_gateways'] = array_keys( edd_get_enabled_payment_gateways() );
102
  $data['products'] = wp_count_posts( 'download' )->publish;
103
  $data['download_label'] = edd_get_label_singular( true );
104
- $data['locale'] = ( $data['wp_version'] >= 4.7 ) ? get_user_locale() : get_locale();
105
 
106
  $this->data = $data;
107
  }
@@ -110,7 +110,11 @@ class EDD_Tracking {
110
  * Send the data to the EDD server
111
  *
112
  * @access private
113
- * @return void
 
 
 
 
114
  */
115
  public function send_checkin( $override = false, $ignore_last_checkin = false ) {
116
 
@@ -132,20 +136,16 @@ class EDD_Tracking {
132
 
133
  $this->setup_data();
134
 
135
- $request = wp_remote_post( 'https://easydigitaldownloads.com/?edd_action=checkin', array(
136
  'method' => 'POST',
137
- 'timeout' => 20,
138
  'redirection' => 5,
139
  'httpversion' => '1.1',
140
- 'blocking' => true,
141
  'body' => $this->data,
142
  'user-agent' => 'EDD/' . EDD_VERSION . '; ' . get_bloginfo( 'url' )
143
  ) );
144
 
145
- if( is_wp_error( $request ) ) {
146
- return $request;
147
- }
148
-
149
  update_option( 'edd_tracking_last_send', time() );
150
 
151
  return true;
101
  $data['active_gateways'] = array_keys( edd_get_enabled_payment_gateways() );
102
  $data['products'] = wp_count_posts( 'download' )->publish;
103
  $data['download_label'] = edd_get_label_singular( true );
104
+ $data['locale'] = get_locale();
105
 
106
  $this->data = $data;
107
  }
110
  * Send the data to the EDD server
111
  *
112
  * @access private
113
+ *
114
+ * @param bool $override If we should override the tracking setting.
115
+ * @param bool $ignore_last_checkin If we should ignore when the last check in was.
116
+ *
117
+ * @return bool
118
  */
119
  public function send_checkin( $override = false, $ignore_last_checkin = false ) {
120
 
136
 
137
  $this->setup_data();
138
 
139
+ wp_remote_post( 'https://easydigitaldownloads.com/?edd_action=checkin', array(
140
  'method' => 'POST',
141
+ 'timeout' => 8,
142
  'redirection' => 5,
143
  'httpversion' => '1.1',
144
+ 'blocking' => false,
145
  'body' => $this->data,
146
  'user-agent' => 'EDD/' . EDD_VERSION . '; ' . get_bloginfo( 'url' )
147
  ) );
148
 
 
 
 
 
149
  update_option( 'edd_tracking_last_send', time() );
150
 
151
  return true;
includes/cart/class-edd-cart.php CHANGED
@@ -216,7 +216,7 @@ class EDD_Cart {
216
  global $edd_is_last_cart_item, $edd_flat_discount_total;
217
 
218
  if ( empty( $this->contents ) ) {
219
- return false;
220
  }
221
 
222
  $details = array();
@@ -725,7 +725,7 @@ class EDD_Cart {
725
  }
726
  }
727
 
728
- $amount = ( $price - apply_filters( 'edd_get_cart_item_discounted_amount', $discounted_price, $discounts, $item, $price ) );
729
 
730
  if ( 'flat' !== edd_get_discount_type( $code_id ) ) {
731
  $amount = $amount * $item['quantity'];
216
  global $edd_is_last_cart_item, $edd_flat_discount_total;
217
 
218
  if ( empty( $this->contents ) ) {
219
+ return array();
220
  }
221
 
222
  $details = array();
725
  }
726
  }
727
 
728
+ $amount = round( ( $price - apply_filters( 'edd_get_cart_item_discounted_amount', $discounted_price, $discounts, $item, $price ) ), edd_currency_decimal_filter() );
729
 
730
  if ( 'flat' !== edd_get_discount_type( $code_id ) ) {
731
  $amount = $amount * $item['quantity'];
includes/checkout/functions.php CHANGED
@@ -27,15 +27,18 @@ function edd_is_checkout() {
27
  $is_checkout = is_page( edd_get_option( 'purchase_page' ) );
28
 
29
  if( ! $is_object_set ) {
30
-
31
  unset( $wp_query->queried_object );
32
-
 
33
  }
34
 
35
  if( ! $is_object_id_set ) {
36
-
37
  unset( $wp_query->queried_object_id );
 
38
 
 
 
 
39
  }
40
 
41
  return apply_filters( 'edd_is_checkout', $is_checkout );
27
  $is_checkout = is_page( edd_get_option( 'purchase_page' ) );
28
 
29
  if( ! $is_object_set ) {
 
30
  unset( $wp_query->queried_object );
31
+ } else if ( is_singular() ) {
32
+ $content = $wp_query->queried_object->post_content;
33
  }
34
 
35
  if( ! $is_object_id_set ) {
 
36
  unset( $wp_query->queried_object_id );
37
+ }
38
 
39
+ // If we know this isn't the primary checkout page, check other methods.
40
+ if ( ! $is_checkout && isset( $content ) && has_shortcode( $content, 'download_checkout' ) ) {
41
+ $is_checkout = true;
42
  }
43
 
44
  return apply_filters( 'edd_is_checkout', $is_checkout );
includes/checkout/template.php CHANGED
@@ -681,7 +681,7 @@ function edd_show_payment_icons() {
681
  } else {
682
 
683
  $image = edd_locate_template( 'images' . DIRECTORY_SEPARATOR . 'icons' . DIRECTORY_SEPARATOR . $card . '.png', false );
684
- $content_dir = WP_CONTENT_DIR;
685
 
686
  if( function_exists( 'wp_normalize_path' ) ) {
687
 
@@ -691,7 +691,7 @@ function edd_show_payment_icons() {
691
 
692
  }
693
 
694
- $image = str_replace( $content_dir, content_url(), $image );
695
 
696
  }
697
 
681
  } else {
682
 
683
  $image = edd_locate_template( 'images' . DIRECTORY_SEPARATOR . 'icons' . DIRECTORY_SEPARATOR . $card . '.png', false );
684
+ $content_dir = WP_PLUGIN_DIR;
685
 
686
  if( function_exists( 'wp_normalize_path' ) ) {
687
 
691
 
692
  }
693
 
694
+ $image = str_replace( $content_dir, WP_PLUGIN_URL, $image );
695
 
696
  }
697
 
includes/class-edd-discount.php CHANGED
@@ -766,6 +766,40 @@ class EDD_Discount {
766
  return apply_filters( 'edd_get_discount_status', $this->status, $this->ID );
767
  }
768
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
769
  /**
770
  * Retrieve the type of discount.
771
  *
766
  return apply_filters( 'edd_get_discount_status', $this->status, $this->ID );
767
  }
768
 
769
+ /**
770
+ * Retrieves the status label of the discount.
771
+ *
772
+ * @since 2.9
773
+ *
774
+ * @return string Status label for the current discount.
775
+ */
776
+ public function get_status_label() {
777
+
778
+ switch( $this->status ) {
779
+ case 'expired' :
780
+ $label = __( 'Expired', 'easy-digital-downloads' );
781
+ break;
782
+ case 'inactive' :
783
+ $label = __( 'Inactive', 'easy-digital-downloads' );
784
+ break;
785
+ case 'active' :
786
+ default :
787
+ $label = __( 'Active', 'easy-digital-downloads' );
788
+ break;
789
+ }
790
+
791
+ /**
792
+ * Filters the discount status.
793
+ *
794
+ * @since 2.9
795
+ *
796
+ * @param string $label Discount status label.
797
+ * @param string $status Discount status (active or inactive).
798
+ * @param int $ID Discount ID.
799
+ */
800
+ return apply_filters( 'edd_get_discount_status_label', $label, $this->status, $this->ID );
801
+ }
802
+
803
  /**
804
  * Retrieve the type of discount.
805
  *
includes/country-functions.php CHANGED
@@ -75,6 +75,9 @@ function edd_get_shop_states( $country = null ) {
75
  case 'CN' :
76
  $states = edd_get_chinese_states_list();
77
  break;
 
 
 
78
  case 'HK' :
79
  $states = edd_get_hong_kong_states_list();
80
  break;
@@ -881,6 +884,237 @@ function edd_get_chinese_states_list() {
881
  return apply_filters( 'edd_chinese_states', $states );
882
  }
883
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
884
  /**
885
  * Get New Zealand States
886
  *
@@ -1673,3 +1907,18 @@ function edd_get_country_name( $country_code = '' ) {
1673
  return apply_filters( 'edd_get_country_name', $country_name, $country_code );
1674
  }
1675
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  case 'CN' :
76
  $states = edd_get_chinese_states_list();
77
  break;
78
+ case 'GB' :
79
+ $states = edd_get_united_kingdom_states_list();
80
+ break;
81
  case 'HK' :
82
  $states = edd_get_hong_kong_states_list();
83
  break;
884
  return apply_filters( 'edd_chinese_states', $states );
885
  }
886
 
887
+ /**
888
+ * Get United Kingdom States
889
+ *
890
+ * @since 2.9
891
+ * @return array $states A list of states
892
+ */
893
+ function edd_get_united_kingdom_states_list() {
894
+ $states = array(
895
+ '' => '',
896
+ 'GB-ABE' => 'Aberdeen City',
897
+ 'GB-ABD' => 'Aberdeenshire',
898
+ 'GB-ANS' => 'Angus',
899
+ 'GB-ANN' => 'Antrim and Newtownabbey',
900
+ 'GB-AND' => 'Ards and North Down',
901
+ 'GB-AGB' => 'Argyll and Bute',
902
+ 'GB-ABC' => 'Armagh, Banbridge and Craigavon',
903
+ 'GB-BDG' => 'Barking and Dagenham',
904
+ 'GB-BNE' => 'Barnet',
905
+ 'GB-BNS' => 'Barnsley',
906
+ 'GB-BAS' => 'Bath and North East Somerset',
907
+ 'GB-BDF' => 'Bedford',
908
+ 'GB-BFS' => 'Belfast',
909
+ 'GB-BEX' => 'Bexley',
910
+ 'GB-BIR' => 'Birmingham',
911
+ 'GB-BBD' => 'Blackburn with Darwen',
912
+ 'GB-BPL' => 'Blackpool',
913
+ 'GB-BGW' => 'Blaenau Gwent',
914
+ 'GB-BOL' => 'Bolton',
915
+ 'GB-BMH' => 'Bournemouth',
916
+ 'GB-BRC' => 'Bracknell Forest',
917
+ 'GB-BRD' => 'Bradford',
918
+ 'GB-BEN' => 'Brent',
919
+ 'GB-BGE' => 'Bridgend',
920
+ 'GB-BNH' => 'Brighton and Hove',
921
+ 'GB-BST' => 'Bristol, City of',
922
+ 'GB-BRY' => 'Bromley',
923
+ 'GB-BKM' => 'Buckinghamshire',
924
+ 'GB-BUR' => 'Bury',
925
+ 'GB-CAY' => 'Caerphilly',
926
+ 'GB-CLD' => 'Calderdale',
927
+ 'GB-CAM' => 'Cambridgeshire',
928
+ 'GB-CMD' => 'Camden',
929
+ 'GB-CRF' => 'Cardiff',
930
+ 'GB-CMN' => 'Carmarthenshire',
931
+ 'GB-CCG' => 'Causeway Coast and Glens',
932
+ 'GB-CBF' => 'Central Bedfordshire',
933
+ 'GB-CGN' => 'Ceredigion',
934
+ 'GB-CHE' => 'Cheshire East',
935
+ 'GB-CHW' => 'Cheshire West and Chester',
936
+ 'GB-CLK' => 'Clackmannanshire',
937
+ 'GB-CWY' => 'Conwy',
938
+ 'GB-CON' => 'Cornwall',
939
+ 'GB-COV' => 'Coventry',
940
+ 'GB-CRY' => 'Croydon',
941
+ 'GB-CMA' => 'Cumbria',
942
+ 'GB-DAL' => 'Darlington',
943
+ 'GB-DEN' => 'Denbighshire',
944
+ 'GB-DER' => 'Derby',
945
+ 'GB-DBY' => 'Derbyshire',
946
+ 'GB-DRS' => 'Derry and Strabane',
947
+ 'GB-DEV' => 'Devon',
948
+ 'GB-DNC' => 'Doncaster',
949
+ 'GB-DOR' => 'Dorset',
950
+ 'GB-DUD' => 'Dudley',
951
+ 'GB-DGY' => 'Dumfries and Galloway',
952
+ 'GB-DND' => 'Dundee City',
953
+ 'GB-DUR' => 'Durham, County',
954
+ 'GB-EAL' => 'Ealing',
955
+ 'GB-EAY' => 'East Ayrshire',
956
+ 'GB-EDU' => 'East Dunbartonshire',
957
+ 'GB-ELN' => 'East Lothian',
958
+ 'GB-ERW' => 'East Renfrewshire',
959
+ 'GB-ERY' => 'East Riding of Yorkshire',
960
+ 'GB-ESX' => 'East Sussex',
961
+ 'GB-EDH' => 'Edinburgh, City of',
962
+ 'GB-ELS' => 'Eilean Siar',
963
+ 'GB-ENF' => 'Enfield',
964
+ 'GB-ESS' => 'Essex',
965
+ 'GB-FAL' => 'Falkirk',
966
+ 'GB-FMO' => 'Fermanagh and Omagh',
967
+ 'GB-FIF' => 'Fife',
968
+ 'GB-FLN' => 'Flintshire',
969
+ 'GB-GAT' => 'Gateshead',
970
+ 'GB-GLG' => 'Glasgow City',
971
+ 'GB-GLS' => 'Gloucestershire',
972
+ 'GB-GRE' => 'Greenwich',
973
+ 'GB-GWN' => 'Gwynedd',
974
+ 'GB-HCK' => 'Hackney',
975
+ 'GB-HAL' => 'Halton',
976
+ 'GB-HMF' => 'Hammersmith and Fulham',
977
+ 'GB-HAM' => 'Hampshire',
978
+ 'GB-HRY' => 'Haringey',
979
+ 'GB-HRW' => 'Harrow',
980
+ 'GB-HPL' => 'Hartlepool',
981
+ 'GB-HAV' => 'Havering',
982
+ 'GB-HEF' => 'Herefordshire',
983
+ 'GB-HRT' => 'Hertfordshire',
984
+ 'GB-HLD' => 'Highland',
985
+ 'GB-HIL' => 'Hillingdon',
986
+ 'GB-HNS' => 'Hounslow',
987
+ 'GB-IVC' => 'Inverclyde',
988
+ 'GB-AGY' => 'Isle of Anglesey',
989
+ 'GB-IOW' => 'Isle of Wight',
990
+ 'GB-IOS' => 'Isles of Scilly',
991
+ 'GB-ISL' => 'Islington',
992
+ 'GB-KEC' => 'Kensington and Chelsea',
993
+ 'GB-KEN' => 'Kent',
994
+ 'GB-KHL' => 'Kingston upon Hull',
995
+ 'GB-KTT' => 'Kingston upon Thames',
996
+ 'GB-KIR' => 'Kirklees',
997
+ 'GB-KWL' => 'Knowsley',
998
+ 'GB-LBH' => 'Lambeth',
999
+ 'GB-LAN' => 'Lancashire',
1000
+ 'GB-LDS' => 'Leeds',
1001
+ 'GB-LCE' => 'Leicester',
1002
+ 'GB-LEC' => 'Leicestershire',
1003
+ 'GB-LEW' => 'Lewisham',
1004
+ 'GB-LIN' => 'Lincolnshire',
1005
+ 'GB-LBC' => 'Lisburn and Castlereagh',
1006
+ 'GB-LIV' => 'Liverpool',
1007
+ 'GB-LND' => 'London, City of',
1008
+ 'GB-LUT' => 'Luton',
1009
+ 'GB-MAN' => 'Manchester',
1010
+ 'GB-MDW' => 'Medway',
1011
+ 'GB-MTY' => 'Merthyr Tydfil',
1012
+ 'GB-MRT' => 'Merton',
1013
+ 'GB-MEA' => 'Mid and East Antrim',
1014
+ 'GB-MUL' => 'Mid Ulster',
1015
+ 'GB-MDB' => 'Middlesbrough',
1016
+ 'GB-MLN' => 'Midlothian',
1017
+ 'GB-MIK' => 'Milton Keynes',
1018
+ 'GB-MON' => 'Monmouthshire',
1019
+ 'GB-MRY' => 'Moray',
1020
+ 'GB-NTL' => 'Neath Port Talbot',
1021
+ 'GB-NET' => 'Newcastle upon Tyne',
1022
+ 'GB-NWM' => 'Newham',
1023
+ 'GB-NWP' => 'Newport',
1024
+ 'GB-NMD' => 'Newry, Mourne and Down',
1025
+ 'GB-NFK' => 'Norfolk',
1026
+ 'GB-NAY' => 'North Ayrshire',
1027
+ 'GB-NEL' => 'North East Lincolnshire',
1028
+ 'GB-NLK' => 'North Lanarkshire',
1029
+ 'GB-NLN' => 'North Lincolnshire',
1030
+ 'GB-NSM' => 'North Somerset',
1031
+ 'GB-NTY' => 'North Tyneside',
1032
+ 'GB-NYK' => 'North Yorkshire',
1033
+ 'GB-NTH' => 'Northamptonshire',
1034
+ 'GB-NBL' => 'Northumberland',
1035
+ 'GB-NGM' => 'Nottingham',
1036
+ 'GB-NTT' => 'Nottinghamshire',
1037
+ 'GB-OLD' => 'Oldham',
1038
+ 'GB-ORK' => 'Orkney Islands',
1039
+ 'GB-OXF' => 'Oxfordshire',
1040
+ 'GB-PEM' => 'Pembrokeshire',
1041
+ 'GB-PKN' => 'Perth and Kinross',
1042
+ 'GB-PTE' => 'Peterborough',
1043
+ 'GB-PLY' => 'Plymouth',
1044
+ 'GB-POL' => 'Poole',
1045
+ 'GB-POR' => 'Portsmouth',
1046
+ 'GB-POW' => 'Powys',
1047
+ 'GB-RDG' => 'Reading',
1048
+ 'GB-RDB' => 'Redbridge',
1049
+ 'GB-RCC' => 'Redcar and Cleveland',
1050
+ 'GB-RFW' => 'Renfrewshire',
1051
+ 'GB-RCT' => 'Rhondda, Cynon, Taff',
1052
+ 'GB-RIC' => 'Richmond upon Thames',
1053
+ 'GB-RCH' => 'Rochdale',
1054
+ 'GB-ROT' => 'Rotherham',
1055
+ 'GB-RUT' => 'Rutland',
1056
+ 'GB-SLF' => 'Salford',
1057
+ 'GB-SAW' => 'Sandwell',
1058
+ 'GB-SCB' => 'Scottish Borders, The',
1059
+ 'GB-SFT' => 'Sefton',
1060
+ 'GB-SHF' => 'Sheffield',
1061
+ 'GB-ZET' => 'Shetland Islands',
1062
+ 'GB-SHR' => 'Shropshire',
1063
+ 'GB-SLG' => 'Slough',
1064
+ 'GB-SOL' => 'Solihull',
1065
+ 'GB-SOM' => 'Somerset',
1066
+ 'GB-SAY' => 'South Ayrshire',
1067
+ 'GB-SGC' => 'South Gloucestershire',
1068
+ 'GB-SLK' => 'South Lanarkshire',
1069
+ 'GB-STY' => 'South Tyneside',
1070
+ 'GB-STH' => 'Southampton',
1071
+ 'GB-SOS' => 'Southend-on-Sea',
1072
+ 'GB-SWK' => 'Southwark',
1073
+ 'GB-SHN' => 'St. Helens',
1074
+ 'GB-STS' => 'Staffordshire',
1075
+ 'GB-STG' => 'Stirling',
1076
+ 'GB-SKP' => 'Stockport',
1077
+ 'GB-STT' => 'Stockton-on-Tees',
1078
+ 'GB-STE' => 'Stoke-on-Trent',
1079
+ 'GB-SFK' => 'Suffolk',
1080
+ 'GB-SND' => 'Sunderland',
1081
+ 'GB-SRY' => 'Surrey',
1082
+ 'GB-STN' => 'Sutton',
1083
+ 'GB-SWA' => 'Swansea',
1084
+ 'GB-SWD' => 'Swindon',
1085
+ 'GB-TAM' => 'Tameside',
1086
+ 'GB-TFW' => 'Telford and Wrekin',
1087
+ 'GB-THR' => 'Thurrock',
1088
+ 'GB-TOB' => 'Torbay',
1089
+ 'GB-TOF' => 'Torfaen',
1090
+ 'GB-TWH' => 'Tower Hamlets',
1091
+ 'GB-TRF' => 'Trafford',
1092
+ 'GB-VGL' => 'Vale of Glamorgan, The',
1093
+ 'GB-WKF' => 'Wakefield',
1094
+ 'GB-WLL' => 'Walsall',
1095
+ 'GB-WFT' => 'Waltham Forest',
1096
+ 'GB-WND' => 'Wandsworth',
1097
+ 'GB-WRT' => 'Warrington',
1098
+ 'GB-WAR' => 'Warwickshire',
1099
+ 'GB-WBK' => 'West Berkshire',
1100
+ 'GB-WDU' => 'West Dunbartonshire',
1101
+ 'GB-WLN' => 'West Lothian',
1102
+ 'GB-WSX' => 'West Sussex',
1103
+ 'GB-WSM' => 'Westminster',
1104
+ 'GB-WGN' => 'Wigan',
1105
+ 'GB-WIL' => 'Wiltshire',
1106
+ 'GB-WNM' => 'Windsor and Maidenhead',
1107
+ 'GB-WRL' => 'Wirral',
1108
+ 'GB-WOK' => 'Wokingham',
1109
+ 'GB-WLV' => 'Wolverhampton',
1110
+ 'GB-WOR' => 'Worcestershire',
1111
+ 'GB-WRX' => 'Wrexham',
1112
+ 'GB-YOR' => 'York',
1113
+ );
1114
+
1115
+ return apply_filters( 'edd_united_kingdom_states', $states );
1116
+ }
1117
+
1118
  /**
1119
  * Get New Zealand States
1120
  *
1907
  return apply_filters( 'edd_get_country_name', $country_name, $country_code );
1908
  }
1909
 
1910
+ /**
1911
+ * Given a country and state code, return the state name
1912
+ *
1913
+ * @since 2.9
1914
+ * @param string $country_code The ISO Code for the country
1915
+ * @param string $state_code The ISO Code for the state
1916
+ *
1917
+ * @return string
1918
+ */
1919
+ function edd_get_state_name( $country_code = '', $state_code = '' ) {
1920
+ $states_list = edd_get_shop_states( $country_code );
1921
+ $state_name = isset( $states_list[ $state_code ] ) ? $states_list[ $state_code ] : $state_code;
1922
+
1923
+ return apply_filters( 'edd_get_state_name', $state_name, $state_code );
1924
+ }
includes/discount-functions.php CHANGED
@@ -442,6 +442,20 @@ function edd_get_discount_product_condition( $code_id = 0 ) {
442
  return $discount->product_condition;
443
  }
444
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
445
  /**
446
  * Check if a discount is not global.
447
  *
442
  return $discount->product_condition;
443
  }
444
 
445
+ /**
446
+ * Retrieves the discount status label.
447
+ *
448
+ * @since 2.9
449
+ *
450
+ * @param int $code_id Discount ID.
451
+ * @return string Product condition.
452
+ */
453
+ function edd_get_discount_status_label( $code_id = null ) {
454
+ $discount = new EDD_Discount( $code_id );
455
+
456
+ return $discount->get_status_label();
457
+ }
458
+
459
  /**
460
  * Check if a discount is not global.
461
  *
includes/download-functions.php CHANGED
@@ -82,30 +82,42 @@ function edd_get_download_by( $field = '', $value = '' ) {
82
  * Retrieves a download post object by ID or slug.
83
  *
84
  * @since 1.0
85
- * @param int $download Download ID
86
- * @return WP_Post $download Entire download data
 
 
 
87
  */
88
- function edd_get_download( $download = 0 ) {
89
- if ( is_numeric( $download ) ) {
90
- $download = get_post( $download );
91
- if ( ! $download || 'download' !== $download->post_type )
92
- return null;
93
- return $download;
94
- }
95
 
96
- $args = array(
97
- 'post_type' => 'download',
98
- 'name' => $download,
99
- 'numberposts' => 1
100
- );
101
 
102
- $download = get_posts($args);
 
 
103
 
104
- if ( $download ) {
105
- return $download[0];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  }
107
 
108
- return null;
109
  }
110
 
111
  /**
@@ -1324,4 +1336,4 @@ function edd_get_bundle_pricing_variations( $download_id = 0 ) {
1324
 
1325
  $download = new EDD_Download( $download_id );
1326
  return $download->get_bundle_pricing_variations();
1327
- }
82
  * Retrieves a download post object by ID or slug.
83
  *
84
  * @since 1.0
85
+ * @since 2.9 - Return an EDD_Download object.
86
+ *
87
+ * @param int $download_id Download ID.
88
+ *
89
+ * @return EDD_Download $download Entire download data.
90
  */
91
+ function edd_get_download( $download_id = 0 ) {
92
+ $download = null;
 
 
 
 
 
93
 
94
+ if ( is_numeric( $download_id ) ) {
95
+
96
+ $found_download = new EDD_Download( $download_id );
 
 
97
 
98
+ if ( ! empty( $found_download->ID ) ) {
99
+ $download = $found_download;
100
+ }
101
 
102
+ } else { // Support getting a download by name.
103
+ $args = array(
104
+ 'post_type' => 'download',
105
+ 'name' => $download_id,
106
+ 'post_per_page' => 1,
107
+ 'fields' => 'ids',
108
+ );
109
+
110
+ $downloads = new WP_Query( $args );
111
+ if ( is_array( $downloads->posts ) && ! empty( $downloads->posts ) ) {
112
+
113
+ $download_id = $downloads->posts[0];
114
+
115
+ $download = new EDD_Download( $download_id );
116
+
117
+ }
118
  }
119
 
120
+ return $download;
121
  }
122
 
123
  /**
1336
 
1337
  $download = new EDD_Download( $download_id );
1338
  return $download->get_bundle_pricing_variations();
1339
+ }
includes/emails/class-edd-emails.php CHANGED
@@ -369,6 +369,8 @@ class EDD_Emails {
369
 
370
  if ( 'text/html' == $this->content_type || true === $this->html ) {
371
  $message = apply_filters( 'edd_email_template_wpautop', true ) ? wpautop( $message ) : $message;
 
 
372
  }
373
 
374
  return $message;
369
 
370
  if ( 'text/html' == $this->content_type || true === $this->html ) {
371
  $message = apply_filters( 'edd_email_template_wpautop', true ) ? wpautop( $message ) : $message;
372
+ $message = apply_filters( 'edd_email_template_make_clickable', true ) ? make_clickable( $message ) : $message;
373
+ $message = str_replace( '&#038;', '&amp;', $message );
374
  }
375
 
376
  return $message;
includes/emails/functions.php CHANGED
@@ -51,6 +51,7 @@ function edd_email_purchase_receipt( $payment_id, $admin_notice = true, $to_emai
51
  $heading = edd_do_email_tags( $heading, $payment_id );
52
 
53
  $attachments = apply_filters( 'edd_receipt_attachments', array(), $payment_id, $payment_data );
 
54
  $message = edd_do_email_tags( edd_get_email_body_content( $payment_id, $payment_data ), $payment_id );
55
 
56
  $emails = EDD()->emails;
@@ -59,7 +60,6 @@ function edd_email_purchase_receipt( $payment_id, $admin_notice = true, $to_emai
59
  $emails->__set( 'from_email', $from_email );
60
  $emails->__set( 'heading', $heading );
61
 
62
-
63
  $headers = apply_filters( 'edd_receipt_headers', $emails->get_headers(), $payment_id, $payment_data );
64
  $emails->__set( 'headers', $headers );
65
 
@@ -135,23 +135,24 @@ function edd_admin_email_notice( $payment_id = 0, $payment_data = array() ) {
135
 
136
  $subject = edd_get_option( 'sale_notification_subject', sprintf( __( 'New download purchase - Order #%1$s', 'easy-digital-downloads' ), $payment_id ) );
137
  $subject = apply_filters( 'edd_admin_sale_notification_subject', wp_strip_all_tags( $subject ), $payment_id );
138
- $subject = edd_do_email_tags( $subject, $payment_id );
139
 
140
- $headers = "From: " . stripslashes_deep( html_entity_decode( $from_name, ENT_COMPAT, 'UTF-8' ) ) . " <$from_email>\r\n";
141
- $headers .= "Reply-To: ". $from_email . "\r\n";
142
- //$headers .= "MIME-Version: 1.0\r\n";
143
- $headers .= "Content-Type: text/html; charset=utf-8\r\n";
144
- $headers = apply_filters( 'edd_admin_sale_notification_headers', $headers, $payment_id, $payment_data );
145
 
146
  $attachments = apply_filters( 'edd_admin_sale_notification_attachments', array(), $payment_id, $payment_data );
147
 
148
  $message = edd_get_sale_notification_body_content( $payment_id, $payment_data );
149
 
150
  $emails = EDD()->emails;
 
151
  $emails->__set( 'from_name', $from_name );
152
  $emails->__set( 'from_email', $from_email );
 
 
 
153
  $emails->__set( 'headers', $headers );
154
- $emails->__set( 'heading', __( 'New Sale!', 'easy-digital-downloads' ) );
155
 
156
  $emails->send( edd_get_admin_notice_emails(), $subject, $message, $attachments );
157
 
51
  $heading = edd_do_email_tags( $heading, $payment_id );
52
 
53
  $attachments = apply_filters( 'edd_receipt_attachments', array(), $payment_id, $payment_data );
54
+
55
  $message = edd_do_email_tags( edd_get_email_body_content( $payment_id, $payment_data ), $payment_id );
56
 
57
  $emails = EDD()->emails;
60
  $emails->__set( 'from_email', $from_email );
61
  $emails->__set( 'heading', $heading );
62
 
 
63
  $headers = apply_filters( 'edd_receipt_headers', $emails->get_headers(), $payment_id, $payment_data );
64
  $emails->__set( 'headers', $headers );
65
 
135
 
136
  $subject = edd_get_option( 'sale_notification_subject', sprintf( __( 'New download purchase - Order #%1$s', 'easy-digital-downloads' ), $payment_id ) );
137
  $subject = apply_filters( 'edd_admin_sale_notification_subject', wp_strip_all_tags( $subject ), $payment_id );
138
+ $subject = wp_specialchars_decode( edd_do_email_tags( $subject, $payment_id ) );
139
 
140
+ $heading = edd_get_option( 'sale_notification_heading', __( 'New Sale!', 'easy-digital-downloads' ) );
141
+ $heading = apply_filters( 'edd_admin_sale_notification_heading', $heading, $payment_id, $payment_data );
142
+ $heading = edd_do_email_tags( $heading, $payment_id );
 
 
143
 
144
  $attachments = apply_filters( 'edd_admin_sale_notification_attachments', array(), $payment_id, $payment_data );
145
 
146
  $message = edd_get_sale_notification_body_content( $payment_id, $payment_data );
147
 
148
  $emails = EDD()->emails;
149
+
150
  $emails->__set( 'from_name', $from_name );
151
  $emails->__set( 'from_email', $from_email );
152
+ $emails->__set( 'heading', $heading );
153
+
154
+ $headers = apply_filters( 'edd_admin_sale_notification_headers', $emails->get_headers(), $payment_id, $payment_data );
155
  $emails->__set( 'headers', $headers );
 
156
 
157
  $emails->send( edd_get_admin_notice_emails(), $subject, $message, $attachments );
158
 
includes/gateways/paypal-standard.php CHANGED
@@ -245,6 +245,7 @@ function edd_process_paypal_purchase( $purchase_data ) {
245
 
246
  // Add cart items
247
  $i = 1;
 
248
  if( is_array( $purchase_data['cart_details'] ) && ! empty( $purchase_data['cart_details'] ) ) {
249
  foreach ( $purchase_data['cart_details'] as $item ) {
250
 
@@ -262,6 +263,8 @@ function edd_process_paypal_purchase( $purchase_data ) {
262
  $paypal_args['item_number_' . $i ] = edd_get_download_sku( $item['id'] );
263
  }
264
 
 
 
265
  $i++;
266
 
267
  }
@@ -290,6 +293,14 @@ function edd_process_paypal_purchase( $purchase_data ) {
290
  $paypal_args['discount_amount_cart'] = edd_sanitize_amount( $discounted_amount );
291
  }
292
 
 
 
 
 
 
 
 
 
293
  // Add taxes to the cart
294
  if ( edd_use_taxes() ) {
295
 
245
 
246
  // Add cart items
247
  $i = 1;
248
+ $paypal_sum = 0;
249
  if( is_array( $purchase_data['cart_details'] ) && ! empty( $purchase_data['cart_details'] ) ) {
250
  foreach ( $purchase_data['cart_details'] as $item ) {
251
 
263
  $paypal_args['item_number_' . $i ] = edd_get_download_sku( $item['id'] );
264
  }
265
 
266
+ $paypal_sum += ( $item_amount * $item['quantity'] );
267
+
268
  $i++;
269
 
270
  }
293
  $paypal_args['discount_amount_cart'] = edd_sanitize_amount( $discounted_amount );
294
  }
295
 
296
+ if( $paypal_sum > $purchase_data['price'] ) {
297
+ $difference = round( $paypal_sum - $purchase_data['price'], 2 );
298
+ if( ! isset( $paypal_args['discount_amount_cart'] ) ) {
299
+ $paypal_args['discount_amount_cart'] = 0;
300
+ }
301
+ $paypal_args['discount_amount_cart'] += $difference;
302
+ }
303
+
304
  // Add taxes to the cart
305
  if ( edd_use_taxes() ) {
306
 
includes/payments/class-edd-payment.php CHANGED
@@ -1582,7 +1582,7 @@ class EDD_Payment {
1582
  return false;
1583
  }
1584
 
1585
- edd_insert_payment_note( $this->ID, $note );
1586
  }
1587
 
1588
  /**
1582
  return false;
1583
  }
1584
 
1585
+ edd_insert_payment_note( $this->ID, esc_html( $note ) );
1586
  }
1587
 
1588
  /**
includes/payments/functions.php CHANGED
@@ -1593,7 +1593,7 @@ function edd_get_payment_note_html( $note, $payment_id = 0 ) {
1593
  $note_html = '<div class="edd-payment-note" id="edd-payment-note-' . $note->comment_ID . '">';
1594
  $note_html .='<p>';
1595
  $note_html .= '<strong>' . $user . '</strong>&nbsp;&ndash;&nbsp;' . date_i18n( $date_format, strtotime( $note->comment_date ) ) . '<br/>';
1596
- $note_html .= make_clickable( $note->comment_content );
1597
  $note_html .= '&nbsp;&ndash;&nbsp;<a href="' . esc_url( $delete_note_url ) . '" class="edd-delete-payment-note" data-note-id="' . absint( $note->comment_ID ) . '" data-payment-id="' . absint( $payment_id ) . '">' . __( 'Delete', 'easy-digital-downloads' ) . '</a>';
1598
  $note_html .= '</p>';
1599
  $note_html .= '</div>';
1593
  $note_html = '<div class="edd-payment-note" id="edd-payment-note-' . $note->comment_ID . '">';
1594
  $note_html .='<p>';
1595
  $note_html .= '<strong>' . $user . '</strong>&nbsp;&ndash;&nbsp;' . date_i18n( $date_format, strtotime( $note->comment_date ) ) . '<br/>';
1596
+ $note_html .= make_clickable( wp_kses_post( $note->comment_content ) );
1597
  $note_html .= '&nbsp;&ndash;&nbsp;<a href="' . esc_url( $delete_note_url ) . '" class="edd-delete-payment-note" data-note-id="' . absint( $note->comment_ID ) . '" data-payment-id="' . absint( $payment_id ) . '">' . __( 'Delete', 'easy-digital-downloads' ) . '</a>';
1598
  $note_html .= '</p>';
1599
  $note_html .= '</div>';
includes/process-download.php CHANGED
@@ -737,11 +737,23 @@ function edd_get_file_ctype( $extension ) {
737
  * See http://codeigniter.com/wiki/Download_helper_for_large_files/
738
  *
739
  * @access public
740
- * @param string $file The file
741
- * @param boolean $retbytes Return the bytes of file
 
 
742
  * @return bool|string If string, $status || $cnt
743
  */
744
  function edd_readfile_chunked( $file, $retbytes = true ) {
 
 
 
 
 
 
 
 
 
 
745
 
746
  $chunksize = 1024 * 1024;
747
  $buffer = '';
@@ -749,22 +761,69 @@ function edd_readfile_chunked( $file, $retbytes = true ) {
749
  $handle = @fopen( $file, 'rb' );
750
 
751
  if ( $size = @filesize( $file ) ) {
752
- header("Content-Length: " . $size );
753
  }
754
 
755
  if ( false === $handle ) {
756
  return false;
757
  }
758
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
759
  while ( ! @feof( $handle ) ) {
760
  $buffer = @fread( $handle, $chunksize );
761
  echo $buffer;
 
762
 
763
  if ( $retbytes ) {
764
  $cnt += strlen( $buffer );
765
  }
 
 
 
 
 
766
  }
767
 
 
 
768
  $status = @fclose( $handle );
769
 
770
  if ( $retbytes && $status ) {
737
  * See http://codeigniter.com/wiki/Download_helper_for_large_files/
738
  *
739
  * @access public
740
+ *
741
+ * @param string $file The file
742
+ * @param boolean $retbytes Return the bytes of file
743
+ *
744
  * @return bool|string If string, $status || $cnt
745
  */
746
  function edd_readfile_chunked( $file, $retbytes = true ) {
747
+ while ( ob_get_level() > 0 ) {
748
+ ob_end_clean();
749
+ }
750
+
751
+ ob_start();
752
+
753
+ // If output buffers exist, make sure they are closed. See https://github.com/easydigitaldownloads/easy-digital-downloads/issues/6387
754
+ if ( ob_get_length() ) {
755
+ ob_clean();
756
+ }
757
 
758
  $chunksize = 1024 * 1024;
759
  $buffer = '';
761
  $handle = @fopen( $file, 'rb' );
762
 
763
  if ( $size = @filesize( $file ) ) {
764
+ header( "Content-Length: " . $size );
765
  }
766
 
767
  if ( false === $handle ) {
768
  return false;
769
  }
770
 
771
+ if ( isset( $_SERVER['HTTP_RANGE'] ) ) {
772
+ list( $size_unit, $range ) = explode( '=', $_SERVER['HTTP_RANGE'], 2 );
773
+ if ( 'bytes' === $size_unit ) {
774
+ if ( strpos( ',', $range ) ) {
775
+ list( $range ) = explode( ',', $range, 1 );
776
+ }
777
+ } else {
778
+ $range = '';
779
+ header( 'HTTP/1.1 416 Requested Range Not Satisfiable' );
780
+ exit;
781
+ }
782
+ } else {
783
+ $range = '';
784
+ }
785
+
786
+ if ( empty( $range ) ) {
787
+ $seek_start = null;
788
+ $seek_end = null;
789
+ } else {
790
+ list( $seek_start, $seek_end ) = explode( '-', $range, 2 );
791
+ }
792
+
793
+ $seek_end = ( empty( $seek_end ) ) ? ( $size - 1 ) : min( abs( intval( $seek_end ) ), ( $size - 1 ) );
794
+ $seek_start = ( empty( $seek_start ) || $seek_end < abs( intval( $seek_start ) ) ) ? 0 : max( abs( intval( $seek_start ) ), 0 );
795
+
796
+ // Only send partial content header if downloading a piece of the file (IE workaround)
797
+ if ( $seek_start > 0 || $seek_end < ( $size - 1 ) ) {
798
+ header( 'HTTP/1.1 206 Partial Content' );
799
+ header( 'Content-Range: bytes ' . $seek_start . '-' . $seek_end . '/' . $size );
800
+ header( 'Content-Length: ' . ( $seek_end - $seek_start + 1 ) );
801
+ } else {
802
+ header( "Content-Length: $size" );
803
+ }
804
+
805
+ header( 'Accept-Ranges: bytes' );
806
+
807
+ set_time_limit( 0 );
808
+ fseek( $handle, $seek_start );
809
+
810
  while ( ! @feof( $handle ) ) {
811
  $buffer = @fread( $handle, $chunksize );
812
  echo $buffer;
813
+ ob_flush();
814
 
815
  if ( $retbytes ) {
816
  $cnt += strlen( $buffer );
817
  }
818
+
819
+ if ( connection_status() != 0 ) {
820
+ @fclose( $handle );
821
+ exit;
822
+ }
823
  }
824
 
825
+ ob_flush();
826
+
827
  $status = @fclose( $handle );
828
 
829
  if ( $retbytes && $status ) {
includes/process-purchase.php CHANGED
@@ -126,7 +126,7 @@ function edd_process_purchase_form() {
126
  'subtotal' => edd_get_cart_subtotal(), // Amount before taxes and discounts
127
  'discount' => edd_get_cart_discounted_amount(), // Discounted amount
128
  'tax' => edd_get_cart_tax(), // Taxed amount
129
- 'tax_rate' => edd_get_cart_tax_rate( $card_country, $card_state, $card_zip ), // Tax rate
130
  'price' => edd_get_cart_total(), // Amount after taxes
131
  'purchase_key' => $purchase_key,
132
  'user_email' => $user['user_email'],
126
  'subtotal' => edd_get_cart_subtotal(), // Amount before taxes and discounts
127
  'discount' => edd_get_cart_discounted_amount(), // Discounted amount
128
  'tax' => edd_get_cart_tax(), // Taxed amount
129
+ 'tax_rate' => edd_use_taxes() ? edd_get_cart_tax_rate( $card_country, $card_state, $card_zip ) : 0, // Tax rate
130
  'price' => edd_get_cart_total(), // Amount after taxes
131
  'purchase_key' => $purchase_key,
132
  'user_email' => $user['user_email'],
includes/shortcodes.php CHANGED
@@ -366,6 +366,18 @@ function edd_downloads_query( $atts, $content = null ) {
366
  $query['meta_key'] = 'edd_price';
367
  $query['orderby'] = 'meta_value_num';
368
  break;
 
 
 
 
 
 
 
 
 
 
 
 
369
 
370
  case 'title':
371
  $query['orderby'] = 'title';
@@ -579,12 +591,17 @@ function edd_downloads_query( $atts, $content = null ) {
579
  $wrapper_class = 'edd_download_columns_' . $atts['columns'];
580
  ob_start(); ?>
581
  <div class="edd_downloads_list <?php echo apply_filters( 'edd_downloads_list_wrapper_class', $wrapper_class, $atts ); ?>">
 
 
 
582
  <?php while ( $downloads->have_posts() ) : $downloads->the_post(); ?>
583
  <?php do_action( 'edd_download_shortcode_item', $atts, $i ); ?>
584
  <?php $i++; endwhile; ?>
585
 
586
  <?php wp_reset_postdata(); ?>
587
 
 
 
588
  <?php if ( filter_var( $atts['pagination'], FILTER_VALIDATE_BOOLEAN ) ) : ?>
589
 
590
  <?php
366
  $query['meta_key'] = 'edd_price';
367
  $query['orderby'] = 'meta_value_num';
368
  break;
369
+
370
+ case 'sales':
371
+ $atts['orderby'] = 'meta_value';
372
+ $query['meta_key'] = '_edd_download_sales';
373
+ $query['orderby'] = 'meta_value_num';
374
+ break;
375
+
376
+ case 'earnings':
377
+ $atts['orderby'] = 'meta_value';
378
+ $query['meta_key'] = '_edd_download_earnings';
379
+ $query['orderby'] = 'meta_value_num';
380
+ break;
381
 
382
  case 'title':
383
  $query['orderby'] = 'title';
591
  $wrapper_class = 'edd_download_columns_' . $atts['columns'];
592
  ob_start(); ?>
593
  <div class="edd_downloads_list <?php echo apply_filters( 'edd_downloads_list_wrapper_class', $wrapper_class, $atts ); ?>">
594
+
595
+ <?php do_action( 'edd_downloads_list_top', $atts ); ?>
596
+
597
  <?php while ( $downloads->have_posts() ) : $downloads->the_post(); ?>
598
  <?php do_action( 'edd_download_shortcode_item', $atts, $i ); ?>
599
  <?php $i++; endwhile; ?>
600
 
601
  <?php wp_reset_postdata(); ?>
602
 
603
+ <?php do_action( 'edd_downloads_list_bottom', $atts ); ?>
604
+
605
  <?php if ( filter_var( $atts['pagination'], FILTER_VALIDATE_BOOLEAN ) ) : ?>
606
 
607
  <?php
includes/tax-functions.php CHANGED
@@ -94,7 +94,7 @@ function edd_get_tax_rate( $country = false, $state = false ) {
94
  }
95
 
96
  $state_rate = $tax_rate['rate'];
97
- if( 0 !== $state_rate || ! empty( $state_rate ) ) {
98
  $rate = number_format( $state_rate, 4 );
99
  }
100
  }
94
  }
95
 
96
  $state_rate = $tax_rate['rate'];
97
+ if( ( 0 !== $state_rate || ! empty( $state_rate ) ) && '' !== $state_rate ) {
98
  $rate = number_format( $state_rate, 4 );
99
  }
100
  }
includes/template-functions.php CHANGED
@@ -76,6 +76,7 @@ function edd_get_purchase_link( $args = array() ) {
76
  'price_id' => isset( $args['price_id'] ) ? $args['price_id'] : false,
77
  'direct' => $button_behavior == 'direct' ? true : false,
78
  'text' => $button_behavior == 'direct' ? edd_get_option( 'buy_now_text', __( 'Buy Now', 'easy-digital-downloads' ) ) : edd_get_option( 'add_to_cart_text', __( 'Purchase', 'easy-digital-downloads' ) ),
 
79
  'style' => edd_get_option( 'button_style', 'button' ),
80
  'color' => edd_get_option( 'checkout_color', 'blue' ),
81
  'class' => 'edd-submit'
@@ -188,7 +189,7 @@ function edd_get_purchase_link( $args = array() ) {
188
  }
189
 
190
  echo '<input type="submit" class="edd-add-to-cart edd-no-js ' . esc_attr( $class ) . '" name="edd_purchase_download" value="' . esc_attr( $args['text'] ) . '" data-action="edd_add_to_cart" data-download-id="' . esc_attr( $download->ID ) . '" ' . $data_variable . ' ' . $type . ' ' . $button_display . '/>';
191
- echo '<a href="' . esc_url( edd_get_checkout_uri() ) . '" class="edd_go_to_checkout ' . esc_attr( $class ) . '" ' . $checkout_display . '>' . __( 'Checkout', 'easy-digital-downloads' ) . '</a>';
192
  ?>
193
 
194
  <?php if ( ! edd_is_ajax_disabled() ) : ?>
76
  'price_id' => isset( $args['price_id'] ) ? $args['price_id'] : false,
77
  'direct' => $button_behavior == 'direct' ? true : false,
78
  'text' => $button_behavior == 'direct' ? edd_get_option( 'buy_now_text', __( 'Buy Now', 'easy-digital-downloads' ) ) : edd_get_option( 'add_to_cart_text', __( 'Purchase', 'easy-digital-downloads' ) ),
79
+ 'checkout' => edd_get_option( 'checkout_button_text', _x( 'Checkout', 'text shown on the Add to Cart Button when the product is already in the cart', 'easy-digital-downloads' ) ),
80
  'style' => edd_get_option( 'button_style', 'button' ),
81
  'color' => edd_get_option( 'checkout_color', 'blue' ),
82
  'class' => 'edd-submit'
189
  }
190
 
191
  echo '<input type="submit" class="edd-add-to-cart edd-no-js ' . esc_attr( $class ) . '" name="edd_purchase_download" value="' . esc_attr( $args['text'] ) . '" data-action="edd_add_to_cart" data-download-id="' . esc_attr( $download->ID ) . '" ' . $data_variable . ' ' . $type . ' ' . $button_display . '/>';
192
+ echo '<a href="' . esc_url( edd_get_checkout_uri() ) . '" class="edd_go_to_checkout ' . esc_attr( $class ) . '" ' . $checkout_display . '>' . $args['checkout'] . '</a>';
193
  ?>
194
 
195
  <?php if ( ! edd_is_ajax_disabled() ) : ?>
includes/user-functions.php CHANGED
@@ -543,11 +543,12 @@ function edd_get_customer_address( $user_id = 0 ) {
543
  /**
544
  * Sends the new user notification email when a user registers during checkout
545
  *
546
- * @access public
547
- * @since 1.8.8
548
  * @param int $user_id
549
  * @param array $user_data
550
- * @return void
 
551
  */
552
  function edd_new_user_notification( $user_id = 0, $user_data = array() ) {
553
 
@@ -559,21 +560,25 @@ function edd_new_user_notification( $user_id = 0, $user_data = array() ) {
559
  $from_name = edd_get_option( 'from_name', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) );
560
  $from_email = edd_get_option( 'from_email', get_bloginfo( 'admin_email' ) );
561
 
 
562
  $emails->__set( 'from_name', $from_name );
563
  $emails->__set( 'from_email', $from_email );
564
 
565
- $admin_subject = sprintf( __('[%s] New User Registration', 'easy-digital-downloads' ), $from_name );
566
- $admin_heading = __( 'New user registration', 'easy-digital-downloads' );
567
  $admin_message = sprintf( __( 'Username: %s', 'easy-digital-downloads'), $user_data['user_login'] ) . "\r\n\r\n";
568
  $admin_message .= sprintf( __( 'E-mail: %s', 'easy-digital-downloads'), $user_data['user_email'] ) . "\r\n";
569
 
 
 
570
  $emails->__set( 'heading', $admin_heading );
571
 
572
  $emails->send( get_option( 'admin_email' ), $admin_subject, $admin_message );
573
 
574
- $user_subject = sprintf( __( '[%s] Your username and password', 'easy-digital-downloads' ), $from_name );
575
- $user_heading = __( 'Your account info', 'easy-digital-downloads' );
576
- $user_message = sprintf( __( 'Username: %s', 'easy-digital-downloads' ), $user_data['user_login'] ) . "\r\n";
 
577
 
578
  if ( did_action( 'edd_pre_process_purchase' ) ) {
579
  $password_message = __( 'Password entered at checkout', 'easy-digital-downloads' );
@@ -581,18 +586,21 @@ function edd_new_user_notification( $user_id = 0, $user_data = array() ) {
581
  $password_message = __( 'Password entered at registration', 'easy-digital-downloads' );
582
  }
583
 
584
- $user_message .= sprintf( __( 'Password: %s', 'easy-digital-downloads' ), '[' . $password_message . ']' ) . "\r\n";
585
 
 
586
  if( $emails->html ) {
587
 
588
- $user_message .= '<a href="' . wp_login_url() . '"> ' . esc_attr__( 'Click here to log in', 'easy-digital-downloads' ) . ' &raquo;</a>' . "\r\n";
589
 
590
  } else {
591
 
592
- $user_message .= sprintf( __( 'To log in, visit: %s', 'easy-digital-downloads' ), wp_login_url() ) . "\r\n";
593
 
594
  }
595
 
 
 
596
  $emails->__set( 'heading', $user_heading );
597
 
598
  $emails->send( $user_data['user_email'], $user_subject, $user_message );
543
  /**
544
  * Sends the new user notification email when a user registers during checkout
545
  *
546
+ * @access public
547
+ * @since 1.8.8
548
  * @param int $user_id
549
  * @param array $user_data
550
+ *
551
+ * @return void
552
  */
553
  function edd_new_user_notification( $user_id = 0, $user_data = array() ) {
554
 
560
  $from_name = edd_get_option( 'from_name', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) );
561
  $from_email = edd_get_option( 'from_email', get_bloginfo( 'admin_email' ) );
562
 
563
+ // Setup and send the new user email for Admins.
564
  $emails->__set( 'from_name', $from_name );
565
  $emails->__set( 'from_email', $from_email );
566
 
567
+ $admin_subject = apply_filters( 'edd_user_registration_admin_email_subject', sprintf( __('[%s] New User Registration', 'easy-digital-downloads' ), $from_name ), $user_data );
568
+ $admin_heading = apply_filters( 'edd_user_registration_admin_email_heading', __( 'New user registration', 'easy-digital-downloads' ), $user_data );
569
  $admin_message = sprintf( __( 'Username: %s', 'easy-digital-downloads'), $user_data['user_login'] ) . "\r\n\r\n";
570
  $admin_message .= sprintf( __( 'E-mail: %s', 'easy-digital-downloads'), $user_data['user_email'] ) . "\r\n";
571
 
572
+ $admin_message = apply_filters( 'edd_user_registration_admin_email_message', $admin_message, $user_data );
573
+
574
  $emails->__set( 'heading', $admin_heading );
575
 
576
  $emails->send( get_option( 'admin_email' ), $admin_subject, $admin_message );
577
 
578
+ // Setup and send the new user email for the end user.
579
+ $user_subject = apply_filters( 'edd_user_registration_email_subject', sprintf( __( '[%s] Your username and password', 'easy-digital-downloads' ), $from_name ), $user_data );
580
+ $user_heading = apply_filters( 'edd_user_registration_email_heading', __( 'Your account info', 'easy-digital-downloads' ), $user_data );
581
+ $user_message = apply_filters( 'edd_user_registration_email_username', sprintf( __( 'Username: %s', 'easy-digital-downloads' ), $user_data['user_login'] ) . "\r\n", $user_data );
582
 
583
  if ( did_action( 'edd_pre_process_purchase' ) ) {
584
  $password_message = __( 'Password entered at checkout', 'easy-digital-downloads' );
586
  $password_message = __( 'Password entered at registration', 'easy-digital-downloads' );
587
  }
588
 
589
+ $user_message .= apply_filters( 'edd_user_registration_email_password', sprintf( __( 'Password: %s', 'easy-digital-downloads' ), '[' . $password_message . ']' ) . "\r\n" );
590
 
591
+ $login_url = apply_filters( 'edd_user_registration_email_login_url', wp_login_url() );
592
  if( $emails->html ) {
593
 
594
+ $user_message .= '<a href="' . $login_url . '"> ' . esc_attr__( 'Click here to log in', 'easy-digital-downloads' ) . ' &raquo;</a>' . "\r\n";
595
 
596
  } else {
597
 
598
+ $user_message .= sprintf( __( 'To log in, visit: %s', 'easy-digital-downloads' ), $login_url ) . "\r\n";
599
 
600
  }
601
 
602
+ $user_message = apply_filters( 'edd_user_registration_email_message', $user_message, $user_data );
603
+
604
  $emails->__set( 'heading', $user_heading );
605
 
606
  $emails->send( $user_data['user_email'], $user_subject, $user_message );
includes/widgets.php CHANGED
@@ -302,15 +302,36 @@ class EDD_Product_Details_Widget extends WP_Widget {
302
  echo $purchase_button;
303
 
304
  // categories and tags.
305
- $category_list = $categories ? get_the_term_list( $download_id, 'download_category', '', ', ' ) : '';
306
- $category_count = count( get_the_terms( $download_id, 'download_category' ) );
307
- $category_labels = edd_get_taxonomy_labels( 'download_category' );
308
- $category_label = $category_count > 1 ? $category_labels['name'] : $category_labels['singular_name'];
309
-
310
- $tag_list = $tags ? get_the_term_list( $download_id, 'download_tag', '', ', ' ) : '';
311
- $tag_count = count( get_the_terms( $download_id, 'download_tag' ) );
312
- $tag_taxonomy = edd_get_taxonomy_labels( 'download_tag' );
313
- $tag_label = $tag_count > 1 ? $tag_taxonomy['name'] : $tag_taxonomy['singular_name'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
314
 
315
  $text = '';
316
 
302
  echo $purchase_button;
303
 
304
  // categories and tags.
305
+ $category_list = false;
306
+ $category_label = '';
307
+ if ( $categories ) {
308
+
309
+ $category_terms = get_the_terms( $download_id, 'download_category' );
310
+
311
+ if ( $category_terms && ! is_wp_error( $category_terms ) ) {
312
+ $category_list = get_the_term_list( $download_id, 'download_category', '', ', ' );
313
+ $category_count = count( $category_terms );
314
+ $category_labels = edd_get_taxonomy_labels( 'download_category' );
315
+ $category_label = $category_count > 1 ? $category_labels['name'] : $category_labels['singular_name'];
316
+ }
317
+
318
+ }
319
+
320
+ $tag_list = false;
321
+ $tag_label = '';
322
+ if ( $tags ) {
323
+
324
+ $tag_terms = get_the_terms( $download_id, 'download_tag' );
325
+
326
+ if ( $tag_terms && ! is_wp_error( $tag_terms ) ) {
327
+ $tag_list = get_the_term_list( $download_id, 'download_tag', '', ', ' );
328
+ $tag_count = count( $tag_terms );
329
+ $tag_taxonomy = edd_get_taxonomy_labels( 'download_tag' );
330
+ $tag_label = $tag_count > 1 ? $tag_taxonomy['name'] : $tag_taxonomy['singular_name'];
331
+ }
332
+
333
+ }
334
+
335
 
336
  $text = '';
337
 
languages/easy-digital-downloads.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Easy Digital Downloads package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Easy Digital Downloads 2.8.17\n"
6
  "Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
7
- "POT-Creation-Date: 2018-02-06 18:16:29+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -22,7 +22,7 @@ msgstr ""
22
  "X-Poedit-SearchPath-0: .\n"
23
  "X-Poedit-Bookmarks: \n"
24
  "X-Textdomain-Support: yes\n"
25
- "X-Generator: grunt-wp-i18n1.0.0\n"
26
 
27
  #: easy-digital-downloads.php:183 easy-digital-downloads.php:195
28
  msgid "Cheatin&#8217; huh?"
@@ -92,13 +92,13 @@ msgstr ""
92
  #: includes/cart/class-edd-cart.php:1470 includes/cart/class-edd-cart.php:1484
93
  #: includes/class-edd-license-handler.php:309
94
  #: includes/deprecated-functions.php:517 includes/deprecated-functions.php:532
95
- #: includes/deprecated-functions.php:542 includes/download-functions.php:1248
96
  #: includes/emails/actions.php:53 includes/emails/template.php:243
97
  #: includes/error-tracking.php:40 includes/gateways/functions.php:221
98
  #: includes/gateways/manual.php:33 includes/gateways/paypal-standard.php:168
99
- #: includes/process-download.php:293 includes/process-download.php:826
100
- #: includes/query-filters.php:48 includes/user-functions.php:880
101
- #: includes/user-functions.php:905 includes/user-functions.php:958
102
  msgid "Error"
103
  msgstr ""
104
 
@@ -195,7 +195,7 @@ msgstr ""
195
 
196
  #: includes/admin/admin-pages.php:43 includes/admin/plugins.php:57
197
  #: includes/admin/settings/contextual-help.php:87
198
- #: includes/admin/settings/register-settings.php:1220
199
  msgid "Extensions"
200
  msgstr ""
201
 
@@ -314,6 +314,7 @@ msgid "A discount with that code already exists, please use a different code."
314
  msgstr ""
315
 
316
  #: includes/admin/class-edd-notices.php:127
 
317
  msgid "Discount code updated."
318
  msgstr ""
319
 
@@ -407,7 +408,7 @@ msgstr ""
407
 
408
  #: includes/admin/customers/class-customer-table.php:72
409
  #: includes/admin/payments/class-payments-table.php:277
410
- #: includes/admin/reporting/class-file-downloads-logs-list-table.php:148
411
  #: includes/admin/reporting/class-sales-logs-list-table.php:131
412
  msgid "Customer"
413
  msgstr ""
@@ -426,7 +427,7 @@ msgstr ""
426
 
427
  #: includes/admin/customers/class-customer-table.php:161
428
  #: includes/admin/discounts/class-discount-codes-table.php:221
429
- #: includes/admin/discounts/class-discount-codes-table.php:289
430
  #: includes/admin/payments/class-payments-table.php:373
431
  #: includes/admin/payments/class-payments-table.php:445
432
  #: includes/payments/functions.php:1597
@@ -438,9 +439,9 @@ msgid "(Pending Verification)"
438
  msgstr ""
439
 
440
  #: includes/admin/customers/class-customer-table.php:179
441
- #: includes/admin/discounts/add-discount.php:23
442
  #: includes/admin/discounts/class-discount-codes-table.php:145
443
- #: includes/admin/discounts/edit-discount.php:37
444
  #: includes/admin/downloads/dashboard-columns.php:31
445
  #: includes/admin/payments/view-order-details.php:660
446
  #: includes/admin/reporting/class-export-customers.php:76
@@ -510,7 +511,7 @@ msgid "An error has occured. Please try again."
510
  msgstr ""
511
 
512
  #: includes/admin/customers/customer-actions.php:207
513
- #: includes/user-functions.php:905
514
  msgid "Nonce verification failed."
515
  msgstr ""
516
 
@@ -551,7 +552,7 @@ msgid "Nonce verification failed"
551
  msgstr ""
552
 
553
  #: includes/admin/customers/customer-actions.php:311
554
- #: includes/shortcodes.php:935
555
  msgid "Email address %s removed by %s"
556
  msgstr ""
557
 
@@ -634,7 +635,7 @@ msgid "City"
634
  msgstr ""
635
 
636
  #: includes/admin/customers/customers.php:269
637
- #: includes/admin/settings/register-settings.php:2018
638
  #: includes/admin/tools.php:695 includes/checkout/template.php:435
639
  #: templates/shortcode-profile-editor.php:171
640
  msgid "State / Province"
@@ -710,6 +711,7 @@ msgstr ""
710
  #: includes/admin/reporting/class-export-payments.php:63
711
  #: includes/admin/reporting/export/class-batch-export-customers.php:44
712
  #: includes/admin/reporting/export/class-batch-export-payments.php:42
 
713
  #: includes/admin/tools.php:497 templates/shortcode-register.php:25
714
  msgid "Email"
715
  msgstr ""
@@ -736,7 +738,7 @@ msgstr ""
736
  #: includes/admin/downloads/metabox.php:698
737
  #: includes/admin/downloads/metabox.php:823
738
  #: includes/admin/payments/view-order-details.php:490
739
- #: includes/admin/settings/register-settings.php:2021 includes/scripts.php:226
740
  #: templates/checkout_cart.php:57 templates/checkout_cart.php:75
741
  #: templates/shortcode-profile-editor.php:123
742
  msgid "Remove"
@@ -770,9 +772,9 @@ msgid "ID"
770
  msgstr ""
771
 
772
  #: includes/admin/customers/customers.php:435
773
- #: includes/admin/discounts/add-discount.php:56
774
  #: includes/admin/discounts/class-discount-codes-table.php:147
775
- #: includes/admin/discounts/edit-discount.php:70
776
  #: includes/admin/payments/class-payments-table.php:275
777
  #: includes/admin/reporting/class-export-payments.php:74
778
  #: includes/admin/reporting/export/class-batch-export-payments.php:55
@@ -787,13 +789,13 @@ msgstr ""
787
  #: includes/admin/reporting/class-export-download-history.php:64
788
  #: includes/admin/reporting/class-export-payments.php:80
789
  #: includes/admin/reporting/class-export.php:70
790
- #: includes/admin/reporting/class-file-downloads-logs-list-table.php:152
791
  #: includes/admin/reporting/class-gateway-error-logs-list-table.php:134
792
  #: includes/admin/reporting/class-sales-logs-list-table.php:135
793
  #: includes/admin/reporting/export/class-batch-export-api-requests.php:47
794
  #: includes/admin/reporting/export/class-batch-export-file-downloads.php:42
795
  #: includes/admin/reporting/export/class-batch-export-payments.php:61
796
- #: includes/admin/reporting/export/class-batch-export-sales.php:46
797
  #: includes/admin/tools.php:587 templates/history-purchases.php:19
798
  #: templates/shortcode-receipt.php:59
799
  msgid "Date"
@@ -801,7 +803,7 @@ msgstr ""
801
 
802
  #: includes/admin/customers/customers.php:437
803
  #: includes/admin/discounts/class-discount-codes-table.php:151
804
- #: includes/admin/discounts/edit-discount.php:175
805
  #: includes/admin/payments/class-payments-table.php:278
806
  #: includes/admin/reporting/class-export-payments.php:82
807
  #: includes/admin/reporting/export/class-batch-export-downloads.php:49
@@ -949,185 +951,188 @@ msgstr ""
949
  msgid "Add New Discount"
950
  msgstr ""
951
 
952
- #: includes/admin/discounts/add-discount.php:15
953
- #: includes/admin/discounts/edit-discount.php:29
954
- #: includes/admin/reporting/reports.php:190
955
- msgid "Go Back"
 
 
 
956
  msgstr ""
957
 
958
- #: includes/admin/discounts/add-discount.php:27
959
  msgid "The name of this discount."
960
  msgstr ""
961
 
962
- #: includes/admin/discounts/add-discount.php:33
963
  #: includes/admin/discounts/class-discount-codes-table.php:146
964
- #: includes/admin/discounts/edit-discount.php:47
965
  msgid "Code"
966
  msgstr ""
967
 
968
- #: includes/admin/discounts/add-discount.php:37
969
- #: includes/admin/discounts/edit-discount.php:51
970
  msgid ""
971
  "Enter a code for this discount, such as 10PERCENT. Only alphanumeric "
972
  "characters are allowed."
973
  msgstr ""
974
 
975
- #: includes/admin/discounts/add-discount.php:43
976
- #: includes/admin/discounts/edit-discount.php:57
977
  msgid "Type"
978
  msgstr ""
979
 
980
- #: includes/admin/discounts/add-discount.php:47
981
- #: includes/admin/discounts/edit-discount.php:61
982
  msgid "Percentage"
983
  msgstr ""
984
 
985
- #: includes/admin/discounts/add-discount.php:48
986
- #: includes/admin/discounts/edit-discount.php:62
987
  msgid "Flat amount"
988
  msgstr ""
989
 
990
- #: includes/admin/discounts/add-discount.php:50
991
- #: includes/admin/discounts/edit-discount.php:64
992
  msgid "The kind of discount to apply for this discount."
993
  msgstr ""
994
 
995
- #: includes/admin/discounts/add-discount.php:60
996
- #: includes/admin/discounts/edit-discount.php:74
997
  msgid "Enter the discount amount in %s"
998
  msgstr ""
999
 
1000
- #: includes/admin/discounts/add-discount.php:61
1001
- #: includes/admin/discounts/edit-discount.php:75
1002
  msgid "Enter the discount percentage. 10 = 10%"
1003
  msgstr ""
1004
 
1005
- #: includes/admin/discounts/add-discount.php:67
1006
- #: includes/admin/discounts/edit-discount.php:81
1007
  msgid "%s Requirements"
1008
  msgstr ""
1009
 
1010
- #: includes/admin/discounts/add-discount.php:76
1011
- #: includes/admin/discounts/add-discount.php:112
1012
- #: includes/admin/discounts/edit-discount.php:91
1013
- #: includes/admin/discounts/edit-discount.php:127
1014
  msgid "Select one or more %s"
1015
  msgstr ""
1016
 
1017
- #: includes/admin/discounts/add-discount.php:82
1018
- #: includes/admin/discounts/edit-discount.php:97
1019
  msgid "Cart must contain all selected %s"
1020
  msgstr ""
1021
 
1022
- #: includes/admin/discounts/add-discount.php:83
1023
- #: includes/admin/discounts/edit-discount.php:98
1024
  msgid "Cart needs one or more of the selected %s"
1025
  msgstr ""
1026
 
1027
- #: includes/admin/discounts/add-discount.php:89
1028
- #: includes/admin/discounts/edit-discount.php:104
1029
  msgid "Apply discount to entire purchase."
1030
  msgstr ""
1031
 
1032
- #: includes/admin/discounts/add-discount.php:93
1033
- #: includes/admin/discounts/edit-discount.php:108
1034
  msgid "Apply discount only to selected %s."
1035
  msgstr ""
1036
 
1037
- #: includes/admin/discounts/add-discount.php:97
1038
- #: includes/admin/discounts/edit-discount.php:112
1039
  msgid ""
1040
  "Select %s relevant to this discount. If left blank, this discount can be "
1041
  "used on any product."
1042
  msgstr ""
1043
 
1044
- #: includes/admin/discounts/add-discount.php:103
1045
- #: includes/admin/discounts/edit-discount.php:118
1046
  msgid "Excluded %s"
1047
  msgstr ""
1048
 
1049
- #: includes/admin/discounts/add-discount.php:114
1050
- #: includes/admin/discounts/edit-discount.php:129
1051
  msgid "%s that this discount code cannot be applied to."
1052
  msgstr ""
1053
 
1054
- #: includes/admin/discounts/add-discount.php:120
1055
- #: includes/admin/discounts/edit-discount.php:135
1056
  msgid "Start date"
1057
  msgstr ""
1058
 
1059
- #: includes/admin/discounts/add-discount.php:124
1060
- #: includes/admin/discounts/edit-discount.php:139
1061
  msgid ""
1062
  "Enter the start date for this discount code in the format of mm/dd/yyyy. "
1063
  "For no start date, leave blank. If entered, the discount can only be used "
1064
  "after or on this date."
1065
  msgstr ""
1066
 
1067
- #: includes/admin/discounts/add-discount.php:130
1068
- #: includes/admin/discounts/edit-discount.php:145
1069
  msgid "Expiration date"
1070
  msgstr ""
1071
 
1072
- #: includes/admin/discounts/add-discount.php:134
1073
  msgid ""
1074
  "Enter the expiration date for this discount code in the format of "
1075
  "mm/dd/yyyy. For no expiration, leave blank."
1076
  msgstr ""
1077
 
1078
- #: includes/admin/discounts/add-discount.php:140
1079
- #: includes/admin/discounts/edit-discount.php:165
1080
  msgid "Minimum Amount"
1081
  msgstr ""
1082
 
1083
- #: includes/admin/discounts/add-discount.php:144
1084
  msgid ""
1085
  "The minimum dollar amount that must be in the cart before this discount can "
1086
  "be used. Leave blank for no minimum."
1087
  msgstr ""
1088
 
1089
- #: includes/admin/discounts/add-discount.php:150
1090
- #: includes/admin/discounts/edit-discount.php:155
1091
  msgid "Max Uses"
1092
  msgstr ""
1093
 
1094
- #: includes/admin/discounts/add-discount.php:154
1095
- #: includes/admin/discounts/edit-discount.php:159
1096
  msgid ""
1097
  "The maximum number of times this discount can be used. Leave blank for "
1098
  "unlimited."
1099
  msgstr ""
1100
 
1101
- #: includes/admin/discounts/add-discount.php:160
1102
- #: includes/admin/discounts/edit-discount.php:188
1103
  msgid "Use Once Per Customer"
1104
  msgstr ""
1105
 
1106
- #: includes/admin/discounts/add-discount.php:164
1107
- #: includes/admin/discounts/edit-discount.php:192
1108
  msgid "Limit this discount to a single-use per customer?"
1109
  msgstr ""
1110
 
1111
- #: includes/admin/discounts/add-discount.php:174
1112
  msgid "Add Discount Code"
1113
  msgstr ""
1114
 
1115
  #: includes/admin/discounts/class-discount-codes-table.php:127
1116
  #: includes/admin/payments/class-payments-table.php:249
1117
- #: includes/admin/reporting/class-file-downloads-logs-list-table.php:350
1118
  #: includes/admin/reporting/class-sales-logs-list-table.php:290
1119
  msgid "All"
1120
  msgstr ""
1121
 
1122
  #: includes/admin/discounts/class-discount-codes-table.php:128
1123
- #: includes/admin/discounts/class-discount-codes-table.php:262
1124
- #: includes/admin/discounts/edit-discount.php:179
1125
  msgid "Active"
1126
  msgstr ""
1127
 
1128
  #: includes/admin/discounts/class-discount-codes-table.php:129
1129
- #: includes/admin/discounts/class-discount-codes-table.php:258
1130
- #: includes/admin/discounts/edit-discount.php:180
1131
  msgid "Inactive"
1132
  msgstr ""
1133
 
@@ -1148,28 +1153,24 @@ msgid "Edit"
1148
  msgstr ""
1149
 
1150
  #: includes/admin/discounts/class-discount-codes-table.php:216
1151
- #: includes/admin/discounts/class-discount-codes-table.php:288
1152
  msgid "Deactivate"
1153
  msgstr ""
1154
 
1155
  #: includes/admin/discounts/class-discount-codes-table.php:218
1156
- #: includes/admin/discounts/class-discount-codes-table.php:287
1157
  msgid "Activate"
1158
  msgstr ""
1159
 
1160
- #: includes/admin/discounts/class-discount-codes-table.php:255
1161
- msgid "Expired"
1162
- msgstr ""
1163
-
1164
- #: includes/admin/discounts/class-discount-codes-table.php:275
1165
  msgid "No discounts found."
1166
  msgstr ""
1167
 
1168
- #: includes/admin/discounts/class-discount-codes-table.php:395
1169
  msgid "No start date"
1170
  msgstr ""
1171
 
1172
- #: includes/admin/discounts/class-discount-codes-table.php:401
1173
  msgid "No expiration"
1174
  msgstr ""
1175
 
@@ -1203,12 +1204,12 @@ msgstr ""
1203
 
1204
  #: includes/admin/discounts/contextual-help.php:38
1205
  #: includes/admin/settings/contextual-help.php:42
1206
- #: includes/admin/settings/register-settings.php:1213
1207
- #: includes/admin/settings/register-settings.php:1268
1208
- #: includes/admin/settings/register-settings.php:1273
1209
- #: includes/admin/settings/register-settings.php:1277
1210
  #: includes/admin/settings/register-settings.php:1282
1211
- #: includes/admin/settings/register-settings.php:1285
 
 
 
1212
  #: includes/admin/tools.php:68
1213
  msgid "General"
1214
  msgstr ""
@@ -1346,27 +1347,27 @@ msgstr ""
1346
  msgid "Edit Discount"
1347
  msgstr ""
1348
 
1349
- #: includes/admin/discounts/edit-discount.php:41
1350
  msgid "The name of this discount"
1351
  msgstr ""
1352
 
1353
- #: includes/admin/discounts/edit-discount.php:149
1354
  msgid ""
1355
  "Enter the expiration date for this discount code in the format of "
1356
  "mm/dd/yyyy. For no expiration, leave blank"
1357
  msgstr ""
1358
 
1359
- #: includes/admin/discounts/edit-discount.php:169
1360
  msgid ""
1361
  "The minimum amount that must be purchased before this discount can be used. "
1362
  "Leave blank for no minimum."
1363
  msgstr ""
1364
 
1365
- #: includes/admin/discounts/edit-discount.php:182
1366
  msgid "The status of this discount code."
1367
  msgstr ""
1368
 
1369
- #: includes/admin/discounts/edit-discount.php:203
1370
  msgid "Update Discount Code"
1371
  msgstr ""
1372
 
@@ -1566,7 +1567,7 @@ msgstr ""
1566
  msgid "Option Name"
1567
  msgstr ""
1568
 
1569
- #: includes/admin/downloads/metabox.php:478 includes/download-functions.php:511
1570
  msgid "Default"
1571
  msgstr ""
1572
 
@@ -1713,7 +1714,7 @@ msgid ""
1713
  msgstr ""
1714
 
1715
  #: includes/admin/downloads/metabox.php:1031
1716
- #: includes/admin/settings/register-settings.php:737
1717
  #: includes/admin/thickbox.php:59 includes/checkout/template.php:893
1718
  #: includes/shortcodes.php:49 includes/template-functions.php:78
1719
  msgid "Purchase"
@@ -1754,13 +1755,13 @@ msgid ""
1754
  msgstr ""
1755
 
1756
  #: includes/admin/downloads/metabox.php:1105
1757
- #: includes/admin/settings/register-settings.php:751
1758
  #: includes/admin/thickbox.php:97
1759
  msgid "Add to Cart"
1760
  msgstr ""
1761
 
1762
  #: includes/admin/downloads/metabox.php:1106
1763
- #: includes/admin/settings/register-settings.php:758 includes/shortcodes.php:47
1764
  #: includes/template-functions.php:78
1765
  msgid "Buy Now"
1766
  msgstr ""
@@ -2188,7 +2189,7 @@ msgstr[0] ""
2188
  msgstr[1] ""
2189
 
2190
  #: includes/admin/payments/view-order-details.php:152
2191
- #: includes/admin/settings/register-settings.php:713
2192
  msgid "None"
2193
  msgstr ""
2194
 
@@ -2389,7 +2390,7 @@ msgid "General Settings"
2389
  msgstr ""
2390
 
2391
  #: includes/admin/reporting/class-api-requests-logs-list-table.php:89
2392
- #: includes/admin/reporting/class-file-downloads-logs-list-table.php:146
2393
  #: includes/admin/reporting/class-gateway-error-logs-list-table.php:129
2394
  #: includes/admin/reporting/class-sales-logs-list-table.php:130
2395
  #: includes/admin/reporting/export/class-batch-export-api-requests.php:40
@@ -2478,6 +2479,7 @@ msgstr ""
2478
  #: includes/admin/reporting/class-export-customers.php:66
2479
  #: includes/admin/reporting/class-export-payments.php:64
2480
  #: includes/admin/reporting/export/class-batch-export-payments.php:44
 
2481
  #: includes/admin/tools.php:506 includes/checkout/template.php:193
2482
  #: includes/checkout/template.php:199 templates/shortcode-profile-editor.php:38
2483
  msgid "First Name"
@@ -2486,6 +2488,7 @@ msgstr ""
2486
  #: includes/admin/reporting/class-export-customers.php:67
2487
  #: includes/admin/reporting/class-export-payments.php:65
2488
  #: includes/admin/reporting/export/class-batch-export-payments.php:45
 
2489
  #: includes/admin/tools.php:515 includes/checkout/template.php:203
2490
  #: includes/checkout/template.php:209 templates/shortcode-profile-editor.php:43
2491
  msgid "Last Name"
@@ -2509,7 +2512,7 @@ msgid "Downloaded by"
2509
  msgstr ""
2510
 
2511
  #: includes/admin/reporting/class-export-download-history.php:66
2512
- #: includes/admin/reporting/class-file-downloads-logs-list-table.php:151
2513
  #: includes/admin/reporting/export/class-batch-export-api-requests.php:42
2514
  #: includes/admin/reporting/export/class-batch-export-file-downloads.php:44
2515
  #: includes/admin/reporting/export/class-batch-export-payments.php:64
@@ -2523,7 +2526,7 @@ msgid "Product"
2523
  msgstr ""
2524
 
2525
  #: includes/admin/reporting/class-export-download-history.php:68
2526
- #: includes/admin/reporting/class-file-downloads-logs-list-table.php:150
2527
  #: includes/admin/reporting/export/class-batch-export-file-downloads.php:46
2528
  msgid "File"
2529
  msgstr ""
@@ -2551,7 +2554,7 @@ msgstr ""
2551
 
2552
  #: includes/admin/reporting/class-export-payments.php:70
2553
  #: includes/admin/reporting/export/class-batch-export-payments.php:50
2554
- #: includes/admin/settings/register-settings.php:2017
2555
  #: includes/admin/tools.php:713 templates/shortcode-profile-editor.php:162
2556
  msgid "Country"
2557
  msgstr ""
@@ -2613,11 +2616,11 @@ msgstr ""
2613
  msgid "You do not have permission to export data."
2614
  msgstr ""
2615
 
2616
- #: includes/admin/reporting/class-file-downloads-logs-list-table.php:149
2617
  #: includes/admin/reporting/class-gateway-error-logs-list-table.php:130
2618
  #: includes/admin/reporting/class-sales-logs-list-table.php:134
2619
  #: includes/admin/reporting/export/class-batch-export-payments.php:40
2620
- #: includes/admin/reporting/export/class-batch-export-sales.php:45
2621
  msgid "Payment ID"
2622
  msgstr ""
2623
 
@@ -2652,7 +2655,7 @@ msgid "Pending / Failed Sales"
2652
  msgstr ""
2653
 
2654
  #: includes/admin/reporting/class-sales-logs-list-table.php:133
2655
- #: includes/admin/reporting/export/class-batch-export-sales.php:44
2656
  msgid "Item Amount"
2657
  msgstr ""
2658
 
@@ -2767,7 +2770,7 @@ msgid "Files"
2767
  msgstr ""
2768
 
2769
  #: includes/admin/reporting/export/class-batch-export-downloads.php:54
2770
- #: includes/admin/settings/register-settings.php:782
2771
  #: includes/admin/tools.php:896
2772
  msgid "File Download Limit"
2773
  msgstr ""
@@ -2815,7 +2818,7 @@ msgstr ""
2815
 
2816
  #: includes/admin/reporting/export/class-batch-export-payments.php:63
2817
  #: includes/admin/settings/register-settings.php:352
2818
- #: includes/admin/settings/register-settings.php:1269
2819
  msgid "Currency"
2820
  msgstr ""
2821
 
@@ -2828,6 +2831,10 @@ msgstr ""
2828
  msgid "Country Name"
2829
  msgstr ""
2830
 
 
 
 
 
2831
  #: includes/admin/reporting/export/export-functions.php:49
2832
  msgid "Export location or file not writable"
2833
  msgstr ""
@@ -2943,7 +2950,7 @@ msgid "Refresh Reports"
2943
  msgstr ""
2944
 
2945
  #: includes/admin/reporting/logs.php:144
2946
- #: includes/admin/settings/register-settings.php:1295
2947
  msgid "File Downloads"
2948
  msgstr ""
2949
 
@@ -2973,7 +2980,7 @@ msgstr ""
2973
 
2974
  #: includes/admin/reporting/reports.php:59
2975
  #: includes/admin/settings/contextual-help.php:71
2976
- #: includes/admin/settings/register-settings.php:1217
2977
  msgid "Taxes"
2978
  msgstr ""
2979
 
@@ -2989,6 +2996,10 @@ msgstr ""
2989
  msgid "Show"
2990
  msgstr ""
2991
 
 
 
 
 
2992
  #: includes/admin/reporting/reports.php:267
2993
  msgid "Category Sales Mix: "
2994
  msgstr ""
@@ -3116,7 +3127,7 @@ msgstr ""
3116
 
3117
  #: includes/admin/settings/contextual-help.php:48
3118
  #: includes/admin/settings/register-settings.php:420
3119
- #: includes/admin/settings/register-settings.php:1214
3120
  msgid "Payment Gateways"
3121
  msgstr ""
3122
 
@@ -3145,7 +3156,7 @@ msgid ""
3145
  msgstr ""
3146
 
3147
  #: includes/admin/settings/contextual-help.php:57
3148
- #: includes/admin/settings/register-settings.php:1215
3149
  msgid "Emails"
3150
  msgstr ""
3151
 
@@ -3165,7 +3176,7 @@ msgid ""
3165
  msgstr ""
3166
 
3167
  #: includes/admin/settings/contextual-help.php:65
3168
- #: includes/admin/settings/register-settings.php:1216
3169
  msgid "Styles"
3170
  msgstr ""
3171
 
@@ -3248,7 +3259,7 @@ msgid ""
3248
  msgstr ""
3249
 
3250
  #: includes/admin/settings/contextual-help.php:93
3251
- #: includes/admin/settings/register-settings.php:1292
3252
  msgid "Miscellaneous"
3253
  msgstr ""
3254
 
@@ -3280,7 +3291,7 @@ msgid ""
3280
  msgstr ""
3281
 
3282
  #: includes/admin/settings/register-settings.php:262
3283
- msgid "Checkout Page"
3284
  msgstr ""
3285
 
3286
  #: includes/admin/settings/register-settings.php:263
@@ -3425,7 +3436,7 @@ msgid "The symbol (usually , or .) to separate decimal points."
3425
  msgstr ""
3426
 
3427
  #: includes/admin/settings/register-settings.php:388
3428
- #: includes/admin/settings/register-settings.php:1270
3429
  msgid "API"
3430
  msgstr ""
3431
 
@@ -3586,157 +3597,170 @@ msgid "Enter the subject line for the sale notification email."
3586
  msgstr ""
3587
 
3588
  #: includes/admin/settings/register-settings.php:526
3589
- msgid "Sale Notification"
3590
  msgstr ""
3591
 
3592
  #: includes/admin/settings/register-settings.php:527
 
 
 
 
 
 
 
 
 
 
 
 
 
3593
  msgid ""
3594
  "Enter the text that is sent as sale notification email after completion of "
3595
  "a purchase. HTML is accepted. Available template tags:"
3596
  msgstr ""
3597
 
3598
- #: includes/admin/settings/register-settings.php:533
3599
  msgid "Sale Notification Emails"
3600
  msgstr ""
3601
 
3602
- #: includes/admin/settings/register-settings.php:534
3603
  msgid ""
3604
  "Enter the email address(es) that should receive a notification anytime a "
3605
  "sale is made, one per line."
3606
  msgstr ""
3607
 
3608
- #: includes/admin/settings/register-settings.php:540
3609
  msgid "Disable Admin Notifications"
3610
  msgstr ""
3611
 
3612
- #: includes/admin/settings/register-settings.php:541
3613
  msgid "Check this box if you do not want to receive sales notification emails."
3614
  msgstr ""
3615
 
3616
- #: includes/admin/settings/register-settings.php:553
3617
  msgid "Disable Styles"
3618
  msgstr ""
3619
 
3620
- #: includes/admin/settings/register-settings.php:554
3621
  msgid ""
3622
  "Check this to disable all included styling of buttons, checkout fields, and "
3623
  "all other elements."
3624
  msgstr ""
3625
 
3626
- #: includes/admin/settings/register-settings.php:556
3627
  msgid "Disabling Styles"
3628
  msgstr ""
3629
 
3630
- #: includes/admin/settings/register-settings.php:557
3631
  msgid ""
3632
  "If your theme has a complete custom CSS file for Easy Digital Downloads, "
3633
  "you may wish to disable our default styles. This is not recommended unless "
3634
  "you're sure your theme has a complete custom CSS."
3635
  msgstr ""
3636
 
3637
- #: includes/admin/settings/register-settings.php:561
3638
  msgid "Buttons"
3639
  msgstr ""
3640
 
3641
- #: includes/admin/settings/register-settings.php:562
3642
  msgid "Options for add to cart and purchase buttons"
3643
  msgstr ""
3644
 
3645
- #: includes/admin/settings/register-settings.php:567
3646
  msgid "Default Button Style"
3647
  msgstr ""
3648
 
3649
- #: includes/admin/settings/register-settings.php:568
3650
  msgid "Choose the style you want to use for the buttons."
3651
  msgstr ""
3652
 
3653
- #: includes/admin/settings/register-settings.php:574
3654
  msgid "Default Button Color"
3655
  msgstr ""
3656
 
3657
- #: includes/admin/settings/register-settings.php:575
3658
  msgid "Choose the color you want to use for the buttons."
3659
  msgstr ""
3660
 
3661
- #: includes/admin/settings/register-settings.php:588
3662
  msgid "Need help?"
3663
  msgstr ""
3664
 
3665
- #: includes/admin/settings/register-settings.php:589
3666
  msgid ""
3667
  "Visit the <a href=\"%s\" target=\"_blank\">Tax setup documentation</a> for "
3668
  "further information. If you need VAT support, there are options listed on "
3669
  "the documentation page."
3670
  msgstr ""
3671
 
3672
- #: includes/admin/settings/register-settings.php:594
3673
  msgid "Enable Taxes"
3674
  msgstr ""
3675
 
3676
- #: includes/admin/settings/register-settings.php:595
3677
  msgid "Check this to enable taxes on purchases."
3678
  msgstr ""
3679
 
3680
- #: includes/admin/settings/register-settings.php:597
3681
  msgid "Enabling Taxes"
3682
  msgstr ""
3683
 
3684
- #: includes/admin/settings/register-settings.php:598
3685
  msgid ""
3686
  "With taxes enabled, Easy Digital Downloads will use the rules below to "
3687
  "charge tax to customers. With taxes enabled, customers are required to "
3688
  "input their address on checkout so that taxes can be properly calculated."
3689
  msgstr ""
3690
 
3691
- #: includes/admin/settings/register-settings.php:602
3692
  msgid "Tax Rates"
3693
  msgstr ""
3694
 
3695
- #: includes/admin/settings/register-settings.php:603
3696
  msgid ""
3697
  "Add tax rates for specific regions. Enter a percentage, such as 6.5 for "
3698
  "6.5%."
3699
  msgstr ""
3700
 
3701
- #: includes/admin/settings/register-settings.php:608
3702
- #: includes/admin/settings/register-settings.php:612
3703
  msgid "Fallback Tax Rate"
3704
  msgstr ""
3705
 
3706
- #: includes/admin/settings/register-settings.php:609
3707
  msgid ""
3708
  "Customers not in a specific rate will be charged this tax rate. Enter a "
3709
  "percentage, such as 6.5 for 6.5%. "
3710
  msgstr ""
3711
 
3712
- #: includes/admin/settings/register-settings.php:613
3713
  msgid ""
3714
  "If the customer's address fails to meet the above tax rules, you can define "
3715
  "a `default` tax rate to be applied to all other customers. Enter a "
3716
  "percentage, such as 6.5 for 6.5%."
3717
  msgstr ""
3718
 
3719
- #: includes/admin/settings/register-settings.php:617
3720
  msgid "Prices entered with tax"
3721
  msgstr ""
3722
 
3723
- #: includes/admin/settings/register-settings.php:618
3724
  msgid "This option affects how you enter prices."
3725
  msgstr ""
3726
 
3727
- #: includes/admin/settings/register-settings.php:622
3728
  msgid "Yes, I will enter prices inclusive of tax"
3729
  msgstr ""
3730
 
3731
- #: includes/admin/settings/register-settings.php:623
3732
  msgid "No, I will enter prices exclusive of tax"
3733
  msgstr ""
3734
 
3735
- #: includes/admin/settings/register-settings.php:625
3736
  msgid "Prices Inclusive of Tax"
3737
  msgstr ""
3738
 
3739
- #: includes/admin/settings/register-settings.php:626
3740
  msgid ""
3741
  "When using prices inclusive of tax, you will be entering your prices as the "
3742
  "total amount you want a customer to pay for the download, including tax. "
@@ -3744,207 +3768,217 @@ msgid ""
3744
  "for the defined total price."
3745
  msgstr ""
3746
 
3747
- #: includes/admin/settings/register-settings.php:630
3748
  msgid "Display Tax Rate on Prices"
3749
  msgstr ""
3750
 
3751
- #: includes/admin/settings/register-settings.php:631
3752
  msgid "Some countries require a notice when product prices include tax."
3753
  msgstr ""
3754
 
3755
- #: includes/admin/settings/register-settings.php:636
3756
  msgid "Display during checkout"
3757
  msgstr ""
3758
 
3759
- #: includes/admin/settings/register-settings.php:637
3760
  msgid "Should prices on the checkout page be shown with or without tax?"
3761
  msgstr ""
3762
 
3763
- #: includes/admin/settings/register-settings.php:641
3764
  msgid "Including tax"
3765
  msgstr ""
3766
 
3767
- #: includes/admin/settings/register-settings.php:642
3768
  msgid "Excluding tax"
3769
  msgstr ""
3770
 
3771
- #: includes/admin/settings/register-settings.php:644
3772
  msgid "Taxes Displayed for Products on Checkout"
3773
  msgstr ""
3774
 
3775
- #: includes/admin/settings/register-settings.php:645
3776
  msgid ""
3777
  "This option will determine whether the product price displays with or "
3778
  "without tax on checkout."
3779
  msgstr ""
3780
 
3781
- #: includes/admin/settings/register-settings.php:663
3782
- #: includes/admin/settings/register-settings.php:666
3783
  msgid "Redirect to Checkout"
3784
  msgstr ""
3785
 
3786
- #: includes/admin/settings/register-settings.php:664
3787
  msgid "Immediately redirect to checkout after adding an item to the cart?"
3788
  msgstr ""
3789
 
3790
- #: includes/admin/settings/register-settings.php:667
3791
  msgid ""
3792
  "When enabled, once an item has been added to the cart, the customer will be "
3793
  "redirected directly to your checkout page. This is useful for stores that "
3794
  "sell single items."
3795
  msgstr ""
3796
 
3797
- #: includes/admin/settings/register-settings.php:671
3798
  msgid "Cart Item Quantities"
3799
  msgstr ""
3800
 
3801
- #: includes/admin/settings/register-settings.php:672
3802
  msgid ""
3803
  "Allow quantities to be adjusted when adding %s to the cart, and while "
3804
  "viewing the checkout cart."
3805
  msgstr ""
3806
 
3807
- #: includes/admin/settings/register-settings.php:677
3808
  msgid "Debug Mode"
3809
  msgstr ""
3810
 
3811
- #: includes/admin/settings/register-settings.php:678
3812
  msgid ""
3813
  "Check this box to enable debug mode. When enabled, debug messages will be "
3814
  "logged and shown in Downloads &rarr; Tools &rarr; Debug Log."
3815
  msgstr ""
3816
 
3817
- #: includes/admin/settings/register-settings.php:683
3818
  msgid "Remove Data on Uninstall?"
3819
  msgstr ""
3820
 
3821
- #: includes/admin/settings/register-settings.php:684
3822
  msgid ""
3823
  "Check this box if you would like EDD to completely remove all of its data "
3824
  "when the plugin is deleted."
3825
  msgstr ""
3826
 
3827
- #: includes/admin/settings/register-settings.php:691
3828
  msgid "Enforce SSL on Checkout"
3829
  msgstr ""
3830
 
3831
- #: includes/admin/settings/register-settings.php:692
3832
  msgid ""
3833
  "Check this to force users to be redirected to the secure checkout page. You "
3834
  "must have an SSL certificate installed to use this option."
3835
  msgstr ""
3836
 
3837
- #: includes/admin/settings/register-settings.php:697
3838
- #: includes/admin/settings/register-settings.php:700
3839
  msgid "Require Login"
3840
  msgstr ""
3841
 
3842
- #: includes/admin/settings/register-settings.php:698
3843
  msgid "Require that users be logged-in to purchase files."
3844
  msgstr ""
3845
 
3846
- #: includes/admin/settings/register-settings.php:701
3847
  msgid ""
3848
  "You can require that customers create and login to user accounts prior to "
3849
  "purchasing from your store by enabling this option. When unchecked, users "
3850
  "can purchase without being logged in by using their name and email address."
3851
  msgstr ""
3852
 
3853
- #: includes/admin/settings/register-settings.php:705
3854
  msgid "Show Register / Login Form?"
3855
  msgstr ""
3856
 
3857
- #: includes/admin/settings/register-settings.php:706
3858
  msgid ""
3859
  "Display the registration and login forms on the checkout page for "
3860
  "non-logged-in users."
3861
  msgstr ""
3862
 
3863
- #: includes/admin/settings/register-settings.php:710
3864
  msgid "Registration and Login Forms"
3865
  msgstr ""
3866
 
3867
- #: includes/admin/settings/register-settings.php:711
3868
  msgid "Registration Form Only"
3869
  msgstr ""
3870
 
3871
- #: includes/admin/settings/register-settings.php:712
3872
  msgid "Login Form Only"
3873
  msgstr ""
3874
 
3875
- #: includes/admin/settings/register-settings.php:718
3876
  msgid "Multiple Discounts"
3877
  msgstr ""
3878
 
3879
- #: includes/admin/settings/register-settings.php:719
3880
  msgid "Allow customers to use multiple discounts on the same purchase?"
3881
  msgstr ""
3882
 
3883
- #: includes/admin/settings/register-settings.php:724
3884
  msgid "Enable Cart Saving"
3885
  msgstr ""
3886
 
3887
- #: includes/admin/settings/register-settings.php:725
3888
  msgid "Check this to enable cart saving on the checkout."
3889
  msgstr ""
3890
 
3891
- #: includes/admin/settings/register-settings.php:727
3892
  msgid "Cart Saving"
3893
  msgstr ""
3894
 
3895
- #: includes/admin/settings/register-settings.php:728
3896
  msgid ""
3897
  "Cart saving allows shoppers to create a temporary link to their current "
3898
  "shopping cart so they can come back to it later, or share it with someone."
3899
  msgstr ""
3900
 
3901
- #: includes/admin/settings/register-settings.php:734
3902
  msgid "Complete Purchase Text"
3903
  msgstr ""
3904
 
3905
- #: includes/admin/settings/register-settings.php:735
3906
  msgid "The button label for completing a purchase."
3907
  msgstr ""
3908
 
3909
- #: includes/admin/settings/register-settings.php:741
3910
  msgid "Register Text"
3911
  msgstr ""
3912
 
3913
- #: includes/admin/settings/register-settings.php:742
3914
  msgid "The button label for completing a free purchase."
3915
  msgstr ""
3916
 
3917
- #: includes/admin/settings/register-settings.php:744
3918
  #: includes/checkout/template.php:896
3919
  msgid "Free Download"
3920
  msgstr ""
3921
 
3922
- #: includes/admin/settings/register-settings.php:748
3923
  msgid "Add to Cart Text"
3924
  msgstr ""
3925
 
3926
- #: includes/admin/settings/register-settings.php:749
3927
  msgid "Text shown on the Add to Cart Buttons."
3928
  msgstr ""
3929
 
3930
- #: includes/admin/settings/register-settings.php:755
 
 
 
 
 
 
 
 
 
 
3931
  msgid "Buy Now Text"
3932
  msgstr ""
3933
 
3934
- #: includes/admin/settings/register-settings.php:756
3935
  msgid "Text shown on the Buy Now Buttons."
3936
  msgstr ""
3937
 
3938
- #: includes/admin/settings/register-settings.php:764
3939
- #: includes/admin/settings/register-settings.php:767
3940
  msgid "Download Method"
3941
  msgstr ""
3942
 
3943
- #: includes/admin/settings/register-settings.php:765
3944
  msgid "Select the file download method. Note, not all methods work on all servers."
3945
  msgstr ""
3946
 
3947
- #: includes/admin/settings/register-settings.php:768
3948
  msgid ""
3949
  "Due to its consistency in multiple platforms and better file protection, "
3950
  "'forced' is the default method. Because Easy Digital Downloads uses PHP to "
@@ -3955,35 +3989,35 @@ msgid ""
3955
  "method can help resolve this."
3956
  msgstr ""
3957
 
3958
- #: includes/admin/settings/register-settings.php:770
3959
  msgid "Forced"
3960
  msgstr ""
3961
 
3962
- #: includes/admin/settings/register-settings.php:771
3963
  msgid "Redirect"
3964
  msgstr ""
3965
 
3966
- #: includes/admin/settings/register-settings.php:776
3967
  msgid "Symlink File Downloads?"
3968
  msgstr ""
3969
 
3970
- #: includes/admin/settings/register-settings.php:777
3971
  msgid ""
3972
  "Check this if you are delivering really large files or having problems with "
3973
  "file downloads completing."
3974
  msgstr ""
3975
 
3976
- #: includes/admin/settings/register-settings.php:783
3977
  msgid ""
3978
  "The maximum number of times files can be downloaded for purchases. Can be "
3979
  "overwritten for each %s."
3980
  msgstr ""
3981
 
3982
- #: includes/admin/settings/register-settings.php:786
3983
  msgid "File Download Limits"
3984
  msgstr ""
3985
 
3986
- #: includes/admin/settings/register-settings.php:787
3987
  msgid ""
3988
  "Set the global default for the number of times a customer can download "
3989
  "items they purchase. Using a value of 0 is unlimited. This can be defined "
@@ -3991,18 +4025,18 @@ msgid ""
3991
  "individual purchase."
3992
  msgstr ""
3993
 
3994
- #: includes/admin/settings/register-settings.php:791
3995
- #: includes/admin/settings/register-settings.php:793
3996
  msgid "Download Link Expiration"
3997
  msgstr ""
3998
 
3999
- #: includes/admin/settings/register-settings.php:792
4000
  msgid ""
4001
  "How long should download links be valid for? Default is 24 hours from the "
4002
  "time they are generated. Enter a time in hours."
4003
  msgstr ""
4004
 
4005
- #: includes/admin/settings/register-settings.php:794
4006
  msgid ""
4007
  "When a customer receives a link to their downloads via email, in their "
4008
  "receipt, or in their purchase history, the link will only be valid for the "
@@ -4011,271 +4045,270 @@ msgid ""
4011
  "customer."
4012
  msgstr ""
4013
 
4014
- #: includes/admin/settings/register-settings.php:802
4015
  msgid "Disable Redownload?"
4016
  msgstr ""
4017
 
4018
- #: includes/admin/settings/register-settings.php:803
4019
  msgid ""
4020
  "Check this if you do not want to allow users to redownload items from their "
4021
  "purchase history."
4022
  msgstr ""
4023
 
4024
- #: includes/admin/settings/register-settings.php:810
4025
  msgid "Enable SKU Entry"
4026
  msgstr ""
4027
 
4028
- #: includes/admin/settings/register-settings.php:811
4029
  msgid ""
4030
  "Check this box to allow entry of product SKUs. SKUs will be shown on "
4031
  "purchase receipt and exported purchase histories."
4032
  msgstr ""
4033
 
4034
- #: includes/admin/settings/register-settings.php:816
4035
  msgid "Sequential Order Numbers"
4036
  msgstr ""
4037
 
4038
- #: includes/admin/settings/register-settings.php:817
4039
  msgid "Check this box to enable sequential order numbers."
4040
  msgstr ""
4041
 
4042
- #: includes/admin/settings/register-settings.php:822
4043
  msgid "Sequential Starting Number"
4044
  msgstr ""
4045
 
4046
- #: includes/admin/settings/register-settings.php:823
4047
  msgid "The number at which the sequence should begin."
4048
  msgstr ""
4049
 
4050
- #: includes/admin/settings/register-settings.php:830
4051
  msgid "Sequential Number Prefix"
4052
  msgstr ""
4053
 
4054
- #: includes/admin/settings/register-settings.php:831
4055
  msgid "A prefix to prepend to all sequential order numbers."
4056
  msgstr ""
4057
 
4058
- #: includes/admin/settings/register-settings.php:836
4059
  msgid "Sequential Number Postfix"
4060
  msgstr ""
4061
 
4062
- #: includes/admin/settings/register-settings.php:837
4063
  msgid "A postfix to append to all sequential order numbers."
4064
  msgstr ""
4065
 
4066
- #: includes/admin/settings/register-settings.php:844
4067
  msgid "Agree to Terms"
4068
  msgstr ""
4069
 
4070
- #: includes/admin/settings/register-settings.php:845
4071
  msgid ""
4072
  "Check this to show an agree to terms on the checkout that users must agree "
4073
  "to before purchasing."
4074
  msgstr ""
4075
 
4076
- #: includes/admin/settings/register-settings.php:850
4077
  msgid "Agree to Terms Label"
4078
  msgstr ""
4079
 
4080
- #: includes/admin/settings/register-settings.php:851
4081
  msgid "Label shown next to the agree to terms check box."
4082
  msgstr ""
4083
 
4084
- #: includes/admin/settings/register-settings.php:857
4085
  msgid "Agreement Text"
4086
  msgstr ""
4087
 
4088
- #: includes/admin/settings/register-settings.php:858
4089
  msgid "If Agree to Terms is checked, enter the agreement terms here."
4090
  msgstr ""
4091
 
4092
- #: includes/admin/settings/register-settings.php:868
4093
  msgid "Buy Now Disabled"
4094
  msgstr ""
4095
 
4096
- #: includes/admin/settings/register-settings.php:869
4097
  msgid ""
4098
  "Buy Now buttons are only available for stores that have a single supported "
4099
  "gateway active and that do not use taxes."
4100
  msgstr ""
4101
 
4102
- #: includes/admin/settings/register-settings.php:967
4103
  msgid "Settings updated."
4104
  msgstr ""
4105
 
4106
- #: includes/admin/settings/register-settings.php:1107
4107
  msgid "Error setting default gateway. No gateways are enabled."
4108
  msgstr ""
4109
 
4110
- #: includes/admin/settings/register-settings.php:1120
4111
  msgid "%s could not be set as the default gateway. It must first be enabled."
4112
  msgstr ""
4113
 
4114
- #: includes/admin/settings/register-settings.php:1223
4115
  msgid "Licenses"
4116
  msgstr ""
4117
 
4118
- #: includes/admin/settings/register-settings.php:1226
4119
  msgid "Misc"
4120
  msgstr ""
4121
 
4122
- #: includes/admin/settings/register-settings.php:1274
4123
  #: includes/gateways/functions.php:25 includes/gateways/paypal-standard.php:33
4124
  msgid "PayPal Standard"
4125
  msgstr ""
4126
 
4127
- #: includes/admin/settings/register-settings.php:1278
4128
  msgid "Purchase Receipts"
4129
  msgstr ""
4130
 
4131
- #: includes/admin/settings/register-settings.php:1279
4132
  msgid "New Sale Notifications"
4133
  msgstr ""
4134
 
4135
- #: includes/admin/settings/register-settings.php:1288
4136
  msgid "Main"
4137
  msgstr ""
4138
 
4139
- #: includes/admin/settings/register-settings.php:1293 includes/install.php:92
4140
- #: includes/template-functions.php:191 templates/widget-cart-checkout.php:6
4141
- #: templates/widget-cart-empty.php:7
4142
  msgid "Checkout"
4143
  msgstr ""
4144
 
4145
- #: includes/admin/settings/register-settings.php:1294
4146
  msgid "Button Text"
4147
  msgstr ""
4148
 
4149
- #: includes/admin/settings/register-settings.php:1296
4150
  msgid "Accounting"
4151
  msgstr ""
4152
 
4153
- #: includes/admin/settings/register-settings.php:1297
4154
  msgid "Terms of Agreement"
4155
  msgstr ""
4156
 
4157
- #: includes/admin/settings/register-settings.php:1539
4158
  msgid ""
4159
  "Don't see what you need? More Payment Gateway options are available <a "
4160
  "href=\"%s\">here</a>."
4161
  msgstr ""
4162
 
4163
- #: includes/admin/settings/register-settings.php:1760
4164
  msgid "The callback function used for the %s setting is missing."
4165
  msgstr ""
4166
 
4167
- #: includes/admin/settings/register-settings.php:1918
4168
  msgid "Upload File"
4169
  msgstr ""
4170
 
4171
- #: includes/admin/settings/register-settings.php:2019
4172
  msgid "Country Wide"
4173
  msgstr ""
4174
 
4175
- #: includes/admin/settings/register-settings.php:2020
4176
  msgid "Rate"
4177
  msgstr ""
4178
 
4179
- #: includes/admin/settings/register-settings.php:2020
4180
  msgid ""
4181
  "<strong>Regional tax rates: </strong>When a customer enters an address on "
4182
  "checkout that matches the specified region for this tax rate, the cart tax "
4183
  "will adjust automatically. Enter a percentage, such as 6.5 for 6.5%."
4184
  msgstr ""
4185
 
4186
- #: includes/admin/settings/register-settings.php:2037
4187
- #: includes/admin/settings/register-settings.php:2082
4188
  msgid "Choose a country"
4189
  msgstr ""
4190
 
4191
- #: includes/admin/settings/register-settings.php:2052
4192
  msgid "Choose a state"
4193
  msgstr ""
4194
 
4195
- #: includes/admin/settings/register-settings.php:2064
4196
- #: includes/admin/settings/register-settings.php:2092
4197
  msgid "Apply to whole country"
4198
  msgstr ""
4199
 
4200
- #: includes/admin/settings/register-settings.php:2067
4201
- #: includes/admin/settings/register-settings.php:2095
4202
  msgid "Remove Rate"
4203
  msgstr ""
4204
 
4205
- #: includes/admin/settings/register-settings.php:2100
4206
  msgid "Add Tax Rate"
4207
  msgstr ""
4208
 
4209
- #: includes/admin/settings/register-settings.php:2153
4210
  msgid ""
4211
  "Your license key expired on %s. Please <a href=\"%s\" "
4212
  "target=\"_blank\">renew your license key</a>."
4213
  msgstr ""
4214
 
4215
- #: includes/admin/settings/register-settings.php:2166
4216
  msgid ""
4217
  "Your license key has been disabled. Please <a href=\"%s\" "
4218
  "target=\"_blank\">contact support</a> for more information."
4219
  msgstr ""
4220
 
4221
- #: includes/admin/settings/register-settings.php:2178
4222
  msgid ""
4223
  "Invalid license. Please <a href=\"%s\" target=\"_blank\">visit your account "
4224
  "page</a> and verify it."
4225
  msgstr ""
4226
 
4227
- #: includes/admin/settings/register-settings.php:2191
4228
  msgid ""
4229
  "Your %s is not active for this URL. Please <a href=\"%s\" "
4230
  "target=\"_blank\">visit your account page</a> to manage your license key "
4231
  "URLs."
4232
  msgstr ""
4233
 
4234
- #: includes/admin/settings/register-settings.php:2203
4235
  msgid "This appears to be an invalid license key for %s."
4236
  msgstr ""
4237
 
4238
- #: includes/admin/settings/register-settings.php:2212
4239
  msgid ""
4240
  "Your license key has reached its activation limit. <a href=\"%s\">View "
4241
  "possible upgrades</a> now."
4242
  msgstr ""
4243
 
4244
- #: includes/admin/settings/register-settings.php:2221
4245
  msgid ""
4246
  "The key you entered belongs to a bundle, please use the product specific "
4247
  "license key."
4248
  msgstr ""
4249
 
4250
- #: includes/admin/settings/register-settings.php:2229
4251
  msgid "unknown_error"
4252
  msgstr ""
4253
 
4254
- #: includes/admin/settings/register-settings.php:2230
4255
  msgid ""
4256
  "There was an error with this license key: %s. Please <a href=\"%s\">contact "
4257
  "our support team</a>."
4258
  msgstr ""
4259
 
4260
- #: includes/admin/settings/register-settings.php:2250
4261
  msgid "License key never expires."
4262
  msgstr ""
4263
 
4264
- #: includes/admin/settings/register-settings.php:2257
4265
  msgid ""
4266
  "Your license key expires soon! It expires on %s. <a href=\"%s\" "
4267
  "target=\"_blank\">Renew your license key</a>."
4268
  msgstr ""
4269
 
4270
- #: includes/admin/settings/register-settings.php:2267
4271
  msgid "Your license key expires on %s."
4272
  msgstr ""
4273
 
4274
- #: includes/admin/settings/register-settings.php:2285
4275
  msgid "To receive updates, please enter your valid %s license key."
4276
  msgstr ""
4277
 
4278
- #: includes/admin/settings/register-settings.php:2298
4279
  msgid "Deactivate License"
4280
  msgstr ""
4281
 
@@ -4907,27 +4940,27 @@ msgstr ""
4907
  msgid "No download logs found!"
4908
  msgstr ""
4909
 
4910
- #: includes/api/class-edd-api.php:1954 includes/user-functions.php:1040
4911
  msgid "Easy Digital Downloads API Keys"
4912
  msgstr ""
4913
 
4914
- #: includes/api/class-edd-api.php:1963 includes/user-functions.php:1045
4915
  msgid "Generate API Key"
4916
  msgstr ""
4917
 
4918
- #: includes/api/class-edd-api.php:1965 includes/user-functions.php:1047
4919
  msgid "Public key:"
4920
  msgstr ""
4921
 
4922
- #: includes/api/class-edd-api.php:1966 includes/user-functions.php:1048
4923
  msgid "Secret key:"
4924
  msgstr ""
4925
 
4926
- #: includes/api/class-edd-api.php:1967 includes/user-functions.php:1049
4927
  msgid "Token:"
4928
  msgstr ""
4929
 
4930
- #: includes/api/class-edd-api.php:1969 includes/user-functions.php:1051
4931
  msgid "Revoke API Keys"
4932
  msgstr ""
4933
 
@@ -5395,8 +5428,8 @@ msgstr ""
5395
  msgid "Customer User ID: %s"
5396
  msgstr ""
5397
 
5398
- #: includes/class-edd-cli.php:335 includes/user-functions.php:567
5399
- #: includes/user-functions.php:576
5400
  msgid "Username: %s"
5401
  msgstr ""
5402
 
@@ -5562,31 +5595,35 @@ msgstr ""
5562
  msgid "Can't get property %s"
5563
  msgstr ""
5564
 
5565
- #: includes/class-edd-discount.php:1511
5566
- msgid "This discount has reached its maximum usage."
5567
  msgstr ""
5568
 
5569
  #: includes/class-edd-discount.php:1545
 
 
 
 
5570
  msgid "Minimum order of %s not met."
5571
  msgstr ""
5572
 
5573
- #: includes/class-edd-discount.php:1633 includes/class-edd-discount.php:1662
5574
  msgid "The product requirements for this discount are not met."
5575
  msgstr ""
5576
 
5577
- #: includes/class-edd-discount.php:1680
5578
  msgid "This discount is not valid for the cart contents."
5579
  msgstr ""
5580
 
5581
- #: includes/class-edd-discount.php:1770
5582
  msgid "This discount has already been redeemed."
5583
  msgstr ""
5584
 
5585
- #: includes/class-edd-discount.php:1851
5586
  msgid "This discount is expired."
5587
  msgstr ""
5588
 
5589
- #: includes/class-edd-discount.php:1856
5590
  msgid "This discount is not active."
5591
  msgstr ""
5592
 
@@ -5749,211 +5786,211 @@ msgstr ""
5749
  msgid "Improper date provided."
5750
  msgstr ""
5751
 
5752
- #: includes/country-functions.php:1604
5753
  msgid "A Coru&ntilde;a"
5754
  msgstr ""
5755
 
5756
- #: includes/country-functions.php:1605
5757
  msgid "Araba"
5758
  msgstr ""
5759
 
5760
- #: includes/country-functions.php:1606
5761
  msgid "Albacete"
5762
  msgstr ""
5763
 
5764
- #: includes/country-functions.php:1607
5765
  msgid "Alicante"
5766
  msgstr ""
5767
 
5768
- #: includes/country-functions.php:1608
5769
  msgid "Almer&iacute;a"
5770
  msgstr ""
5771
 
5772
- #: includes/country-functions.php:1609
5773
  msgid "Asturias"
5774
  msgstr ""
5775
 
5776
- #: includes/country-functions.php:1610
5777
  msgid "&Aacute;vila"
5778
  msgstr ""
5779
 
5780
- #: includes/country-functions.php:1611
5781
  msgid "Badajoz"
5782
  msgstr ""
5783
 
5784
- #: includes/country-functions.php:1612
5785
  msgid "Baleares"
5786
  msgstr ""
5787
 
5788
- #: includes/country-functions.php:1613
5789
  msgid "Barcelona"
5790
  msgstr ""
5791
 
5792
- #: includes/country-functions.php:1614
5793
  msgid "Burgos"
5794
  msgstr ""
5795
 
5796
- #: includes/country-functions.php:1615
5797
  msgid "C&aacute;ceres"
5798
  msgstr ""
5799
 
5800
- #: includes/country-functions.php:1616
5801
  msgid "C&aacute;diz"
5802
  msgstr ""
5803
 
5804
- #: includes/country-functions.php:1617
5805
  msgid "Cantabria"
5806
  msgstr ""
5807
 
5808
- #: includes/country-functions.php:1618
5809
  msgid "Castell&oacute;n"
5810
  msgstr ""
5811
 
5812
- #: includes/country-functions.php:1619
5813
  msgid "Ceuta"
5814
  msgstr ""
5815
 
5816
- #: includes/country-functions.php:1620
5817
  msgid "Ciudad Real"
5818
  msgstr ""
5819
 
5820
- #: includes/country-functions.php:1621
5821
  msgid "C&oacute;rdoba"
5822
  msgstr ""
5823
 
5824
- #: includes/country-functions.php:1622
5825
  msgid "Cuenca"
5826
  msgstr ""
5827
 
5828
- #: includes/country-functions.php:1623
5829
  msgid "Girona"
5830
  msgstr ""
5831
 
5832
- #: includes/country-functions.php:1624
5833
  msgid "Granada"
5834
  msgstr ""
5835
 
5836
- #: includes/country-functions.php:1625
5837
  msgid "Guadalajara"
5838
  msgstr ""
5839
 
5840
- #: includes/country-functions.php:1626
5841
  msgid "Gipuzkoa"
5842
  msgstr ""
5843
 
5844
- #: includes/country-functions.php:1627
5845
  msgid "Huelva"
5846
  msgstr ""
5847
 
5848
- #: includes/country-functions.php:1628
5849
  msgid "Huesca"
5850
  msgstr ""
5851
 
5852
- #: includes/country-functions.php:1629
5853
  msgid "Ja&eacute;n"
5854
  msgstr ""
5855
 
5856
- #: includes/country-functions.php:1630
5857
  msgid "La Rioja"
5858
  msgstr ""
5859
 
5860
- #: includes/country-functions.php:1631
5861
  msgid "Las Palmas"
5862
  msgstr ""
5863
 
5864
- #: includes/country-functions.php:1632
5865
  msgid "Le&oacute;n"
5866
  msgstr ""
5867
 
5868
- #: includes/country-functions.php:1633
5869
  msgid "Lleida"
5870
  msgstr ""
5871
 
5872
- #: includes/country-functions.php:1634
5873
  msgid "Lugo"
5874
  msgstr ""
5875
 
5876
- #: includes/country-functions.php:1635
5877
  msgid "Madrid"
5878
  msgstr ""
5879
 
5880
- #: includes/country-functions.php:1636
5881
  msgid "M&aacute;laga"
5882
  msgstr ""
5883
 
5884
- #: includes/country-functions.php:1637
5885
  msgid "Melilla"
5886
  msgstr ""
5887
 
5888
- #: includes/country-functions.php:1638
5889
  msgid "Murcia"
5890
  msgstr ""
5891
 
5892
- #: includes/country-functions.php:1639
5893
  msgid "Navarra"
5894
  msgstr ""
5895
 
5896
- #: includes/country-functions.php:1640
5897
  msgid "Ourense"
5898
  msgstr ""
5899
 
5900
- #: includes/country-functions.php:1641
5901
  msgid "Palencia"
5902
  msgstr ""
5903
 
5904
- #: includes/country-functions.php:1642
5905
  msgid "Pontevedra"
5906
  msgstr ""
5907
 
5908
- #: includes/country-functions.php:1643
5909
  msgid "Salamanca"
5910
  msgstr ""
5911
 
5912
- #: includes/country-functions.php:1644
5913
  msgid "Santa Cruz de Tenerife"
5914
  msgstr ""
5915
 
5916
- #: includes/country-functions.php:1645
5917
  msgid "Segovia"
5918
  msgstr ""
5919
 
5920
- #: includes/country-functions.php:1646
5921
  msgid "Sevilla"
5922
  msgstr ""
5923
 
5924
- #: includes/country-functions.php:1647
5925
  msgid "Soria"
5926
  msgstr ""
5927
 
5928
- #: includes/country-functions.php:1648
5929
  msgid "Tarragona"
5930
  msgstr ""
5931
 
5932
- #: includes/country-functions.php:1649
5933
  msgid "Teruel"
5934
  msgstr ""
5935
 
5936
- #: includes/country-functions.php:1650
5937
  msgid "Toledo"
5938
  msgstr ""
5939
 
5940
- #: includes/country-functions.php:1651
5941
  msgid "Valencia"
5942
  msgstr ""
5943
 
5944
- #: includes/country-functions.php:1652
5945
  msgid "Valladolid"
5946
  msgstr ""
5947
 
5948
- #: includes/country-functions.php:1653
5949
  msgid "Bizkaia"
5950
  msgstr ""
5951
 
5952
- #: includes/country-functions.php:1654
5953
  msgid "Zamora"
5954
  msgstr ""
5955
 
5956
- #: includes/country-functions.php:1655
5957
  msgid "Zaragoza"
5958
  msgstr ""
5959
 
@@ -6055,11 +6092,11 @@ msgid ""
6055
  "of a purchase. HTML is accepted. Available template tags:"
6056
  msgstr ""
6057
 
6058
- #: includes/deprecated-functions.php:517 includes/process-download.php:826
6059
  msgid "Sorry but you have hit your download limit for this file."
6060
  msgstr ""
6061
 
6062
- #: includes/deprecated-functions.php:532 includes/download-functions.php:1248
6063
  msgid "Sorry but your download link has expired."
6064
  msgstr ""
6065
 
@@ -6067,7 +6104,7 @@ msgstr ""
6067
  msgid "No payments matching your request were found."
6068
  msgstr ""
6069
 
6070
- #: includes/download-functions.php:512
6071
  msgid "Bundle"
6072
  msgstr ""
6073
 
@@ -6119,35 +6156,31 @@ msgstr ""
6119
  msgid "New download purchase - Order #%1$s"
6120
  msgstr ""
6121
 
6122
- #: includes/emails/functions.php:154
6123
- msgid "New Sale!"
6124
- msgstr ""
6125
-
6126
- #: includes/emails/functions.php:199 includes/emails/template.php:212
6127
  msgid "Hello"
6128
  msgstr ""
6129
 
6130
- #: includes/emails/functions.php:199 includes/emails/template.php:212
6131
  msgid "A %s purchase has been made"
6132
  msgstr ""
6133
 
6134
- #: includes/emails/functions.php:200 includes/emails/template.php:213
6135
  msgid "%s sold:"
6136
  msgstr ""
6137
 
6138
- #: includes/emails/functions.php:202 includes/emails/template.php:215
6139
  msgid "Purchased by: "
6140
  msgstr ""
6141
 
6142
- #: includes/emails/functions.php:203 includes/emails/template.php:216
6143
  msgid "Amount: "
6144
  msgstr ""
6145
 
6146
- #: includes/emails/functions.php:204 includes/emails/template.php:217
6147
  msgid "Payment Method: "
6148
  msgstr ""
6149
 
6150
- #: includes/emails/functions.php:205 includes/emails/template.php:218
6151
  msgid "Thank you"
6152
  msgstr ""
6153
 
@@ -6294,12 +6327,12 @@ msgstr ""
6294
 
6295
  #: includes/gateways/amazon-payments.php:1113
6296
  #: includes/gateways/amazon-payments.php:1167
6297
- #: includes/gateways/paypal-standard.php:439
6298
- #: includes/gateways/paypal-standard.php:446
6299
- #: includes/gateways/paypal-standard.php:535
6300
- #: includes/gateways/paypal-standard.php:545
6301
- #: includes/gateways/paypal-standard.php:605
6302
- #: includes/gateways/paypal-standard.php:614
6303
  msgid "IPN Error"
6304
  msgstr ""
6305
 
@@ -6457,44 +6490,44 @@ msgstr ""
6457
  msgid "Payment creation failed before sending buyer to PayPal. Payment data: %s"
6458
  msgstr ""
6459
 
6460
- #: includes/gateways/paypal-standard.php:439
6461
- #: includes/gateways/paypal-standard.php:446
6462
  msgid "Invalid IPN verification response. IPN data: %s"
6463
  msgstr ""
6464
 
6465
- #: includes/gateways/paypal-standard.php:535
6466
  msgid "Invalid business email in IPN response. IPN data: %s"
6467
  msgstr ""
6468
 
6469
- #: includes/gateways/paypal-standard.php:538
6470
  msgid "Payment failed due to invalid PayPal business email."
6471
  msgstr ""
6472
 
6473
- #: includes/gateways/paypal-standard.php:545
6474
  msgid "Invalid currency in IPN response. IPN data: %s"
6475
  msgstr ""
6476
 
6477
- #: includes/gateways/paypal-standard.php:548
6478
  msgid "Payment failed due to invalid currency in PayPal IPN."
6479
  msgstr ""
6480
 
6481
- #: includes/gateways/paypal-standard.php:605
6482
  msgid "Invalid payment amount in IPN response. IPN data: %s"
6483
  msgstr ""
6484
 
6485
- #: includes/gateways/paypal-standard.php:608
6486
  msgid "Payment failed due to invalid amount in PayPal IPN."
6487
  msgstr ""
6488
 
6489
- #: includes/gateways/paypal-standard.php:614
6490
  msgid "Invalid purchase key in IPN response. IPN data: %s"
6491
  msgstr ""
6492
 
6493
- #: includes/gateways/paypal-standard.php:616
6494
  msgid "Payment failed due to invalid purchase key in PayPal IPN."
6495
  msgstr ""
6496
 
6497
- #: includes/gateways/paypal-standard.php:622
6498
  #: tests/helpers/class-helper-payment.php:131
6499
  #: tests/helpers/class-helper-payment.php:234
6500
  #: tests/helpers/class-helper-payment.php:342
@@ -6505,79 +6538,79 @@ msgstr ""
6505
  msgid "PayPal Transaction ID: %s"
6506
  msgstr ""
6507
 
6508
- #: includes/gateways/paypal-standard.php:636
6509
  msgid "Payment made via eCheck and will clear automatically in 5-8 days"
6510
  msgstr ""
6511
 
6512
- #: includes/gateways/paypal-standard.php:643
6513
  msgid ""
6514
  "Payment requires a confirmed customer address and must be accepted manually "
6515
  "through PayPal"
6516
  msgstr ""
6517
 
6518
- #: includes/gateways/paypal-standard.php:649
6519
  msgid ""
6520
  "Payment must be accepted manually through PayPal due to international "
6521
  "account regulations"
6522
  msgstr ""
6523
 
6524
- #: includes/gateways/paypal-standard.php:655
6525
  msgid ""
6526
  "Payment received in non-shop currency and must be accepted manually through "
6527
  "PayPal"
6528
  msgstr ""
6529
 
6530
- #: includes/gateways/paypal-standard.php:662
6531
  msgid ""
6532
  "Payment is being reviewed by PayPal staff as high-risk or in possible "
6533
  "violation of government regulations"
6534
  msgstr ""
6535
 
6536
- #: includes/gateways/paypal-standard.php:668
6537
  msgid "Payment was sent to non-confirmed or non-registered email address."
6538
  msgstr ""
6539
 
6540
- #: includes/gateways/paypal-standard.php:674
6541
  msgid "PayPal account must be upgraded before this payment can be accepted"
6542
  msgstr ""
6543
 
6544
- #: includes/gateways/paypal-standard.php:680
6545
  msgid ""
6546
  "PayPal account is not verified. Verify account in order to accept this "
6547
  "payment"
6548
  msgstr ""
6549
 
6550
- #: includes/gateways/paypal-standard.php:686
6551
  msgid ""
6552
  "Payment is pending for unknown reasons. Contact PayPal support for "
6553
  "assistance"
6554
  msgstr ""
6555
 
6556
- #: includes/gateways/paypal-standard.php:739
6557
  msgid "Partial PayPal refund processed: %s"
6558
  msgstr ""
6559
 
6560
- #: includes/gateways/paypal-standard.php:744
6561
  msgid "PayPal Payment #%s Refunded for reason: %s"
6562
  msgstr ""
6563
 
6564
- #: includes/gateways/paypal-standard.php:745
6565
  msgid "PayPal Refund Transaction ID: %s"
6566
  msgstr ""
6567
 
6568
- #: includes/gateways/paypal-standard.php:1004
6569
  msgid "Refund Payment in PayPal"
6570
  msgstr ""
6571
 
6572
- #: includes/gateways/paypal-standard.php:1153
6573
  msgid "PayPal refund failed for unknown reason."
6574
  msgstr ""
6575
 
6576
- #: includes/gateways/paypal-standard.php:1163
6577
  msgid "PayPal refund transaction ID: %s"
6578
  msgstr ""
6579
 
6580
- #: includes/gateways/paypal-standard.php:1167
6581
  msgid "PayPal refund failed: %s"
6582
  msgstr ""
6583
 
@@ -7121,15 +7154,15 @@ msgstr ""
7121
  msgid "Purchase Verification Failed"
7122
  msgstr ""
7123
 
7124
- #: includes/process-download.php:902
7125
  msgid "Invalid file"
7126
  msgstr ""
7127
 
7128
- #: includes/process-download.php:909
7129
  msgid "The requested file could not be found. Error 404."
7130
  msgstr ""
7131
 
7132
- #: includes/process-download.php:910
7133
  msgid "File not found"
7134
  msgstr ""
7135
 
@@ -7267,7 +7300,7 @@ msgstr ""
7267
  msgid "You have already added this item to your cart"
7268
  msgstr ""
7269
 
7270
- #: includes/scripts.php:89 includes/template-functions.php:186
7271
  msgid "Loading"
7272
  msgstr ""
7273
 
@@ -7391,31 +7424,31 @@ msgstr ""
7391
  msgid "Purchase All Items"
7392
  msgstr ""
7393
 
7394
- #: includes/shortcodes.php:672
7395
  msgid "Sorry, trouble retrieving payment receipt."
7396
  msgstr ""
7397
 
7398
- #: includes/shortcodes.php:707
7399
  msgid "You must be logged in to view this payment receipt."
7400
  msgstr ""
7401
 
7402
- #: includes/shortcodes.php:719
7403
  msgid "Receipt could not be retrieved, your purchase session has expired."
7404
  msgstr ""
7405
 
7406
- #: includes/shortcodes.php:849
7407
  msgid "The passwords you entered do not match. Please try again."
7408
  msgstr ""
7409
 
7410
- #: includes/shortcodes.php:859
7411
  msgid "The email you entered is invalid. Please enter a valid email."
7412
  msgstr ""
7413
 
7414
- #: includes/shortcodes.php:864
7415
  msgid "The email you entered belongs to another user. Please use another."
7416
  msgstr ""
7417
 
7418
- #: includes/shortcodes.php:939
7419
  msgid "Error removing email address from profile. Please try again later."
7420
  msgstr ""
7421
 
@@ -7427,111 +7460,111 @@ msgstr ""
7427
  msgid "You are already logged in"
7428
  msgstr ""
7429
 
7430
- #: includes/template-functions.php:143
7431
  msgid "Free"
7432
  msgstr ""
7433
 
7434
- #: includes/template-functions.php:200
7435
  msgid "Added to cart"
7436
  msgstr ""
7437
 
7438
- #: includes/template-functions.php:206
7439
  msgid "Includes %1$s&#37; tax"
7440
  msgstr ""
7441
 
7442
- #: includes/template-functions.php:208
7443
  msgid "Excluding %1$s&#37; tax"
7444
  msgstr ""
7445
 
7446
- #: includes/template-functions.php:493
7447
  msgid "White"
7448
  msgstr ""
7449
 
7450
- #: includes/template-functions.php:497
7451
  msgid "Gray"
7452
  msgstr ""
7453
 
7454
- #: includes/template-functions.php:501
7455
  msgid "Blue"
7456
  msgstr ""
7457
 
7458
- #: includes/template-functions.php:505
7459
  msgid "Red"
7460
  msgstr ""
7461
 
7462
- #: includes/template-functions.php:509
7463
  msgid "Green"
7464
  msgstr ""
7465
 
7466
- #: includes/template-functions.php:513
7467
  msgid "Yellow"
7468
  msgstr ""
7469
 
7470
- #: includes/template-functions.php:517
7471
  msgid "Orange"
7472
  msgstr ""
7473
 
7474
- #: includes/template-functions.php:521
7475
  msgid "Dark Gray"
7476
  msgstr ""
7477
 
7478
- #: includes/template-functions.php:525
7479
  msgid "Inherit"
7480
  msgstr ""
7481
 
7482
- #: includes/template-functions.php:543
7483
  msgid "Button"
7484
  msgstr ""
7485
 
7486
- #: includes/template-functions.php:544
7487
  msgid "Plain Text"
7488
  msgstr ""
7489
 
7490
- #: includes/user-functions.php:565
7491
  msgid "[%s] New User Registration"
7492
  msgstr ""
7493
 
7494
- #: includes/user-functions.php:566
7495
  msgid "New user registration"
7496
  msgstr ""
7497
 
7498
- #: includes/user-functions.php:568
7499
  msgid "E-mail: %s"
7500
  msgstr ""
7501
 
7502
- #: includes/user-functions.php:574
7503
  msgid "[%s] Your username and password"
7504
  msgstr ""
7505
 
7506
- #: includes/user-functions.php:575
7507
  msgid "Your account info"
7508
  msgstr ""
7509
 
7510
- #: includes/user-functions.php:579
7511
  msgid "Password entered at checkout"
7512
  msgstr ""
7513
 
7514
- #: includes/user-functions.php:581
7515
  msgid "Password entered at registration"
7516
  msgstr ""
7517
 
7518
- #: includes/user-functions.php:584
7519
  msgid "Password: %s"
7520
  msgstr ""
7521
 
7522
- #: includes/user-functions.php:588
7523
  msgid "Click here to log in"
7524
  msgstr ""
7525
 
7526
- #: includes/user-functions.php:592
7527
  msgid "To log in, visit: %s"
7528
  msgstr ""
7529
 
7530
- #: includes/user-functions.php:748 includes/user-functions.php:749
7531
  msgid "Verify your account"
7532
  msgstr ""
7533
 
7534
- #: includes/user-functions.php:751
7535
  msgid ""
7536
  "Hello %s,\n"
7537
  "\n"
@@ -7541,33 +7574,33 @@ msgid ""
7541
  "Link missing? Visit the following URL: %s"
7542
  msgstr ""
7543
 
7544
- #: includes/user-functions.php:876
7545
  msgid ""
7546
  "Sorry but your account verification link has expired. <a href=\"%s\">Click "
7547
  "here</a> to request a new verification URL."
7548
  msgstr ""
7549
 
7550
- #: includes/user-functions.php:909
7551
  msgid "You must be logged in to verify your account."
7552
  msgstr ""
7553
 
7554
- #: includes/user-functions.php:909 includes/user-functions.php:913
7555
  msgid "Notice"
7556
  msgstr ""
7557
 
7558
- #: includes/user-functions.php:913
7559
  msgid "Your account has already been verified."
7560
  msgstr ""
7561
 
7562
- #: includes/user-functions.php:958
7563
  msgid "Invalid verification token provided."
7564
  msgstr ""
7565
 
7566
- #: includes/user-functions.php:1063
7567
  msgid "Easy Digital Downloads <a href=\"%s\">iOS App</a>"
7568
  msgstr ""
7569
 
7570
- #: includes/user-functions.php:1070
7571
  msgid "Add to iOS App"
7572
  msgstr ""
7573
 
@@ -7579,7 +7612,7 @@ msgstr ""
7579
  msgid "Display the downloads shopping cart"
7580
  msgstr ""
7581
 
7582
- #: includes/widgets.php:91 includes/widgets.php:202 includes/widgets.php:369
7583
  msgid "Title:"
7584
  msgstr ""
7585
 
@@ -7611,7 +7644,7 @@ msgstr ""
7611
  msgid "Hide Empty Categories:"
7612
  msgstr ""
7613
 
7614
- #: includes/widgets.php:243 includes/widgets.php:346
7615
  msgid "%s Details"
7616
  msgstr ""
7617
 
@@ -7619,35 +7652,35 @@ msgstr ""
7619
  msgid "Display the details of a specific %s"
7620
  msgstr ""
7621
 
7622
- #: includes/widgets.php:374
7623
  msgid "Display Type:"
7624
  msgstr ""
7625
 
7626
- #: includes/widgets.php:375
7627
  msgid "Current"
7628
  msgstr ""
7629
 
7630
- #: includes/widgets.php:376
7631
  msgid "Specific"
7632
  msgstr ""
7633
 
7634
- #: includes/widgets.php:382
7635
  msgid "%s:"
7636
  msgstr ""
7637
 
7638
- #: includes/widgets.php:400
7639
  msgid "%s ID"
7640
  msgstr ""
7641
 
7642
- #: includes/widgets.php:407
7643
  msgid "Show %s Title"
7644
  msgstr ""
7645
 
7646
- #: includes/widgets.php:413
7647
  msgid "Show Purchase Button"
7648
  msgstr ""
7649
 
7650
- #: includes/widgets.php:420 includes/widgets.php:427
7651
  msgid "Show %s"
7652
  msgstr ""
7653
 
@@ -7940,6 +7973,12 @@ msgctxt "Date one to date two"
7940
  msgid "to"
7941
  msgstr ""
7942
 
 
 
 
 
 
 
7943
  #: includes/checkout/template.php:741
7944
  msgctxt "Entering a discount code"
7945
  msgid "Click to enter it"
@@ -7950,12 +7989,12 @@ msgctxt "Apply discount at checkout"
7950
  msgid "Apply"
7951
  msgstr ""
7952
 
7953
- #: includes/class-edd-discount.php:1442
7954
  msgctxt "error shown when attempting to use a discount before its start date"
7955
  msgid "This discount is invalid."
7956
  msgstr ""
7957
 
7958
- #: includes/class-edd-discount.php:1819
7959
  msgctxt "error for when a discount is invalid based on its configuration"
7960
  msgid "This discount is invalid."
7961
  msgstr ""
@@ -7980,7 +8019,7 @@ msgctxt "download post type name"
7980
  msgid "%2$s"
7981
  msgstr ""
7982
 
7983
- #: includes/shortcodes.php:625
7984
  msgctxt "download post type name"
7985
  msgid "No %s found"
7986
  msgstr ""
2
  # This file is distributed under the same license as the Easy Digital Downloads package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Easy Digital Downloads 2.9\n"
6
  "Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
7
+ "POT-Creation-Date: 2018-03-15 20:37:36+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
22
  "X-Poedit-SearchPath-0: .\n"
23
  "X-Poedit-Bookmarks: \n"
24
  "X-Textdomain-Support: yes\n"
25
+ "X-Generator: grunt-wp-i18n1.0.2\n"
26
 
27
  #: easy-digital-downloads.php:183 easy-digital-downloads.php:195
28
  msgid "Cheatin&#8217; huh?"
92
  #: includes/cart/class-edd-cart.php:1470 includes/cart/class-edd-cart.php:1484
93
  #: includes/class-edd-license-handler.php:309
94
  #: includes/deprecated-functions.php:517 includes/deprecated-functions.php:532
95
+ #: includes/deprecated-functions.php:542 includes/download-functions.php:1260
96
  #: includes/emails/actions.php:53 includes/emails/template.php:243
97
  #: includes/error-tracking.php:40 includes/gateways/functions.php:221
98
  #: includes/gateways/manual.php:33 includes/gateways/paypal-standard.php:168
99
+ #: includes/process-download.php:293 includes/process-download.php:885
100
+ #: includes/query-filters.php:48 includes/user-functions.php:888
101
+ #: includes/user-functions.php:913 includes/user-functions.php:966
102
  msgid "Error"
103
  msgstr ""
104
 
195
 
196
  #: includes/admin/admin-pages.php:43 includes/admin/plugins.php:57
197
  #: includes/admin/settings/contextual-help.php:87
198
+ #: includes/admin/settings/register-settings.php:1234
199
  msgid "Extensions"
200
  msgstr ""
201
 
314
  msgstr ""
315
 
316
  #: includes/admin/class-edd-notices.php:127
317
+ #: includes/admin/discounts/edit-discount.php:33
318
  msgid "Discount code updated."
319
  msgstr ""
320
 
408
 
409
  #: includes/admin/customers/class-customer-table.php:72
410
  #: includes/admin/payments/class-payments-table.php:277
411
+ #: includes/admin/reporting/class-file-downloads-logs-list-table.php:155
412
  #: includes/admin/reporting/class-sales-logs-list-table.php:131
413
  msgid "Customer"
414
  msgstr ""
427
 
428
  #: includes/admin/customers/class-customer-table.php:161
429
  #: includes/admin/discounts/class-discount-codes-table.php:221
430
+ #: includes/admin/discounts/class-discount-codes-table.php:277
431
  #: includes/admin/payments/class-payments-table.php:373
432
  #: includes/admin/payments/class-payments-table.php:445
433
  #: includes/payments/functions.php:1597
439
  msgstr ""
440
 
441
  #: includes/admin/customers/class-customer-table.php:179
442
+ #: includes/admin/discounts/add-discount.php:32
443
  #: includes/admin/discounts/class-discount-codes-table.php:145
444
+ #: includes/admin/discounts/edit-discount.php:46
445
  #: includes/admin/downloads/dashboard-columns.php:31
446
  #: includes/admin/payments/view-order-details.php:660
447
  #: includes/admin/reporting/class-export-customers.php:76
511
  msgstr ""
512
 
513
  #: includes/admin/customers/customer-actions.php:207
514
+ #: includes/user-functions.php:913
515
  msgid "Nonce verification failed."
516
  msgstr ""
517
 
552
  msgstr ""
553
 
554
  #: includes/admin/customers/customer-actions.php:311
555
+ #: includes/shortcodes.php:952
556
  msgid "Email address %s removed by %s"
557
  msgstr ""
558
 
635
  msgstr ""
636
 
637
  #: includes/admin/customers/customers.php:269
638
+ #: includes/admin/settings/register-settings.php:2032
639
  #: includes/admin/tools.php:695 includes/checkout/template.php:435
640
  #: templates/shortcode-profile-editor.php:171
641
  msgid "State / Province"
711
  #: includes/admin/reporting/class-export-payments.php:63
712
  #: includes/admin/reporting/export/class-batch-export-customers.php:44
713
  #: includes/admin/reporting/export/class-batch-export-payments.php:42
714
+ #: includes/admin/reporting/export/class-batch-export-sales.php:43
715
  #: includes/admin/tools.php:497 templates/shortcode-register.php:25
716
  msgid "Email"
717
  msgstr ""
738
  #: includes/admin/downloads/metabox.php:698
739
  #: includes/admin/downloads/metabox.php:823
740
  #: includes/admin/payments/view-order-details.php:490
741
+ #: includes/admin/settings/register-settings.php:2035 includes/scripts.php:226
742
  #: templates/checkout_cart.php:57 templates/checkout_cart.php:75
743
  #: templates/shortcode-profile-editor.php:123
744
  msgid "Remove"
772
  msgstr ""
773
 
774
  #: includes/admin/customers/customers.php:435
775
+ #: includes/admin/discounts/add-discount.php:65
776
  #: includes/admin/discounts/class-discount-codes-table.php:147
777
+ #: includes/admin/discounts/edit-discount.php:79
778
  #: includes/admin/payments/class-payments-table.php:275
779
  #: includes/admin/reporting/class-export-payments.php:74
780
  #: includes/admin/reporting/export/class-batch-export-payments.php:55
789
  #: includes/admin/reporting/class-export-download-history.php:64
790
  #: includes/admin/reporting/class-export-payments.php:80
791
  #: includes/admin/reporting/class-export.php:70
792
+ #: includes/admin/reporting/class-file-downloads-logs-list-table.php:159
793
  #: includes/admin/reporting/class-gateway-error-logs-list-table.php:134
794
  #: includes/admin/reporting/class-sales-logs-list-table.php:135
795
  #: includes/admin/reporting/export/class-batch-export-api-requests.php:47
796
  #: includes/admin/reporting/export/class-batch-export-file-downloads.php:42
797
  #: includes/admin/reporting/export/class-batch-export-payments.php:61
798
+ #: includes/admin/reporting/export/class-batch-export-sales.php:50
799
  #: includes/admin/tools.php:587 templates/history-purchases.php:19
800
  #: templates/shortcode-receipt.php:59
801
  msgid "Date"
803
 
804
  #: includes/admin/customers/customers.php:437
805
  #: includes/admin/discounts/class-discount-codes-table.php:151
806
+ #: includes/admin/discounts/edit-discount.php:184
807
  #: includes/admin/payments/class-payments-table.php:278
808
  #: includes/admin/reporting/class-export-payments.php:82
809
  #: includes/admin/reporting/export/class-batch-export-downloads.php:49
951
  msgid "Add New Discount"
952
  msgstr ""
953
 
954
+ #: includes/admin/discounts/add-discount.php:19
955
+ msgid "Discount code created."
956
+ msgstr ""
957
+
958
+ #: includes/admin/discounts/add-discount.php:21
959
+ #: includes/admin/discounts/edit-discount.php:35
960
+ msgid "&larr; Back to Discounts"
961
  msgstr ""
962
 
963
+ #: includes/admin/discounts/add-discount.php:36
964
  msgid "The name of this discount."
965
  msgstr ""
966
 
967
+ #: includes/admin/discounts/add-discount.php:42
968
  #: includes/admin/discounts/class-discount-codes-table.php:146
969
+ #: includes/admin/discounts/edit-discount.php:56
970
  msgid "Code"
971
  msgstr ""
972
 
973
+ #: includes/admin/discounts/add-discount.php:46
974
+ #: includes/admin/discounts/edit-discount.php:60
975
  msgid ""
976
  "Enter a code for this discount, such as 10PERCENT. Only alphanumeric "
977
  "characters are allowed."
978
  msgstr ""
979
 
980
+ #: includes/admin/discounts/add-discount.php:52
981
+ #: includes/admin/discounts/edit-discount.php:66
982
  msgid "Type"
983
  msgstr ""
984
 
985
+ #: includes/admin/discounts/add-discount.php:56
986
+ #: includes/admin/discounts/edit-discount.php:70
987
  msgid "Percentage"
988
  msgstr ""
989
 
990
+ #: includes/admin/discounts/add-discount.php:57
991
+ #: includes/admin/discounts/edit-discount.php:71
992
  msgid "Flat amount"
993
  msgstr ""
994
 
995
+ #: includes/admin/discounts/add-discount.php:59
996
+ #: includes/admin/discounts/edit-discount.php:73
997
  msgid "The kind of discount to apply for this discount."
998
  msgstr ""
999
 
1000
+ #: includes/admin/discounts/add-discount.php:69
1001
+ #: includes/admin/discounts/edit-discount.php:83
1002
  msgid "Enter the discount amount in %s"
1003
  msgstr ""
1004
 
1005
+ #: includes/admin/discounts/add-discount.php:70
1006
+ #: includes/admin/discounts/edit-discount.php:84
1007
  msgid "Enter the discount percentage. 10 = 10%"
1008
  msgstr ""
1009
 
1010
+ #: includes/admin/discounts/add-discount.php:76
1011
+ #: includes/admin/discounts/edit-discount.php:90
1012
  msgid "%s Requirements"
1013
  msgstr ""
1014
 
1015
+ #: includes/admin/discounts/add-discount.php:85
1016
+ #: includes/admin/discounts/add-discount.php:121
1017
+ #: includes/admin/discounts/edit-discount.php:100
1018
+ #: includes/admin/discounts/edit-discount.php:136
1019
  msgid "Select one or more %s"
1020
  msgstr ""
1021
 
1022
+ #: includes/admin/discounts/add-discount.php:91
1023
+ #: includes/admin/discounts/edit-discount.php:106
1024
  msgid "Cart must contain all selected %s"
1025
  msgstr ""
1026
 
1027
+ #: includes/admin/discounts/add-discount.php:92
1028
+ #: includes/admin/discounts/edit-discount.php:107
1029
  msgid "Cart needs one or more of the selected %s"
1030
  msgstr ""
1031
 
1032
+ #: includes/admin/discounts/add-discount.php:98
1033
+ #: includes/admin/discounts/edit-discount.php:113
1034
  msgid "Apply discount to entire purchase."
1035
  msgstr ""
1036
 
1037
+ #: includes/admin/discounts/add-discount.php:102
1038
+ #: includes/admin/discounts/edit-discount.php:117
1039
  msgid "Apply discount only to selected %s."
1040
  msgstr ""
1041
 
1042
+ #: includes/admin/discounts/add-discount.php:106
1043
+ #: includes/admin/discounts/edit-discount.php:121
1044
  msgid ""
1045
  "Select %s relevant to this discount. If left blank, this discount can be "
1046
  "used on any product."
1047
  msgstr ""
1048
 
1049
+ #: includes/admin/discounts/add-discount.php:112
1050
+ #: includes/admin/discounts/edit-discount.php:127
1051
  msgid "Excluded %s"
1052
  msgstr ""
1053
 
1054
+ #: includes/admin/discounts/add-discount.php:123
1055
+ #: includes/admin/discounts/edit-discount.php:138
1056
  msgid "%s that this discount code cannot be applied to."
1057
  msgstr ""
1058
 
1059
+ #: includes/admin/discounts/add-discount.php:129
1060
+ #: includes/admin/discounts/edit-discount.php:144
1061
  msgid "Start date"
1062
  msgstr ""
1063
 
1064
+ #: includes/admin/discounts/add-discount.php:133
1065
+ #: includes/admin/discounts/edit-discount.php:148
1066
  msgid ""
1067
  "Enter the start date for this discount code in the format of mm/dd/yyyy. "
1068
  "For no start date, leave blank. If entered, the discount can only be used "
1069
  "after or on this date."
1070
  msgstr ""
1071
 
1072
+ #: includes/admin/discounts/add-discount.php:139
1073
+ #: includes/admin/discounts/edit-discount.php:154
1074
  msgid "Expiration date"
1075
  msgstr ""
1076
 
1077
+ #: includes/admin/discounts/add-discount.php:143
1078
  msgid ""
1079
  "Enter the expiration date for this discount code in the format of "
1080
  "mm/dd/yyyy. For no expiration, leave blank."
1081
  msgstr ""
1082
 
1083
+ #: includes/admin/discounts/add-discount.php:149
1084
+ #: includes/admin/discounts/edit-discount.php:174
1085
  msgid "Minimum Amount"
1086
  msgstr ""
1087
 
1088
+ #: includes/admin/discounts/add-discount.php:153
1089
  msgid ""
1090
  "The minimum dollar amount that must be in the cart before this discount can "
1091
  "be used. Leave blank for no minimum."
1092
  msgstr ""
1093
 
1094
+ #: includes/admin/discounts/add-discount.php:159
1095
+ #: includes/admin/discounts/edit-discount.php:164
1096
  msgid "Max Uses"
1097
  msgstr ""
1098
 
1099
+ #: includes/admin/discounts/add-discount.php:163
1100
+ #: includes/admin/discounts/edit-discount.php:168
1101
  msgid ""
1102
  "The maximum number of times this discount can be used. Leave blank for "
1103
  "unlimited."
1104
  msgstr ""
1105
 
1106
+ #: includes/admin/discounts/add-discount.php:169
1107
+ #: includes/admin/discounts/edit-discount.php:197
1108
  msgid "Use Once Per Customer"
1109
  msgstr ""
1110
 
1111
+ #: includes/admin/discounts/add-discount.php:173
1112
+ #: includes/admin/discounts/edit-discount.php:201
1113
  msgid "Limit this discount to a single-use per customer?"
1114
  msgstr ""
1115
 
1116
+ #: includes/admin/discounts/add-discount.php:183
1117
  msgid "Add Discount Code"
1118
  msgstr ""
1119
 
1120
  #: includes/admin/discounts/class-discount-codes-table.php:127
1121
  #: includes/admin/payments/class-payments-table.php:249
1122
+ #: includes/admin/reporting/class-file-downloads-logs-list-table.php:357
1123
  #: includes/admin/reporting/class-sales-logs-list-table.php:290
1124
  msgid "All"
1125
  msgstr ""
1126
 
1127
  #: includes/admin/discounts/class-discount-codes-table.php:128
1128
+ #: includes/admin/discounts/edit-discount.php:188
1129
+ #: includes/class-edd-discount.php:787
1130
  msgid "Active"
1131
  msgstr ""
1132
 
1133
  #: includes/admin/discounts/class-discount-codes-table.php:129
1134
+ #: includes/admin/discounts/edit-discount.php:189
1135
+ #: includes/class-edd-discount.php:783
1136
  msgid "Inactive"
1137
  msgstr ""
1138
 
1153
  msgstr ""
1154
 
1155
  #: includes/admin/discounts/class-discount-codes-table.php:216
1156
+ #: includes/admin/discounts/class-discount-codes-table.php:276
1157
  msgid "Deactivate"
1158
  msgstr ""
1159
 
1160
  #: includes/admin/discounts/class-discount-codes-table.php:218
1161
+ #: includes/admin/discounts/class-discount-codes-table.php:275
1162
  msgid "Activate"
1163
  msgstr ""
1164
 
1165
+ #: includes/admin/discounts/class-discount-codes-table.php:263
 
 
 
 
1166
  msgid "No discounts found."
1167
  msgstr ""
1168
 
1169
+ #: includes/admin/discounts/class-discount-codes-table.php:383
1170
  msgid "No start date"
1171
  msgstr ""
1172
 
1173
+ #: includes/admin/discounts/class-discount-codes-table.php:389
1174
  msgid "No expiration"
1175
  msgstr ""
1176
 
1204
 
1205
  #: includes/admin/discounts/contextual-help.php:38
1206
  #: includes/admin/settings/contextual-help.php:42
1207
+ #: includes/admin/settings/register-settings.php:1227
 
 
 
1208
  #: includes/admin/settings/register-settings.php:1282
1209
+ #: includes/admin/settings/register-settings.php:1287
1210
+ #: includes/admin/settings/register-settings.php:1291
1211
+ #: includes/admin/settings/register-settings.php:1296
1212
+ #: includes/admin/settings/register-settings.php:1299
1213
  #: includes/admin/tools.php:68
1214
  msgid "General"
1215
  msgstr ""
1347
  msgid "Edit Discount"
1348
  msgstr ""
1349
 
1350
+ #: includes/admin/discounts/edit-discount.php:50
1351
  msgid "The name of this discount"
1352
  msgstr ""
1353
 
1354
+ #: includes/admin/discounts/edit-discount.php:158
1355
  msgid ""
1356
  "Enter the expiration date for this discount code in the format of "
1357
  "mm/dd/yyyy. For no expiration, leave blank"
1358
  msgstr ""
1359
 
1360
+ #: includes/admin/discounts/edit-discount.php:178
1361
  msgid ""
1362
  "The minimum amount that must be purchased before this discount can be used. "
1363
  "Leave blank for no minimum."
1364
  msgstr ""
1365
 
1366
+ #: includes/admin/discounts/edit-discount.php:191
1367
  msgid "The status of this discount code."
1368
  msgstr ""
1369
 
1370
+ #: includes/admin/discounts/edit-discount.php:212
1371
  msgid "Update Discount Code"
1372
  msgstr ""
1373
 
1567
  msgid "Option Name"
1568
  msgstr ""
1569
 
1570
+ #: includes/admin/downloads/metabox.php:478 includes/download-functions.php:523
1571
  msgid "Default"
1572
  msgstr ""
1573
 
1714
  msgstr ""
1715
 
1716
  #: includes/admin/downloads/metabox.php:1031
1717
+ #: includes/admin/settings/register-settings.php:744
1718
  #: includes/admin/thickbox.php:59 includes/checkout/template.php:893
1719
  #: includes/shortcodes.php:49 includes/template-functions.php:78
1720
  msgid "Purchase"
1755
  msgstr ""
1756
 
1757
  #: includes/admin/downloads/metabox.php:1105
1758
+ #: includes/admin/settings/register-settings.php:758
1759
  #: includes/admin/thickbox.php:97
1760
  msgid "Add to Cart"
1761
  msgstr ""
1762
 
1763
  #: includes/admin/downloads/metabox.php:1106
1764
+ #: includes/admin/settings/register-settings.php:772 includes/shortcodes.php:47
1765
  #: includes/template-functions.php:78
1766
  msgid "Buy Now"
1767
  msgstr ""
2189
  msgstr[1] ""
2190
 
2191
  #: includes/admin/payments/view-order-details.php:152
2192
+ #: includes/admin/settings/register-settings.php:720
2193
  msgid "None"
2194
  msgstr ""
2195
 
2390
  msgstr ""
2391
 
2392
  #: includes/admin/reporting/class-api-requests-logs-list-table.php:89
2393
+ #: includes/admin/reporting/class-file-downloads-logs-list-table.php:153
2394
  #: includes/admin/reporting/class-gateway-error-logs-list-table.php:129
2395
  #: includes/admin/reporting/class-sales-logs-list-table.php:130
2396
  #: includes/admin/reporting/export/class-batch-export-api-requests.php:40
2479
  #: includes/admin/reporting/class-export-customers.php:66
2480
  #: includes/admin/reporting/class-export-payments.php:64
2481
  #: includes/admin/reporting/export/class-batch-export-payments.php:44
2482
+ #: includes/admin/reporting/export/class-batch-export-sales.php:44
2483
  #: includes/admin/tools.php:506 includes/checkout/template.php:193
2484
  #: includes/checkout/template.php:199 templates/shortcode-profile-editor.php:38
2485
  msgid "First Name"
2488
  #: includes/admin/reporting/class-export-customers.php:67
2489
  #: includes/admin/reporting/class-export-payments.php:65
2490
  #: includes/admin/reporting/export/class-batch-export-payments.php:45
2491
+ #: includes/admin/reporting/export/class-batch-export-sales.php:45
2492
  #: includes/admin/tools.php:515 includes/checkout/template.php:203
2493
  #: includes/checkout/template.php:209 templates/shortcode-profile-editor.php:43
2494
  msgid "Last Name"
2512
  msgstr ""
2513
 
2514
  #: includes/admin/reporting/class-export-download-history.php:66
2515
+ #: includes/admin/reporting/class-file-downloads-logs-list-table.php:158
2516
  #: includes/admin/reporting/export/class-batch-export-api-requests.php:42
2517
  #: includes/admin/reporting/export/class-batch-export-file-downloads.php:44
2518
  #: includes/admin/reporting/export/class-batch-export-payments.php:64
2526
  msgstr ""
2527
 
2528
  #: includes/admin/reporting/class-export-download-history.php:68
2529
+ #: includes/admin/reporting/class-file-downloads-logs-list-table.php:157
2530
  #: includes/admin/reporting/export/class-batch-export-file-downloads.php:46
2531
  msgid "File"
2532
  msgstr ""
2554
 
2555
  #: includes/admin/reporting/class-export-payments.php:70
2556
  #: includes/admin/reporting/export/class-batch-export-payments.php:50
2557
+ #: includes/admin/settings/register-settings.php:2031
2558
  #: includes/admin/tools.php:713 templates/shortcode-profile-editor.php:162
2559
  msgid "Country"
2560
  msgstr ""
2616
  msgid "You do not have permission to export data."
2617
  msgstr ""
2618
 
2619
+ #: includes/admin/reporting/class-file-downloads-logs-list-table.php:156
2620
  #: includes/admin/reporting/class-gateway-error-logs-list-table.php:130
2621
  #: includes/admin/reporting/class-sales-logs-list-table.php:134
2622
  #: includes/admin/reporting/export/class-batch-export-payments.php:40
2623
+ #: includes/admin/reporting/export/class-batch-export-sales.php:48
2624
  msgid "Payment ID"
2625
  msgstr ""
2626
 
2655
  msgstr ""
2656
 
2657
  #: includes/admin/reporting/class-sales-logs-list-table.php:133
2658
+ #: includes/admin/reporting/export/class-batch-export-sales.php:47
2659
  msgid "Item Amount"
2660
  msgstr ""
2661
 
2770
  msgstr ""
2771
 
2772
  #: includes/admin/reporting/export/class-batch-export-downloads.php:54
2773
+ #: includes/admin/settings/register-settings.php:796
2774
  #: includes/admin/tools.php:896
2775
  msgid "File Download Limit"
2776
  msgstr ""
2818
 
2819
  #: includes/admin/reporting/export/class-batch-export-payments.php:63
2820
  #: includes/admin/settings/register-settings.php:352
2821
+ #: includes/admin/settings/register-settings.php:1283
2822
  msgid "Currency"
2823
  msgstr ""
2824
 
2831
  msgid "Country Name"
2832
  msgstr ""
2833
 
2834
+ #: includes/admin/reporting/export/class-batch-export-sales.php:49
2835
+ msgid "Price ID"
2836
+ msgstr ""
2837
+
2838
  #: includes/admin/reporting/export/export-functions.php:49
2839
  msgid "Export location or file not writable"
2840
  msgstr ""
2950
  msgstr ""
2951
 
2952
  #: includes/admin/reporting/logs.php:144
2953
+ #: includes/admin/settings/register-settings.php:1309
2954
  msgid "File Downloads"
2955
  msgstr ""
2956
 
2980
 
2981
  #: includes/admin/reporting/reports.php:59
2982
  #: includes/admin/settings/contextual-help.php:71
2983
+ #: includes/admin/settings/register-settings.php:1231
2984
  msgid "Taxes"
2985
  msgstr ""
2986
 
2996
  msgid "Show"
2997
  msgstr ""
2998
 
2999
+ #: includes/admin/reporting/reports.php:190
3000
+ msgid "Go Back"
3001
+ msgstr ""
3002
+
3003
  #: includes/admin/reporting/reports.php:267
3004
  msgid "Category Sales Mix: "
3005
  msgstr ""
3127
 
3128
  #: includes/admin/settings/contextual-help.php:48
3129
  #: includes/admin/settings/register-settings.php:420
3130
+ #: includes/admin/settings/register-settings.php:1228
3131
  msgid "Payment Gateways"
3132
  msgstr ""
3133
 
3156
  msgstr ""
3157
 
3158
  #: includes/admin/settings/contextual-help.php:57
3159
+ #: includes/admin/settings/register-settings.php:1229
3160
  msgid "Emails"
3161
  msgstr ""
3162
 
3176
  msgstr ""
3177
 
3178
  #: includes/admin/settings/contextual-help.php:65
3179
+ #: includes/admin/settings/register-settings.php:1230
3180
  msgid "Styles"
3181
  msgstr ""
3182
 
3259
  msgstr ""
3260
 
3261
  #: includes/admin/settings/contextual-help.php:93
3262
+ #: includes/admin/settings/register-settings.php:1306
3263
  msgid "Miscellaneous"
3264
  msgstr ""
3265
 
3291
  msgstr ""
3292
 
3293
  #: includes/admin/settings/register-settings.php:262
3294
+ msgid "Primary Checkout Page"
3295
  msgstr ""
3296
 
3297
  #: includes/admin/settings/register-settings.php:263
3436
  msgstr ""
3437
 
3438
  #: includes/admin/settings/register-settings.php:388
3439
+ #: includes/admin/settings/register-settings.php:1284
3440
  msgid "API"
3441
  msgstr ""
3442
 
3597
  msgstr ""
3598
 
3599
  #: includes/admin/settings/register-settings.php:526
3600
+ msgid "Sale Notification Heading"
3601
  msgstr ""
3602
 
3603
  #: includes/admin/settings/register-settings.php:527
3604
+ msgid "Enter the heading for the sale notification email."
3605
+ msgstr ""
3606
+
3607
+ #: includes/admin/settings/register-settings.php:529
3608
+ #: includes/emails/functions.php:140
3609
+ msgid "New Sale!"
3610
+ msgstr ""
3611
+
3612
+ #: includes/admin/settings/register-settings.php:533
3613
+ msgid "Sale Notification"
3614
+ msgstr ""
3615
+
3616
+ #: includes/admin/settings/register-settings.php:534
3617
  msgid ""
3618
  "Enter the text that is sent as sale notification email after completion of "
3619
  "a purchase. HTML is accepted. Available template tags:"
3620
  msgstr ""
3621
 
3622
+ #: includes/admin/settings/register-settings.php:540
3623
  msgid "Sale Notification Emails"
3624
  msgstr ""
3625
 
3626
+ #: includes/admin/settings/register-settings.php:541
3627
  msgid ""
3628
  "Enter the email address(es) that should receive a notification anytime a "
3629
  "sale is made, one per line."
3630
  msgstr ""
3631
 
3632
+ #: includes/admin/settings/register-settings.php:547
3633
  msgid "Disable Admin Notifications"
3634
  msgstr ""
3635
 
3636
+ #: includes/admin/settings/register-settings.php:548
3637
  msgid "Check this box if you do not want to receive sales notification emails."
3638
  msgstr ""
3639
 
3640
+ #: includes/admin/settings/register-settings.php:560
3641
  msgid "Disable Styles"
3642
  msgstr ""
3643
 
3644
+ #: includes/admin/settings/register-settings.php:561
3645
  msgid ""
3646
  "Check this to disable all included styling of buttons, checkout fields, and "
3647
  "all other elements."
3648
  msgstr ""
3649
 
3650
+ #: includes/admin/settings/register-settings.php:563
3651
  msgid "Disabling Styles"
3652
  msgstr ""
3653
 
3654
+ #: includes/admin/settings/register-settings.php:564
3655
  msgid ""
3656
  "If your theme has a complete custom CSS file for Easy Digital Downloads, "
3657
  "you may wish to disable our default styles. This is not recommended unless "
3658
  "you're sure your theme has a complete custom CSS."
3659
  msgstr ""
3660
 
3661
+ #: includes/admin/settings/register-settings.php:568
3662
  msgid "Buttons"
3663
  msgstr ""
3664
 
3665
+ #: includes/admin/settings/register-settings.php:569
3666
  msgid "Options for add to cart and purchase buttons"
3667
  msgstr ""
3668
 
3669
+ #: includes/admin/settings/register-settings.php:574
3670
  msgid "Default Button Style"
3671
  msgstr ""
3672
 
3673
+ #: includes/admin/settings/register-settings.php:575
3674
  msgid "Choose the style you want to use for the buttons."
3675
  msgstr ""
3676
 
3677
+ #: includes/admin/settings/register-settings.php:581
3678
  msgid "Default Button Color"
3679
  msgstr ""
3680
 
3681
+ #: includes/admin/settings/register-settings.php:582
3682
  msgid "Choose the color you want to use for the buttons."
3683
  msgstr ""
3684
 
3685
+ #: includes/admin/settings/register-settings.php:595
3686
  msgid "Need help?"
3687
  msgstr ""
3688
 
3689
+ #: includes/admin/settings/register-settings.php:596
3690
  msgid ""
3691
  "Visit the <a href=\"%s\" target=\"_blank\">Tax setup documentation</a> for "
3692
  "further information. If you need VAT support, there are options listed on "
3693
  "the documentation page."
3694
  msgstr ""
3695
 
3696
+ #: includes/admin/settings/register-settings.php:601
3697
  msgid "Enable Taxes"
3698
  msgstr ""
3699
 
3700
+ #: includes/admin/settings/register-settings.php:602
3701
  msgid "Check this to enable taxes on purchases."
3702
  msgstr ""
3703
 
3704
+ #: includes/admin/settings/register-settings.php:604
3705
  msgid "Enabling Taxes"
3706
  msgstr ""
3707
 
3708
+ #: includes/admin/settings/register-settings.php:605
3709
  msgid ""
3710
  "With taxes enabled, Easy Digital Downloads will use the rules below to "
3711
  "charge tax to customers. With taxes enabled, customers are required to "
3712
  "input their address on checkout so that taxes can be properly calculated."
3713
  msgstr ""
3714
 
3715
+ #: includes/admin/settings/register-settings.php:609
3716
  msgid "Tax Rates"
3717
  msgstr ""
3718
 
3719
+ #: includes/admin/settings/register-settings.php:610
3720
  msgid ""
3721
  "Add tax rates for specific regions. Enter a percentage, such as 6.5 for "
3722
  "6.5%."
3723
  msgstr ""
3724
 
3725
+ #: includes/admin/settings/register-settings.php:615
3726
+ #: includes/admin/settings/register-settings.php:619
3727
  msgid "Fallback Tax Rate"
3728
  msgstr ""
3729
 
3730
+ #: includes/admin/settings/register-settings.php:616
3731
  msgid ""
3732
  "Customers not in a specific rate will be charged this tax rate. Enter a "
3733
  "percentage, such as 6.5 for 6.5%. "
3734
  msgstr ""
3735
 
3736
+ #: includes/admin/settings/register-settings.php:620
3737
  msgid ""
3738
  "If the customer's address fails to meet the above tax rules, you can define "
3739
  "a `default` tax rate to be applied to all other customers. Enter a "
3740
  "percentage, such as 6.5 for 6.5%."
3741
  msgstr ""
3742
 
3743
+ #: includes/admin/settings/register-settings.php:624
3744
  msgid "Prices entered with tax"
3745
  msgstr ""
3746
 
3747
+ #: includes/admin/settings/register-settings.php:625
3748
  msgid "This option affects how you enter prices."
3749
  msgstr ""
3750
 
3751
+ #: includes/admin/settings/register-settings.php:629
3752
  msgid "Yes, I will enter prices inclusive of tax"
3753
  msgstr ""
3754
 
3755
+ #: includes/admin/settings/register-settings.php:630
3756
  msgid "No, I will enter prices exclusive of tax"
3757
  msgstr ""
3758
 
3759
+ #: includes/admin/settings/register-settings.php:632
3760
  msgid "Prices Inclusive of Tax"
3761
  msgstr ""
3762
 
3763
+ #: includes/admin/settings/register-settings.php:633
3764
  msgid ""
3765
  "When using prices inclusive of tax, you will be entering your prices as the "
3766
  "total amount you want a customer to pay for the download, including tax. "
3768
  "for the defined total price."
3769
  msgstr ""
3770
 
3771
+ #: includes/admin/settings/register-settings.php:637
3772
  msgid "Display Tax Rate on Prices"
3773
  msgstr ""
3774
 
3775
+ #: includes/admin/settings/register-settings.php:638
3776
  msgid "Some countries require a notice when product prices include tax."
3777
  msgstr ""
3778
 
3779
+ #: includes/admin/settings/register-settings.php:643
3780
  msgid "Display during checkout"
3781
  msgstr ""
3782
 
3783
+ #: includes/admin/settings/register-settings.php:644
3784
  msgid "Should prices on the checkout page be shown with or without tax?"
3785
  msgstr ""
3786
 
3787
+ #: includes/admin/settings/register-settings.php:648
3788
  msgid "Including tax"
3789
  msgstr ""
3790
 
3791
+ #: includes/admin/settings/register-settings.php:649
3792
  msgid "Excluding tax"
3793
  msgstr ""
3794
 
3795
+ #: includes/admin/settings/register-settings.php:651
3796
  msgid "Taxes Displayed for Products on Checkout"
3797
  msgstr ""
3798
 
3799
+ #: includes/admin/settings/register-settings.php:652
3800
  msgid ""
3801
  "This option will determine whether the product price displays with or "
3802
  "without tax on checkout."
3803
  msgstr ""
3804
 
3805
+ #: includes/admin/settings/register-settings.php:670
3806
+ #: includes/admin/settings/register-settings.php:673
3807
  msgid "Redirect to Checkout"
3808
  msgstr ""
3809
 
3810
+ #: includes/admin/settings/register-settings.php:671
3811
  msgid "Immediately redirect to checkout after adding an item to the cart?"
3812
  msgstr ""
3813
 
3814
+ #: includes/admin/settings/register-settings.php:674
3815
  msgid ""
3816
  "When enabled, once an item has been added to the cart, the customer will be "
3817
  "redirected directly to your checkout page. This is useful for stores that "
3818
  "sell single items."
3819
  msgstr ""
3820
 
3821
+ #: includes/admin/settings/register-settings.php:678
3822
  msgid "Cart Item Quantities"
3823
  msgstr ""
3824
 
3825
+ #: includes/admin/settings/register-settings.php:679
3826
  msgid ""
3827
  "Allow quantities to be adjusted when adding %s to the cart, and while "
3828
  "viewing the checkout cart."
3829
  msgstr ""
3830
 
3831
+ #: includes/admin/settings/register-settings.php:684
3832
  msgid "Debug Mode"
3833
  msgstr ""
3834
 
3835
+ #: includes/admin/settings/register-settings.php:685
3836
  msgid ""
3837
  "Check this box to enable debug mode. When enabled, debug messages will be "
3838
  "logged and shown in Downloads &rarr; Tools &rarr; Debug Log."
3839
  msgstr ""
3840
 
3841
+ #: includes/admin/settings/register-settings.php:690
3842
  msgid "Remove Data on Uninstall?"
3843
  msgstr ""
3844
 
3845
+ #: includes/admin/settings/register-settings.php:691
3846
  msgid ""
3847
  "Check this box if you would like EDD to completely remove all of its data "
3848
  "when the plugin is deleted."
3849
  msgstr ""
3850
 
3851
+ #: includes/admin/settings/register-settings.php:698
3852
  msgid "Enforce SSL on Checkout"
3853
  msgstr ""
3854
 
3855
+ #: includes/admin/settings/register-settings.php:699
3856
  msgid ""
3857
  "Check this to force users to be redirected to the secure checkout page. You "
3858
  "must have an SSL certificate installed to use this option."
3859
  msgstr ""
3860
 
3861
+ #: includes/admin/settings/register-settings.php:704
3862
+ #: includes/admin/settings/register-settings.php:707
3863
  msgid "Require Login"
3864
  msgstr ""
3865
 
3866
+ #: includes/admin/settings/register-settings.php:705
3867
  msgid "Require that users be logged-in to purchase files."
3868
  msgstr ""
3869
 
3870
+ #: includes/admin/settings/register-settings.php:708
3871
  msgid ""
3872
  "You can require that customers create and login to user accounts prior to "
3873
  "purchasing from your store by enabling this option. When unchecked, users "
3874
  "can purchase without being logged in by using their name and email address."
3875
  msgstr ""
3876
 
3877
+ #: includes/admin/settings/register-settings.php:712
3878
  msgid "Show Register / Login Form?"
3879
  msgstr ""
3880
 
3881
+ #: includes/admin/settings/register-settings.php:713
3882
  msgid ""
3883
  "Display the registration and login forms on the checkout page for "
3884
  "non-logged-in users."
3885
  msgstr ""
3886
 
3887
+ #: includes/admin/settings/register-settings.php:717
3888
  msgid "Registration and Login Forms"
3889
  msgstr ""
3890
 
3891
+ #: includes/admin/settings/register-settings.php:718
3892
  msgid "Registration Form Only"
3893
  msgstr ""
3894
 
3895
+ #: includes/admin/settings/register-settings.php:719
3896
  msgid "Login Form Only"
3897
  msgstr ""
3898
 
3899
+ #: includes/admin/settings/register-settings.php:725
3900
  msgid "Multiple Discounts"
3901
  msgstr ""
3902
 
3903
+ #: includes/admin/settings/register-settings.php:726
3904
  msgid "Allow customers to use multiple discounts on the same purchase?"
3905
  msgstr ""
3906
 
3907
+ #: includes/admin/settings/register-settings.php:731
3908
  msgid "Enable Cart Saving"
3909
  msgstr ""
3910
 
3911
+ #: includes/admin/settings/register-settings.php:732
3912
  msgid "Check this to enable cart saving on the checkout."
3913
  msgstr ""
3914
 
3915
+ #: includes/admin/settings/register-settings.php:734
3916
  msgid "Cart Saving"
3917
  msgstr ""
3918
 
3919
+ #: includes/admin/settings/register-settings.php:735
3920
  msgid ""
3921
  "Cart saving allows shoppers to create a temporary link to their current "
3922
  "shopping cart so they can come back to it later, or share it with someone."
3923
  msgstr ""
3924
 
3925
+ #: includes/admin/settings/register-settings.php:741
3926
  msgid "Complete Purchase Text"
3927
  msgstr ""
3928
 
3929
+ #: includes/admin/settings/register-settings.php:742
3930
  msgid "The button label for completing a purchase."
3931
  msgstr ""
3932
 
3933
+ #: includes/admin/settings/register-settings.php:748
3934
  msgid "Register Text"
3935
  msgstr ""
3936
 
3937
+ #: includes/admin/settings/register-settings.php:749
3938
  msgid "The button label for completing a free purchase."
3939
  msgstr ""
3940
 
3941
+ #: includes/admin/settings/register-settings.php:751
3942
  #: includes/checkout/template.php:896
3943
  msgid "Free Download"
3944
  msgstr ""
3945
 
3946
+ #: includes/admin/settings/register-settings.php:755
3947
  msgid "Add to Cart Text"
3948
  msgstr ""
3949
 
3950
+ #: includes/admin/settings/register-settings.php:756
3951
  msgid "Text shown on the Add to Cart Buttons."
3952
  msgstr ""
3953
 
3954
+ #: includes/admin/settings/register-settings.php:762
3955
+ msgid "Checkout Button Text"
3956
+ msgstr ""
3957
+
3958
+ #: includes/admin/settings/register-settings.php:763
3959
+ msgid ""
3960
+ "Text shown on the Add to Cart Button when the product is already in the "
3961
+ "cart."
3962
+ msgstr ""
3963
+
3964
+ #: includes/admin/settings/register-settings.php:769
3965
  msgid "Buy Now Text"
3966
  msgstr ""
3967
 
3968
+ #: includes/admin/settings/register-settings.php:770
3969
  msgid "Text shown on the Buy Now Buttons."
3970
  msgstr ""
3971
 
3972
+ #: includes/admin/settings/register-settings.php:778
3973
+ #: includes/admin/settings/register-settings.php:781
3974
  msgid "Download Method"
3975
  msgstr ""
3976
 
3977
+ #: includes/admin/settings/register-settings.php:779
3978
  msgid "Select the file download method. Note, not all methods work on all servers."
3979
  msgstr ""
3980
 
3981
+ #: includes/admin/settings/register-settings.php:782
3982
  msgid ""
3983
  "Due to its consistency in multiple platforms and better file protection, "
3984
  "'forced' is the default method. Because Easy Digital Downloads uses PHP to "
3989
  "method can help resolve this."
3990
  msgstr ""
3991
 
3992
+ #: includes/admin/settings/register-settings.php:784
3993
  msgid "Forced"
3994
  msgstr ""
3995
 
3996
+ #: includes/admin/settings/register-settings.php:785
3997
  msgid "Redirect"
3998
  msgstr ""
3999
 
4000
+ #: includes/admin/settings/register-settings.php:790
4001
  msgid "Symlink File Downloads?"
4002
  msgstr ""
4003
 
4004
+ #: includes/admin/settings/register-settings.php:791
4005
  msgid ""
4006
  "Check this if you are delivering really large files or having problems with "
4007
  "file downloads completing."
4008
  msgstr ""
4009
 
4010
+ #: includes/admin/settings/register-settings.php:797
4011
  msgid ""
4012
  "The maximum number of times files can be downloaded for purchases. Can be "
4013
  "overwritten for each %s."
4014
  msgstr ""
4015
 
4016
+ #: includes/admin/settings/register-settings.php:800
4017
  msgid "File Download Limits"
4018
  msgstr ""
4019
 
4020
+ #: includes/admin/settings/register-settings.php:801
4021
  msgid ""
4022
  "Set the global default for the number of times a customer can download "
4023
  "items they purchase. Using a value of 0 is unlimited. This can be defined "
4025
  "individual purchase."
4026
  msgstr ""
4027
 
4028
+ #: includes/admin/settings/register-settings.php:805
4029
+ #: includes/admin/settings/register-settings.php:807
4030
  msgid "Download Link Expiration"
4031
  msgstr ""
4032
 
4033
+ #: includes/admin/settings/register-settings.php:806
4034
  msgid ""
4035
  "How long should download links be valid for? Default is 24 hours from the "
4036
  "time they are generated. Enter a time in hours."
4037
  msgstr ""
4038
 
4039
+ #: includes/admin/settings/register-settings.php:808
4040
  msgid ""
4041
  "When a customer receives a link to their downloads via email, in their "
4042
  "receipt, or in their purchase history, the link will only be valid for the "
4045
  "customer."
4046
  msgstr ""
4047
 
4048
+ #: includes/admin/settings/register-settings.php:816
4049
  msgid "Disable Redownload?"
4050
  msgstr ""
4051
 
4052
+ #: includes/admin/settings/register-settings.php:817
4053
  msgid ""
4054
  "Check this if you do not want to allow users to redownload items from their "
4055
  "purchase history."
4056
  msgstr ""
4057
 
4058
+ #: includes/admin/settings/register-settings.php:824
4059
  msgid "Enable SKU Entry"
4060
  msgstr ""
4061
 
4062
+ #: includes/admin/settings/register-settings.php:825
4063
  msgid ""
4064
  "Check this box to allow entry of product SKUs. SKUs will be shown on "
4065
  "purchase receipt and exported purchase histories."
4066
  msgstr ""
4067
 
4068
+ #: includes/admin/settings/register-settings.php:830
4069
  msgid "Sequential Order Numbers"
4070
  msgstr ""
4071
 
4072
+ #: includes/admin/settings/register-settings.php:831
4073
  msgid "Check this box to enable sequential order numbers."
4074
  msgstr ""
4075
 
4076
+ #: includes/admin/settings/register-settings.php:836
4077
  msgid "Sequential Starting Number"
4078
  msgstr ""
4079
 
4080
+ #: includes/admin/settings/register-settings.php:837
4081
  msgid "The number at which the sequence should begin."
4082
  msgstr ""
4083
 
4084
+ #: includes/admin/settings/register-settings.php:844
4085
  msgid "Sequential Number Prefix"
4086
  msgstr ""
4087
 
4088
+ #: includes/admin/settings/register-settings.php:845
4089
  msgid "A prefix to prepend to all sequential order numbers."
4090
  msgstr ""
4091
 
4092
+ #: includes/admin/settings/register-settings.php:850
4093
  msgid "Sequential Number Postfix"
4094
  msgstr ""
4095
 
4096
+ #: includes/admin/settings/register-settings.php:851
4097
  msgid "A postfix to append to all sequential order numbers."
4098
  msgstr ""
4099
 
4100
+ #: includes/admin/settings/register-settings.php:858
4101
  msgid "Agree to Terms"
4102
  msgstr ""
4103
 
4104
+ #: includes/admin/settings/register-settings.php:859
4105
  msgid ""
4106
  "Check this to show an agree to terms on the checkout that users must agree "
4107
  "to before purchasing."
4108
  msgstr ""
4109
 
4110
+ #: includes/admin/settings/register-settings.php:864
4111
  msgid "Agree to Terms Label"
4112
  msgstr ""
4113
 
4114
+ #: includes/admin/settings/register-settings.php:865
4115
  msgid "Label shown next to the agree to terms check box."
4116
  msgstr ""
4117
 
4118
+ #: includes/admin/settings/register-settings.php:871
4119
  msgid "Agreement Text"
4120
  msgstr ""
4121
 
4122
+ #: includes/admin/settings/register-settings.php:872
4123
  msgid "If Agree to Terms is checked, enter the agreement terms here."
4124
  msgstr ""
4125
 
4126
+ #: includes/admin/settings/register-settings.php:882
4127
  msgid "Buy Now Disabled"
4128
  msgstr ""
4129
 
4130
+ #: includes/admin/settings/register-settings.php:883
4131
  msgid ""
4132
  "Buy Now buttons are only available for stores that have a single supported "
4133
  "gateway active and that do not use taxes."
4134
  msgstr ""
4135
 
4136
+ #: includes/admin/settings/register-settings.php:981
4137
  msgid "Settings updated."
4138
  msgstr ""
4139
 
4140
+ #: includes/admin/settings/register-settings.php:1121
4141
  msgid "Error setting default gateway. No gateways are enabled."
4142
  msgstr ""
4143
 
4144
+ #: includes/admin/settings/register-settings.php:1134
4145
  msgid "%s could not be set as the default gateway. It must first be enabled."
4146
  msgstr ""
4147
 
4148
+ #: includes/admin/settings/register-settings.php:1237
4149
  msgid "Licenses"
4150
  msgstr ""
4151
 
4152
+ #: includes/admin/settings/register-settings.php:1240
4153
  msgid "Misc"
4154
  msgstr ""
4155
 
4156
+ #: includes/admin/settings/register-settings.php:1288
4157
  #: includes/gateways/functions.php:25 includes/gateways/paypal-standard.php:33
4158
  msgid "PayPal Standard"
4159
  msgstr ""
4160
 
4161
+ #: includes/admin/settings/register-settings.php:1292
4162
  msgid "Purchase Receipts"
4163
  msgstr ""
4164
 
4165
+ #: includes/admin/settings/register-settings.php:1293
4166
  msgid "New Sale Notifications"
4167
  msgstr ""
4168
 
4169
+ #: includes/admin/settings/register-settings.php:1302
4170
  msgid "Main"
4171
  msgstr ""
4172
 
4173
+ #: includes/admin/settings/register-settings.php:1307 includes/install.php:92
4174
+ #: templates/widget-cart-checkout.php:6 templates/widget-cart-empty.php:7
 
4175
  msgid "Checkout"
4176
  msgstr ""
4177
 
4178
+ #: includes/admin/settings/register-settings.php:1308
4179
  msgid "Button Text"
4180
  msgstr ""
4181
 
4182
+ #: includes/admin/settings/register-settings.php:1310
4183
  msgid "Accounting"
4184
  msgstr ""
4185
 
4186
+ #: includes/admin/settings/register-settings.php:1311
4187
  msgid "Terms of Agreement"
4188
  msgstr ""
4189
 
4190
+ #: includes/admin/settings/register-settings.php:1553
4191
  msgid ""
4192
  "Don't see what you need? More Payment Gateway options are available <a "
4193
  "href=\"%s\">here</a>."
4194
  msgstr ""
4195
 
4196
+ #: includes/admin/settings/register-settings.php:1774
4197
  msgid "The callback function used for the %s setting is missing."
4198
  msgstr ""
4199
 
4200
+ #: includes/admin/settings/register-settings.php:1932
4201
  msgid "Upload File"
4202
  msgstr ""
4203
 
4204
+ #: includes/admin/settings/register-settings.php:2033
4205
  msgid "Country Wide"
4206
  msgstr ""
4207
 
4208
+ #: includes/admin/settings/register-settings.php:2034
4209
  msgid "Rate"
4210
  msgstr ""
4211
 
4212
+ #: includes/admin/settings/register-settings.php:2034
4213
  msgid ""
4214
  "<strong>Regional tax rates: </strong>When a customer enters an address on "
4215
  "checkout that matches the specified region for this tax rate, the cart tax "
4216
  "will adjust automatically. Enter a percentage, such as 6.5 for 6.5%."
4217
  msgstr ""
4218
 
4219
+ #: includes/admin/settings/register-settings.php:2051
4220
+ #: includes/admin/settings/register-settings.php:2096
4221
  msgid "Choose a country"
4222
  msgstr ""
4223
 
4224
+ #: includes/admin/settings/register-settings.php:2066
4225
  msgid "Choose a state"
4226
  msgstr ""
4227
 
4228
+ #: includes/admin/settings/register-settings.php:2078
4229
+ #: includes/admin/settings/register-settings.php:2106
4230
  msgid "Apply to whole country"
4231
  msgstr ""
4232
 
4233
+ #: includes/admin/settings/register-settings.php:2081
4234
+ #: includes/admin/settings/register-settings.php:2109
4235
  msgid "Remove Rate"
4236
  msgstr ""
4237
 
4238
+ #: includes/admin/settings/register-settings.php:2114
4239
  msgid "Add Tax Rate"
4240
  msgstr ""
4241
 
4242
+ #: includes/admin/settings/register-settings.php:2167
4243
  msgid ""
4244
  "Your license key expired on %s. Please <a href=\"%s\" "
4245
  "target=\"_blank\">renew your license key</a>."
4246
  msgstr ""
4247
 
4248
+ #: includes/admin/settings/register-settings.php:2180
4249
  msgid ""
4250
  "Your license key has been disabled. Please <a href=\"%s\" "
4251
  "target=\"_blank\">contact support</a> for more information."
4252
  msgstr ""
4253
 
4254
+ #: includes/admin/settings/register-settings.php:2192
4255
  msgid ""
4256
  "Invalid license. Please <a href=\"%s\" target=\"_blank\">visit your account "
4257
  "page</a> and verify it."
4258
  msgstr ""
4259
 
4260
+ #: includes/admin/settings/register-settings.php:2205
4261
  msgid ""
4262
  "Your %s is not active for this URL. Please <a href=\"%s\" "
4263
  "target=\"_blank\">visit your account page</a> to manage your license key "
4264
  "URLs."
4265
  msgstr ""
4266
 
4267
+ #: includes/admin/settings/register-settings.php:2217
4268
  msgid "This appears to be an invalid license key for %s."
4269
  msgstr ""
4270
 
4271
+ #: includes/admin/settings/register-settings.php:2226
4272
  msgid ""
4273
  "Your license key has reached its activation limit. <a href=\"%s\">View "
4274
  "possible upgrades</a> now."
4275
  msgstr ""
4276
 
4277
+ #: includes/admin/settings/register-settings.php:2235
4278
  msgid ""
4279
  "The key you entered belongs to a bundle, please use the product specific "
4280
  "license key."
4281
  msgstr ""
4282
 
4283
+ #: includes/admin/settings/register-settings.php:2243
4284
  msgid "unknown_error"
4285
  msgstr ""
4286
 
4287
+ #: includes/admin/settings/register-settings.php:2244
4288
  msgid ""
4289
  "There was an error with this license key: %s. Please <a href=\"%s\">contact "
4290
  "our support team</a>."
4291
  msgstr ""
4292
 
4293
+ #: includes/admin/settings/register-settings.php:2264
4294
  msgid "License key never expires."
4295
  msgstr ""
4296
 
4297
+ #: includes/admin/settings/register-settings.php:2271
4298
  msgid ""
4299
  "Your license key expires soon! It expires on %s. <a href=\"%s\" "
4300
  "target=\"_blank\">Renew your license key</a>."
4301
  msgstr ""
4302
 
4303
+ #: includes/admin/settings/register-settings.php:2281
4304
  msgid "Your license key expires on %s."
4305
  msgstr ""
4306
 
4307
+ #: includes/admin/settings/register-settings.php:2299
4308
  msgid "To receive updates, please enter your valid %s license key."
4309
  msgstr ""
4310
 
4311
+ #: includes/admin/settings/register-settings.php:2312
4312
  msgid "Deactivate License"
4313
  msgstr ""
4314
 
4940
  msgid "No download logs found!"
4941
  msgstr ""
4942
 
4943
+ #: includes/api/class-edd-api.php:1954 includes/user-functions.php:1048
4944
  msgid "Easy Digital Downloads API Keys"
4945
  msgstr ""
4946
 
4947
+ #: includes/api/class-edd-api.php:1963 includes/user-functions.php:1053
4948
  msgid "Generate API Key"
4949
  msgstr ""
4950
 
4951
+ #: includes/api/class-edd-api.php:1965 includes/user-functions.php:1055
4952
  msgid "Public key:"
4953
  msgstr ""
4954
 
4955
+ #: includes/api/class-edd-api.php:1966 includes/user-functions.php:1056
4956
  msgid "Secret key:"
4957
  msgstr ""
4958
 
4959
+ #: includes/api/class-edd-api.php:1967 includes/user-functions.php:1057
4960
  msgid "Token:"
4961
  msgstr ""
4962
 
4963
+ #: includes/api/class-edd-api.php:1969 includes/user-functions.php:1059
4964
  msgid "Revoke API Keys"
4965
  msgstr ""
4966
 
5428
  msgid "Customer User ID: %s"
5429
  msgstr ""
5430
 
5431
+ #: includes/class-edd-cli.php:335 includes/user-functions.php:569
5432
+ #: includes/user-functions.php:581
5433
  msgid "Username: %s"
5434
  msgstr ""
5435
 
5595
  msgid "Can't get property %s"
5596
  msgstr ""
5597
 
5598
+ #: includes/class-edd-discount.php:780
5599
+ msgid "Expired"
5600
  msgstr ""
5601
 
5602
  #: includes/class-edd-discount.php:1545
5603
+ msgid "This discount has reached its maximum usage."
5604
+ msgstr ""
5605
+
5606
+ #: includes/class-edd-discount.php:1579
5607
  msgid "Minimum order of %s not met."
5608
  msgstr ""
5609
 
5610
+ #: includes/class-edd-discount.php:1667 includes/class-edd-discount.php:1696
5611
  msgid "The product requirements for this discount are not met."
5612
  msgstr ""
5613
 
5614
+ #: includes/class-edd-discount.php:1714
5615
  msgid "This discount is not valid for the cart contents."
5616
  msgstr ""
5617
 
5618
+ #: includes/class-edd-discount.php:1804
5619
  msgid "This discount has already been redeemed."
5620
  msgstr ""
5621
 
5622
+ #: includes/class-edd-discount.php:1885
5623
  msgid "This discount is expired."
5624
  msgstr ""
5625
 
5626
+ #: includes/class-edd-discount.php:1890
5627
  msgid "This discount is not active."
5628
  msgstr ""
5629
 
5786
  msgid "Improper date provided."
5787
  msgstr ""
5788
 
5789
+ #: includes/country-functions.php:1838
5790
  msgid "A Coru&ntilde;a"
5791
  msgstr ""
5792
 
5793
+ #: includes/country-functions.php:1839
5794
  msgid "Araba"
5795
  msgstr ""
5796
 
5797
+ #: includes/country-functions.php:1840
5798
  msgid "Albacete"
5799
  msgstr ""
5800
 
5801
+ #: includes/country-functions.php:1841
5802
  msgid "Alicante"
5803
  msgstr ""
5804
 
5805
+ #: includes/country-functions.php:1842
5806
  msgid "Almer&iacute;a"
5807
  msgstr ""
5808
 
5809
+ #: includes/country-functions.php:1843
5810
  msgid "Asturias"
5811
  msgstr ""
5812
 
5813
+ #: includes/country-functions.php:1844
5814
  msgid "&Aacute;vila"
5815
  msgstr ""
5816
 
5817
+ #: includes/country-functions.php:1845
5818
  msgid "Badajoz"
5819
  msgstr ""
5820
 
5821
+ #: includes/country-functions.php:1846
5822
  msgid "Baleares"
5823
  msgstr ""
5824
 
5825
+ #: includes/country-functions.php:1847
5826
  msgid "Barcelona"
5827
  msgstr ""
5828
 
5829
+ #: includes/country-functions.php:1848
5830
  msgid "Burgos"
5831
  msgstr ""
5832
 
5833
+ #: includes/country-functions.php:1849
5834
  msgid "C&aacute;ceres"
5835
  msgstr ""
5836
 
5837
+ #: includes/country-functions.php:1850
5838
  msgid "C&aacute;diz"
5839
  msgstr ""
5840
 
5841
+ #: includes/country-functions.php:1851
5842
  msgid "Cantabria"
5843
  msgstr ""
5844
 
5845
+ #: includes/country-functions.php:1852
5846
  msgid "Castell&oacute;n"
5847
  msgstr ""
5848
 
5849
+ #: includes/country-functions.php:1853
5850
  msgid "Ceuta"
5851
  msgstr ""
5852
 
5853
+ #: includes/country-functions.php:1854
5854
  msgid "Ciudad Real"
5855
  msgstr ""
5856
 
5857
+ #: includes/country-functions.php:1855
5858
  msgid "C&oacute;rdoba"
5859
  msgstr ""
5860
 
5861
+ #: includes/country-functions.php:1856
5862
  msgid "Cuenca"
5863
  msgstr ""
5864
 
5865
+ #: includes/country-functions.php:1857
5866
  msgid "Girona"
5867
  msgstr ""
5868
 
5869
+ #: includes/country-functions.php:1858
5870
  msgid "Granada"
5871
  msgstr ""
5872
 
5873
+ #: includes/country-functions.php:1859
5874
  msgid "Guadalajara"
5875
  msgstr ""
5876
 
5877
+ #: includes/country-functions.php:1860
5878
  msgid "Gipuzkoa"
5879
  msgstr ""
5880
 
5881
+ #: includes/country-functions.php:1861
5882
  msgid "Huelva"
5883
  msgstr ""
5884
 
5885
+ #: includes/country-functions.php:1862
5886
  msgid "Huesca"
5887
  msgstr ""
5888
 
5889
+ #: includes/country-functions.php:1863
5890
  msgid "Ja&eacute;n"
5891
  msgstr ""
5892
 
5893
+ #: includes/country-functions.php:1864
5894
  msgid "La Rioja"
5895
  msgstr ""
5896
 
5897
+ #: includes/country-functions.php:1865
5898
  msgid "Las Palmas"
5899
  msgstr ""
5900
 
5901
+ #: includes/country-functions.php:1866
5902
  msgid "Le&oacute;n"
5903
  msgstr ""
5904
 
5905
+ #: includes/country-functions.php:1867
5906
  msgid "Lleida"
5907
  msgstr ""
5908
 
5909
+ #: includes/country-functions.php:1868
5910
  msgid "Lugo"
5911
  msgstr ""
5912
 
5913
+ #: includes/country-functions.php:1869
5914
  msgid "Madrid"
5915
  msgstr ""
5916
 
5917
+ #: includes/country-functions.php:1870
5918
  msgid "M&aacute;laga"
5919
  msgstr ""
5920
 
5921
+ #: includes/country-functions.php:1871
5922
  msgid "Melilla"
5923
  msgstr ""
5924
 
5925
+ #: includes/country-functions.php:1872
5926
  msgid "Murcia"
5927
  msgstr ""
5928
 
5929
+ #: includes/country-functions.php:1873
5930
  msgid "Navarra"
5931
  msgstr ""
5932
 
5933
+ #: includes/country-functions.php:1874
5934
  msgid "Ourense"
5935
  msgstr ""
5936
 
5937
+ #: includes/country-functions.php:1875
5938
  msgid "Palencia"
5939
  msgstr ""
5940
 
5941
+ #: includes/country-functions.php:1876
5942
  msgid "Pontevedra"
5943
  msgstr ""
5944
 
5945
+ #: includes/country-functions.php:1877
5946
  msgid "Salamanca"
5947
  msgstr ""
5948
 
5949
+ #: includes/country-functions.php:1878
5950
  msgid "Santa Cruz de Tenerife"
5951
  msgstr ""
5952
 
5953
+ #: includes/country-functions.php:1879
5954
  msgid "Segovia"
5955
  msgstr ""
5956
 
5957
+ #: includes/country-functions.php:1880
5958
  msgid "Sevilla"
5959
  msgstr ""
5960
 
5961
+ #: includes/country-functions.php:1881
5962
  msgid "Soria"
5963
  msgstr ""
5964
 
5965
+ #: includes/country-functions.php:1882
5966
  msgid "Tarragona"
5967
  msgstr ""
5968
 
5969
+ #: includes/country-functions.php:1883
5970
  msgid "Teruel"
5971
  msgstr ""
5972
 
5973
+ #: includes/country-functions.php:1884
5974
  msgid "Toledo"
5975
  msgstr ""
5976
 
5977
+ #: includes/country-functions.php:1885
5978
  msgid "Valencia"
5979
  msgstr ""
5980
 
5981
+ #: includes/country-functions.php:1886
5982
  msgid "Valladolid"
5983
  msgstr ""
5984
 
5985
+ #: includes/country-functions.php:1887
5986
  msgid "Bizkaia"
5987
  msgstr ""
5988
 
5989
+ #: includes/country-functions.php:1888
5990
  msgid "Zamora"
5991
  msgstr ""
5992
 
5993
+ #: includes/country-functions.php:1889
5994
  msgid "Zaragoza"
5995
  msgstr ""
5996
 
6092
  "of a purchase. HTML is accepted. Available template tags:"
6093
  msgstr ""
6094
 
6095
+ #: includes/deprecated-functions.php:517 includes/process-download.php:885
6096
  msgid "Sorry but you have hit your download limit for this file."
6097
  msgstr ""
6098
 
6099
+ #: includes/deprecated-functions.php:532 includes/download-functions.php:1260
6100
  msgid "Sorry but your download link has expired."
6101
  msgstr ""
6102
 
6104
  msgid "No payments matching your request were found."
6105
  msgstr ""
6106
 
6107
+ #: includes/download-functions.php:524
6108
  msgid "Bundle"
6109
  msgstr ""
6110
 
6156
  msgid "New download purchase - Order #%1$s"
6157
  msgstr ""
6158
 
6159
+ #: includes/emails/functions.php:200 includes/emails/template.php:212
 
 
 
 
6160
  msgid "Hello"
6161
  msgstr ""
6162
 
6163
+ #: includes/emails/functions.php:200 includes/emails/template.php:212
6164
  msgid "A %s purchase has been made"
6165
  msgstr ""
6166
 
6167
+ #: includes/emails/functions.php:201 includes/emails/template.php:213
6168
  msgid "%s sold:"
6169
  msgstr ""
6170
 
6171
+ #: includes/emails/functions.php:203 includes/emails/template.php:215
6172
  msgid "Purchased by: "
6173
  msgstr ""
6174
 
6175
+ #: includes/emails/functions.php:204 includes/emails/template.php:216
6176
  msgid "Amount: "
6177
  msgstr ""
6178
 
6179
+ #: includes/emails/functions.php:205 includes/emails/template.php:217
6180
  msgid "Payment Method: "
6181
  msgstr ""
6182
 
6183
+ #: includes/emails/functions.php:206 includes/emails/template.php:218
6184
  msgid "Thank you"
6185
  msgstr ""
6186
 
6327
 
6328
  #: includes/gateways/amazon-payments.php:1113
6329
  #: includes/gateways/amazon-payments.php:1167
6330
+ #: includes/gateways/paypal-standard.php:450
6331
+ #: includes/gateways/paypal-standard.php:457
6332
+ #: includes/gateways/paypal-standard.php:546
6333
+ #: includes/gateways/paypal-standard.php:556
6334
+ #: includes/gateways/paypal-standard.php:616
6335
+ #: includes/gateways/paypal-standard.php:625
6336
  msgid "IPN Error"
6337
  msgstr ""
6338
 
6490
  msgid "Payment creation failed before sending buyer to PayPal. Payment data: %s"
6491
  msgstr ""
6492
 
6493
+ #: includes/gateways/paypal-standard.php:450
6494
+ #: includes/gateways/paypal-standard.php:457
6495
  msgid "Invalid IPN verification response. IPN data: %s"
6496
  msgstr ""
6497
 
6498
+ #: includes/gateways/paypal-standard.php:546
6499
  msgid "Invalid business email in IPN response. IPN data: %s"
6500
  msgstr ""
6501
 
6502
+ #: includes/gateways/paypal-standard.php:549
6503
  msgid "Payment failed due to invalid PayPal business email."
6504
  msgstr ""
6505
 
6506
+ #: includes/gateways/paypal-standard.php:556
6507
  msgid "Invalid currency in IPN response. IPN data: %s"
6508
  msgstr ""
6509
 
6510
+ #: includes/gateways/paypal-standard.php:559
6511
  msgid "Payment failed due to invalid currency in PayPal IPN."
6512
  msgstr ""
6513
 
6514
+ #: includes/gateways/paypal-standard.php:616
6515
  msgid "Invalid payment amount in IPN response. IPN data: %s"
6516
  msgstr ""
6517
 
6518
+ #: includes/gateways/paypal-standard.php:619
6519
  msgid "Payment failed due to invalid amount in PayPal IPN."
6520
  msgstr ""
6521
 
6522
+ #: includes/gateways/paypal-standard.php:625
6523
  msgid "Invalid purchase key in IPN response. IPN data: %s"
6524
  msgstr ""
6525
 
6526
+ #: includes/gateways/paypal-standard.php:627
6527
  msgid "Payment failed due to invalid purchase key in PayPal IPN."
6528
  msgstr ""
6529
 
6530
+ #: includes/gateways/paypal-standard.php:633
6531
  #: tests/helpers/class-helper-payment.php:131
6532
  #: tests/helpers/class-helper-payment.php:234
6533
  #: tests/helpers/class-helper-payment.php:342
6538
  msgid "PayPal Transaction ID: %s"
6539
  msgstr ""
6540
 
6541
+ #: includes/gateways/paypal-standard.php:647
6542
  msgid "Payment made via eCheck and will clear automatically in 5-8 days"
6543
  msgstr ""
6544
 
6545
+ #: includes/gateways/paypal-standard.php:654
6546
  msgid ""
6547
  "Payment requires a confirmed customer address and must be accepted manually "
6548
  "through PayPal"
6549
  msgstr ""
6550
 
6551
+ #: includes/gateways/paypal-standard.php:660
6552
  msgid ""
6553
  "Payment must be accepted manually through PayPal due to international "
6554
  "account regulations"
6555
  msgstr ""
6556
 
6557
+ #: includes/gateways/paypal-standard.php:666
6558
  msgid ""
6559
  "Payment received in non-shop currency and must be accepted manually through "
6560
  "PayPal"
6561
  msgstr ""
6562
 
6563
+ #: includes/gateways/paypal-standard.php:673
6564
  msgid ""
6565
  "Payment is being reviewed by PayPal staff as high-risk or in possible "
6566
  "violation of government regulations"
6567
  msgstr ""
6568
 
6569
+ #: includes/gateways/paypal-standard.php:679
6570
  msgid "Payment was sent to non-confirmed or non-registered email address."
6571
  msgstr ""
6572
 
6573
+ #: includes/gateways/paypal-standard.php:685
6574
  msgid "PayPal account must be upgraded before this payment can be accepted"
6575
  msgstr ""
6576
 
6577
+ #: includes/gateways/paypal-standard.php:691
6578
  msgid ""
6579
  "PayPal account is not verified. Verify account in order to accept this "
6580
  "payment"
6581
  msgstr ""
6582
 
6583
+ #: includes/gateways/paypal-standard.php:697
6584
  msgid ""
6585
  "Payment is pending for unknown reasons. Contact PayPal support for "
6586
  "assistance"
6587
  msgstr ""
6588
 
6589
+ #: includes/gateways/paypal-standard.php:750
6590
  msgid "Partial PayPal refund processed: %s"
6591
  msgstr ""
6592
 
6593
+ #: includes/gateways/paypal-standard.php:755
6594
  msgid "PayPal Payment #%s Refunded for reason: %s"
6595
  msgstr ""
6596
 
6597
+ #: includes/gateways/paypal-standard.php:756
6598
  msgid "PayPal Refund Transaction ID: %s"
6599
  msgstr ""
6600
 
6601
+ #: includes/gateways/paypal-standard.php:1015
6602
  msgid "Refund Payment in PayPal"
6603
  msgstr ""
6604
 
6605
+ #: includes/gateways/paypal-standard.php:1164
6606
  msgid "PayPal refund failed for unknown reason."
6607
  msgstr ""
6608
 
6609
+ #: includes/gateways/paypal-standard.php:1174
6610
  msgid "PayPal refund transaction ID: %s"
6611
  msgstr ""
6612
 
6613
+ #: includes/gateways/paypal-standard.php:1178
6614
  msgid "PayPal refund failed: %s"
6615
  msgstr ""
6616
 
7154
  msgid "Purchase Verification Failed"
7155
  msgstr ""
7156
 
7157
+ #: includes/process-download.php:961
7158
  msgid "Invalid file"
7159
  msgstr ""
7160
 
7161
+ #: includes/process-download.php:968
7162
  msgid "The requested file could not be found. Error 404."
7163
  msgstr ""
7164
 
7165
+ #: includes/process-download.php:969
7166
  msgid "File not found"
7167
  msgstr ""
7168
 
7300
  msgid "You have already added this item to your cart"
7301
  msgstr ""
7302
 
7303
+ #: includes/scripts.php:89 includes/template-functions.php:187
7304
  msgid "Loading"
7305
  msgstr ""
7306
 
7424
  msgid "Purchase All Items"
7425
  msgstr ""
7426
 
7427
+ #: includes/shortcodes.php:689
7428
  msgid "Sorry, trouble retrieving payment receipt."
7429
  msgstr ""
7430
 
7431
+ #: includes/shortcodes.php:724
7432
  msgid "You must be logged in to view this payment receipt."
7433
  msgstr ""
7434
 
7435
+ #: includes/shortcodes.php:736
7436
  msgid "Receipt could not be retrieved, your purchase session has expired."
7437
  msgstr ""
7438
 
7439
+ #: includes/shortcodes.php:866
7440
  msgid "The passwords you entered do not match. Please try again."
7441
  msgstr ""
7442
 
7443
+ #: includes/shortcodes.php:876
7444
  msgid "The email you entered is invalid. Please enter a valid email."
7445
  msgstr ""
7446
 
7447
+ #: includes/shortcodes.php:881
7448
  msgid "The email you entered belongs to another user. Please use another."
7449
  msgstr ""
7450
 
7451
+ #: includes/shortcodes.php:956
7452
  msgid "Error removing email address from profile. Please try again later."
7453
  msgstr ""
7454
 
7460
  msgid "You are already logged in"
7461
  msgstr ""
7462
 
7463
+ #: includes/template-functions.php:144
7464
  msgid "Free"
7465
  msgstr ""
7466
 
7467
+ #: includes/template-functions.php:201
7468
  msgid "Added to cart"
7469
  msgstr ""
7470
 
7471
+ #: includes/template-functions.php:207
7472
  msgid "Includes %1$s&#37; tax"
7473
  msgstr ""
7474
 
7475
+ #: includes/template-functions.php:209
7476
  msgid "Excluding %1$s&#37; tax"
7477
  msgstr ""
7478
 
7479
+ #: includes/template-functions.php:494
7480
  msgid "White"
7481
  msgstr ""
7482
 
7483
+ #: includes/template-functions.php:498
7484
  msgid "Gray"
7485
  msgstr ""
7486
 
7487
+ #: includes/template-functions.php:502
7488
  msgid "Blue"
7489
  msgstr ""
7490
 
7491
+ #: includes/template-functions.php:506
7492
  msgid "Red"
7493
  msgstr ""
7494
 
7495
+ #: includes/template-functions.php:510
7496
  msgid "Green"
7497
  msgstr ""
7498
 
7499
+ #: includes/template-functions.php:514
7500
  msgid "Yellow"
7501
  msgstr ""
7502
 
7503
+ #: includes/template-functions.php:518
7504
  msgid "Orange"
7505
  msgstr ""
7506
 
7507
+ #: includes/template-functions.php:522
7508
  msgid "Dark Gray"
7509
  msgstr ""
7510
 
7511
+ #: includes/template-functions.php:526
7512
  msgid "Inherit"
7513
  msgstr ""
7514
 
7515
+ #: includes/template-functions.php:544
7516
  msgid "Button"
7517
  msgstr ""
7518
 
7519
+ #: includes/template-functions.php:545
7520
  msgid "Plain Text"
7521
  msgstr ""
7522
 
7523
+ #: includes/user-functions.php:567
7524
  msgid "[%s] New User Registration"
7525
  msgstr ""
7526
 
7527
+ #: includes/user-functions.php:568
7528
  msgid "New user registration"
7529
  msgstr ""
7530
 
7531
+ #: includes/user-functions.php:570
7532
  msgid "E-mail: %s"
7533
  msgstr ""
7534
 
7535
+ #: includes/user-functions.php:579
7536
  msgid "[%s] Your username and password"
7537
  msgstr ""
7538
 
7539
+ #: includes/user-functions.php:580
7540
  msgid "Your account info"
7541
  msgstr ""
7542
 
7543
+ #: includes/user-functions.php:584
7544
  msgid "Password entered at checkout"
7545
  msgstr ""
7546
 
7547
+ #: includes/user-functions.php:586
7548
  msgid "Password entered at registration"
7549
  msgstr ""
7550
 
7551
+ #: includes/user-functions.php:589
7552
  msgid "Password: %s"
7553
  msgstr ""
7554
 
7555
+ #: includes/user-functions.php:594
7556
  msgid "Click here to log in"
7557
  msgstr ""
7558
 
7559
+ #: includes/user-functions.php:598
7560
  msgid "To log in, visit: %s"
7561
  msgstr ""
7562
 
7563
+ #: includes/user-functions.php:756 includes/user-functions.php:757
7564
  msgid "Verify your account"
7565
  msgstr ""
7566
 
7567
+ #: includes/user-functions.php:759
7568
  msgid ""
7569
  "Hello %s,\n"
7570
  "\n"
7574
  "Link missing? Visit the following URL: %s"
7575
  msgstr ""
7576
 
7577
+ #: includes/user-functions.php:884
7578
  msgid ""
7579
  "Sorry but your account verification link has expired. <a href=\"%s\">Click "
7580
  "here</a> to request a new verification URL."
7581
  msgstr ""
7582
 
7583
+ #: includes/user-functions.php:917
7584
  msgid "You must be logged in to verify your account."
7585
  msgstr ""
7586
 
7587
+ #: includes/user-functions.php:917 includes/user-functions.php:921
7588
  msgid "Notice"
7589
  msgstr ""
7590
 
7591
+ #: includes/user-functions.php:921
7592
  msgid "Your account has already been verified."
7593
  msgstr ""
7594
 
7595
+ #: includes/user-functions.php:966
7596
  msgid "Invalid verification token provided."
7597
  msgstr ""
7598
 
7599
+ #: includes/user-functions.php:1071
7600
  msgid "Easy Digital Downloads <a href=\"%s\">iOS App</a>"
7601
  msgstr ""
7602
 
7603
+ #: includes/user-functions.php:1078
7604
  msgid "Add to iOS App"
7605
  msgstr ""
7606
 
7612
  msgid "Display the downloads shopping cart"
7613
  msgstr ""
7614
 
7615
+ #: includes/widgets.php:91 includes/widgets.php:202 includes/widgets.php:390
7616
  msgid "Title:"
7617
  msgstr ""
7618
 
7644
  msgid "Hide Empty Categories:"
7645
  msgstr ""
7646
 
7647
+ #: includes/widgets.php:243 includes/widgets.php:367
7648
  msgid "%s Details"
7649
  msgstr ""
7650
 
7652
  msgid "Display the details of a specific %s"
7653
  msgstr ""
7654
 
7655
+ #: includes/widgets.php:395
7656
  msgid "Display Type:"
7657
  msgstr ""
7658
 
7659
+ #: includes/widgets.php:396
7660
  msgid "Current"
7661
  msgstr ""
7662
 
7663
+ #: includes/widgets.php:397
7664
  msgid "Specific"
7665
  msgstr ""
7666
 
7667
+ #: includes/widgets.php:403
7668
  msgid "%s:"
7669
  msgstr ""
7670
 
7671
+ #: includes/widgets.php:421
7672
  msgid "%s ID"
7673
  msgstr ""
7674
 
7675
+ #: includes/widgets.php:428
7676
  msgid "Show %s Title"
7677
  msgstr ""
7678
 
7679
+ #: includes/widgets.php:434
7680
  msgid "Show Purchase Button"
7681
  msgstr ""
7682
 
7683
+ #: includes/widgets.php:441 includes/widgets.php:448
7684
  msgid "Show %s"
7685
  msgstr ""
7686
 
7973
  msgid "to"
7974
  msgstr ""
7975
 
7976
+ #: includes/admin/settings/register-settings.php:765
7977
+ #: includes/template-functions.php:79
7978
+ msgctxt "text shown on the Add to Cart Button when the product is already in the cart"
7979
+ msgid "Checkout"
7980
+ msgstr ""
7981
+
7982
  #: includes/checkout/template.php:741
7983
  msgctxt "Entering a discount code"
7984
  msgid "Click to enter it"
7989
  msgid "Apply"
7990
  msgstr ""
7991
 
7992
+ #: includes/class-edd-discount.php:1476
7993
  msgctxt "error shown when attempting to use a discount before its start date"
7994
  msgid "This discount is invalid."
7995
  msgstr ""
7996
 
7997
+ #: includes/class-edd-discount.php:1853
7998
  msgctxt "error for when a discount is invalid based on its configuration"
7999
  msgid "This discount is invalid."
8000
  msgstr ""
8019
  msgid "%2$s"
8020
  msgstr ""
8021
 
8022
+ #: includes/shortcodes.php:642
8023
  msgctxt "download post type name"
8024
  msgid "No %s found"
8025
  msgstr ""
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://easydigitaldownloads.com/donate/
6
  Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce, ecommerce, ebook
7
  Requires at least: 4.4
8
  Tested up to: 4.9.4
9
- Stable Tag: 2.8.18
10
  License: GNU Version 2 or Any Later Version
11
 
12
  The easiest way to sell digital products with WordPress.
@@ -190,6 +190,39 @@ Yes. Easy Digital Downloads also includes default support for Amazon Payments an
190
 
191
  == Changelog ==
192
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  = 2.8.18, February 6, 2018 =
194
 
195
  * Fix: Earnings report was incomplete and did not allow adding additional statuses.
6
  Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce, ecommerce, ebook
7
  Requires at least: 4.4
8
  Tested up to: 4.9.4
9
+ Stable Tag: 2.9
10
  License: GNU Version 2 or Any Later Version
11
 
12
  The easiest way to sell digital products with WordPress.
190
 
191
  == Changelog ==
192
 
193
+ = 2.9, March 15, 2018 =
194
+
195
+ * New: A message is now displayed on the [edd_register] shortcode when the user is already logged in.
196
+ * New: Support was added for resume and ranged download links.
197
+ * New: The customer name, email, and price ID was added to sales log export.
198
+ * New: Added ability to sort by sales/earnings in the [downloads] shortcode.
199
+ * New: Any page containing the [download_checkout] shortcode returns true for edd_is_checkout().
200
+ * New: Upgraded to the latest version of the Chosen library.
201
+ * New: Added United Kingdom Counties to pre-populated "states" list.
202
+ * New: EDD_Payment::add_note now escapes the HTML provided.
203
+ * New: Added the variable price ID to the download log entries.
204
+ * New: Added a helper to retrieve and filter discount status labels.
205
+ * Fix: Prevent a possible PHP Warning when no tax rate is entered, when taxes are enabled.
206
+ * Fix: PayPal Standard: Totals with discounts could calculate differently between EDD and PayPal, preventing completion of the purchase.
207
+ * Fix: Links would break when using SendGrid's link tracking feature.
208
+ * Fix: Download widget would cause PHP warnings when no tags were attached to a product.
209
+ * Fix: Improved support for payment method icons when not using a standard WP Install directory format.
210
+ * Fix: Prevent a possible corrupted download file by verifying no output buffers exists.
211
+ * Fix: Opt-in telemetry data was sending the incorrect Locale.
212
+ * Fix: Prevent a possible PHP Notice when editing a discount code.
213
+ * Fix: Checkboxes on Advanced Settings of variable prices would not always save on the first try.
214
+ * Fix: Hardcoded 'Checkout' text was not using the 'Add to Cart text' variable.
215
+ * Fix: Prices were possibly incorrect when using the Quick Edit feature.
216
+ * Tweak: The edd_get_download method now returns an `EDD_Download` object instead of a `WP_Post`.
217
+ * Tweak: Corrected some URLs to the EDD site that were using an old URL.
218
+ * Tweak: The customer UI now shows the country and state name, instead of their codes.
219
+ * Tweak: Removed the hyphen and "Go Back" button from discount screens.
220
+ * Tweak: The cart contents method returned boolean false instead of an empty array when the cart was empty.
221
+ * Tweak: Reduced the blocking calls in the opt-in telemetry requests to help with performance.
222
+ * Dev: Added filters for new user notification email.
223
+ * Dev: Added filter and email heading to New Sale Notifications.
224
+ * Dev: Added hooks before and after downloads shortcode grid.
225
+
226
  = 2.8.18, February 6, 2018 =
227
 
228
  * Fix: Earnings report was incomplete and did not allow adding additional statuses.