View | Details | Raw Unified | Return to bug 17015
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/css/discretecalendar.css (-213 lines)
Lines 1-213 Link Here
1
#jcalendar-container .ui-datepicker {
2
    float: left;
3
    font-size: 185%;
4
}
5
6
#holidayweeklyrepeatable,
7
#holidaysyearlyrepeatable,
8
#holidaysunique,
9
#holidayexceptions {
10
    font-size: 90%;
11
    margin-bottom: 1em;
12
}
13
14
#showHoliday {
15
    margin: .5em 0;
16
}
17
18
.key {
19
    padding: 3px;
20
    white-space: nowrap;
21
    line-height: 230%;
22
}
23
24
.ui-datepicker {
25
    font-size: 150%;
26
}
27
28
.ui-datepicker th,
29
.ui-datepicker .ui-datepicker-title select {
30
    font-size: 80%;
31
}
32
33
.ui-datepicker td a {
34
    padding: .5em;
35
}
36
37
.ui-datepicker td span {
38
    padding: .5em;
39
    border: 1px solid #BCBCBC;
40
}
41
42
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
43
    font-size: 80%;
44
}
45
46
.key {
47
    padding: 3px;
48
    white-space: nowrap;
49
    line-height: 230%;
50
}
51
52
.normalday {
53
    background-color: #EDEDED;
54
    color: #000;
55
    border: 1px solid #BCBCBC;
56
}
57
58
.ui-datepicker-unselectable {
59
    padding: .5em;
60
    white-space: nowrap;
61
}
62
63
.ui-state-disabled {
64
    padding: .5em;
65
    white-space: nowrap;
66
}
67
68
.exception {
69
    background-color: #b3d4ff;
70
    color: #000;
71
    border: 1px solid #BCBCBC;
72
}
73
74
.past-date {
75
    background-color: #e6e6e6;
76
    color: #555;
77
    border: 1px solid #BCBCBC;
78
}
79
80
td.past-date a.ui-state-default {
81
    background: #e6e6e6;
82
    color: #555;
83
}
84
85
.float {
86
    background-color: #6f3;
87
    color: #000;
88
    border: 1px solid #BCBCBC;
89
}
90
91
.holiday {
92
    background-color: #ffaeae;
93
    color: #000;
94
    border: 1px solid #BCBCBC;
95
}
96
97
.repeatableweekly {
98
    background-color: #FF9;
99
    color: #000;
100
    border: 1px solid #BCBCBC;
101
}
102
103
.repeatableyearly {
104
    background-color: #FC6;
105
    color: #000;
106
    border: 1px solid #BCBCBC;
107
}
108
109
td.exception a.ui-state-default {
110
    background: #b3d4ff none;
111
    color: #000;
112
    border: 1px solid #BCBCBC;
113
}
114
115
td.float a.ui-state-default {
116
    background: #6f3 none;
117
    color: #000;
118
    border: 1px solid #BCBCBC;
119
}
120
121
td.holiday a.ui-state-default {
122
    background: #ffaeae none;
123
    color: #000;
124
    border: 1px solid #BCBCBC;
125
}
126
127
td.repeatableweekly a.ui-state-default {
128
    background: #FF9 none;
129
    color: #000;
130
    border: 1px solid #BCBCBC;
131
}
132
133
td.repeatableyearly a.ui-state-default {
134
    background: #FC6 none;
135
    color: #000;
136
    border: 1px solid #BCBCBC;
137
}
138
139
.information {
140
    background-color: #DCD2F1;
141
    width: 300px;
142
    display: none;
143
    border: 1px solid #000;
144
    color: #000;
145
    font-size: 8pt;
146
    font-weight: 700;
147
    background-color: #FFD700;
148
    cursor: pointer;
149
    padding: 2px;
150
}
151
152
.panel {
153
    z-index: 1;
154
    display: none;
155
    float: left;
156
    border: 3px solid #CCC;
157
    padding: 3px;
158
    margin-top: .3em;
159
    margin-left: 15px;
160
    background-color: #FEFEFE;
161
}
162
163
fieldset.brief {
164
    border: 0;
165
    margin: 0;
166
}
167
168
h1 select {
169
    width: 20em;
170
}
171
172
fieldset.brief ol {
173
    font-size: 100%;
174
}
175
176
fieldset.brief li,
177
fieldset.brief li.radio {
178
    padding: .2em 0;
179
}
180
181
.CopyDatePanel {
182
    margin-left: 15px;
183
}
184
185
.help {
186
    margin: .3em 0;
187
    border: 1px solid #EEE;
188
    padding: .3em .7em;
189
    font-size: 90%;
190
}
191
192
.calendar td,
193
.calendar th,
194
.calendar .button,
195
.calendar tbody .day {
196
    padding: .7em;
197
    font-size: 110%;
198
}
199
200
.calendar {
201
    width: auto;
202
    border: 0;
203
}
204
205
.copyHoliday form li {
206
    display: table-row;
207
}
208
209
.copyHoliday form li b,
210
.copyHoliday form li input {
211
    display: table-cell;
212
    margin-bottom: 2px;
213
}
(-)a/koha-tmpl/intranet-tmpl/prog/css/src/calendar.scss (+31 lines)
Lines 1-8 Link Here
1
$daySize: 45px;
1
$daySize: 45px;
2
$pastdate_bg: #E6E6E6;
3
$normalday_bg: #F4F8F9;
2
$exception_bg: #B3D4FF;
4
$exception_bg: #B3D4FF;
3
$holiday_bg: #FFAEAE;
5
$holiday_bg: #FFAEAE;
4
$repeatableweekly_bg: #FFFF99;
6
$repeatableweekly_bg: #FFFF99;
5
$repeatableyearly_bg: #FFCC66;
7
$repeatableyearly_bg: #FFCC66;
8
$float_bg: #66FF33;
6
$selected: #B9DB88;
9
$selected: #B9DB88;
7
10
8
@import "flatpickr";
11
@import "flatpickr";
Lines 32-37 $selected: #B9DB88; Link Here
32
    &.repeatableyearly {
35
    &.repeatableyearly {
33
        background-color: $repeatableyearly_bg;
36
        background-color: $repeatableyearly_bg;
34
    }
37
    }
