Download Monitor - Version 4.7.5

Version Description

  • 22.11.2022 = Fix: Installed extensions error - missing class
Download this release

Release Info

Developer raldea89
Plugin Icon 128x128 Download Monitor
Version 4.7.5
Comparing to
See all releases

Code changes from version 4.7.4 to 4.7.5

assets/js/chosen/chosen-sprite.png DELETED
Binary file
assets/js/chosen/chosen-sprite@2x.png DELETED
Binary file
assets/js/chosen/chosen.css DELETED
@@ -1,413 +0,0 @@
1
- /* @group Base */
2
- .chzn-container {
3
- font-size: 13px;
4
- position: relative;
5
- display: inline-block;
6
- zoom: 1;
7
- *display: inline;
8
- }
9
- .chzn-container .chzn-drop {
10
- background: #fff;
11
- border: 1px solid #aaa;
12
- border-top: 0;
13
- position: absolute;
14
- top: 29px;
15
- left: 0;
16
- -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
17
- -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
18
- box-shadow : 0 4px 5px rgba(0,0,0,.15);
19
- z-index: 1010;
20
- }
21
- /* @end */
22
-
23
- /* @group Single Chosen */
24
- .chzn-container-single .chzn-single {
25
- background-color: #ffffff;
26
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 );
27
- background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
28
- background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
29
- background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
30
- background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
31
- background-image: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
32
- -webkit-border-radius: 5px;
33
- -moz-border-radius : 5px;
34
- border-radius : 5px;
35
- -moz-background-clip : padding;
36
- -webkit-background-clip: padding-box;
37
- background-clip : padding-box;
38
- border: 1px solid #aaaaaa;
39
- -webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
40
- -moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
41
- box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
42
- display: block;
43
- overflow: hidden;
44
- white-space: nowrap;
45
- position: relative;
46
- height: 23px;
47
- line-height: 24px;
48
- padding: 0 0 0 8px;
49
- color: #444444;
50
- text-decoration: none;
51
- }
52
- .chzn-container-single .chzn-default {
53
- color: #999;
54
- }
55
- .chzn-container-single .chzn-single span {
56
- margin-right: 26px;
57
- display: block;
58
- overflow: hidden;
59
- white-space: nowrap;
60
- -o-text-overflow: ellipsis;
61
- -ms-text-overflow: ellipsis;
62
- text-overflow: ellipsis;
63
- }
64
- .chzn-container-single .chzn-single abbr {
65
- display: block;
66
- position: absolute;
67
- right: 26px;
68
- top: 6px;
69
- width: 12px;
70
- height: 12px;
71
- font-size: 1px;
72
- background: url('chosen-sprite.png') -42px 1px no-repeat;
73
- }
74
- .chzn-container-single .chzn-single abbr:hover {
75
- background-position: -42px -10px;
76
- }
77
- .chzn-container-single.chzn-disabled .chzn-single abbr:hover {
78
- background-position: -42px -10px;
79
- }
80
- .chzn-container-single .chzn-single div {
81
- position: absolute;
82
- right: 0;
83
- top: 0;
84
- display: block;
85
- height: 100%;
86
- width: 18px;
87
- }
88
- .chzn-container-single .chzn-single div b {
89
- background: url('chosen-sprite.png') no-repeat 0px 2px;
90
- display: block;
91
- width: 100%;
92
- height: 100%;
93
- }
94
- .chzn-container-single .chzn-search {
95
- padding: 3px 4px;
96
- position: relative;
97
- margin: 0;
98
- white-space: nowrap;
99
- z-index: 1010;
100
- }
101
- .chzn-container-single .chzn-search input {
102
- background: #fff url('chosen-sprite.png') no-repeat 100% -20px;
103
- background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
104
- background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
105
- background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
106
- background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
107
- background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
108
- margin: 1px 0;
109
- padding: 4px 20px 4px 5px;
110
- outline: 0;
111
- border: 1px solid #aaa;
112
- font-family: sans-serif;
113
- font-size: 1em;
114
- }
115
- .chzn-container-single .chzn-drop {
116
- -webkit-border-radius: 0 0 4px 4px;
117
- -moz-border-radius : 0 0 4px 4px;
118
- border-radius : 0 0 4px 4px;
119
- -moz-background-clip : padding;
120
- -webkit-background-clip: padding-box;
121
- background-clip : padding-box;
122
- }
123
- /* @end */
124
-
125
- .chzn-container-single-nosearch .chzn-search input {
126
- position: absolute;
127
- left: -9000px;
128
- }
129
-
130
- /* @group Multi Chosen */
131
- .chzn-container-multi .chzn-choices {
132
- background-color: #fff;
133
- background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
134
- background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
135
- background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
136
- background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
137
- background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
138
- border: 1px solid #aaa;
139
- margin: 0;
140
- padding: 0;
141
- cursor: text;
142
- overflow: hidden;
143
- height: auto !important;
144
- height: 1%;
145
- position: relative;
146
- }
147
- .chzn-container-multi .chzn-choices li {
148
- float: left;
149
- list-style: none;
150
- }
151
- .chzn-container-multi .chzn-choices .search-field {
152
- white-space: nowrap;
153
- margin: 0;
154
- padding: 0;
155
- }
156
- .chzn-container-multi .chzn-choices .search-field input {
157
- color: #666;
158
- background: transparent !important;
159
- border: 0 !important;
160
- font-family: sans-serif;
161
- font-size: 100%;
162
- height: 15px;
163
- padding: 5px;
164
- margin: 1px 0;
165
- outline: 0;
166
- -webkit-box-shadow: none;
167
- -moz-box-shadow : none;
168
- box-shadow : none;
169
- }
170
- .chzn-container-multi .chzn-choices .search-field .default {
171
- color: #999;
172
- }
173
- .chzn-container-multi .chzn-choices .search-choice {
174
- -webkit-border-radius: 3px;
175
- -moz-border-radius : 3px;
176
- border-radius : 3px;
177
- -moz-background-clip : padding;
178
- -webkit-background-clip: padding-box;
179
- background-clip : padding-box;
180
- background-color: #e4e4e4;
181
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
182
- background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
183
- background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
184
- background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
185
- background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
186
- background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
187
- -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
188
- -moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
189
- box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
190
- color: #333;
191
- border: 1px solid #aaaaaa;
192
- line-height: 13px;
193
- padding: 3px 20px 3px 5px;
194
- margin: 3px 0 3px 5px;
195
- position: relative;
196
- cursor: default;
197
- }
198
- .chzn-container-multi .chzn-choices .search-choice.search-choice-disabled {
199
- background-color: #e4e4e4;
200
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
201
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
202
- background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
203
- background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
204
- background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
205
- background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
206
- background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
207
- color: #666;
208
- border: 1px solid #cccccc;
209
- padding-right: 5px;
210
- }
211
- .chzn-container-multi .chzn-choices .search-choice-focus {
212
- background: #d4d4d4;
213
- }
214
- .chzn-container-multi .chzn-choices .search-choice .search-choice-close {
215
- display: block;
216
- position: absolute;
217
- right: 3px;
218
- top: 4px;
219
- width: 12px;
220
- height: 12px;
221
- font-size: 1px;
222
- background: url('chosen-sprite.png') -42px 1px no-repeat;
223
- }
224
- .chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
225
- background-position: -42px -10px;
226
- }
227
- .chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
228
- background-position: -42px -10px;
229
- }
230
- /* @end */
231
-
232
- /* @group Results */
233
- .chzn-container .chzn-results {
234
- margin: 0 4px 4px 0;
235
- max-height: 240px;
236
- padding: 0 0 0 4px;
237
- position: relative;
238
- overflow-x: hidden;
239
- overflow-y: auto;
240
- -webkit-overflow-scrolling: touch;
241
- }
242
- .chzn-container-multi .chzn-results {
243
- margin: -1px 0 0;
244
- padding: 0;
245
- }
246
- .chzn-container .chzn-results li {
247
- display: none;
248
- line-height: 15px;
249
- padding: 5px 6px;
250
- margin: 0;
251
- list-style: none;
252
- }
253
- .chzn-container .chzn-results .active-result {
254
- cursor: pointer;
255
- display: list-item;
256
- }
257
- .chzn-container .chzn-results .highlighted {
258
- background-color: #3875d7;
259
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 );
260
- background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
261
- background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
262
- background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
263
- background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
264
- background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
265
- color: #fff;
266
- }
267
- .chzn-container .chzn-results li em {
268
- background: #feffde;
269
- font-style: normal;
270
- }
271
- .chzn-container .chzn-results .highlighted em {
272
- background: transparent;
273
- }
274
- .chzn-container .chzn-results .no-results {
275
- background: #f4f4f4;
276
- display: list-item;
277
- }
278
- .chzn-container .chzn-results .group-result {
279
- cursor: default;
280
- color: #999;
281
- font-weight: bold;
282
- }
283
- .chzn-container .chzn-results .group-option {
284
- padding-left: 15px;
285
- }
286
- .chzn-container-multi .chzn-drop .result-selected {
287
- display: none;
288
- }
289
- .chzn-container .chzn-results-scroll {
290
- background: white;
291
- margin: 0 4px;
292
- position: absolute;
293
- text-align: center;
294
- width: 321px; /* This should by dynamic with js */
295
- z-index: 1;
296
- }
297
- .chzn-container .chzn-results-scroll span {
298
- display: inline-block;
299
- height: 17px;
300
- text-indent: -5000px;
301
- width: 9px;
302
- }
303
- .chzn-container .chzn-results-scroll-down {
304
- bottom: 0;
305
- }
306
- .chzn-container .chzn-results-scroll-down span {
307
- background: url('chosen-sprite.png') no-repeat -4px -3px;
308
- }
309
- .chzn-container .chzn-results-scroll-up span {
310
- background: url('chosen-sprite.png') no-repeat -22px -3px;
311
- }
312
- /* @end */
313
-
314
- /* @group Active */
315
- .chzn-container-active .chzn-single {
316
- -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
317
- -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
318
- box-shadow : 0 0 5px rgba(0,0,0,.3);
319
- border: 1px solid #5897fb;
320
- }
321
- .chzn-container-active .chzn-single-with-drop {
322
- border: 1px solid #aaa;
323
- -webkit-box-shadow: 0 1px 0 #fff inset;
324
- -moz-box-shadow : 0 1px 0 #fff inset;
325
- box-shadow : 0 1px 0 #fff inset;
326
- background-color: #eee;
327
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 );
328
- background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
329
- background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
330
- background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
331
- background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
332
- background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
333
- -webkit-border-bottom-left-radius : 0;
334
- -webkit-border-bottom-right-radius: 0;
335
- -moz-border-radius-bottomleft : 0;
336
- -moz-border-radius-bottomright: 0;
337
- border-bottom-left-radius : 0;
338
- border-bottom-right-radius: 0;
339
- }
340
- .chzn-container-active .chzn-single-with-drop div {
341
- background: transparent;
342
- border-left: none;
343
- }
344
- .chzn-container-active .chzn-single-with-drop div b {
345
- background-position: -18px 2px;
346
- }
347
- .chzn-container-active .chzn-choices {
348
- -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
349
- -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
350
- box-shadow : 0 0 5px rgba(0,0,0,.3);
351
- border: 1px solid #5897fb;
352
- }
353
- .chzn-container-active .chzn-choices .search-field input {
354
- color: #111 !important;
355
- }
356
- /* @end */
357
-
358
- /* @group Disabled Support */
359
- .chzn-disabled {
360
- cursor: default;
361
- opacity:0.5 !important;
362
- }
363
- .chzn-disabled .chzn-single {
364
- cursor: default;
365
- }
366
- .chzn-disabled .chzn-choices .search-choice .search-choice-close {
367
- cursor: default;
368
- }
369
-
370
- /* @group Right to Left */
371
- .chzn-rtl { text-align: right; }
372
- .chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; }
373
- .chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; }
374
-
375
- .chzn-rtl .chzn-single div { left: 3px; right: auto; }
376
- .chzn-rtl .chzn-single abbr {
377
- left: 26px;
378
- right: auto;
379
- }
380
- .chzn-rtl .chzn-choices .search-field input { direction: rtl; }
381
- .chzn-rtl .chzn-choices li { float: right; }
382
- .chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; }
383
- .chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; }
384
- .chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; }
385
- .chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; }
386
- .chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
387
- .chzn-rtl .chzn-search input {
388
- background: #fff url('chosen-sprite.png') no-repeat -30px -20px;
389
- background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
390
- background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
391
- background: url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
392
- background: url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
393
- background: url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
394
- padding: 4px 5px 4px 20px;
395
- direction: rtl;
396
- }
397
- .chzn-container-single.chzn-rtl .chzn-single div b {
398
- background-position: 6px 2px;
399
- }
400
- .chzn-container-single.chzn-rtl .chzn-single-with-drop div b {
401
- background-position: -12px 2px;
402
- }
403
- /* @end */
404
-
405
- /* @group Retina compatibility */
406
- @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
407
- .chzn-rtl .chzn-search input, .chzn-container-single .chzn-single abbr, .chzn-container-single .chzn-single div b, .chzn-container-single .chzn-search input, .chzn-container-multi .chzn-choices .search-choice .search-choice-close, .chzn-container .chzn-results-scroll-down span, .chzn-container .chzn-results-scroll-up span {
408
- background-image: url('chosen-sprite@2x.png') !important;
409
- background-repeat: no-repeat !important;
410
- background-size: 52px 37px !important;
411
- }
412
- }
413
- /* @end */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/chosen/chosen.jquery.js DELETED
@@ -1,1090 +0,0 @@
1
- // Chosen, a Select Box Enhancer for jQuery and Protoype
2
- // by Patrick Filler for Harvest, http://getharvest.com
3
- //
4
- // Version 0.9.12
5
- // Full source at https://github.com/harvesthq/chosen
6
- // Copyright (c) 2011 Harvest http://getharvest.com
7
-
8
- // MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
9
- // This file is generated by `cake build`, do not edit it by hand.
10
- (function() {
11
- var SelectParser;
12
-
13
- SelectParser = (function() {
14
-
15
- function SelectParser() {
16
- this.options_index = 0;
17
- this.parsed = [];
18
- }
19
-
20
- SelectParser.prototype.add_node = function(child) {
21
- if (child.nodeName.toUpperCase() === "OPTGROUP") {
22
- return this.add_group(child);
23
- } else {
24
- return this.add_option(child);
25
- }
26
- };
27
-
28
- SelectParser.prototype.add_group = function(group) {
29
- var group_position, option, _i, _len, _ref, _results;
30
- group_position = this.parsed.length;
31
- this.parsed.push({
32
- array_index: group_position,
33
- group: true,
34
- label: group.label,
35
- children: 0,
36
- disabled: group.disabled
37
- });
38
- _ref = group.childNodes;
39
- _results = [];
40
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
41
- option = _ref[_i];
42
- _results.push(this.add_option(option, group_position, group.disabled));
43
- }
44
- return _results;
45
- };
46
-
47
- SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
48
- if (option.nodeName.toUpperCase() === "OPTION") {
49
- if (option.text !== "") {
50
- if (group_position != null) {
51
- this.parsed[group_position].children += 1;
52
- }
53
- this.parsed.push({
54
- array_index: this.parsed.length,
55
- options_index: this.options_index,
56
- value: option.value,
57
- text: option.text,
58
- html: option.innerHTML,
59
- selected: option.selected,
60
- disabled: group_disabled === true ? group_disabled : option.disabled,
61
- group_array_index: group_position,
62
- classes: option.className,
63
- style: option.style.cssText
64
- });
65
- } else {
66
- this.parsed.push({
67
- array_index: this.parsed.length,
68
- options_index: this.options_index,
69
- empty: true
70
- });
71
- }
72
- return this.options_index += 1;
73
- }
74
- };
75
-
76
- return SelectParser;
77
-
78
- })();
79
-
80
- SelectParser.select_to_array = function(select) {
81
- var child, parser, _i, _len, _ref;
82
- parser = new SelectParser();
83
- _ref = select.childNodes;
84
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
85
- child = _ref[_i];
86
- parser.add_node(child);
87
- }
88
- return parser.parsed;
89
- };
90
-
91
- this.SelectParser = SelectParser;
92
-
93
- }).call(this);
94
-
95
- /*
96
- Chosen source: generate output using 'cake build'
97
- Copyright (c) 2011 by Harvest
98
- */
99
-
100
-
101
- (function() {
102
- var AbstractChosen, root;
103
-
104
- root = this;
105
-
106
- AbstractChosen = (function() {
107
-
108
- function AbstractChosen(form_field, options) {
109
- this.form_field = form_field;
110
- this.options = options != null ? options : {};
111
- this.is_multiple = this.form_field.multiple;
112
- this.set_default_text();
113
- this.set_default_values();
114
- this.setup();
115
- this.set_up_html();
116
- this.register_observers();
117
- this.finish_setup();
118
- }
119
-
120
- AbstractChosen.prototype.set_default_values = function() {
121
- var _this = this;
122
- this.click_test_action = function(evt) {
123
- return _this.test_active_click(evt);
124
- };
125
- this.activate_action = function(evt) {
126
- return _this.activate_field(evt);
127
- };
128
- this.active_field = false;
129
- this.mouse_on_container = false;
130
- this.results_showing = false;
131
- this.result_highlighted = null;
132
- this.result_single_selected = null;
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.search_contains = this.options.search_contains || false;
138
- this.choices = 0;
139
- this.single_backstroke_delete = this.options.single_backstroke_delete || false;
140
- this.max_selected_options = this.options.max_selected_options || Infinity;
141
- return this.inherit_select_classes = this.options.inherit_select_classes || false;
142
- };
143
-
144
- AbstractChosen.prototype.set_default_text = function() {
145
- if (this.form_field.getAttribute("data-placeholder")) {
146
- this.default_text = this.form_field.getAttribute("data-placeholder");
147
- } else if (this.is_multiple) {
148
- this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || "Select Some Options";
149
- } else {
150
- this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || "Select an Option";
151
- }
152
- return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || "No results match";
153
- };
154
-
155
- AbstractChosen.prototype.mouse_enter = function() {
156
- return this.mouse_on_container = true;
157
- };
158
-
159
- AbstractChosen.prototype.mouse_leave = function() {
160
- return this.mouse_on_container = false;
161
- };
162
-
163
- AbstractChosen.prototype.input_focus = function(evt) {
164
- var _this = this;
165
- if (this.is_multiple) {
166
- if (!this.active_field) {
167
- return setTimeout((function() {
168
- return _this.container_mousedown();
169
- }), 50);
170
- }
171
- } else {
172
- if (!this.active_field) {
173
- return this.activate_field();
174
- }
175
- }
176
- };
177
-
178
- AbstractChosen.prototype.input_blur = function(evt) {
179
- var _this = this;
180
- if (!this.mouse_on_container) {
181
- this.active_field = false;
182
- return setTimeout((function() {
183
- return _this.blur_test();
184
- }), 100);
185
- }
186
- };
187
-
188
- AbstractChosen.prototype.result_add_option = function(option) {
189
- var classes, style;
190
- if (!option.disabled) {
191
- option.dom_id = this.container_id + "_o_" + option.array_index;
192
- classes = option.selected && this.is_multiple ? [] : ["active-result"];
193
- if (option.selected) {
194
- classes.push("result-selected");
195
- }
196
- if (option.group_array_index != null) {
197
- classes.push("group-option");
198
- }
199
- if (option.classes !== "") {
200
- classes.push(option.classes);
201
- }
202
- style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : "";
203
- return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '"' + style + '>' + option.html + '</li>';
204
- } else {
205
- return "";
206
- }
207
- };
208
-
209
- AbstractChosen.prototype.results_update_field = function() {
210
- this.set_default_text();
211
- if (!this.is_multiple) {
212
- this.results_reset_cleanup();
213
- }
214
- this.result_clear_highlight();
215
- this.result_single_selected = null;
216
- return this.results_build();
217
- };
218
-
219
- AbstractChosen.prototype.results_toggle = function() {
220
- if (this.results_showing) {
221
- return this.results_hide();
222
- } else {
223
- return this.results_show();
224
- }
225
- };
226
-
227
- AbstractChosen.prototype.results_search = function(evt) {
228
- if (this.results_showing) {
229
- return this.winnow_results();
230
- } else {
231
- return this.results_show();
232
- }
233
- };
234
-
235
- AbstractChosen.prototype.keyup_checker = function(evt) {
236
- var stroke, _ref;
237
- stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
238
- this.search_field_scale();
239
- switch (stroke) {
240
- case 8:
241
- if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0) {
242
- return this.keydown_backstroke();
243
- } else if (!this.pending_backstroke) {
244
- this.result_clear_highlight();
245
- return this.results_search();
246
- }
247
- break;
248
- case 13:
249
- evt.preventDefault();
250
- if (this.results_showing) {
251
- return this.result_select(evt);
252
- }
253
- break;
254
- case 27:
255
- if (this.results_showing) {
256
- this.results_hide();
257
- }
258
- return true;
259
- case 9:
260
- case 38:
261
- case 40:
262
- case 16:
263
- case 91:
264
- case 17:
265
- break;
266
- default:
267
- return this.results_search();
268
- }
269
- };
270
-
271
- AbstractChosen.prototype.generate_field_id = function() {
272
- var new_id;
273
- new_id = this.generate_random_id();
274
- this.form_field.id = new_id;
275
- return new_id;
276
- };
277
-
278
- AbstractChosen.prototype.generate_random_char = function() {
279
- var chars, newchar, rand;
280
- chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
281
- rand = Math.floor(Math.random() * chars.length);
282
- return newchar = chars.substring(rand, rand + 1);
283
- };
284
-
285
- return AbstractChosen;
286
-
287
- })();
288
-
289
- root.AbstractChosen = AbstractChosen;
290
-
291
- }).call(this);
292
-
293
- /*
294
- Chosen source: generate output using 'cake build'
295
- Copyright (c) 2011 by Harvest
296
- */
297
-
298
-
299
- (function() {
300
- var $, Chosen, get_side_border_padding, root,
301
- __hasProp = {}.hasOwnProperty,
302
- __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; };
303
-
304
- root = this;
305
-
306
- $ = jQuery;
307
-
308
- $.fn.extend({
309
- chosen: function(options) {
310
- var browser, match, ua;
311
- ua = navigator.userAgent.toLowerCase();
312
- match = /(msie) ([\w.]+)/.exec(ua) || [];
313
- browser = {
314
- name: match[1] || "",
315
- version: match[2] || "0"
316
- };
317
- if (browser.name === "msie" && (browser.version === "6.0" || (browser.version === "7.0" && document.documentMode === 7))) {
318
- return this;
319
- }
320
- return this.each(function(input_field) {
321
- var $this;
322
- $this = $(this);
323
- if (!$this.hasClass("chzn-done")) {
324
- return $this.data('chosen', new Chosen(this, options));
325
- }
326
- });
327
- }
328
- });
329
-
330
- Chosen = (function(_super) {
331
-
332
- __extends(Chosen, _super);
333
-
334
- function Chosen() {
335
- return Chosen.__super__.constructor.apply(this, arguments);
336
- }
337
-
338
- Chosen.prototype.setup = function() {
339
- this.form_field_jq = $(this.form_field);
340
- this.current_value = this.form_field_jq.val();
341
- return this.is_rtl = this.form_field_jq.hasClass("chzn-rtl");
342
- };
343
-
344
- Chosen.prototype.finish_setup = function() {
345
- return this.form_field_jq.addClass("chzn-done");
346
- };
347
-
348
- Chosen.prototype.set_up_html = function() {
349
- var container_classes, container_div, container_props, dd_top, dd_width, sf_width;
350
- this.container_id = this.form_field.id.length ? this.form_field.id.replace(/[^\w]/g, '_') : this.generate_field_id();
351
- this.container_id += "_chzn";
352
- container_classes = ["chzn-container"];
353
- container_classes.push("chzn-container-" + (this.is_multiple ? "multi" : "single"));
354
- if (this.inherit_select_classes && this.form_field.className) {
355
- container_classes.push(this.form_field.className);
356
- }
357
- if (this.is_rtl) {
358
- container_classes.push("chzn-rtl");
359
- }
360
- this.f_width = this.form_field_jq.outerWidth();
361
- container_props = {
362
- id: this.container_id,
363
- "class": container_classes.join(' '),
364
- style: 'width: ' + this.f_width + 'px;',
365
- title: this.form_field.title
366
- };
367
- container_div = $("<div />", container_props);
368
- if (this.is_multiple) {
369
- container_div.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>');
370
- } else {
371
- container_div.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>');
372
- }
373
- this.form_field_jq.hide().after(container_div);
374
- this.container = $('#' + this.container_id);
375
- this.dropdown = this.container.find('div.chzn-drop').first();
376
- dd_top = this.container.height();
377
- dd_width = this.f_width - get_side_border_padding(this.dropdown);
378
- this.dropdown.css({
379
- "width": dd_width + "px",
380
- "top": dd_top + "px"
381
- });
382
- this.search_field = this.container.find('input').first();
383
- this.search_results = this.container.find('ul.chzn-results').first();
384
- this.search_field_scale();
385
- this.search_no_results = this.container.find('li.no-results').first();
386
- if (this.is_multiple) {
387
- this.search_choices = this.container.find('ul.chzn-choices').first();
388
- this.search_container = this.container.find('li.search-field').first();
389
- } else {
390
- this.search_container = this.container.find('div.chzn-search').first();
391
- this.selected_item = this.container.find('.chzn-single').first();
392
- sf_width = dd_width - get_side_border_padding(this.search_container) - get_side_border_padding(this.search_field);
393
- this.search_field.css({
394
- "width": sf_width + "px"
395
- });
396
- }
397
- this.results_build();
398
- this.set_tab_index();
399
- return this.form_field_jq.trigger("liszt:ready", {
400
- chosen: this
401
- });
402
- };
403
-
404
- Chosen.prototype.register_observers = function() {
405
- var _this = this;
406
- this.container.mousedown(function(evt) {
407
- _this.container_mousedown(evt);
408
- });
409
- this.container.mouseup(function(evt) {
410
- _this.container_mouseup(evt);
411
- });
412
- this.container.mouseenter(function(evt) {
413
- _this.mouse_enter(evt);
414
- });
415
- this.container.mouseleave(function(evt) {
416
- _this.mouse_leave(evt);
417
- });
418
- this.search_results.mouseup(function(evt) {
419
- _this.search_results_mouseup(evt);
420
- });
421
- this.search_results.mouseover(function(evt) {
422
- _this.search_results_mouseover(evt);
423
- });
424
- this.search_results.mouseout(function(evt) {
425
- _this.search_results_mouseout(evt);
426
- });
427
- this.form_field_jq.bind("liszt:updated", function(evt) {
428
- _this.results_update_field(evt);
429
- });
430
- this.form_field_jq.bind("liszt:activate", function(evt) {
431
- _this.activate_field(evt);
432
- });
433
- this.form_field_jq.bind("liszt:open", function(evt) {
434
- _this.container_mousedown(evt);
435
- });
436
- this.search_field.blur(function(evt) {
437
- _this.input_blur(evt);
438
- });
439
- this.search_field.keyup(function(evt) {
440
- _this.keyup_checker(evt);
441
- });
442
- this.search_field.keydown(function(evt) {
443
- _this.keydown_checker(evt);
444
- });
445
- this.search_field.focus(function(evt) {
446
- _this.input_focus(evt);
447
- });
448
- if (this.is_multiple) {
449
- return this.search_choices.click(function(evt) {
450
- _this.choices_click(evt);
451
- });
452
- } else {
453
- return this.container.click(function(evt) {
454
- evt.preventDefault();
455
- });
456
- }
457
- };
458
-
459
- Chosen.prototype.search_field_disabled = function() {
460
- this.is_disabled = this.form_field_jq[0].disabled;
461
- if (this.is_disabled) {
462
- this.container.addClass('chzn-disabled');
463
- this.search_field[0].disabled = true;
464
- if (!this.is_multiple) {
465
- this.selected_item.unbind("focus", this.activate_action);
466
- }
467
- return this.close_field();
468
- } else {
469
- this.container.removeClass('chzn-disabled');
470
- this.search_field[0].disabled = false;
471
- if (!this.is_multiple) {
472
- return this.selected_item.bind("focus", this.activate_action);
473
- }
474
- }
475
- };
476
-
477
- Chosen.prototype.container_mousedown = function(evt) {
478
- var target_closelink;
479
- if (!this.is_disabled) {
480
- target_closelink = evt != null ? ($(evt.target)).hasClass("search-choice-close") : false;
481
- if (evt && evt.type === "mousedown" && !this.results_showing) {
482
- evt.preventDefault();
483
- }
484
- if (!this.pending_destroy_click && !target_closelink) {
485
- if (!this.active_field) {
486
- if (this.is_multiple) {
487
- this.search_field.val("");
488
- }
489
- $(document).click(this.click_test_action);
490
- this.results_show();
491
- } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chzn-single").length)) {
492
- evt.preventDefault();
493
- this.results_toggle();
494
- }
495
- return this.activate_field();
496
- } else {
497
- return this.pending_destroy_click = false;
498
- }
499
- }
500
- };
501
-
502
- Chosen.prototype.container_mouseup = function(evt) {
503
- if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
504
- return this.results_reset(evt);
505
- }
506
- };
507
-
508
- Chosen.prototype.blur_test = function(evt) {
509
- if (!this.active_field && this.container.hasClass("chzn-container-active")) {
510
- return this.close_field();
511
- }
512
- };
513
-
514
- Chosen.prototype.close_field = function() {
515
- $(document).unbind("click", this.click_test_action);
516
- this.active_field = false;
517
- this.results_hide();
518
- this.container.removeClass("chzn-container-active");
519
- this.winnow_results_clear();
520
- this.clear_backstroke();
521
- this.show_search_field_default();
522
- return this.search_field_scale();
523
- };
524
-
525
- Chosen.prototype.activate_field = function() {
526
- this.container.addClass("chzn-container-active");
527
- this.active_field = true;
528
- this.search_field.val(this.search_field.val());
529
- return this.search_field.focus();
530
- };
531
-
532
- Chosen.prototype.test_active_click = function(evt) {
533
- if ($(evt.target).parents('#' + this.container_id).length) {
534
- return this.active_field = true;
535
- } else {
536
- return this.close_field();
537
- }
538
- };
539
-
540
- Chosen.prototype.results_build = function() {
541
- var content, data, _i, _len, _ref;
542
- this.parsing = true;
543
- this.results_data = root.SelectParser.select_to_array(this.form_field);
544
- if (this.is_multiple && this.choices > 0) {
545
- this.search_choices.find("li.search-choice").remove();
546
- this.choices = 0;
547
- } else if (!this.is_multiple) {
548
- this.selected_item.addClass("chzn-default").find("span").text(this.default_text);
549
- if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
550
- this.container.addClass("chzn-container-single-nosearch");
551
- } else {
552
- this.container.removeClass("chzn-container-single-nosearch");
553
- }
554
- }
555
- content = '';
556
- _ref = this.results_data;
557
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
558
- data = _ref[_i];
559
- if (data.group) {
560
- content += this.result_add_group(data);
561
- } else if (!data.empty) {
562
- content += this.result_add_option(data);
563
- if (data.selected && this.is_multiple) {
564
- this.choice_build(data);
565
- } else if (data.selected && !this.is_multiple) {
566
- this.selected_item.removeClass("chzn-default").find("span").text(data.text);
567
- if (this.allow_single_deselect) {
568
- this.single_deselect_control_build();
569
- }
570
- }
571
- }
572
- }
573
- this.search_field_disabled();
574
- this.show_search_field_default();
575
- this.search_field_scale();
576
- this.search_results.html(content);
577
- return this.parsing = false;
578
- };
579
-
580
- Chosen.prototype.result_add_group = function(group) {
581
- if (!group.disabled) {
582
- group.dom_id = this.container_id + "_g_" + group.array_index;
583
- return '<li id="' + group.dom_id + '" class="group-result">' + $("<div />").text(group.label).html() + '</li>';
584
- } else {
585
- return "";
586
- }
587
- };
588
-
589
- Chosen.prototype.result_do_highlight = function(el) {
590
- var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
591
- if (el.length) {
592
- this.result_clear_highlight();
593
- this.result_highlight = el;
594
- this.result_highlight.addClass("highlighted");
595
- maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
596
- visible_top = this.search_results.scrollTop();
597
- visible_bottom = maxHeight + visible_top;
598
- high_top = this.result_highlight.position().top + this.search_results.scrollTop();
599
- high_bottom = high_top + this.result_highlight.outerHeight();
600
- if (high_bottom >= visible_bottom) {
601
- return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
602
- } else if (high_top < visible_top) {
603
- return this.search_results.scrollTop(high_top);
604
- }
605
- }
606
- };
607
-
608
- Chosen.prototype.result_clear_highlight = function() {
609
- if (this.result_highlight) {
610
- this.result_highlight.removeClass("highlighted");
611
- }
612
- return this.result_highlight = null;
613
- };
614
-
615
- Chosen.prototype.results_show = function() {
616
- var dd_top;
617
- if (!this.is_multiple) {
618
- this.selected_item.addClass("chzn-single-with-drop");
619
- if (this.result_single_selected) {
620
- this.result_do_highlight(this.result_single_selected);
621
- }
622
- } else if (this.max_selected_options <= this.choices) {
623
- this.form_field_jq.trigger("liszt:maxselected", {
624
- chosen: this
625
- });
626
- return false;
627
- }
628
- dd_top = this.is_multiple ? this.container.height() : this.container.height() - 1;
629
- this.form_field_jq.trigger("liszt:showing_dropdown", {
630
- chosen: this
631
- });
632
- this.dropdown.css({
633
- "top": dd_top + "px",
634
- "left": 0
635
- });
636
- this.results_showing = true;
637
- this.search_field.focus();
638
- this.search_field.val(this.search_field.val());
639
- return this.winnow_results();
640
- };
641
-
642
- Chosen.prototype.results_hide = function() {
643
- if (!this.is_multiple) {
644
- this.selected_item.removeClass("chzn-single-with-drop");
645
- }
646
- this.result_clear_highlight();
647
- this.form_field_jq.trigger("liszt:hiding_dropdown", {
648
- chosen: this
649
- });
650
- this.dropdown.css({
651
- "left": "-9000px"
652
- });
653
- return this.results_showing = false;
654
- };
655
-
656
- Chosen.prototype.set_tab_index = function(el) {
657
- var ti;
658
- if (this.form_field_jq.attr("tabindex")) {
659
- ti = this.form_field_jq.attr("tabindex");
660
- this.form_field_jq.attr("tabindex", -1);
661
- return this.search_field.attr("tabindex", ti);
662
- }
663
- };
664
-
665
- Chosen.prototype.show_search_field_default = function() {
666
- if (this.is_multiple && this.choices < 1 && !this.active_field) {
667
- this.search_field.val(this.default_text);
668
- return this.search_field.addClass("default");
669
- } else {
670
- this.search_field.val("");
671
- return this.search_field.removeClass("default");
672
- }
673
- };
674
-
675
- Chosen.prototype.search_results_mouseup = function(evt) {
676
- var target;
677
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
678
- if (target.length) {
679
- this.result_highlight = target;
680
- this.result_select(evt);
681
- return this.search_field.focus();
682
- }
683
- };
684
-
685
- Chosen.prototype.search_results_mouseover = function(evt) {
686
- var target;
687
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
688
- if (target) {
689
- return this.result_do_highlight(target);
690
- }
691
- };
692
-
693
- Chosen.prototype.search_results_mouseout = function(evt) {
694
- if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
695
- return this.result_clear_highlight();
696
- }
697
- };
698
-
699
- Chosen.prototype.choices_click = function(evt) {
700
- evt.preventDefault();
701
- if (this.active_field && !($(evt.target).hasClass("search-choice" || $(evt.target).parents('.search-choice').first)) && !this.results_showing) {
702
- return this.results_show();
703
- }
704
- };
705
-
706
- Chosen.prototype.choice_build = function(item) {
707
- var choice_id, html, link,
708
- _this = this;
709
- if (this.is_multiple && this.max_selected_options <= this.choices) {
710
- this.form_field_jq.trigger("liszt:maxselected", {
711
- chosen: this
712
- });
713
- return false;
714
- }
715
- choice_id = this.container_id + "_c_" + item.array_index;
716
- this.choices += 1;
717
- if (item.disabled) {
718
- html = '<li class="search-choice search-choice-disabled" id="' + choice_id + '"><span>' + item.html + '</span></li>';
719
- } else {
720
- html = '<li class="search-choice" id="' + choice_id + '"><span>' + item.html + '</span><a href="javascript:void(0)" class="search-choice-close" rel="' + item.array_index + '"></a></li>';
721
- }
722
- this.search_container.before(html);
723
- link = $('#' + choice_id).find("a").first();
724
- return link.click(function(evt) {
725
- return _this.choice_destroy_link_click(evt);
726
- });
727
- };
728
-
729
- Chosen.prototype.choice_destroy_link_click = function(evt) {
730
- evt.preventDefault();
731
- if (!this.is_disabled) {
732
- this.pending_destroy_click = true;
733
- return this.choice_destroy($(evt.target));
734
- } else {
735
- return evt.stopPropagation;
736
- }
737
- };
738
-
739
- Chosen.prototype.choice_destroy = function(link) {
740
- if (this.result_deselect(link.attr("rel"))) {
741
- this.choices -= 1;
742
- this.show_search_field_default();
743
- if (this.is_multiple && this.choices > 0 && this.search_field.val().length < 1) {
744
- this.results_hide();
745
- }
746
- link.parents('li').first().remove();
747
- return this.search_field_scale();
748
- }
749
- };
750
-
751
- Chosen.prototype.results_reset = function() {
752
- this.form_field.options[0].selected = true;
753
- this.selected_item.find("span").text(this.default_text);
754
- if (!this.is_multiple) {
755
- this.selected_item.addClass("chzn-default");
756
- }
757
- this.show_search_field_default();
758
- this.results_reset_cleanup();
759
- this.form_field_jq.trigger("change");
760
- if (this.active_field) {
761
- return this.results_hide();
762
- }
763
- };
764
-
765
- Chosen.prototype.results_reset_cleanup = function() {
766
- this.current_value = this.form_field_jq.val();
767
- return this.selected_item.find("abbr").remove();
768
- };
769
-
770
- Chosen.prototype.result_select = function(evt) {
771
- var high, high_id, item, position;
772
- if (this.result_highlight) {
773
- high = this.result_highlight;
774
- high_id = high.attr("id");
775
- this.result_clear_highlight();
776
- if (this.is_multiple) {
777
- this.result_deactivate(high);
778
- } else {
779
- this.search_results.find(".result-selected").removeClass("result-selected");
780
- this.result_single_selected = high;
781
- this.selected_item.removeClass("chzn-default");
782
- }
783
- high.addClass("result-selected");
784
- position = high_id.substr(high_id.lastIndexOf("_") + 1);
785
- item = this.results_data[position];
786
- item.selected = true;
787
- this.form_field.options[item.options_index].selected = true;
788
- if (this.is_multiple) {
789
- this.choice_build(item);
790
- } else {
791
- this.selected_item.find("span").first().text(item.text);
792
- if (this.allow_single_deselect) {
793
- this.single_deselect_control_build();
794
- }
795
- }
796
- if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
797
- this.results_hide();
798
- }
799
- this.search_field.val("");
800
- if (this.is_multiple || this.form_field_jq.val() !== this.current_value) {
801
- this.form_field_jq.trigger("change", {
802
- 'selected': this.form_field.options[item.options_index].value
803
- });
804
- }
805
- this.current_value = this.form_field_jq.val();
806
- return this.search_field_scale();
807
- }
808
- };
809
-
810
- Chosen.prototype.result_activate = function(el) {
811
- return el.addClass("active-result");
812
- };
813
-
814
- Chosen.prototype.result_deactivate = function(el) {
815
- return el.removeClass("active-result");
816
- };
817
-
818
- Chosen.prototype.result_deselect = function(pos) {
819
- var result, result_data;
820
- result_data = this.results_data[pos];
821
- if (!this.form_field.options[result_data.options_index].disabled) {
822
- result_data.selected = false;
823
- this.form_field.options[result_data.options_index].selected = false;
824
- result = $("#" + this.container_id + "_o_" + pos);
825
- result.removeClass("result-selected").addClass("active-result").show();
826
- this.result_clear_highlight();
827
- this.winnow_results();
828
- this.form_field_jq.trigger("change", {
829
- deselected: this.form_field.options[result_data.options_index].value
830
- });
831
- this.search_field_scale();
832
- return true;
833
- } else {
834
- return false;
835
- }
836
- };
837
-
838
- Chosen.prototype.single_deselect_control_build = function() {
839
- if (this.allow_single_deselect && this.selected_item.find("abbr").length < 1) {
840
- return this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
841
- }
842
- };
843
-
844
- Chosen.prototype.winnow_results = function() {
845
- var found, option, part, parts, regex, regexAnchor, result, result_id, results, searchText, startpos, text, zregex, _i, _j, _len, _len1, _ref;
846
- this.no_results_clear();
847
- results = 0;
848
- searchText = this.search_field.val() === this.default_text ? "" : $('<div/>').text($.trim(this.search_field.val())).html();
849
- regexAnchor = this.search_contains ? "" : "^";
850
- regex = new RegExp(regexAnchor + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
851
- zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
852
- _ref = this.results_data;
853
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
854
- option = _ref[_i];
855
- if (!option.disabled && !option.empty) {
856
- if (option.group) {
857
- $('#' + option.dom_id).css('display', 'none');
858
- } else if (!(this.is_multiple && option.selected)) {
859
- found = false;
860
- result_id = option.dom_id;
861
- result = $("#" + result_id);
862
- if (regex.test(option.html)) {
863
- found = true;
864
- results += 1;
865
- } else if (this.enable_split_word_search && (option.html.indexOf(" ") >= 0 || option.html.indexOf("[") === 0)) {
866
- parts = option.html.replace(/\[|\]/g, "").split(" ");
867
- if (parts.length) {
868
- for (_j = 0, _len1 = parts.length; _j < _len1; _j++) {
869
- part = parts[_j];
870
- if (regex.test(part)) {
871
- found = true;
872
- results += 1;
873
- }
874
- }
875
- }
876
- }
877
- if (found) {
878
- if (searchText.length) {
879
- startpos = option.html.search(zregex);
880
- text = option.html.substr(0, startpos + searchText.length) + '</em>' + option.html.substr(startpos + searchText.length);
881
- text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
882
- } else {
883
- text = option.html;
884
- }
885
- result.html(text);
886
- this.result_activate(result);
887
- if (option.group_array_index != null) {
888
- $("#" + this.results_data[option.group_array_index].dom_id).css('display', 'list-item');
889
- }
890
- } else {
891
- if (this.result_highlight && result_id === this.result_highlight.attr('id')) {
892
- this.result_clear_highlight();
893
- }
894
- this.result_deactivate(result);
895
- }
896
- }
897
- }
898
- }
899
- if (results < 1 && searchText.length) {
900
- return this.no_results(searchText);
901
- } else {
902
- return this.winnow_results_set_highlight();
903
- }
904
- };
905
-
906
- Chosen.prototype.winnow_results_clear = function() {
907
- var li, lis, _i, _len, _results;
908
- this.search_field.val("");
909
- lis = this.search_results.find("li");
910
- _results = [];
911
- for (_i = 0, _len = lis.length; _i < _len; _i++) {
912
- li = lis[_i];
913
- li = $(li);
914
- if (li.hasClass("group-result")) {
915
- _results.push(li.css('display', 'auto'));
916
- } else if (!this.is_multiple || !li.hasClass("result-selected")) {
917
- _results.push(this.result_activate(li));
918
- } else {
919
- _results.push(void 0);
920
- }
921
- }
922
- return _results;
923
- };
924
-
925
- Chosen.prototype.winnow_results_set_highlight = function() {
926
- var do_high, selected_results;
927
- if (!this.result_highlight) {
928
- selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
929
- do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
930
- if (do_high != null) {
931
- return this.result_do_highlight(do_high);
932
- }
933
- }
934
- };
935
-
936
- Chosen.prototype.no_results = function(terms) {
937
- var no_results_html;
938
- no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
939
- no_results_html.find("span").first().html(terms);
940
- return this.search_results.append(no_results_html);
941
- };
942
-
943
- Chosen.prototype.no_results_clear = function() {
944
- return this.search_results.find(".no-results").remove();
945
- };
946
-
947
- Chosen.prototype.keydown_arrow = function() {
948
- var first_active, next_sib;
949
- if (!this.result_highlight) {
950
- first_active = this.search_results.find("li.active-result").first();
951
- if (first_active) {
952
- this.result_do_highlight($(first_active));
953
- }
954
- } else if (this.results_showing) {
955
- next_sib = this.result_highlight.nextAll("li.active-result").first();
956
- if (next_sib) {
957
- this.result_do_highlight(next_sib);
958
- }
959
- }
960
- if (!this.results_showing) {
961
- return this.results_show();
962
- }
963
- };
964
-
965
- Chosen.prototype.keyup_arrow = function() {
966
- var prev_sibs;
967
- if (!this.results_showing && !this.is_multiple) {
968
- return this.results_show();
969
- } else if (this.result_highlight) {
970
- prev_sibs = this.result_highlight.prevAll("li.active-result");
971
- if (prev_sibs.length) {
972
- return this.result_do_highlight(prev_sibs.first());
973
- } else {
974
- if (this.choices > 0) {
975
- this.results_hide();
976
- }
977
- return this.result_clear_highlight();
978
- }
979
- }
980
- };
981
-
982
- Chosen.prototype.keydown_backstroke = function() {
983
- var next_available_destroy;
984
- if (this.pending_backstroke) {
985
- this.choice_destroy(this.pending_backstroke.find("a").first());
986
- return this.clear_backstroke();
987
- } else {
988
- next_available_destroy = this.search_container.siblings("li.search-choice").last();
989
- if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
990
- this.pending_backstroke = next_available_destroy;
991
- if (this.single_backstroke_delete) {
992
- return this.keydown_backstroke();
993
- } else {
994
- return this.pending_backstroke.addClass("search-choice-focus");
995
- }
996
- }
997
- }
998
- };
999
-
1000
- Chosen.prototype.clear_backstroke = function() {
1001
- if (this.pending_backstroke) {
1002
- this.pending_backstroke.removeClass("search-choice-focus");
1003
- }
1004
- return this.pending_backstroke = null;
1005
- };
1006
-
1007
- Chosen.prototype.keydown_checker = function(evt) {
1008
- var stroke, _ref;
1009
- stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
1010
- this.search_field_scale();
1011
- if (stroke !== 8 && this.pending_backstroke) {
1012
- this.clear_backstroke();
1013
- }
1014
- switch (stroke) {
1015
- case 8:
1016
- this.backstroke_length = this.search_field.val().length;
1017
- break;
1018
- case 9:
1019
- if (this.results_showing && !this.is_multiple) {
1020
- this.result_select(evt);
1021
- }
1022
- this.mouse_on_container = false;
1023
- break;
1024
- case 13:
1025
- evt.preventDefault();
1026
- break;
1027
- case 38:
1028
- evt.preventDefault();
1029
- this.keyup_arrow();
1030
- break;
1031
- case 40:
1032
- this.keydown_arrow();
1033
- break;
1034
- }
1035
- };
1036
-
1037
- Chosen.prototype.search_field_scale = function() {
1038
- var dd_top, div, h, style, style_block, styles, w, _i, _len;
1039
- if (this.is_multiple) {
1040
- h = 0;
1041
- w = 0;
1042
- style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1043
- styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1044
- for (_i = 0, _len = styles.length; _i < _len; _i++) {
1045
- style = styles[_i];
1046
- style_block += style + ":" + this.search_field.css(style) + ";";
1047
- }
1048
- div = $('<div />', {
1049
- 'style': style_block
1050
- });
1051
- div.text(this.search_field.val());
1052
- $('body').append(div);
1053
- w = div.width() + 25;
1054
- div.remove();
1055
- if (w > this.f_width - 10) {
1056
- w = this.f_width - 10;
1057
- }
1058
- this.search_field.css({
1059
- 'width': w + 'px'
1060
- });
1061
- dd_top = this.container.height();
1062
- return this.dropdown.css({
1063
- "top": dd_top + "px"
1064
- });
1065
- }
1066
- };
1067
-
1068
- Chosen.prototype.generate_random_id = function() {
1069
- var string;
1070
- string = "sel" + this.generate_random_char() + this.generate_random_char() + this.generate_random_char();
1071
- while ($("#" + string).length > 0) {
1072
- string += this.generate_random_char();
1073
- }
1074
- return string;
1075
- };
1076
-
1077
- return Chosen;
1078
-
1079
- })(AbstractChosen);
1080
-
1081
- root.Chosen = Chosen;
1082
-
1083
- get_side_border_padding = function(elmt) {
1084
- var side_border_padding;
1085
- return side_border_padding = elmt.outerWidth() - elmt.width();
1086
- };
1087
-
1088
- root.get_side_border_padding = get_side_border_padding;
1089
-
1090
- }).call(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/chosen/chosen.jquery.min.js DELETED
@@ -1,10 +0,0 @@
1
- // Chosen, a Select Box Enhancer for jQuery and Protoype
2
- // by Patrick Filler for Harvest, http://getharvest.com
3
- //
4
- // Version 0.9.12
5
- // Full source at https://github.com/harvesthq/chosen
6
- // Copyright (c) 2011 Harvest http://getharvest.com
7
-
8
- // MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
9
- // This file is generated by `cake build`, do not edit it by hand.
10
- (function(){var e;e=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return e.nodeName.toUpperCase()==="OPTGROUP"?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,r,i,s,o;t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,children:0,disabled:e.disabled}),s=e.childNodes,o=[];for(r=0,i=s.length;r<i;r++)n=s[r],o.push(this.add_option(n,t,e.disabled));return o},e.prototype.add_option=function(e,t,n){if(e.nodeName.toUpperCase()==="OPTION")return e.text!==""?(t!=null&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:n===!0?n:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}(),e.select_to_array=function(t){var n,r,i,s,o;r=new e,o=t.childNodes;for(i=0,s=o.length;i<s;i++)n=o[i],r.add_node(n);return r.parsed},this.SelectParser=e}).call(this),function(){var e,t;t=this,e=function(){function e(e,t){this.form_field=e,this.options=t!=null?t:{},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.finish_setup()}return e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,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:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=this.options.enable_split_word_search!=null?this.options.enable_split_word_search:!0,this.search_contains=this.options.search_contains||!1,this.choices=0,this.single_backstroke_delete=this.options.single_backstroke_delete||!1,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1},e.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||"Select Some Options":this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||"Select an Option",this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||"No results match"},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){var t=this;if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return t.blur_test()},100)},e.prototype.result_add_option=function(e){var t,n;return e.disabled?"":(e.dom_id=this.container_id+"_o_"+e.array_index,t=e.selected&&this.is_multiple?[]:["active-result"],e.selected&&t.push("result-selected"),e.group_array_index!=null&&t.push("group-option"),e.classes!==""&&t.push(e.classes),n=e.style.cssText!==""?' style="'+e.style+'"':"",'<li id="'+e.dom_id+'" class="'+t.join(" ")+'"'+n+">"+e.html+"</li>")},e.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.keyup_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode,this.search_field_scale();switch(t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:e.preventDefault();if(this.results_showing)return this.result_select(e);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()}},e.prototype.generate_field_id=function(){var e;return e=this.generate_random_id(),this.form_field.id=e,e},e.prototype.generate_random_char=function(){var e,t,n;return e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=Math.floor(Math.random()*e.length),t=e.substring(n,n+1)},e}(),t.AbstractChosen=e}.call(this),function(){var e,t,n,r,i={}.hasOwnProperty,s=function(e,t){function r(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};r=this,e=jQuery,e.fn.extend({chosen:function(n){var r,i,s;return s=navigator.userAgent.toLowerCase(),i=/(msie) ([\w.]+)/.exec(s)||[],r={name:i[1]||"",version:i[2]||"0"},r.name==="msie"&&(r.version==="6.0"||r.version==="7.0"&&document.documentMode===7)?this:this.each(function(r){var i;i=e(this);if(!i.hasClass("chzn-done"))return i.data("chosen",new t(this,n))})}}),t=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return s(i,t),i.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_value=this.form_field_jq.val(),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},i.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},i.prototype.set_up_html=function(){var t,r,i,s,o,u;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/[^\w]/g,"_"):this.generate_field_id(),this.container_id+="_chzn",t=["chzn-container"],t.push("chzn-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chzn-rtl"),this.f_width=this.form_field_jq.outerWidth(),i={id:this.container_id,"class":t.join(" "),style:"width: "+this.f_width+"px;",title:this.form_field.title},r=e("<div />",i),this.is_multiple?r.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):r.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(r),this.container=e("#"+this.container_id),this.dropdown=this.container.find("div.chzn-drop").first(),s=this.container.height(),o=this.f_width-n(this.dropdown),this.dropdown.css({width:o+"px",top:s+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-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.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),u=o-n(this.search_container)-n(this.search_field),this.search_field.css({width:u+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},i.prototype.register_observers=function(){var e=this;return this.container.mousedown(function(t){e.container_mousedown(t)}),this.container.mouseup(function(t){e.container_mouseup(t)}),this.container.mouseenter(function(t){e.mouse_enter(t)}),this.container.mouseleave(function(t){e.mouse_leave(t)}),this.search_results.mouseup(function(t){e.search_results_mouseup(t)}),this.search_results.mouseover(function(t){e.search_results_mouseover(t)}),this.search_results.mouseout(function(t){e.search_results_mouseout(t)}),this.form_field_jq.bind("liszt:updated",function(t){e.results_update_field(t)}),this.form_field_jq.bind("liszt:activate",function(t){e.activate_field(t)}),this.form_field_jq.bind("liszt:open",function(t){e.container_mousedown(t)}),this.search_field.blur(function(t){e.input_blur(t)}),this.search_field.keyup(function(t){e.keyup_checker(t)}),this.search_field.keydown(function(t){e.keydown_checker(t)}),this.search_field.focus(function(t){e.input_focus(t)}),this.is_multiple?this.search_choices.click(function(t){e.choices_click(t)}):this.container.click(function(e){e.preventDefault()})},i.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled)return this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field();this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1;if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},i.prototype.container_mousedown=function(t){var n;if(!this.is_disabled)return n=t!=null?e(t.target).hasClass("search-choice-close"):!1,t&&t.type==="mousedown"&&!this.results_showing&&t.preventDefault(),!this.pending_destroy_click&&!n?(this.active_field?!this.is_multiple&&t&&(e(t.target)[0]===this.selected_item[0]||e(t.target).parents("a.chzn-single").length)&&(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(document).click(this.click_test_action),this.results_show()),this.activate_field()):this.pending_destroy_click=!1},i.prototype.container_mouseup=function(e){if(e.target.nodeName==="ABBR"&&!this.is_disabled)return this.results_reset(e)},i.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},i.prototype.close_field=function(){return e(document).unbind("click",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},i.prototype.activate_field=function(){return this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},i.prototype.test_active_click=function(t){return e(t.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){var e,t,n,i,s;this.parsing=!0,this.results_data=r.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),e="",s=this.results_data;for(n=0,i=s.length;n<i;n++)t=s[n],t.group?e+=this.result_add_group(t):t.empty||(e+=this.result_add_option(t),t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(t.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(e),this.parsing=!1},i.prototype.result_add_group=function(t){return t.disabled?"":(t.dom_id=this.container_id+"_g_"+t.array_index,'<li id="'+t.dom_id+'" class="group-result">'+e("<div />").text(t.label).html()+"</li>")},i.prototype.result_do_highlight=function(e){var t,n,r,i,s;if(e.length){this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),r=parseInt(this.search_results.css("maxHeight"),10),s=this.search_results.scrollTop(),i=r+s,n=this.result_highlight.position().top+this.search_results.scrollTop(),t=n+this.result_highlight.outerHeight();if(t>=i)return this.search_results.scrollTop(t-r>0?t-r:0);if(n<s)return this.search_results.scrollTop(n)}},i.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},i.prototype.results_show=function(){var e;if(!this.is_multiple)this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected);else if(this.max_selected_options<=this.choices)return this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1;return e=this.is_multiple?this.container.height():this.container.height()-1,this.form_field_jq.trigger("liszt:showing_dropdown",{chosen:this}),this.dropdown.css({top:e+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},i.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.form_field_jq.trigger("liszt:hiding_dropdown",{chosen:this}),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},i.prototype.set_tab_index=function(e){var t;if(this.form_field_jq.attr("tabindex"))return t=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.search_field.attr("tabindex",t)},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<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"))},i.prototype.search_results_mouseup=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n.length)return this.result_highlight=n,this.result_select(t),this.search_field.focus()},i.prototype.search_results_mouseover=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n)return this.result_do_highlight(n)},i.prototype.search_results_mouseout=function(t){if(e(t.target).hasClass("active-result"))return this.result_clear_highlight()},i.prototype.choices_click=function(t){t.preventDefault();if(this.active_field&&!e(t.target).hasClass("search-choice")&&!this.results_showing)return this.results_show()},i.prototype.choice_build=function(t){var n,r,i,s=this;return this.is_multiple&&this.max_selected_options<=this.choices?(this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1):(n=this.container_id+"_c_"+t.array_index,this.choices+=1,t.disabled?r='<li class="search-choice search-choice-disabled" id="'+n+'"><span>'+t.html+"</span></li>":r='<li class="search-choice" id="'+n+'"><span>'+t.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+t.array_index+'"></a></li>',this.search_container.before(r),i=e("#"+n).find("a").first(),i.click(function(e){return s.choice_destroy_link_click(e)}))},i.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),this.is_disabled?t.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(e(t.target)))},i.prototype.choice_destroy=function(e){if(this.result_deselect(e.attr("rel")))return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},i.prototype.results_reset=function(){this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},i.prototype.results_reset_cleanup=function(){return this.current_value=this.form_field_jq.val(),this.selected_item.find("abbr").remove()},i.prototype.result_select=function(e){var t,n,r,i;if(this.result_highlight)return t=this.result_highlight,n=t.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(t):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=t,this.selected_item.removeClass("chzn-default")),t.addClass("result-selected"),i=n.substr(n.lastIndexOf("_")+1),r=this.results_data[i],r.selected=!0,this.form_field.options[r.options_index].selected=!0,this.is_multiple?this.choice_build(r):(this.selected_item.find("span").first().text(r.text),this.allow_single_deselect&&this.single_deselect_control_build()),(!e.metaKey&&!e.ctrlKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field_jq.val()!==this.current_value)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[r.options_index].value}),this.current_value=this.form_field_jq.val(),this.search_field_scale()},i.prototype.result_activate=function(e){return e.addClass("active-result")},i.prototype.result_deactivate=function(e){return e.removeClass("active-result")},i.prototype.result_deselect=function(t){var n,r;return r=this.results_data[t],this.form_field.options[r.options_index].disabled?!1:(r.selected=!1,this.form_field.options[r.options_index].selected=!1,n=e("#"+this.container_id+"_o_"+t),n.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[r.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1)return this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>')},i.prototype.winnow_results=function(){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y;this.no_results_clear(),f=0,l=this.search_field.val()===this.default_text?"":e("<div/>").text(e.trim(this.search_field.val())).html(),o=this.search_contains?"":"^",s=new RegExp(o+l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),p=new RegExp(l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),y=this.results_data;for(d=0,m=y.length;d<m;d++){n=y[d];if(!n.disabled&&!n.empty)if(n.group)e("#"+n.dom_id).css("display","none");else if(!this.is_multiple||!n.selected){t=!1,a=n.dom_id,u=e("#"+a);if(s.test(n.html))t=!0,f+=1;else if(this.enable_split_word_search&&(n.html.indexOf(" ")>=0||n.html.indexOf("[")===0)){i=n.html.replace(/\[|\]/g,"").split(" ");if(i.length)for(v=0,g=i.length;v<g;v++)r=i[v],s.test(r)&&(t=!0,f+=1)}t?(l.length?(c=n.html.search(p),h=n.html.substr(0,c+l.length)+"</em>"+n.html.substr(c+l.length),h=h.substr(0,c)+"<em>"+h.substr(c)):h=n.html,u.html(h),this.result_activate(u),n.group_array_index!=null&&e("#"+this.results_data[n.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&a===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(u))}}return f<1&&l.length?this.no_results(l):this.winnow_results_set_highlight()},i.prototype.winnow_results_clear=function(){var t,n,r,i,s;this.search_field.val(""),n=this.search_results.find("li"),s=[];for(r=0,i=n.length;r<i;r++)t=n[r],t=e(t),t.hasClass("group-result")?s.push(t.css("display","auto")):!this.is_multiple||!t.hasClass("result-selected")?s.push(this.result_activate(t)):s.push(void 0);return s},i.prototype.winnow_results_set_highlight=function(){var e,t;if(!this.result_highlight){t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=t.length?t.first():this.search_results.find(".active-result").first();if(e!=null)return this.result_do_highlight(e)}},i.prototype.no_results=function(t){var n;return n=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),n.find("span").first().html(t),this.search_results.append(n)},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var t,n;this.result_highlight?this.results_showing&&(n=this.result_highlight.nextAll("li.active-result").first(),n&&this.result_do_highlight(n)):(t=this.search_results.find("li.active-result").first(),t&&this.result_do_highlight(e(t)));if(!this.results_showing)return this.results_show()},i.prototype.keyup_arrow=function(){var e;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},i.prototype.keydown_backstroke=function(){var e;if(this.pending_backstroke)return this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke();e=this.search_container.siblings("li.search-choice").last();if(e.length&&!e.hasClass("search-choice-disabled"))return this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode,this.search_field_scale(),t!==8&&this.pending_backstroke&&this.clear_backstroke();switch(t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},i.prototype.search_field_scale=function(){var t,n,r,i,s,o,u,a,f;if(this.is_multiple){r=0,u=0,s="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(a=0,f=o.length;a<f;a++)i=o[a],s+=i+":"+this.search_field.css(i)+";";return n=e("<div />",{style:s}),n.text(this.search_field.val()),e("body").append(n),u=n.width()+25,n.remove(),u>this.f_width-10&&(u=this.f_width-10),this.search_field.css({width:u+"px"}),t=this.container.height(),this.dropdown.css({top:t+"px"})}},i.prototype.generate_random_id=function(){var t;t="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(e("#"+t).length>0)t+=this.generate_random_char();return t},i}(AbstractChosen),r.Chosen=t,n=function(e){var t;return t=e.outerWidth()-e.width()},r.get_side_border_padding=n}.call(this);
 
 
 
 
 
 
 
 
 
 
changelog.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  = 4.7.4 - 21.12.2022 =
2
  Fix: Sorting by download count did not take into consideration the post meta ( [#1126](https://github.com/WPChill/download-monitor/issues/1126) )
3
  Fix: Reports Downloads CPT retrieval ( [#1128](https://github.com/WPChill/download-monitor/issues/1128) )
1
+ = 4.7.5 - 22.11.2022 =
2
+ Fix: Installed extensions error - missing class
3
+
4
  = 4.7.4 - 21.12.2022 =
5
  Fix: Sorting by download count did not take into consideration the post meta ( [#1126](https://github.com/WPChill/download-monitor/issues/1126) )
6
  Fix: Reports Downloads CPT retrieval ( [#1128](https://github.com/WPChill/download-monitor/issues/1128) )
download-monitor.php CHANGED
@@ -3,11 +3,11 @@
3
  Plugin Name: Download Monitor
4
  Plugin URI: https://www.download-monitor.com
5
  Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
- Version: 4.7.4
7
  Author: WPChill
8
  Author URI: https://wpchill.com
9
  Requires at least: 5.4
10
- Tested up to: 6.0
11
  Text Domain: download-monitor
12
 
13
  License: GPL v3
@@ -34,7 +34,7 @@ if ( ! defined( 'ABSPATH' ) ) {
34
 
35
  // Define DLM Version
36
 
37
- define( 'DLM_VERSION', '4.7.4' );
38
  define( 'DLM_UPGRADER_VERSION', '4.6.0' );
39
 
40
  // Define DLM FILE
3
  Plugin Name: Download Monitor
4
  Plugin URI: https://www.download-monitor.com
5
  Description: A full solution for managing and selling downloadable files, monitoring downloads and outputting download links and file information on your WordPress powered site.
6
+ Version: 4.7.5
7
  Author: WPChill
8
  Author URI: https://wpchill.com
9
  Requires at least: 5.4
10
+ Tested up to: 6.1
11
  Text Domain: download-monitor
12
 
13
  License: GPL v3
34
 
35
  // Define DLM Version
36
 
37
+ define( 'DLM_VERSION', '4.7.5' );
38
  define( 'DLM_UPGRADER_VERSION', '4.6.0' );
39
 
40
  // Define DLM FILE
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wpchill, silkalns, barrykooij, mikejolley
3
  Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection, password, protect downloads, tracker, sell, shop, ecommerce, paypal
4
  Requires at least: 5.4
5
  Tested up to: 6.1
6
- Stable tag: 4.7.4
7
  License: GPLv3
8
  Text Domain: -
9
  Requires PHP: 5.6
@@ -121,6 +121,9 @@ More documentation can be found in our [Knowledge Base](https://www.download-mon
121
 
122
  == Changelog ==
123
 
 
 
 
124
  = 4.7.4 - 21.11.2022 =
125
  Fix: Sorting by download count did not take into consideration the post meta ( [#1126](https://github.com/WPChill/download-monitor/issues/1126) )
126
  Fix: Reports Downloads CPT retrieval ( [#1128](https://github.com/WPChill/download-monitor/issues/1128) )
3
  Tags: download manager, document management, file manager, digital store, ecommerce, document management plugin, download monitor, download counter, password protection, download protection, password, protect downloads, tracker, sell, shop, ecommerce, paypal
4
  Requires at least: 5.4
5
  Tested up to: 6.1
6
+ Stable tag: 4.7.5
7
  License: GPLv3
8
  Text Domain: -
9
  Requires PHP: 5.6
121
 
122
  == Changelog ==
123
 
124
+ = 4.7.5 - 22.11.2022 =
125
+ Fix: Installed extensions error - missing class
126
+
127
  = 4.7.4 - 21.11.2022 =
128
  Fix: Sorting by download count did not take into consideration the post meta ( [#1126](https://github.com/WPChill/download-monitor/issues/1126) )
129
  Fix: Reports Downloads CPT retrieval ( [#1128](https://github.com/WPChill/download-monitor/issues/1128) )
src/Admin/Extensions.php CHANGED
@@ -377,6 +377,8 @@ class DLM_Admin_Extensions {
377
  if ( ! class_exists( 'WPChill_Welcome' ) ) {
378
  return;
379
  }
 
 
380
  echo '<div id="installed-extensions" class="settings_panel">';
381
 
382
  echo '<div class="dlm_extensions">';
377
  if ( ! class_exists( 'WPChill_Welcome' ) ) {
378
  return;
379
  }
380
+
381
+ $welcome = WPChill_Welcome::get_instance();
382
  echo '<div id="installed-extensions" class="settings_panel">';
383
 
384
  echo '<div class="dlm_extensions">';