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

(-)a/koha-tmpl/intranet-tmpl/prog/css/calendar.css (+160 lines)
Line 0 Link Here
1
.controls {
2
    display: block;
3
    padding: 3px 0;
4
}
5
6
.key {
7
     padding: 3px;
8
     white-space: nowrap;
9
     line-height: 230%;
10
 }
11
12
 .ui-datepicker {
13
     font-size: 150%;
14
 }
15
16
 .ui-datepicker th,
17
 .ui-datepicker .ui-datepicker-title select {
18
     font-size: 80%;
19
 }
20
21
 .ui-datepicker td a {
22
     padding: .5em;
23
 }
24
25
 .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
26
     font-size: 80%;
27
 }
28
29
 .key {
30
     padding: 3px;
31
     white-space: nowrap;
32
     line-height: 230%;
33
 }
34
35
 .normalday {
36
     background-color: #EDEDED;
37
     color: Black;
38
     border: 1px solid #BCBCBC;
39
 }
40
41
 .exception {
42
     background-color: #b3d4ff;
43
     color: Black;
44
     border: 1px solid #BCBCBC;
45
 }
46
47
 .holiday {
48
     background-color: #ffaeae;
49
     color: Black;
50
     border: 1px solid #BCBCBC;
51
 }
52
53
 .repeatableweekly {
54
     background-color: #FFFF99;
55
     color: Black;
56
     border: 1px solid #BCBCBC;
57
 }
58
59
 .repeatableyearly {
60
     background-color: #FFCC66;
61
     color: Black;
62
     border: 1px solid #BCBCBC;
63
 }
64
65
 td.exception a.ui-state-default {
66
     background: #b3d4ff none;
67
     color: Black;
68
     border: 1px solid #BCBCBC;
69
 }
70
71
 td.holiday a.ui-state-default {
72
     background: #ffaeae none;
73
     color: Black;
74
     border: 1px solid #BCBCBC;
75
 }
76
77
 td.repeatableweekly a.ui-state-default {
78
     background: #FFFF99 none;
79
     color: Black;
80
     border: 1px solid #BCBCBC;
81
 }
82
83
 td.repeatableyearly a.ui-state-default {
84
     background: #FFCC66 none;
85
     color: Black;
86
     border: 1px solid #BCBCBC;
87
 }
88
89
 .information {
90
     z-index: 1;
91
     background-color: #DCD2F1;
92
     width: 300px;
93
     display: none;
94
     border: 1px solid #000000;
95
     color: #000000;
96
     font-size: 8pt;
97
     font-weight: bold;
98
     background-color: #FFD700;
99
     cursor: pointer;
100
     padding: 2px;
101
 }
102
103
 .panel {
104
     z-index: 1;
105
     display: none;
106
     border: 3px solid #CCC;
107
     padding: 3px;
108
     margin-top: .3em;
109
     background-color: #FEFEFE;
110
 }
111
112
 fieldset.brief {
113
     border: 0;
114
     margin-top: 0;
115
 }
116
117
 #showHoliday {
118
     margin: .5em 0;
119
 }
120
121
 h1 select {
122
     width: 20em;
123
 }
124
125
 fieldset.brief ol {
126
     font-size: 100%;
127
 }
128
129
 fieldset.brief li,
130
 fieldset.brief li.radio {
131
     padding: 0.2em 0;
132
 }
133
134
 .help {
135
     margin: .3em 0;
136
     border: 1px solid #EEE;
137
     padding: .3em .7em;
138
     font-size: 90%;
139
 }
140
141
 #holidayweeklyrepeatable,
142
 #holidaysyearlyrepeatable,
143
 #holidaysunique,
144
 #holidayexceptions {
145
     font-size: 90%;
146
     margin-bottom: 1em;
147
 }
148
149
 .calendar td,
150
 .calendar th,
151
 .calendar .button,
152
 .calendar tbody .day {
153
     padding: .7em;
154
     font-size: 110%;
155
 }
156
157
 .calendar {
158
     width: auto;
159
     border: 0;
160
 }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt (-30 / +49 lines)