38
39
    &.float {
40
        background-color: $float_bg;
41
    }
35
}
42
}
36
43
37
.flatpickr-day {
44
.flatpickr-day {
Lines 40-45 $selected: #B9DB88; Link Here
40
        border: 0;
47
        border: 0;
41
    }
48
    }
42
49
50
    &.past-date {
51
        background-color: $pastdate_bg;
52
53
        &.selected {
54
            border:3px solid $selected;
55
        }
56
57
        &:hover {
58
            background-color: #CCC;
59
        }
60
    }
61
43
    &.exception {
62
    &.exception {
44
        background-color: $exception_bg;
63
        background-color: $exception_bg;
45
64
Lines 71-76 $selected: #B9DB88; Link Here
71
            border: 3px solid $selected;
90
            border: 3px solid $selected;
72
        }
91
        }
73
    }
92
    }
93
94
    &.float {
95
        background-color: $float_bg;
96
97
        .selected {
98
            border: 3px solid $selected;
99
        }
100
    }
74
}
101
}
75
102
76
#holidayexceptions th.exception {
103
#holidayexceptions th.exception {
Lines 93-98 $selected: #B9DB88; Link Here
93
    background-color: $repeatableyearly_bg;
120
    background-color: $repeatableyearly_bg;
94
}
121
}
95
122
123
#holidaysfloat th.float {
124
    background-color: $float_bg;
