nodebb-plugin-poll 1.1.7 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,651 +38,4 @@
38
38
 
39
39
  .poll-creator {
40
40
  z-index: 11000 !important;
41
- }
42
-
43
- /* flatpickr styles */
44
- .flatpickr-input {
45
- cursor: pointer;
46
- z-index: 1
47
- }
48
-
49
- .flatpickr-mobileInput {
50
- opacity: 0;
51
- visibility: hidden;
52
- position: absolute;
53
- width: 0;
54
- height: 0;
55
- box-sizing: border-box;
56
- padding: 0
57
- }
58
-
59
- .flatpickr-calendar {
60
- background: #fff;
61
- display: inline-block;
62
- max-height: 0;
63
- opacity: 0;
64
- visibility: hidden;
65
- text-align: center;
66
- padding: 0;
67
- animation: none;
68
- direction: ltr;
69
- border: 1px solid #e6e6e6;
70
- font-size: 14px;
71
- border-radius: 5px;
72
- position: absolute;
73
- min-width: 200px;
74
- max-width: 256px;
75
- box-sizing: border-box;
76
- }
77
-
78
- .flatpickr-calendar.open {
79
- opacity: 1;
80
- visibility: visible;
81
- max-height: 320px;
82
- z-index: 99999;
83
- animation: fadeInDown .5s cubic-bezier(0, 1, .5, 1)
84
- }
85
-
86
- .flatpickr-calendar.inline {
87
- margin-top: 2px;
88
- position: relative;
89
- opacity: 1;
90
- visibility: visible;
91
- max-height: 320px;
92
- display: block
93
- }
94
-
95
- .flatpickr-calendar.static {
96
- display: none;
97
- position: relative;
98
- }
99
-
100
- .flatpickr-calendar.static.open {
101
- display: block
102
- }
103
-
104
- .flatpickr-calendar.hasWeeks {
105
- max-width: 320px
106
- }
107
-
108
- .flatpickr-calendar.dateIsPicked.hasTime .flatpickr-time {
109
- height: 38px
110
- }
111
-
112
- .flatpickr-calendar:before,
113
- .flatpickr-calendar:after {
114
- position: absolute;
115
- display: block;
116
- pointer-events: none;
117
- border: solid transparent;
118
- content: '';
119
- height: 0;
120
- width: 0;
121
- left: 22px
122
- }
123
-
124
- .flatpickr-calendar:before {
125
- border-width: 5px;
126
- margin: 0 -5px
127
- }
128
-
129
- .flatpickr-calendar:after {
130
- border-width: 4px;
131
- margin: 0 -4px
132
- }
133
-
134
- .flatpickr-calendar.arrowTop:before,
135
- .flatpickr-calendar.arrowTop:after {
136
- bottom: 100%
137
- }
138
-
139
- .flatpickr-calendar.arrowTop:before {
140
- border-bottom-color: #e6e6e6
141
- }
142
-
143
- .flatpickr-calendar.arrowTop:after {
144
- border-bottom-color: #fff
145
- }
146
-
147
- .flatpickr-calendar.arrowBottom:before,
148
- .flatpickr-calendar.arrowBottom:after {
149
- top: 100%
150
- }
151
-
152
- .flatpickr-calendar.arrowBottom:before {
153
- border-top-color: #e6e6e6
154
- }
155
-
156
- .flatpickr-calendar.arrowBottom:after {
157
- border-top-color: #fff
158
- }
159
-
160
- .flatpickr-month {
161
- background: transparent;
162
- color: rgba(0, 0, 0, 0.8);
163
- fill: rgba(0, 0, 0, 0.8);
164
- height: 26px;
165
- text-align: center;
166
- position: relative
167
- }
168
-
169
- .flatpickr-prev-month,
170
- .flatpickr-next-month {
171
- text-decoration: none;
172
- cursor: pointer;
173
- position: absolute;
174
- top: 8px;
175
- height: 16px;
176
- }
177
-
178
- .flatpickr-prev-month i,
179
- .flatpickr-next-month i {
180
- position: relative
181
- }
182
-
183
- .flatpickr-prev-month.flatpickr-prev-month,
184
- .flatpickr-next-month.flatpickr-prev-month {
185
- /*
186
- /*rtl:begin:ignore*/
187
- left: 5px;
188
- /*
189
- /*rtl:end:ignore*/
190
- }
191
-
192
- /*
193
- /*rtl:begin:ignore*/
194
-
195
- /*
196
- /*rtl:end:ignore*/
197
-
198
- .flatpickr-prev-month.flatpickr-next-month,
199
- .flatpickr-next-month.flatpickr-next-month {
200
- /*
201
- /*rtl:begin:ignore*/
202
- right: 5px;
203
- /*
204
- /*rtl:end:ignore*/
205
- }
206
-
207
- /*
208
- /*rtl:begin:ignore*/
209
-
210
- /*
211
- /*rtl:end:ignore*/
212
-
213
- .flatpickr-prev-month svg,
214
- .flatpickr-next-month svg {
215
- width: 14px;
216
- }
217
-
218
- .flatpickr-prev-month svg path,
219
- .flatpickr-next-month svg path {
220
- transition: fill .1s;
221
- fill: inherit
222
- }
223
-
224
- .flatpickr-prev-month svg:hover,
225
- .flatpickr-next-month svg:hover {
226
- fill: #f64747
227
- }
228
-
229
- .flatpickr-prev-month:hover,
230
- .flatpickr-next-month:hover {
231
- color: #959ea9
232
- }
233
-
234
- .numInputWrapper {
235
- position: relative;
236
- height: auto;
237
- }
238
-
239
- .numInputWrapper input,
240
- .numInputWrapper span {
241
- display: inline-block
242
- }
243
-
244
- .numInputWrapper input {
245
- width: 100%
246
- }
247
-
248
- .numInputWrapper span {
249
- position: absolute;
250
- right: 0;
251
- width: 14px;
252
- padding: 0 4px 0 2px;
253
- height: 50%;
254
- line-height: 50%;
255
- opacity: 0;
256
- z-index: 9;
257
- cursor: pointer;
258
- border: 1px solid rgba(0, 0, 0, 0.05);
259
- box-sizing: border-box;
260
- }
261
-
262
- .numInputWrapper span:hover {
263
- background: rgba(0, 0, 0, 0.1)
264
- }
265
-
266
- .numInputWrapper span:active {
267
- background: rgba(0, 0, 0, 0.2)
268
- }
269
-
270
- .numInputWrapper span:after {
271
- display: block;
272
- content: "";
273
- position: absolute;
274
- top: 33%
275
- }
276
-
277
- .numInputWrapper span.arrowUp {
278
- top: 0;
279
- border-bottom: 0;
280
- }
281
-
282
- .numInputWrapper span.arrowUp:after {
283
- border-left: 4px solid transparent;
284
- border-right: 4px solid transparent;
285
- border-bottom: 4px solid rgba(0, 0, 0, 0.6)
286
- }
287
-
288
- .numInputWrapper span.arrowDown {
289
- top: 50%;
290
- }
291
-
292
- .numInputWrapper span.arrowDown:after {
293
- border-left: 4px solid transparent;
294
- border-right: 4px solid transparent;
295
- border-top: 4px solid rgba(0, 0, 0, 0.6)
296
- }
297
-
298
- .numInputWrapper span svg {
299
- width: inherit;
300
- height: auto;
301
- }
302
-
303
- .numInputWrapper span svg path {
304
- fill: rgba(0, 0, 0, 0.5)
305
- }
306
-
307
- .numInputWrapper:hover {
308
- background: rgba(0, 0, 0, 0.05);
309
- }
310
-
311
- .numInputWrapper:hover span {
312
- opacity: 1
313
- }
314
-
315
- .flatpickr-current-month {
316
- font-size: 135%;
317
- line-height: 1.35;
318
- font-weight: 300;
319
- color: inherit;
320
- position: absolute;
321
- width: 75%;
322
- left: 12.5%;
323
- top: 5px;
324
- display: inline-block;
325
- text-align: center;
326
- }
327
-
328
- .flatpickr-current-month span.cur-month {
329
- font-family: inherit;
330
- font-weight: 700;
331
- color: inherit;
332
- display: inline-block;
333
- margin-right: 4px
334
- }
335
-
336
- .flatpickr-current-month .numInputWrapper {
337
- width: 6ch;
338
- width: 7ch \0;
339
- display: inline-block
340
- }
341
-
342
- .flatpickr-current-month input.cur-year {
343
- background: transparent;
344
- box-sizing: border-box;
345
- color: inherit;
346
- cursor: default;
347
- padding: 0 0 0 .5ch;
348
- margin: 0;
349
- display: inline;
350
- font-size: inherit;
351
- font-family: inherit;
352
- font-weight: 300;
353
- line-height: inherit;
354
- height: initial;
355
- border: 0;
356
- border-radius: 0;
357
- vertical-align: initial;
358
- }
359
-
360
- .flatpickr-current-month input.cur-year:focus {
361
- outline: 0
362
- }
363
-
364
- .flatpickr-current-month input.cur-year[disabled],
365
- .flatpickr-current-month input.cur-year[disabled]:hover {
366
- font-size: 100%;
367
- color: rgba(0, 0, 0, 0.5);
368
- background: transparent;
369
- pointer-events: none
370
- }
371
-
372
- .flatpickr-weekdays {
373
- background: transparent;
374
- text-align: center;
375
- overflow: hidden
376
- }
377
-
378
- .flatpickr-days {
379
- padding: 1px;
380
- outline: 0;
381
- text-align: left;
382
- display: -webkit-flex;
383
- display: -ms-flexbox;
384
- display: flex;
385
- -webkit-flex-wrap: wrap;
386
- -ms-flex-wrap: wrap;
387
- flex-wrap: wrap;
388
- max-width: 100%;
389
- }
390
-
391
- .flatpickr-day {
392
- background: none;
393
- border: 1px solid transparent;
394
- border-radius: 150px;
395
- box-sizing: border-box;
396
- color: #393939;
397
- cursor: pointer;
398
- display: inline-block;
399
- display: -webkit-flex;
400
- display: -ms-flexbox;
401
- display: flex;
402
- display: inline-block;
403
- position: relative;
404
- -webkit-align-items: center;
405
- -ms-flex-align: center;
406
- align-items: center;
407
- -webkit-justify-content: center;
408
- -ms-flex-pack: center;
409
- justify-content: center;
410
- font-weight: 300;
411
- width: 14.28571%;
412
- height: 35px;
413
- line-height: 35px;
414
- margin: 0;
415
- text-align: center;
416
- transition: 50ms all ease-out;
417
- }
418
-
419
- .flatpickr-day.inRange,
420
- .flatpickr-day.prevMonthDay.inRange,
421
- .flatpickr-day.nextMonthDay.inRange,
422
- .flatpickr-day.today.inRange,
423
- .flatpickr-day.prevMonthDay.today.inRange,
424
- .flatpickr-day.nextMonthDay.today.inRange,
425
- .flatpickr-day:hover,
426
- .flatpickr-day.prevMonthDay:hover,
427
- .flatpickr-day.nextMonthDay:hover,
428
- .flatpickr-day:focus,
429
- .flatpickr-day.prevMonthDay:focus,
430
- .flatpickr-day.nextMonthDay:focus {
431
- cursor: pointer;
432
- outline: 0;
433
- background: #e6e6e6;
434
- border-color: #e6e6e6
435
- }
436
-
437
- .flatpickr-day.today {
438
- border-color: #959ea9;
439
- }
440
-
441
- .flatpickr-day.today:hover,
442
- .flatpickr-day.today:focus {
443
- border-color: #959ea9;
444
- background: #959ea9;
445
- color: #fff
446
- }
447
-
448
- .flatpickr-day.selected,
449
- .flatpickr-day.selected:focus,
450
- .flatpickr-day.selected:hover,
451
- .flatpickr-day.selected.prevMonthDay,
452
- .flatpickr-day.selected.nextMonthDay {
453
- background: #569ff7;
454
- color: #fff;
455
- border-color: #569ff7
456
- }
457
-
458
- .flatpickr-day.disabled,
459
- .flatpickr-day.disabled:hover,
460
- .flatpickr-day.prevMonthDay,
461
- .flatpickr-day.nextMonthDay,
462
- .flatpickr-day.notAllowed,
463
- .flatpickr-day.notAllowed.prevMonthDay,
464
- .flatpickr-day.notAllowed.nextMonthDay {
465
- color: rgba(57, 57, 57, 0.3);
466
- background: transparent;
467
- border-color: transparent;
468
- cursor: default
469
- }
470
-
471
- span.flatpickr-weekday {
472
- cursor: default;
473
- font-size: 90%;
474
- color: rgba(0, 0, 0, 0.54);
475
- height: 24px;
476
- line-height: 24px;
477
- margin: 0;
478
- background: transparent;
479
- text-align: center;
480
- display: block;
481
- float: left;
482
- width: 14.28%;
483
- font-weight: bold
484
- }
485
-
486
- .flatpickr-weekwrapper {
487
- display: inline-block;
488
- float: left;
489
- }
490
-
491
- .flatpickr-weekwrapper .flatpickr-weeks {
492
- border-right: 1px solid #e6e6e6
493
- }
494
-
495
- .flatpickr-weekwrapper .flatpickr-weekday {
496
- float: none;
497
- width: 100%
498
- }
499
-
500
- .flatpickr-weekwrapper span.flatpickr-day {
501
- display: block;
502
- width: 100%;
503
- margin-right: 1rem
504
- }
505
-
506
- .flatpickr-innerContainer {
507
- display: block;
508
- display: flex;
509
- }
510
-
511
- .flatpickr-innerContainer:after {
512
- display: inline-block;
513
- content: "";
514
- clear: both
515
- }
516
-
517
- .flatpickr-rContainer {
518
- display: inline-block
519
- }
520
-
521
- .flatpickr-time {
522
- text-align: center;
523
- border-top: 0;
524
- outline: 0;
525
- display: block;
526
- height: 0;
527
- line-height: 38px;
528
- max-height: 38px;
529
- box-sizing: border-box;
530
- overflow: hidden;
531
- transition: height .33s cubic-bezier(0, 1, .5, 1);
532
- }
533
-
534
- .flatpickr-time:after {
535
- content: "";
536
- display: table;
537
- clear: both
538
- }
539
-
540
- .flatpickr-time .numInputWrapper {
541
- width: 40%;
542
- height: 38px;
543
- float: left
544
- }
545
-
546
- .flatpickr-time.hasSeconds .numInputWrapper {
547
- width: 26%
548
- }
549
-
550
- .flatpickr-time input {
551
- background: transparent;
552
- box-shadow: none;
553
- border: 0;
554
- border-radius: 0;
555
- text-align: center;
556
- margin: 0;
557
- padding: 0;
558
- height: inherit;
559
- line-height: inherit;
560
- cursor: pointer;
561
- color: #393939;
562
- font-size: 14px;
563
- position: relative;
564
- box-sizing: border-box;
565
- }
566
-
567
- .flatpickr-time input.flatpickr-hour {
568
- font-weight: bold
569
- }
570
-
571
- .flatpickr-time input.flatpickr-minute,
572
- .flatpickr-time input.flatpickr-second {
573
- font-weight: 400
574
- }
575
-
576
- .flatpickr-time input:focus {
577
- outline: 0;
578
- border: 0
579
- }
580
-
581
- .flatpickr-time .flatpickr-time-separator,
582
- .flatpickr-time .flatpickr-am-pm {
583
- height: inherit;
584
- display: inline-block;
585
- float: left;
586
- line-height: inherit;
587
- color: #393939;
588
- font-weight: bold;
589
- width: 2%
590
- }
591
-
592
- .flatpickr-time .flatpickr-am-pm {
593
- outline: 0;
594
- width: 18%;
595
- cursor: pointer;
596
- text-align: center;
597
- font-weight: 400;
598
- }
599
-
600
- .flatpickr-time .flatpickr-am-pm:hover,
601
- .flatpickr-time .flatpickr-am-pm:focus {
602
- background: #f0f0f0
603
- }
604
-
605
- .hasWeeks .flatpickr-days,
606
- .hasTime .flatpickr-days {
607
- border-bottom: 0;
608
- border-bottom-right-radius: 0;
609
- border-bottom-left-radius: 0
610
- }
611
-
612
- .hasWeeks .flatpickr-days {
613
- border-left: 0
614
- }
615
-
616
- .dateIsPicked .flatpickr-innerContainer + .flatpickr-time {
617
- border-top: 1px solid #e6e6e6
618
- }
619
-
620
- .date {
621
- width: 100%;
622
- }
623
-
624
- .cal-icon {
625
- position: absolute;
626
- top: 0.8em;
627
- right: 1em;
628
- padding-right: 0.5em;
629
- z-index: 4;
630
- }
631
-
632
- @media all and (-ms-high-contrast: none) {
633
- .flatpickr-days {
634
- width: 256px
635
- }
636
-
637
- .flatpickr-month {
638
- padding: 0;
639
- }
640
-
641
- .flatpickr-month svg {
642
- top: 0 !important
643
- }
644
- }
645
-
646
- @-moz-keyframes fadeInDown {
647
- from {
648
- opacity: 0;
649
- transform: translate3d(0, -20px, 0)
650
- }
651
- to {
652
- opacity: 1;
653
- transform: none
654
- }
655
- }
656
-
657
- @-webkit-keyframes fadeInDown {
658
- from {
659
- opacity: 0;
660
- transform: translate3d(0, -20px, 0)
661
- }
662
- to {
663
- opacity: 1;
664
- transform: none
665
- }
666
- }
667
-
668
- @-o-keyframes fadeInDown {
669
- from {
670
- opacity: 0;
671
- transform: translate3d(0, -20px, 0)
672
- }
673
- to {
674
- opacity: 1;
675
- transform: none
676
- }
677
- }
678
-
679
- @keyframes fadeInDown {
680
- from {
681
- opacity: 0;
682
- transform: translate3d(0, -20px, 0)
683
- }
684
- to {
685
- opacity: 1;
686
- transform: none
687
- }
688
- }
41
+ }
@@ -3,17 +3,17 @@
3
3
 