Lines 5-29 Link Here
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
<title>Koha &rsaquo; Tools &rsaquo; [% Branches.GetName( branch ) | html %] calendar</title>
6
<title>Koha &rsaquo; Tools &rsaquo; [% Branches.GetName( branch ) | html %] calendar</title>
7
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
8
<style> .key { padding : 3px; white-space:nowrap; line-height:230%; }
8
[% Asset.css("css/calendar.css") %]
9
.ui-datepicker { font-size : 150%; }
10
.ui-datepicker th, .ui-datepicker .ui-datepicker-title select { font-size : 80%; }
11
.ui-datepicker td a { padding : .5em; }
12
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { font-size : 80%; }
13
.key { padding : 3px; white-space:nowrap; line-height:230%; }
14
.normalday { background-color :  #EDEDED; color :  Black; border : 1px solid #BCBCBC; }
15
.exception { background-color :  #b3d4ff; color :  Black; border : 1px solid #BCBCBC; }
16
.holiday {  background-color :  #ffaeae; color :  Black;  border : 1px solid #BCBCBC; }
17
.repeatableweekly {  background-color :  #FFFF99; color :  Black;  border : 1px solid #BCBCBC; }
18
.repeatableyearly {  background-color :  #FFCC66; color :  Black;  border : 1px solid #BCBCBC; }
19
td.exception a.ui-state-default { background:  #b3d4ff none; color :  Black; border : 1px solid #BCBCBC; }
20
td.holiday a.ui-state-default {  background:  #ffaeae none; color :  Black;  border : 1px solid #BCBCBC; }
21
td.repeatableweekly a.ui-state-default {  background:  #FFFF99 none; color :  Black;  border : 1px solid #BCBCBC; }
22
td.repeatableyearly a.ui-state-default {  background:  #FFCC66 none; color :  Black;  border : 1px solid #BCBCBC; }
23
.information { z-index : 1; background-color :  #DCD2F1; width : 300px; display : none; border : 1px solid #000000; color :  #000000; font-size :  8pt; font-weight :  bold; background-color :  #FFD700; cursor :  pointer; padding : 2px; }
24
.panel { z-index : 1; display : none; border : 3px solid #CCC; padding : 3px; margin-top: .3em;  background-color: #FEFEFE; } fieldset.brief { border : 0; margin-top: 0; }
25
#showHoliday { margin : .5em 0; } h1 select { width: 20em; } fieldset.brief ol { font-size:100%; } fieldset.brief li, fieldset.brief li.radio  { padding:0.2em 0; } .help { margin:.3em 0;border:1px solid #EEE;padding:.3em .7em; font-size : 90%; } #holidayweeklyrepeatable, #holidaysyearlyrepeatable, #holidaysunique, #holidayexceptions { font-size : 90%; margin-bottom : 1em;} .calendar td, .calendar th, .calendar .button, .calendar tbody .day { padding : .7em; font-size: 110%; } .calendar { width: auto; border : 0; }
26
</style>
27
</head>
9
</head>
28
<body id="tools_holidays" class="tools">
10
<body id="tools_holidays" class="tools">
29
[% INCLUDE 'header.inc' %]
11
[% INCLUDE 'header.inc' %]
Lines 246-261 td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl Link Here
246
<!--   this will probably always have the least amount of data -->
228
<!--   this will probably always have the least amount of data -->
247
[% IF ( EXCEPTION_HOLIDAYS_LOOP ) %]
229
[% IF ( EXCEPTION_HOLIDAYS_LOOP ) %]
248
<h3>Exceptions</h3>
230
<h3>Exceptions</h3>
231
    <label class="controls">
232
        <input type="checkbox" name="show_past" id="show_past_holidayexceptions" class="show_past" />
233
        Show past entries
234
    </label>
249
  <table id="holidayexceptions">
235
  <table id="holidayexceptions">
250
<thead><tr>
236
<thead><tr>
251
  <th class="exception">Date</th>
237
  <th class="exception title-string">Date</th>
252
  <th class="exception">Title</th>
238
  <th class="exception">Title</th>
253
  <th class="exception">Description</th>
239
  <th class="exception">Description</th>
254
</tr>
240
</tr>
255
</thead>
241
</thead>
256
<tbody>
242
<tbody>
257
  [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
243
  [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
258
  <tr>
244
  <tr data-date="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]">
259
  <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&amp;calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE | uri %]"><span title="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]">[% EXCEPTION_HOLIDAYS_LOO.DATE | html %]</span></a></td>
245
  <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&amp;calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE | uri %]"><span title="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]">[% EXCEPTION_HOLIDAYS_LOO.DATE | html %]</span></a></td>
260
  <td>[% EXCEPTION_HOLIDAYS_LOO.TITLE | html %]</td>
246
  <td>[% EXCEPTION_HOLIDAYS_LOO.TITLE | html %]</td>
261
  <td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION | html %]</td>
247
  <td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION | html %]</td>
Lines 294-302 td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl Link Here
294
<thead>
280
<thead>
295
<tr>
281
<tr>
296
  [% IF ( dateformat == "metric" ) %]
282
  [% IF ( dateformat == "metric" ) %]
297
  <th class="repeatableyearly">Day/month</th>
283
  <th class="repeatableyearly title-string">Day/month</th>
298
  [% ELSE %]
284
  [% ELSE %]
299
  <th class="repeatableyearly">Month/day</th>
285
  <th class="repeatableyearly title-string">Month/day</th>
300
  [% END %]
286
  [% END %]
301
  <th class="repeatableyearly">Title</th>
287
  <th class="repeatableyearly">Title</th>
302
  <th class="repeatableyearly">Description</th>
288
  <th class="repeatableyearly">Description</th>
Lines 316-332 td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl Link Here
316
302
317
[% IF ( HOLIDAYS_LOOP ) %]
303
[% IF ( HOLIDAYS_LOOP ) %]
318
<h3>Unique holidays</h3>
304
<h3>Unique holidays</h3>
305
<label class="controls">
306
    <input type="checkbox" name="show_past" id="show_past_holidaysunique" class="show_past" />
307
    Show past entries
308
</label>
319
<table id="holidaysunique">
309
<table id="holidaysunique">
320
<thead>
310
<thead>
321
<tr>
311
<tr>
322
  <th class="holiday">Date</th>
312
  <th class="holiday title-string">Date</th>
323
  <th class="holiday">Title</th>
313
  <th class="holiday">Title</th>
324
  <th class="holiday">Description</th>
314
  <th class="holiday">Description</th>
325
</tr>
315
</tr>
326
</thead>
316
</thead>
327
<tbody>
317
<tbody>
328
    [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
318
    [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
329
<tr>
319
<tr data-date="[% HOLIDAYS_LOO.DATE_SORT | html %]">
330
  <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&amp;calendardate=[% HOLIDAYS_LOO.DATE | uri %]"><span title="[% HOLIDAYS_LOO.DATE_SORT | html %]">[% HOLIDAYS_LOO.DATE | html %]</span></a></td>
320
  <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&amp;calendardate=[% HOLIDAYS_LOO.DATE | uri %]"><span title="[% HOLIDAYS_LOO.DATE_SORT | html %]">[% HOLIDAYS_LOO.DATE | html %]</span></a></td>
331
  <td>[% HOLIDAYS_LOO.TITLE | html %]</td>
321
  <td>[% HOLIDAYS_LOO.TITLE | html %]</td>
332
  <td>[% HOLIDAYS_LOO.DESCRIPTION.replace('\\\r\\\n', '<br />') | html %]</td>
322
  <td>[% HOLIDAYS_LOO.DESCRIPTION.replace('\\\r\\\n', '<br />') | html %]</td>
Lines 498-503 td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl Link Here
498
                }
488
                }
499
        };
489
        };
500
490
491
            /* Custom table search configuration: If a table row
492
               has an "expired" class, hide it UNLESS the
493
               show_expired checkbox is checked */
494
            $.fn.dataTable.ext.search.push(
495
                function( settings, searchData, index, rowData, counter ) {
496
                    var table = settings.nTable.id;
497
                    var row = $(settings.aoData[index].nTr);
498
                    if( row.hasClass("date_past") && !$("#show_past_" + table ).prop("checked") ){
499
                        return false;
500
                    } else {
501
                        return true;
502
                    }
503
                }
504
            );
505
506
        // Create current date variable
507
        var date = new Date();
508
        var datestring = date.toISOString().substring(0, 10);
509
501
        $(document).ready(function() {
510
        $(document).ready(function() {
502
511
503
            $(".hint").hide();
512
            $(".hint").hide();
Lines 512-524 td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl Link Here
512
                "sDom": 't',
521
                "sDom": 't',
513
                "bPaginate": false
522
                "bPaginate": false
514
            }));
523
            }));
515
            $("#holidayexceptions,#holidaysyearlyrepeatable,#holidaysunique").dataTable($.extend(true, {}, dataTablesDefaults, {
524
            var tables = $("#holidayexceptions,#holidaysyearlyrepeatable,#holidaysunique").DataTable($.extend(true, {}, dataTablesDefaults, {
516
                "sDom": 't',
525
                "sDom": 't',
517
                "aoColumns": [
526
                "aoColumnDefs": [
518
                    { "sType": "title-string" },null,null
527
                    { "type": "title-string", "targets" : [ "title-string" ] },
519
                ],
528
                ],
520
                "bPaginate": false
529
                "bPaginate": false,
530
                "createdRow": function( row, data, dataIndex ) {
531
                    var holiday = $(row).data("date");
532
                    if( holiday < datestring ){
533
                        $(row).addClass("date_past");
534
                    }
535
                }
521
            }));
536
            }));
537
538
            $(".show_past").on("change", function(){
539
                tables.draw();
540
            });
541
522
            $("a.helptext").click(function(){
542
            $("a.helptext").click(function(){
523
                $(this).parent().find(".hint").toggle(); return false;
543
                $(this).parent().find(".hint").toggle(); return false;
524
            });
544
            });
525
- 

Return to bug 27773