125
}
126
96
.panel {
127
.panel {
97
    border: 1px solid #8AC363;
128
    border: 1px solid #8AC363;
98
    box-shadow: none;
129
    box-shadow: none;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/discrete_calendar.tt (-72 / +73 lines)
Lines 5-11 Link Here
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
<title>[% Branches.GetName( branch ) | html %] calendar; Tools &rsaquo; Koha &rsaquo</title>
6
<title>[% Branches.GetName( branch ) | html %] calendar; Tools &rsaquo; Koha &rsaquo</title>
7
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
8
[% Asset.css("css/discretecalendar.css") | $raw %]
8
[% Asset.css("css/calendar.css") | $raw %]
9
</head>
9
</head>
10
10
11
<body id="tools_holidays" class="tools">
11
<body id="tools_holidays" class="tools">
Lines 80-86 Link Here
80
80
81
                        <h3>Calendar information</h3>
81
                        <h3>Calendar information</h3>
82
82
83
                        <div id="jcalendar-container"></div>
83
                        <span id="calendar-anchor"></span>
84
84
85
                        <!-- ***************************** Panel to deal with new holidays ********************** -->
85
                        <!-- ***************************** Panel to deal with new holidays ********************** -->
86
                        <div class="panel newHoliday" id="newHoliday">
86
                        <div class="panel newHoliday" id="newHoliday">
Lines 110-116 Link Here
110
                                        </li>
110
                                        </li>
111
                                        <li class="dateinsert">
111
                                        <li class="dateinsert">
112
                                            <strong>To date:</strong>
112
                                            <strong>To date:</strong>
113
                                            <input type="text" id="to_date_datepicker" size="20" class="datepicker" />
113
                                            <input type="text" id="to_date_flatpickr" size="20" />
114
                                        </li>
114
                                        </li>
115
                                        <li>
115
                                        <li>
116
                                            <label for="title">Title: </label>
116
                                            <label for="title">Title: </label>
Lines 162-170 Link Here
162
                                        </li>
162
                                        </li>
163
                                        <li class="CopyDatePanel">
163
                                        <li class="CopyDatePanel">
164
                                            <label>From:</label>
164
                                            <label>From:</label>
165
                                            <input type="text" id="copyto_from_datepicker" size="20" class="datepicker"/>
165
                                            <input type="text" id="copyto_from_flatpickr" size="20"/>
166
                                            <label>To:</label>
166
                                            <label>To:</label>
167
                                            <input type="text" id="copyto_to_datepicker" size="20" class="datepicker"/>
167
                                            <input type="text" id="copyto_to_flatpickr" size="20"/>
168
                                        </li>
168
                                        </li>
169
                                    </ol>
169
                                    </ol>
170
170
Lines 214-224 Link Here
214
                        <div id="holiday-list">
214
                        <div id="holiday-list">
215
                            [% IF ( NEED_VALIDATION_HOLIDAYS ) %]
215
                            [% IF ( NEED_VALIDATION_HOLIDAYS ) %]
216
                            <h3>Need validation holidays</h3>
216
                            <h3>Need validation holidays</h3>
217
                            <table id="holidaysunique">
217
                            <table id="holidaysvalidation">
218
                                <thead>
218
                                <thead>
219
                                    <tr>
219
                                    <tr>
220
                                        <th class="exception">Date</th>
220
                                        <th class="validation">Date</th>
221
                                        <th class="exception">Title</th>
221
                                        <th class="validation">Title</th>
222
                                    </tr>
222
                                    </tr>
223
                                </thead>
223
                                </thead>
224
                                <tbody>
224
                                <tbody>
Lines 302-308 Link Here
302
302
303
                            [% IF ( FLOAT_HOLIDAYS ) %]
303
                            [% IF ( FLOAT_HOLIDAYS ) %]
304
                            <h3>Floating holidays</h3>
304
                            <h3>Floating holidays</h3>
305
                            <table id="holidaysunique">
305
                            <table id="holidaysfloat">
306
                                <thead>
306
                                <thead>
307
                                    <tr>
307
                                    <tr>
308
                                        <th class="float">Date</th>
308
                                        <th class="float">Date</th>
Lines 336-342 Link Here
336
[% MACRO jsinclude BLOCK %]
336
[% MACRO jsinclude BLOCK %]
337
    [% INCLUDE 'calendar.inc' %]
337
    [% INCLUDE 'calendar.inc' %]
338
    [% INCLUDE 'datatables.inc' %]
338
    [% INCLUDE 'datatables.inc' %]
339
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
340
    [% Asset.js("js/tools-menu.js") | $raw %]
339
    [% Asset.js("js/tools-menu.js") | $raw %]
341
    <script>
340
    <script>
342
        var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays"));
341
        var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays"));
Lines 426-456 Link Here
426
        }
425
        }
427
426
428
        // This function gives css classes to each kind of day
427
        // This function gives css classes to each kind of day
