Lines 2-11
Link Here
|
2 |
<title>Koha › Tools › [% branchname %] Calendar</title> |
2 |
<title>Koha › Tools › [% branchname %] Calendar</title> |
3 |
[% INCLUDE 'doc-head-close.inc' %] |
3 |
[% INCLUDE 'doc-head-close.inc' %] |
4 |
[% INCLUDE 'calendar.inc' %] |
4 |
[% INCLUDE 'calendar.inc' %] |
5 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> |
5 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
|
|
6 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> |
7 |
[% INCLUDE 'datatables-strings.inc' %] |
8 |
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> |
6 |
<script language="JavaScript" type="text/javascript"> |
9 |
<script language="JavaScript" type="text/javascript"> |
7 |
//<![CDATA[ |
10 |
//<![CDATA[ |
8 |
|
11 |
[% IF (dateformat == 'metric') %]dt_add_type_uk_date();[% END %] |
9 |
var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays")); |
12 |
var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays")); |
10 |
|
13 |
|
11 |
/* Creates all the structures to deal with all diferents kinds of holidays */ |
14 |
/* Creates all the structures to deal with all diferents kinds of holidays */ |
Lines 153-198
Link Here
|
153 |
|
156 |
|
154 |
$(document).ready(function() { |
157 |
$(document).ready(function() { |
155 |
|
158 |
|
156 |
[% IF ( dateformat_metric ) %] $.tablesorter.addParser({ // http://tablesorter.com/docs/example-parsers.html |
|
|
157 |
id: 'shortDates', |
158 |
is: function(s){ |
159 |
return false; |
160 |
}, |
161 |
format: function(s){ |
162 |
var datepattern = new RegExp("[0-9]\/[0-9]"); |
163 |
if( datepattern.test(s)){ // sorting a date without a year: "01/12" |
164 |
var dateparts = s.split("/").reverse().join("-"); // build an ISO date to be sorted as text |
165 |
s = "2000-" + dateparts; // use 2000 as the default year |
166 |
} |
167 |
return s; |
168 |
}, |
169 |
type: 'text' |
170 |
}); |
171 |
[% END %] |
172 |
$(".hint").hide(); |
159 |
$(".hint").hide(); |
173 |
$("#branch").change(function(){ |
160 |
$("#branch").change(function(){ |
174 |
changeBranch(); |
161 |
changeBranch(); |
175 |
}); |
162 |
}); |
176 |
$("#holidayexceptions").tablesorter({[% IF ( dateformat_metric ) %] |
163 |
$("#holidayexceptions,#holidayweeklyrepeatable,#holidaysunique").dataTable($.extend(true, {}, dataTablesDefaults, { |
177 |
dateFormat: 'uk',[% END %] |
164 |
"sDom": 't', |
178 |
sortList: [[0,0]], widgets: ['zebra'] |
165 |
"bPaginate": false |
179 |
}); |
166 |
})); |
180 |
$("#holidayweeklyrepeatable").tablesorter({[% IF ( dateformat_metric ) %] |
167 |
$("#holidaysyearlyrepeatable").dataTable($.extend(true, {}, dataTablesDefaults, { |
181 |
dateFormat: 'uk',[% END %] |
168 |
"sDom": 't', |
182 |
sortList: [[0,0]], widgets: ['zebra'] |
169 |
"aoColumns": [ |
183 |
}); |
170 |
{ "sType": "title-string" },null,null |
184 |
$("#holidaysyearlyrepeatable").tablesorter({[% IF ( dateformat_metric ) %] |
171 |
], |
185 |
headers : { |
172 |
"bPaginate": false |
186 |
0: { |
173 |
})); |
187 |
sorter : 'shortDates' |
|
|
188 |
} |
189 |
},[% END %] |
190 |
sortList: [[0,0]], widgets: ['zebra'] |
191 |
}); |
192 |
$("#holidaysunique").tablesorter({[% IF ( dateformat_metric ) %] |
193 |
dateFormat: 'uk',[% END %] |
194 |
sortList: [[0,0]], widgets: ['zebra'] |
195 |
}); |
196 |
$("a.helptext").click(function(){ |
174 |
$("a.helptext").click(function(){ |
197 |
$(this).parent().find(".hint").toggle(); return false; |
175 |
$(this).parent().find(".hint").toggle(); return false; |
198 |
}); |
176 |
}); |
Lines 227-236
Link Here
|
227 |
.holiday { background-color : #ffaeae; color : Black; border : 1px solid #BCBCBC; } |
205 |
.holiday { background-color : #ffaeae; color : Black; border : 1px solid #BCBCBC; } |
228 |
.repeatableweekly { background-color : #FFFF99; color : Black; border : 1px solid #BCBCBC; } |
206 |
.repeatableweekly { background-color : #FFFF99; color : Black; border : 1px solid #BCBCBC; } |
229 |
.repeatableyearly { background-color : #FFCC66; color : Black; border : 1px solid #BCBCBC; } |
207 |
.repeatableyearly { background-color : #FFCC66; color : Black; border : 1px solid #BCBCBC; } |
230 |
td.exception a.ui-state-default, .exception { background: #b3d4ff none; color : Black; border : 1px solid #BCBCBC; } |
208 |
td.exception a.ui-state-default { background: #b3d4ff none; color : Black; border : 1px solid #BCBCBC; } |
231 |
td.holiday a.ui-state-default, .holiday { background: #ffaeae none; color : Black; border : 1px solid #BCBCBC; } |
209 |
td.holiday a.ui-state-default { background: #ffaeae none; color : Black; border : 1px solid #BCBCBC; } |
232 |
td.repeatableweekly a.ui-state-default, .repeatableweekly { background: #D8EFB3 none; color : Black; border : 1px solid #BCBCBC; } |
210 |
td.repeatableweekly a.ui-state-default { background: #D8EFB3 none; color : Black; border : 1px solid #BCBCBC; } |
233 |
td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF99 none; color : Black; border : 1px solid #BCBCBC; } |
211 |
td.repeatableyearly a.ui-state-default { background: #FFFF99 none; color : Black; border : 1px solid #BCBCBC; } |
234 |
.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; } |
212 |
.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; } |
235 |
.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; } |
213 |
.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; } |
236 |
#showHoliday { margin : .5em 0; } h1 select { width: 20em; } div.yui-b fieldset.brief ol { font-size:100%; } div.yui-b fieldset.brief li, div.yui-b 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; } |
214 |
#showHoliday { margin : .5em 0; } h1 select { width: 20em; } div.yui-b fieldset.brief ol { font-size:100%; } div.yui-b fieldset.brief li, div.yui-b 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; } |
Lines 465-471
td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9
Link Here
|
465 |
<tbody> |
443 |
<tbody> |
466 |
[% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %] |
444 |
[% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %] |
467 |
<tr> |
445 |
<tr> |
468 |
<td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch %]&calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE %]">[% EXCEPTION_HOLIDAYS_LOO.DATE %]</a></td> |
446 |
<td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch %]&calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE %]"><span title="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT %]">[% EXCEPTION_HOLIDAYS_LOO.DATE %]</span></a></td> |
469 |
<td>[% EXCEPTION_HOLIDAYS_LOO.TITLE %]</td> |
447 |
<td>[% EXCEPTION_HOLIDAYS_LOO.TITLE %]</td> |
470 |
<td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION %]</td> |
448 |
<td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION %]</td> |
471 |
</tr> |
449 |
</tr> |
Lines 517-523
td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9
Link Here
|
517 |
<tbody> |
495 |
<tbody> |
518 |
[% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %] |
496 |
[% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %] |
519 |
<tr> |
497 |
<tr> |
520 |
<td>[% DAY_MONTH_HOLIDAYS_LOO.DATE %]</td> |
498 |
<td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT %]">[% DAY_MONTH_HOLIDAYS_LOO.DATE %]</span></td> |
521 |
<td>[% DAY_MONTH_HOLIDAYS_LOO.TITLE %]</td> |
499 |
<td>[% DAY_MONTH_HOLIDAYS_LOO.TITLE %]</td> |
522 |
<td>[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION %]</td> |
500 |
<td>[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION %]</td> |
523 |
</tr> |
501 |
</tr> |
Lines 539-545
td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9
Link Here
|
539 |
<tbody> |
517 |
<tbody> |
540 |
[% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %] |
518 |
[% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %] |
541 |
<tr> |
519 |
<tr> |
542 |
<td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch %]&calendardate=[% HOLIDAYS_LOO.DATE %]">[% HOLIDAYS_LOO.DATE %]</a></td> |
520 |
<td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch %]&calendardate=[% HOLIDAYS_LOO.DATE %]"><span title="[% HOLIDAYS_LOO.DATE_SORT %]">[% HOLIDAYS_LOO.DATE %]</span></a></td> |
543 |
<td>[% HOLIDAYS_LOO.TITLE %]</td> |
521 |
<td>[% HOLIDAYS_LOO.TITLE %]</td> |
544 |
<td>[% HOLIDAYS_LOO.DESCRIPTION %]</td> |
522 |
<td>[% HOLIDAYS_LOO.DESCRIPTION %]</td> |
545 |
</tr> |
523 |
</tr> |