4
4
  <div class="form-group">
5
5
  <label for="pollInputTitle">[[poll:poll_title]]</label>
6
- <input type="text" name="settings[title]" id="pollInputTitle" value="{poll.settings.title}" placeholder="[[poll:poll_title_placeholder]]" class="form-control">
6
+ <input type="text" name="settings.title" id="pollInputTitle" value="{poll.settings.title}" placeholder="[[poll:poll_title_placeholder]]" class="form-control">
7
7
  </div>
8
8
 
9
9
  <div class="form-group">
10
10
  <label for="pollInputOptions">[[poll:options_title]]</label>
11
11
  <!-- IF poll.options.length -->
12
12
  <!-- BEGIN poll.options -->
13
- <input type="text" name="options[]" id="pollInputOptions" value="{@value}" class="form-control"/>
13
+ <input type="text" name="options" id="pollInputOptions" value="{@value}" class="form-control"/>
14
14
  <!-- END poll.options -->
15
15
  <!-- ELSE -->
16
- <input type="text" name="options[]" id="pollInputOptions" class="form-control"/>
16
+ <input type="text" name="options" id="pollInputOptions" class="form-control"/>
17
17
  <!-- ENDIF poll.options.length -->
18
18
  <button type="button" id="pollAddOption" class="btn btn-primary btn-sm btn-block">[[poll:options_add]]</button>