429
        function dateStatusHandler(date) {
428
        function dateStatusHandler(dayElem) {
430
            date = getSeparetedDate(date);
429
            date = getSeparetedDate(dayElem.dateObj);
431
            var dateString = date.dateString;
430
            var dateString = date.dateString;
432
            var today = new Date();
431
            var today = new Date();
433
            today.setHours(0, 0, 0, 0);
432
            today.setHours(0, 0, 0, 0);
434
433
435
            if (datesInfos[dateString] && datesInfos[dateString].holiday_type =='W') {
434
            if (datesInfos[dateString] && datesInfos[dateString].holiday_type =='W') {
436
                return [true, "repeatableweekly", _("Weekly holiday: %s").format(datesInfos[dateString].title)];
435
                formatDay( [ "repeatableweekly", _("Weekly holiday: %s").format(datesInfos[dateString].title)], dayElem );
437
            } else if (datesInfos[dateString] && datesInfos[dateString].holiday_type == 'R') {
436
            } else if (datesInfos[dateString] && datesInfos[dateString].holiday_type == 'R') {
438
                return [true, "repeatableyearly", _("Yearly holiday: %s").format(datesInfos[dateString].title)];
437
                formatDay( [ "repeatableyearly", _("Yearly holiday: %s").format(datesInfos[dateString].title)], dayElem );
439
            } else if (datesInfos[dateString] && datesInfos[dateString].holiday_type == 'N') {
438
            } else if (datesInfos[dateString] && datesInfos[dateString].holiday_type == 'N') {
440
                return [true, "exception", _("Need validation: %s").format(datesInfos[dateString].title)];
439
                formatDay( [ "exception", _("Need validation: %s").format(datesInfos[dateString].title)], dayElem );
441
            } else if (datesInfos[dateString] && datesInfos[dateString].holiday_type == 'F') {
440
            } else if (datesInfos[dateString] && datesInfos[dateString].holiday_type == 'F') {
442
                return [true, "float", _("Floating holiday: %s").format(datesInfos[dateString].title)];
441
                formatDay( [ "float", _("Floating holiday: %s").format(datesInfos[dateString].title)], dayElem );
443
            } else if (datesInfos[dateString] && datesInfos[dateString].holiday_type == 'E') {
442
            } else if (datesInfos[dateString] && datesInfos[dateString].holiday_type == 'E') {
444
                return [true, "holiday", _("Single holiday: %s").format(datesInfos[dateString].title)];
443
                formatDay( [ "holiday", _("Single holiday: %s").format(datesInfos[dateString].title)], dayElem );
445
            } else {
444
            } else {
446
                if (date.date_obj < today) {
445
                if (date.date_obj < today) {
447
                    return [true, "past-date", _("Past day")];
446
                    formatDay( [ "past-date", _("Past day")], dayElem );
448
                }else {
447
                }else {
449
                    return [true, "normalday", _("Normal day")];
448
                    formatDay( [ "normalday", _("Normal day")], dayElem );
450
                }
449
                }
451
            }
450
            }
452
        }
451
        }
453
452
453
        function formatDay( settings, dayElem ){
454
            $(dayElem).attr("title", settings[1]).addClass( settings[0]);
455
        }
456
454
        /*
457
        /*
455
         * This function separate a given date object and returns an array containing all needed information about the date.
458
         * This function separate a given date object and returns an array containing all needed information about the date.
456
         */
459
         */
Lines 479-492 Link Here
479
         */
482
         */