19
19
  </div>
@@ -22,13 +22,13 @@
22
22
 
23
23
  <div class="form-group">
24
24
  <label for="pollInputAmount">[[poll:max_votes]]</label>
25
- <input type="number" name="settings[maxvotes]" id="pollInputAmount" value="{poll.settings.maxvotes}"
25
+ <input type="number" name="settings.maxvotes" id="pollInputAmount" value="{poll.settings.maxvotes}"
26
26
  min="1" max="10" step="1" placeholder="[[poll:max_votes_placeholder]]" class="form-control">
27
27
  </div>
28
28
 
29
29
  <div class="form-group">
30
30
  <label for="pollDisallowVoteUpdate">
31
- <input type="checkbox" name="settings[disallowVoteUpdate]" id="pollDisallowVoteUpdate">
31
+ <input type="checkbox" name="settings.disallowVoteUpdate" id="pollDisallowVoteUpdate" {{{if poll.settings.disallowVoteUpdate}}}checked{{{end}}}>
32
32
  [[poll:disallow_vote_update]]
33
33
  </label>
34
34
  </div>
@@ -36,11 +36,9 @@
36
36
  <div class="form-group">
37
37
  <label for="pollInputEnd">[[poll:auto_end_title]]</label>
38
38
 
39
- <div class='input-group date'>
40
- <p id="pollInputEnd">
41
- <input placeholder="[[poll:auto_end_placeholder]]" name="settings[end]" class="form-control" value="{poll.settings.end}" data-input>
42
- <a class="cal-icon" data-toggle><i class="fa fa-calendar"></i></a>
43
- </p>
39
+ <div class="input-group date flatpickr">
40
+ <input id="pollInputEnd" placeholder="[[poll:auto_end_placeholder]]" name="settings.end" class="form-control" value="{poll.settings.end}" data-input>
41
+ <a class="input-group-addon" data-toggle><i class="fa fa-calendar"></i></a>
44
42
  </div>
45
43
  <p class="help-block">[[poll:auto_end_help]]</p>
46
44
  </div>