480
        function validateForm(form) {
483
        function validateForm(form) {
481
            if (form =='newHoliday-form' && $('#CopyRadioButton').is(':checked')) {
484
            if (form =='newHoliday-form' && $('#CopyRadioButton').is(':checked')) {
482
                if ($('#copyto_from_datepicker').val() =='' || $('#copyto_to_datepicker').val() =='') {
485
                if ($('#copyto_from_flatpickr').val() =='' || $('#copyto_to_flatpickr').val() =='') {
483
                    alert("You have to pick a FROM and TO in the Copy to different dates.");
486
                    alert("You have to pick a FROM and TO in the Copy to different dates.");
484
                    return false;
487
                    return false;
485
                } else if ($('#to_date_datepicker').val()) {
488
                } else if ($('#to_date_flatpickr').val()) {
486
                    var from_DateFrom = new Date($("#jcalendar-container").datepicker("getDate"));
489
                    var from_DateFrom = new Date(document.querySelector("#calendar-anchor")._flatpickr.selectedDates[0]);
487
                    var from_DateTo = new Date($('#to_date_datepicker').datepicker("getDate"));
490
                    var from_DateTo = new Date(document.querySelector('#to_date_flatpickr')._flatpickr.selectedDates[0]);
488
                    var to_DateFrom = new Date($('#copyto_from_datepicker').datepicker("getDate"));
491
                    var to_DateFrom = new Date(document.querySelector('#copyto_from_flatpickr')._flatpickr.selectedDates[0]);
489
                    var to_DateTo = new Date($('#copyto_to_datepicker').datepicker("getDate"));
492
                    var to_DateTo = new Date(document.querySelector('#copyto_to_flatpickr')._flatpickr.selectedDates[0]);
490
493
491
                    var from_start = Math.round( from_DateFrom.getTime() / (3600*24*1000)); // days as integer from..
494
                    var from_start = Math.round( from_DateFrom.getTime() / (3600*24*1000)); // days as integer from..
492
                    var from_end   = Math.round( from_DateTo.getTime() / (3600*24*1000));
495
                    var from_end   = Math.round( from_DateTo.getTime() / (3600*24*1000));
Lines 526-532 Link Here
526
            var dateString = date.dateString;
529
            var dateString = date.dateString;
527
            var date_obj = date.date_obj;
530
            var date_obj = date.date_obj;
528
531
529
            $("#jcalendar-container").datepicker("setDate", date_obj);
532
            document.querySelector("#calendar-anchor")._flatpickr.setDate(date_obj);
530
            showHoliday(date_obj, dateString, dayName, day, month, year, weekDay, datesInfos[dateString].title, datesInfos[dateString].holiday_type);
533
            showHoliday(date_obj, dateString, dayName, day, month, year, weekDay, datesInfos[dateString].title, datesInfos[dateString].holiday_type);
531
        }
534
        }
532
535
Lines 536-542 Link Here
536
        function checkRange(date) {
539
        function checkRange(date) {
537
            date = new Date(date);
540
            date = new Date(date);
538
            $('#to_date').val(getSeparetedDate(date).dateString);
541
            $('#to_date').val(getSeparetedDate(date).dateString);
539
            var fromDate = new Date($("#jcalendar-container").datepicker("getDate"));
542
            var fromDate = new Date(document.querySelector("#calendar-anchor")._flatpickr.selectedDates[0]);
540
            var sameHoliday =true;
543
            var sameHoliday =true;
541
            var sameOpenHours =true;
544
            var sameOpenHours =true;
542
            var sameCloseHours =true;
545
            var sameCloseHours =true;
Lines 600-674 Link Here
600
                return validateForm($(this).attr("id"));
603
                return validateForm($(this).attr("id"));
601
            });
604
            });
602
605
603
            // Set the correct coloring, default date and the date ranges for all datepickers
606
            flatpickr.setDefaults({
604
            [%    IF (dateformat == 'metric') %][% datepickerformat = 'dd/mm/yy' %]
607
                onDayCreate: function( dObj, dStr, fp, dayElem ){
605
            [% ELSIF (dateformat == 'us'    ) %][% datepickerformat = 'mm/dd/yy' %]
608
                    /* for each day on the calendar, get the
606
            [% ELSIF (dateformat == 'iso'   ) %][% datepickerformat = 'yy-mm-dd' %]
609
                      correct status information for the date */
607
            [% ELSIF (dateformat == 'dmydot') %][% datepickerformat = 'dd.mm.yy' %]
610
                    dateStatusHandler( dayElem );
608
            [% END %]
609
610
            $.datepicker.setDefaults({
611
                beforeShowDay: function(thedate) {
612
                    return dateStatusHandler(thedate);
613
                },
611
                },
614
                defaultDate: new Date("[% keydate | html %]"),
615
                minDate: new Date("[% minDate | html %]"),
612
                minDate: new Date("[% minDate | html %]"),
616
                maxDate: new Date("[% maxDate | html %]"),
613
                maxDate: new Date("[% maxDate | html %]")
617
                dateFormat: "[% datepickerformat | html %]"
618
            });
614
            });
619
615
620
            // Main datepicker
616
            // Main flatpickr
621
            $("#jcalendar-container").datepicker({
617
            $("#calendar-anchor").flatpickr({
622
                onSelect: function(dateText, inst) {
618
                inline: true,
619
                onReady: function( selectedDates, dateStr, instance ){
620
                    // We do not want to display the 'close' icon in this case
621
                    $(instance.input).siblings('.flatpickr-input').hide();
622
                },
623
                onChange: function(selectedDates, dateStr, instance) {
623
                    [% IF datesInfos %]
624
                    [% IF datesInfos %]
624
                        var date = getSeparetedDate($(this).datepicker("getDate"));
625
                        var date = getSeparetedDate(selectedDates[0]);
625
                        var weekDay = date.weekDay;
626
                        var weekDay = date.weekDay;
626
                        var dayName = weekdays[weekDay];
627
                        var dayName = weekdays[weekDay];
627
                        var dateString = date.dateString;
628
                        var dateString = date.dateString;
628
629
629
                        // set value of form hidden field
630
                        // set value of form hidden field
630
                        $('#from_date').val(dateText);
631
                        $('#from_date').val(dateStr);
631
632
                        showHoliday(date.date_obj, dateString, dayName, date.day, date.month, date.year, weekDay, datesInfos[dateString].title, datesInfos[dateString].holiday_type);
632
                        showHoliday(date.date_obj, dateString, dayName, date.day, date.month, date.year, weekDay, datesInfos[dateString].title, datesInfos[dateString].holiday_type);
633
                    [% END %]
633
                    [% END %]
634
                },
634
                }
635
            });
635
            });
636
636
637
            $('#to_date_datepicker').datepicker();
637
            $('#to_date_flatpickr').flatpickr();
638
            $("#to_date_datepicker").change(function() {
638
            $("#to_date_flatpickr").change(function() {
639
                checkRange($(this).datepicker("getDate"));
639
                checkRange(document.querySelector("#to_date_flatpickr")._flatpickr.selectedDates[0]);
640
                $('#to_date').val(($(this).val()));
640
                $('#to_date').val(($("#to_date_flatpickr").val()));
641
                if ($('#to_date_datepicker').val()) {
641
                if ($('#to_date_flatpickr').val()) {
642
                    $('#days_of_week').show("fast");
642
                    $('#days_of_week').show("fast");
643
                } else {
643
                } else {
644
                    $('#days_of_week').hide("fast");
644
                    $('#days_of_week').hide("fast");
645
                }
645
                }
646
            });
646
            });
647
647
648
            // Datepickers for copy dates feature
648
            // Flatpickrs for copy dates feature
649
            $('#copyto_from_datepicker').datepicker();
649
            $('#copyto_from_flatpickr').flatpickr();
650
            $("#copyto_from_datepicker").change(function() {
650
            $("#copyto_from_flatpickr").change(function() {
651
                $('#copyto_from').val(($(this).val()));
651
                $('#copyto_from').val(($(this).val()));
652
            });
652
            });
653
653
654
            $('#copyto_to_datepicker').datepicker();
654
            $('#copyto_to_flatpickr').flatpickr();
655
            $("#copyto_to_datepicker").change(function() {
655
            $("#copyto_to_flatpickr").change(function() {
656
                $('#copyto_to').val(($(this).val()));
656
                $('#copyto_to').val(($(this).val()));
657
            });
657
            });
658
658
659
            // Timepickers for open and close hours
659
            // Flatpickrs for open and close hours
660
            $('#openHour').timepicker({
660
            timeoptions = {
661
                showOn : 'focus',
661
                plugins: [],
662
                timeFormat: 'HH:mm:ss',
662
                enableTime: true,
663
                showSecond: false,
663
                noCalendar: true,
664
                stepMinute: 5,
664
                dateFormat: "H:i:S",
665
            });
665
                altInput: false,
666
            $('#closeHour').timepicker({
666
                defaultHour: 12,
667
                showOn : 'focus',
667
                defaultMinute: 0,
668
                timeFormat: 'HH:mm:ss',
668
                onOpen: function( selectedDates, dateStr, instance ) {
669
                showSecond: false,
669
                    instance.setDate(instance.input.value, false);
670
                stepMinute: 5,
670
                }
671
            });
671
            }
672
            $('#openHour').flatpickr(timeoptions);
673
            $('#closeHour').flatpickr(timeoptions);
672
674
673
            $('.newHoliday input[type="radio"]').click(function() {
675
            $('.newHoliday input[type="radio"]').click(function() {
674
                if ($(this).attr("id") == "CopyRadioButton") {
676
                if ($(this).attr("id") == "CopyRadioButton") {
Lines 696-702 Link Here
696
            $("#holidayType select").on("change", function() {
698
            $("#holidayType select").on("change", function() {
697
                if ($("#holidayType select").val() == "R") {
699
                if ($("#holidayType select").val() == "R") {
698
                    $('#days_of_week').hide("fast");
700
                    $('#days_of_week').hide("fast");
699
                } else if ($('#to_date_datepicker').val()) {
701
                } else if ($('#to_date_flatpickr').val()) {
700
                    $('#days_of_week').show("fast");
702
                    $('#days_of_week').show("fast");
701
                }
703
                }
702
            });
704
            });
703
- 

Return to bug 17015