Lines 6-12
Link Here
|
6 |
<script language="JavaScript" type="text/javascript"> |
6 |
<script language="JavaScript" type="text/javascript"> |
7 |
//<![CDATA[ |
7 |
//<![CDATA[ |
8 |
|
8 |
|
9 |
var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays")); |
9 |
var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays")); |
10 |
|
10 |
|
11 |
/* Creates all the structures to deal with all diferents kinds of holidays */ |
11 |
/* Creates all the structures to deal with all diferents kinds of holidays */ |
12 |
var week_days = new Array(); |
12 |
var week_days = new Array(); |
Lines 36-110
Link Here
|
36 |
formObject.submit(); |
36 |
formObject.submit(); |
37 |
} |
37 |
} |
38 |
|
38 |
|
39 |
// This function shows the "Show Holiday" panel // |
39 |
// This function shows the "Show Holiday" panel // |
40 |
function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description, holidayType) { |
40 |
function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description, holidayType) { |
41 |
$("#newHoliday").slideUp("fast"); |
41 |
$("#newHoliday").slideUp("fast"); |
42 |
$("#showHoliday").slideDown("fast"); |
42 |
$("#showHoliday").slideDown("fast"); |
43 |
$('#showDaynameOutput').html(dayName); |
43 |
$('#showDaynameOutput').html(dayName); |
44 |
$('#showDayname').val(dayName); |
44 |
$('#showDayname').val(dayName); |
45 |
$('#showBranchNameOutput').html($("#branch :selected").text()); |
45 |
$('#showBranchNameOutput').html($("#branch :selected").text()); |
46 |
$('#showBranchName').val($("#branch").val()); |
46 |
$('#showBranchName').val($("#branch").val()); |
47 |
$('#showDayOutput').html(day); |
47 |
$('#showDayOutput').html(day); |
48 |
$('#showDay').val(day); |
48 |
$('#showDay').val(day); |
49 |
$('#showMonthOutput').html(month); |
49 |
$('#showMonthOutput').html(month); |
50 |
$('#showMonth').val(month); |
50 |
$('#showMonth').val(month); |
51 |
$('#showYearOutput').html(year); |
51 |
$('#showYearOutput').html(year); |
52 |
$('#showYear').val(year); |
52 |
$('#showYear').val(year); |
53 |
$('#showDescription').val(description); |
53 |
$('#showDescription').val(description); |
54 |
$('#showWeekday:first').val(weekDay); |
54 |
$('#showWeekday:first').val(weekDay); |
55 |
$('#showTitle').val(title); |
55 |
$('#showTitle').val(title); |
56 |
$('#showHolidayType').val(holidayType); |
56 |
$('#showHolidayType').val(holidayType); |
57 |
|
57 |
|
58 |
if (holidayType == 'exception') { |
58 |
if (holidayType == 'exception') { |
59 |
$("#showOperationDelLabel").html(_("Delete this exception.")); |
59 |
$("#showOperationDelLabel").html(_("Delete this exception.")); |
60 |
$("#holtype").attr("class","key exception").html(_("Holiday exception")); |
60 |
$("#holtype").attr("class","key exception").html(_("Holiday exception")); |
61 |
} else if(holidayType == 'weekday') { |
61 |
} else if(holidayType == 'weekday') { |
62 |
$("#showOperationDelLabel").html(_("Delete this holiday.")); |
62 |
$("#showOperationDelLabel").html(_("Delete this holiday.")); |
63 |
$("#holtype").attr("class","key repeatableweekly").html(_("Holiday repeating weekly")); |
63 |
$("#holtype").attr("class","key repeatableweekly").html(_("Holiday repeating weekly")); |
64 |
} else if(holidayType == 'daymonth') { |
64 |
} else if(holidayType == 'daymonth') { |
65 |
$("#showOperationDelLabel").html(_("Delete this holiday.")); |
65 |
$("#showOperationDelLabel").html(_("Delete this holiday.")); |
66 |
$("#holtype").attr("class","key repeatableyearly").html(_("Holiday repeating yearly")); |
66 |
$("#holtype").attr("class","key repeatableyearly").html(_("Holiday repeating yearly")); |
67 |
} else { |
67 |
} else { |
68 |
$("#showOperationDelLabel").html(_("Delete this holiday.")); |
68 |
$("#showOperationDelLabel").html(_("Delete this holiday.")); |
69 |
$("#holtype").attr("class","key holiday").html(_("Unique holiday")); |
69 |
$("#holtype").attr("class","key holiday").html(_("Unique holiday")); |
70 |
} |
70 |
} |
71 |
|
71 |
|
72 |
if (exceptionPosibility == 1) { |
72 |
if (exceptionPosibility == 1) { |
73 |
$("#exceptionPosibility").parent().show(); |
73 |
$("#exceptionPosibility").parent().show(); |
74 |
} else { |
74 |
} else { |
75 |
$("#exceptionPosibility").parent().hide(); |
75 |
$("#exceptionPosibility").parent().hide(); |
76 |
} |
76 |
} |
77 |
} |
77 |
} |
78 |
|
78 |
|
79 |
// This function shows the "Add Holiday" panel // |
79 |
// This function shows the "Add Holiday" panel // |
80 |
function newHoliday (dayName, day, month, year, weekDay) { |
80 |
function newHoliday (dayName, day, month, year, weekDay) { |
81 |
$("#showHoliday").slideUp("fast"); |
81 |
$("#showHoliday").slideUp("fast"); |
82 |
$("#newHoliday").slideDown("fast"); |
82 |
$("#newHoliday").slideDown("fast"); |
83 |
$("#newDaynameOutput").html(dayName); |
83 |
$("#newDaynameOutput").html(dayName); |
84 |
$("#newDayname").val(dayName); |
84 |
$("#newDayname").val(dayName); |
85 |
$("#newBranchNameOutput").html($('#branch :selected').text()); |
85 |
$("#newBranchNameOutput").html($('#branch :selected').text()); |
86 |
$("#newBranchName").val($('#branch').val()); |
86 |
$("#newBranchName").val($('#branch').val()); |
87 |
$("#newDayOutput").html(day); |
87 |
$("#newDayOutput").html(day); |
88 |
$("#newDay").val(day); |
88 |
$("#newDay").val(day); |
89 |
$("#newMonthOutput").html(month); |
89 |
$("#newMonthOutput").html(month); |
90 |
$("#newMonth").val(month); |
90 |
$("#newMonth").val(month); |
91 |
$("#newYearOutput").html(year); |
91 |
$("#newYearOutput").html(year); |
92 |
$("#newYear").val(year); |
92 |
$("#newYear").val(year); |
93 |
$("#newWeekday:first").val(weekDay); |
93 |
$("#newWeekday:first").val(weekDay); |
94 |
} |
94 |
} |
95 |
|
95 |
|
96 |
function hidePanel(aPanelName) { |
96 |
function hidePanel(aPanelName) { |
97 |
$("#"+aPanelName).slideUp("fast"); |
97 |
$("#"+aPanelName).slideUp("fast"); |
98 |
} |
98 |
} |
99 |
|
99 |
|
100 |
function changeBranch () { |
100 |
function changeBranch () { |
101 |
var branch = $("#branch option:selected").val(); |
101 |
var branch = $("#branch option:selected").val(); |
102 |
location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + branch + '&calendardate=' + "[% calendardate %]"; |
102 |
location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + branch + '&calendardate=' + "[% calendardate %]"; |
103 |
} |
103 |
} |
104 |
|
104 |
|
105 |
function Help() { |
105 |
function Help() { |
106 |
newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes'); |
106 |
newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes'); |
107 |
} |
107 |
} |
108 |
|
108 |
|
109 |
/* This function gives css clases to each kind of day */ |
109 |
/* This function gives css clases to each kind of day */ |
110 |
function dateStatusHandler(date) { |
110 |
function dateStatusHandler(date) { |
Lines 139-149
Link Here
|
139 |
var dayMonth = month + '/' + day; |
139 |
var dayMonth = month + '/' + day; |
140 |
var dateString = year + '/' + month + '/' + day; |
140 |
var dateString = year + '/' + month + '/' + day; |
141 |
if (holidays[dateString] != null) { |
141 |
if (holidays[dateString] != null) { |
142 |
showHoliday(0, dayName, day, month, year, weekDay, holidays[dateString].title, holidays[dateString].description, 'ymd'); |
142 |
showHoliday(0, dayName, day, month, year, weekDay, holidays[dateString].title, holidays[dateString].description, 'ymd'); |
143 |
} else if (exception_holidays[dateString] != null) { |
143 |
} else if (exception_holidays[dateString] != null) { |
144 |
showHoliday(0, dayName, day, month, year, weekDay, exception_holidays[dateString].title, exception_holidays[dateString].description, 'exception'); |
144 |
showHoliday(0, dayName, day, month, year, weekDay, exception_holidays[dateString].title, exception_holidays[dateString].description, 'exception'); |
145 |
} else if (week_days[weekDay] != null) { |
145 |
} else if (week_days[weekDay] != null) { |
146 |
showHoliday(1, dayName, day, month, year, weekDay, week_days[weekDay].title, week_days[weekDay].description, 'weekday'); |
146 |
showHoliday(1, dayName, day, month, year, weekDay, week_days[weekDay].title, week_days[weekDay].description, 'weekday'); |
147 |
} else if (day_month_holidays[dayMonth] != null) { |
147 |
} else if (day_month_holidays[dayMonth] != null) { |
148 |
showHoliday(1, dayName, day, month, year, weekDay, day_month_holidays[dayMonth].title, day_month_holidays[dayMonth].description, 'daymonth'); |
148 |
showHoliday(1, dayName, day, month, year, weekDay, day_month_holidays[dayMonth].title, day_month_holidays[dayMonth].description, 'daymonth'); |
149 |
} else { |
149 |
} else { |
Lines 151-204
Link Here
|
151 |
} |
151 |
} |
152 |
}; |
152 |
}; |
153 |
|
153 |
|
154 |
$(document).ready(function() { |
154 |
$(document).ready(function() { |
155 |
|
155 |
|
156 |
[% IF ( dateformat == "metric" ) %] $.tablesorter.addParser({ // http://tablesorter.com/docs/example-parsers.html |
156 |
[% IF ( dateformat == "metric" ) %] $.tablesorter.addParser({ // http://tablesorter.com/docs/example-parsers.html |
157 |
id: 'shortDates', |
157 |
id: 'shortDates', |
158 |
is: function(s){ |
158 |
is: function(s){ |
159 |
return false; |
159 |
return false; |
160 |
}, |
160 |
}, |
161 |
format: function(s){ |
161 |
format: function(s){ |
162 |
var datepattern = new RegExp("[0-9]\/[0-9]"); |
162 |
var datepattern = new RegExp("[0-9]\/[0-9]"); |
163 |
if( datepattern.test(s)){ // sorting a date without a year: "01/12" |
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 |
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 |
165 |
s = "2000-" + dateparts; // use 2000 as the default year |
166 |
} |
166 |
} |
167 |
return s; |
167 |
return s; |
168 |
}, |
168 |
}, |
169 |
type: 'text' |
169 |
type: 'text' |
170 |
}); |
170 |
}); |
171 |
[% END %] |
171 |
[% END %] |
172 |
$(".hint").hide(); |
172 |
$(".hint").hide(); |
173 |
$("#branch").change(function(){ |
173 |
$("#branch").change(function(){ |
174 |
changeBranch(); |
174 |
changeBranch(); |
175 |
}); |
175 |
}); |
176 |
$("#holidayexceptions").tablesorter({[% IF ( dateformat == "metric" ) %] |
176 |
$("#holidayexceptions").tablesorter({[% IF ( dateformat == "metric" ) %] |
177 |
dateFormat: 'uk',[% END %] |
177 |
dateFormat: 'uk',[% END %] |
178 |
sortList: [[0,0]], widgets: ['zebra'] |
178 |
sortList: [[0,0]], widgets: ['zebra'] |
179 |
}); |
179 |
}); |
180 |
$("#holidayweeklyrepeatable").tablesorter({[% IF ( dateformat == "metric" ) %] |
180 |
$("#holidayweeklyrepeatable").tablesorter({[% IF ( dateformat == "metric" ) %] |
181 |
dateFormat: 'uk',[% END %] |
181 |
dateFormat: 'uk',[% END %] |
182 |
sortList: [[0,0]], widgets: ['zebra'] |
182 |
sortList: [[0,0]], widgets: ['zebra'] |
183 |
}); |
183 |
}); |
184 |
$("#holidaysyearlyrepeatable").tablesorter({[% IF ( dateformat == "metric" ) %] |
184 |
$("#holidaysyearlyrepeatable").tablesorter({[% IF ( dateformat == "metric" ) %] |
185 |
headers : { |
185 |
headers : { |
186 |
0: { |
186 |
0: { |
187 |
sorter : 'shortDates' |
187 |
sorter : 'shortDates' |
188 |
} |
188 |
} |
189 |
},[% END %] |
189 |
},[% END %] |
190 |
sortList: [[0,0]], widgets: ['zebra'] |
190 |
sortList: [[0,0]], widgets: ['zebra'] |
191 |
}); |
191 |
}); |
192 |
$("#holidaysunique").tablesorter({[% IF ( dateformat == "metric" ) %] |
192 |
$("#holidaysunique").tablesorter({[% IF ( dateformat == "metric" ) %] |
193 |
dateFormat: 'uk',[% END %] |
193 |
dateFormat: 'uk',[% END %] |
194 |
sortList: [[0,0]], widgets: ['zebra'] |
194 |
sortList: [[0,0]], widgets: ['zebra'] |
195 |
}); |
195 |
}); |
196 |
$("a.helptext").click(function(){ |
196 |
$("a.helptext").click(function(){ |
197 |
$(this).parent().find(".hint").toggle(); return false; |
197 |
$(this).parent().find(".hint").toggle(); return false; |
198 |
}); |
198 |
}); |
199 |
$("#dateofrange").datepicker(); |
199 |
$("#dateofrange").datepicker(); |
200 |
$("#datecancelrange").datepicker(); |
200 |
$("#datecancelrange").datepicker(); |
201 |
$("#dateofrange").each(function () { this.value = "" }); |
201 |
$("#dateofrange").each(function () { this.value = "" }); |
202 |
$("#datecancelrange").each(function () { this.value = "" }); |
202 |
$("#datecancelrange").each(function () { this.value = "" }); |
203 |
$("#jcalendar-container").datepicker({ |
203 |
$("#jcalendar-container").datepicker({ |
204 |
beforeShowDay: function(thedate) { |
204 |
beforeShowDay: function(thedate) { |
Lines 213-219
Link Here
|
213 |
}, |
213 |
}, |
214 |
defaultDate: new Date("[% keydate %]") |
214 |
defaultDate: new Date("[% keydate %]") |
215 |
}); |
215 |
}); |
216 |
}); |
216 |
}); |
217 |
//]]> |
217 |
//]]> |
218 |
</script> |
218 |
</script> |
219 |
<style type="text/css"> .key { padding : 3px; white-space:nowrap; line-height:230%; } |
219 |
<style type="text/css"> .key { padding : 3px; white-space:nowrap; line-height:230%; } |
Lines 245-255
td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9
Link Here
|
245 |
<div id="doc3" class="yui-t1"> |
245 |
<div id="doc3" class="yui-t1"> |
246 |
|
246 |
|
247 |
<div id="bd"> |
247 |
<div id="bd"> |
248 |
<div id="yui-main"> |
248 |
<div id="yui-main"> |
249 |
<div class="yui-b"> |
249 |
<div class="yui-b"> |
250 |
<h2>[% branchname %] Calendar</h2> |
250 |
<h2>[% branchname %] Calendar</h2> |
251 |
<div class="yui-g"> |
251 |
<div class="yui-g"> |
252 |
<div class="yui-u first"> |
252 |
<div class="yui-u first"> |
253 |
<label for="branch">Define the holidays for:</label> |
253 |
<label for="branch">Define the holidays for:</label> |
254 |
<select id="branch" name="branch"> |
254 |
<select id="branch" name="branch"> |
255 |
[% FOREACH branchloo IN branchloop %] |
255 |
[% FOREACH branchloo IN branchloop %] |
Lines 260-316
td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9
Link Here
|
260 |
[% END %] |
260 |
[% END %] |
261 |
[% END %] |
261 |
[% END %] |
262 |
</select> |
262 |
</select> |
263 |
|
263 |
|
264 |
<!-- ******************************** FLAT PANELS ******************************************* --> |
264 |
<!-- ******************************** FLAT PANELS ******************************************* --> |
265 |
<!-- ***** Makes all the flat panel to deal with holidays ***** --> |
265 |
<!-- ***** Makes all the flat panel to deal with holidays ***** --> |
266 |
<!-- **************************************************************************************** --> |
266 |
<!-- **************************************************************************************** --> |
267 |
|
267 |
|
268 |
<!-- ********************** Panel for showing already loaded holidays *********************** --> |
268 |
<!-- ********************** Panel for showing already loaded holidays *********************** --> |
269 |
<div class="panel" id="showHoliday"> |
269 |
<div class="panel" id="showHoliday"> |
270 |
<form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post"> |
270 |
<form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post"> |
271 |
<input type="hidden" id="showHolidayType" name="showHolidayType" value="" /> |
271 |
<input type="hidden" id="showHolidayType" name="showHolidayType" value="" /> |
272 |
<fieldset class="brief"> |
272 |
<fieldset class="brief"> |
273 |
<h3>Edit this holiday</h3> |
273 |
<h3>Edit this holiday</h3> |
274 |
<span id="holtype"></span> |
274 |
<span id="holtype"></span> |
275 |
<ol> |
275 |
<ol> |
276 |
<li> |
276 |
<li> |
277 |
<strong>Library:</strong> <span id="showBranchNameOutput"></span> |
277 |
<strong>Library:</strong> <span id="showBranchNameOutput"></span> |
278 |
<input type="hidden" id="showBranchName" name="showBranchName" /> |
278 |
<input type="hidden" id="showBranchName" name="showBranchName" /> |
279 |
</li> |
279 |
</li> |
280 |
<li> |
280 |
<li> |
281 |
<strong>From Date:</strong> |
281 |
<strong>From Date:</strong> |
282 |
<span id="showDaynameOutput"></span>, |
282 |
<span id="showDaynameOutput"></span>, |
283 |
|
283 |
|
284 |
[% IF ( dateformat == "us" ) %]<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>/<span id="showYearOutput"></span>[% ELSIF ( dateformat == "metric" ) %]<span id="showDayOutput"></span>/<span id="showMonthOutput"></span>/<span id="showYearOutput"></span>[% ELSE %]<span id="showYearOutput"></span>/<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>[% END %] |
284 |
[% IF ( dateformat == "us" ) %]<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>/<span id="showYearOutput"></span>[% ELSIF ( dateformat == "metric" ) %]<span id="showDayOutput"></span>/<span id="showMonthOutput"></span>/<span id="showYearOutput"></span>[% ELSE %]<span id="showYearOutput"></span>/<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>[% END %] |
285 |
|
285 |
|
286 |
<input type="hidden" id="showDayname" name="showDayname" /> |
286 |
<input type="hidden" id="showDayname" name="showDayname" /> |
287 |
<input type="hidden" id="showWeekday" name="showWeekday" /> |
287 |
<input type="hidden" id="showWeekday" name="showWeekday" /> |
288 |
<input type="hidden" id="showDay" name="showDay" /> |
288 |
<input type="hidden" id="showDay" name="showDay" /> |
289 |
<input type="hidden" id="showMonth" name="showMonth" /> |
289 |
<input type="hidden" id="showMonth" name="showMonth" /> |
290 |
<input type="hidden" id="showYear" name="showYear" /> |
290 |
<input type="hidden" id="showYear" name="showYear" /> |
291 |
</li> |
291 |
</li> |
292 |
<li class="dateinsert"> |
292 |
<li class="dateinsert"> |
293 |
<b>To Date : </b> |
293 |
<b>To Date : </b> |
294 |
<input type="text" id="datecancelrange" name="datecancelrange" size="20" value="[% datecancelrange %]" class="datepicker"/> |
294 |
<input type="text" id="datecancelrange" name="datecancelrange" size="20" value="[% datecancelrange %]" class="datepicker"/> |
295 |
</li> |
295 |
</li> |
296 |
<li><label for="showTitle">Title: </label><input type="text" name="showTitle" id="showTitle" size="35" /></li> |
296 |
<li><label for="showTitle">Title: </label><input type="text" name="showTitle" id="showTitle" size="35" /></li> |
297 |
<!-- showTitle is necessary for exception radio button to work properly --> |
297 |
<!-- showTitle is necessary for exception radio button to work properly --> |
298 |
<label for="showDescription">Description:</label> |
298 |
<label for="showDescription">Description:</label> |
299 |
<textarea rows="2" cols="40" id="showDescription" name="showDescription"></textarea> |
299 |
<textarea rows="2" cols="40" id="showDescription" name="showDescription"></textarea> |
300 |
</li> |
300 |
</li> |
301 |
<li class="radio"><div id="exceptionPosibility" style="position:static"> |
301 |
<li class="radio"><div id="exceptionPosibility" style="position:static"> |
302 |
<input type="radio" name="showOperation" id="showOperationExc" value="exception" /> <label for="showOperationExc">Generate an exception for this repeated holiday.</label> |
302 |
<input type="radio" name="showOperation" id="showOperationExc" value="exception" /> <label for="showOperationExc">Generate an exception for this repeated holiday.</label> |
303 |
<a href="#" class="helptext">[?]</a> |
303 |
<a href="#" class="helptext">[?]</a> |
304 |
<div class="hint">You can make an exception for this holiday rule. This means that you will be able to say that for a repeatable holiday there is one day which is going to be an exception.</div> |
304 |
<div class="hint">You can make an exception for this holiday rule. This means that you will be able to say that for a repeatable holiday there is one day which is going to be an exception.</div> |
305 |
</div></li> |
305 |
</div></li> |
306 |
<li class="radio"><input type="radio" name="showOperation" id="showOperationExcRange" value="exceptionrange" /> |
306 |
<li class="radio"><input type="radio" name="showOperation" id="showOperationExcRange" value="exceptionrange" /> |
307 |
<label for="newOperationFieldException">Generate exceptions on a range of dates.</label> |
307 |
<label for="newOperationFieldException">Generate exceptions on a range of dates.</label> |
308 |
<a href="#" class="helptext">[?]</a> |
308 |
<a href="#" class="helptext">[?]</a> |
309 |
<div class="hint">You can make an exception on a range of dates repeated yearly.</div> |
309 |
<div class="hint">You can make an exception on a range of dates repeated yearly.</div> |
310 |
</li> |
310 |
</li> |
311 |
<li class="radio"><input type="radio" name="showOperation" id="showOperationDel" value="delete" /> <label for="showOperationDel" id="showOperationDelLabel">Delete this holiday</label> |
311 |
<li class="radio"><input type="radio" name="showOperation" id="showOperationDel" value="delete" /> <label for="showOperationDel" id="showOperationDelLabel">Delete this holiday</label> |
312 |
<a href="#" class="helptext">[?]</a> |
312 |
<a href="#" class="helptext">[?]</a> |
313 |
<div class="hint">This will delete this holiday rule. If it is a repeatable holiday, this option checks for possible exceptions. If an exception exists, this option will remove the exception and set the date to a regular holiday.</div></li> |
313 |
<div class="hint">This will delete this holiday rule. If it is a repeatable holiday, this option checks for possible exceptions. If an exception exists, this option will remove the exception and set the date to a regular holiday.</div></li> |
314 |
<li class="radio"><input type="radio" name="showOperation" id="showOperationDelRange" value="deleterange" /> <label for="showOperationDelRange" id="showOperationDelLabelRange">Delete the single holidays on a range</label>. |
314 |
<li class="radio"><input type="radio" name="showOperation" id="showOperationDelRange" value="deleterange" /> <label for="showOperationDelRange" id="showOperationDelLabelRange">Delete the single holidays on a range</label>. |
315 |
<a href="#" class="helptext">[?]</a> |
315 |
<a href="#" class="helptext">[?]</a> |
316 |
<div class="hint">This will delete the single holidays rules only. The repeatable holidays and exceptions will not be deleted.</div> |
316 |
<div class="hint">This will delete the single holidays rules only. The repeatable holidays and exceptions will not be deleted.</div> |
Lines 323-387
td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9
Link Here
|
323 |
<a href="#" class="helptext">[?]</a> |
323 |
<a href="#" class="helptext">[?]</a> |
324 |
<div class="hint">This will delete the exceptions inside a given range. Be careful about your scope range if it is oversized you could slow down Koha.</div> |
324 |
<div class="hint">This will delete the exceptions inside a given range. Be careful about your scope range if it is oversized you could slow down Koha.</div> |
325 |
</li> |
325 |
</li> |
326 |
<li class="radio"><input type="radio" name="showOperation" id="showOperationEdit" value="edit" checked="checked" /> <label for="showOperationEdit">Edit this holiday</label> |
326 |
<li class="radio"><input type="radio" name="showOperation" id="showOperationEdit" value="edit" checked="checked" /> <label for="showOperationEdit">Edit this holiday</label> |
327 |
<a href="#" class="helptext">[?]</a> |
327 |
<a href="#" class="helptext">[?]</a> |
328 |
<div class="hint">This will save changes to the holiday's title and description. If the information for a repeatable holiday is modified, it affects all of the dates on which the holiday is repeated.</div></li> |
328 |
<div class="hint">This will save changes to the holiday's title and description. If the information for a repeatable holiday is modified, it affects all of the dates on which the holiday is repeated.</div></li> |
329 |
</ol> |
329 |
</ol> |
330 |
<fieldset class="action"> |
330 |
<fieldset class="action"> |
331 |
<input type="submit" name="submit" value="Save" /> |
331 |
<input type="submit" name="submit" value="Save" /> |
332 |
<a href="#" class="cancel" name="cancel2" onclick=" hidePanel('showHoliday');">Cancel</a> |
332 |
<a href="#" class="cancel" name="cancel2" onclick=" hidePanel('showHoliday');">Cancel</a> |
333 |
</fieldset> |
333 |
</fieldset> |
334 |
</fieldset> |
334 |
</fieldset> |
335 |
</form> |
335 |
</form> |
336 |
</div> |
336 |
</div> |
337 |
|
337 |
|
338 |
<!-- ***************************** Panel to deal with new holidays ********************** --> |
338 |
<!-- ***************************** Panel to deal with new holidays ********************** --> |
339 |
<div class="panel" id="newHoliday"> |
339 |
<div class="panel" id="newHoliday"> |
340 |
<form action="/cgi-bin/koha/tools/newHolidays.pl" method="post"> |
340 |
<form action="/cgi-bin/koha/tools/newHolidays.pl" method="post"> |
341 |
<input type="hidden" name="branchCodes" id="branchCodes" value="[% branchcodes %]" /> |
341 |
<input type="hidden" name="branchCodes" id="branchCodes" value="[% branchcodes %]" /> |
342 |
<fieldset class="brief"> |
342 |
<fieldset class="brief"> |
343 |
<h3>Add new holiday</h3> |
343 |
<h3>Add new holiday</h3> |
344 |
<ol> |
344 |
<ol> |
345 |
<li> |
345 |
<li> |
346 |
<strong>Library:</strong> |
346 |
<strong>Library:</strong> |
347 |
<span id="newBranchNameOutput"></span> |
347 |
<span id="newBranchNameOutput"></span> |
348 |
<input type="hidden" id="newBranchName" name="newBranchName" /> |
348 |
<input type="hidden" id="newBranchName" name="newBranchName" /> |
349 |
</li> |
349 |
</li> |
350 |
<li> |
350 |
<li> |
351 |
<strong>From date:</strong> |
351 |
<strong>From date:</strong> |
352 |
<span id="newDaynameOutput"></span>, |
352 |
<span id="newDaynameOutput"></span>, |
353 |
|
353 |
|
354 |
[% IF ( dateformat == "us" ) %]<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>/<span id="newYearOutput"></span>[% ELSIF ( dateformat == "metric" ) %]<span id="newDayOutput"></span>/<span id="newMonthOutput"></span>/<span id="newYearOutput"></span>[% ELSE %]<span id="newYearOutput"></span>/<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>[% END %] |
354 |
[% IF ( dateformat == "us" ) %]<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>/<span id="newYearOutput"></span>[% ELSIF ( dateformat == "metric" ) %]<span id="newDayOutput"></span>/<span id="newMonthOutput"></span>/<span id="newYearOutput"></span>[% ELSE %]<span id="newYearOutput"></span>/<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>[% END %] |
355 |
|
355 |
|
356 |
<input type="hidden" id="newDayname" name="showDayname" /> |
356 |
<input type="hidden" id="newDayname" name="showDayname" /> |
357 |
<input type="hidden" id="newWeekday" name="newWeekday" /> |
357 |
<input type="hidden" id="newWeekday" name="newWeekday" /> |
358 |
<input type="hidden" id="newDay" name="newDay" /> |
358 |
<input type="hidden" id="newDay" name="newDay" /> |
359 |
<input type="hidden" id="newMonth" name="newMonth" /> |
359 |
<input type="hidden" id="newMonth" name="newMonth" /> |
360 |
<input type="hidden" id="newYear" name="newYear" /> |
360 |
<input type="hidden" id="newYear" name="newYear" /> |
361 |
</li> |
361 |
</li> |
362 |
<li class="dateinsert"> |
362 |
<li class="dateinsert"> |
363 |
<b>To date : </b> |
363 |
<b>To date : </b> |
364 |
<input type="text" id="dateofrange" name="dateofrange" size="20" value="[% dateofrange %]" class="datepicker" /> |
364 |
<input type="text" id="dateofrange" name="dateofrange" size="20" value="[% dateofrange %]" class="datepicker" /> |
365 |
</li> |
365 |
</li> |
366 |
<li><label for="title">Title: </label><input type="text" name="newTitle" id="title" size="35" /></li> |
366 |
<li><label for="title">Title: </label><input type="text" name="newTitle" id="title" size="35" /></li> |
367 |
<li><label for="newDescription">Description:</label> |
367 |
<li><label for="newDescription">Description:</label> |
368 |
<textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea> |
368 |
<textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea> |
369 |
</li> |
369 |
</li> |
370 |
<li class="radio"><input type="radio" name="newOperation" id="newOperationOnce" value="holiday" checked="checked" /> |
370 |
<li class="radio"><input type="radio" name="newOperation" id="newOperationOnce" value="holiday" checked="checked" /> |
371 |
<label for="newOperationOnce">Holiday only on this day</label>. |
371 |
<label for="newOperationOnce">Holiday only on this day</label>. |
372 |
<a href="#" class="helptext">[?]</a> |
372 |
<a href="#" class="helptext">[?]</a> |
373 |
<div class="hint">Make a single holiday. For example, selecting August 1st, 2012 will make it a holiday, but will not affect August 1st in other years.</div> |
373 |
<div class="hint">Make a single holiday. For example, selecting August 1st, 2012 will make it a holiday, but will not affect August 1st in other years.</div> |
374 |
</li> |
374 |
</li> |
375 |
<li class="radio"><input type="radio" name="newOperation" id="newOperationDay" value="weekday" /> |
375 |
<li class="radio"><input type="radio" name="newOperation" id="newOperationDay" value="weekday" /> |
376 |
<label for="newOperationDay">Holiday repeated every same day of the week</label>. |
376 |
<label for="newOperationDay">Holiday repeated every same day of the week</label>. |
377 |
<a href="#" class="helptext">[?]</a> |
377 |
<a href="#" class="helptext">[?]</a> |
378 |
<div class="hint">Make this weekday a holiday, every week. For example, if your library is closed on Saturdays, use this option to make every Saturday a holiday.</div> |
378 |
<div class="hint">Make this weekday a holiday, every week. For example, if your library is closed on Saturdays, use this option to make every Saturday a holiday.</div> |
379 |
</li> |
379 |
</li> |
380 |
<li class="radio"><input type="radio" name="newOperation" id="newOperationYear" value="repeatable" /> |
380 |
<li class="radio"><input type="radio" name="newOperation" id="newOperationYear" value="repeatable" /> |
381 |
<label for="newOperationYear">Holiday repeated yearly on the same date</label>. |
381 |
<label for="newOperationYear">Holiday repeated yearly on the same date</label>. |
382 |
<a href="#" class="helptext">[?]</a> |
382 |
<a href="#" class="helptext">[?]</a> |
383 |
<div class="hint">This will take this day and month as a reference to make it a holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1st will make August 1st a holiday every year.</div> |
383 |
<div class="hint">This will take this day and month as a reference to make it a holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1st will make August 1st a holiday every year.</div> |
384 |
</li> |
384 |
</li> |
385 |
<li class="radio"><input type="radio" name="newOperation" id="newOperationField" value="holidayrange" /> |
385 |
<li class="radio"><input type="radio" name="newOperation" id="newOperationField" value="holidayrange" /> |
386 |
<label for="newOperationField">Holidays on a range</label>. |
386 |
<label for="newOperationField">Holidays on a range</label>. |
387 |
<a href="#" class="helptext">[?]</a> |
387 |
<a href="#" class="helptext">[?]</a> |
Lines 392-414
td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9
Link Here
|
392 |
<a href="#" class="helptext">[?]</a> |
392 |
<a href="#" class="helptext">[?]</a> |
393 |
<div class="hint">Make a single holiday on a range repeated yearly. For example, selecting August 1st, 2012 and August 10st, 2012 will make all days between 1st and 10st holiday, and will affect August 1-10 in other years.</div> |
393 |
<div class="hint">Make a single holiday on a range repeated yearly. For example, selecting August 1st, 2012 and August 10st, 2012 will make all days between 1st and 10st holiday, and will affect August 1-10 in other years.</div> |
394 |
</li> |
394 |
</li> |
395 |
<li class="radio"> |
395 |
<li class="radio"> |
396 |
<input type="checkbox" name="allBranches" id="allBranches" /> |
396 |
<input type="checkbox" name="allBranches" id="allBranches" /> |
397 |
<label for="allBranches">Copy to all libraries</label>. |
397 |
<label for="allBranches">Copy to all libraries</label>. |
398 |
<a href="#" class="helptext">[?]</a> |
398 |
<a href="#" class="helptext">[?]</a> |
399 |
<div class="hint">If checked, this holiday will be copied to all libraries. If the holiday already exists for a library, no change is made.</div> |
399 |
<div class="hint">If checked, this holiday will be copied to all libraries. If the holiday already exists for a library, no change is made.</div> |
400 |
</li></ol> |
400 |
</li></ol> |
401 |
<fieldset class="action"> |
401 |
<fieldset class="action"> |
402 |
<input type="submit" name="submit" value="Save" /> |
402 |
<input type="submit" name="submit" value="Save" /> |
403 |
<a href="#" class="cancel" name="cancel2" onclick=" hidePanel('newHoliday');">Cancel</a> |
403 |
<a href="#" class="cancel" name="cancel2" onclick=" hidePanel('newHoliday');">Cancel</a> |
404 |
</fieldset> |
404 |
</fieldset> |
405 |
</fieldset> |
405 |
</fieldset> |
406 |
</form> |
406 |
</form> |
407 |
</div> |
407 |
</div> |
408 |
|
408 |
|
409 |
<!-- *************************************************************************************** --> |
409 |
<!-- *************************************************************************************** --> |
410 |
<!-- ****** END OF FLAT PANELS ****** --> |
410 |
<!-- ****** END OF FLAT PANELS ****** --> |
411 |
<!-- *************************************************************************************** --> |
411 |
<!-- *************************************************************************************** --> |
412 |
|
412 |
|
413 |
<!-- ************************************************************************************** --> |
413 |
<!-- ************************************************************************************** --> |
414 |
<!-- ****** MAIN SCREEN CODE ****** --> |
414 |
<!-- ****** MAIN SCREEN CODE ****** --> |
Lines 418-424
td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9
Link Here
|
418 |
|
418 |
|
419 |
<div style="margin-top: 2em;"> |
419 |
<div style="margin-top: 2em;"> |
420 |
<form action="copy-holidays.pl" method="post"> |
420 |
<form action="copy-holidays.pl" method="post"> |
421 |
<input type="hidden" name="from_branchcode" value="[% branch %]" /> |
421 |
<input type="hidden" name="from_branchcode" value="[% branch %]" /> |
422 |
<label for="branchcode">Copy holidays to:</label> |
422 |
<label for="branchcode">Copy holidays to:</label> |
423 |
<select id="branchcode" name="branchcode"> |
423 |
<select id="branchcode" name="branchcode"> |
424 |
<option value=""></option> |
424 |
<option value=""></option> |
Lines 426-432
td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9
Link Here
|
426 |
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option> |
426 |
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option> |
427 |
[% END %] |
427 |
[% END %] |
428 |
</select> |
428 |
</select> |
429 |
<input type="submit" value="Copy" /> |
429 |
<input type="submit" value="Copy" /> |
430 |
</form> |
430 |
</form> |
431 |
</div> |
431 |
</div> |
432 |
|
432 |
|
Lines 434-454
td.repeatableyearly a.ui-state-default, .repeatableyearly { background: #FFFF9
Link Here
|
434 |
<div class="yui-u"> |
434 |
<div class="yui-u"> |
435 |
<div class="help"> |
435 |
<div class="help"> |
436 |
<h4>Hints</h4> |
436 |
<h4>Hints</h4> |
437 |
<ul> |
437 |
<ul> |
438 |
<li>Search in the calendar the day you want to set as holiday.</li> |
438 |
<li>Search in the calendar the day you want to set as holiday.</li> |
439 |
<li>Click the date to add or edit a holiday.</li> |
439 |
<li>Click the date to add or edit a holiday.</li> |
440 |
<li>Enter a title and description for the holdiay.</li> |
440 |
<li>Enter a title and description for the holdiay.</li> |
441 |
<li>Specify how the holiday should repeat.</li> |
441 |
<li>Specify how the holiday should repeat.</li> |
442 |
<li>Click Save to finish.</li> |
442 |
<li>Click Save to finish.</li> |
443 |
</ul> |
443 |
</ul> |
444 |
<h4>Key</h4> |
444 |
<h4>Key</h4> |
445 |
<p> |
445 |
<p> |
446 |
<span class="key normalday">Working day</span> |
446 |
<span class="key normalday">Working day</span> |
447 |
<span class="key holiday">Unique holiday</span> |
447 |
<span class="key holiday">Unique holiday</span> |
448 |
<span class="key repeatableweekly">Holiday repeating weekly</span> |
448 |
<span class="key repeatableweekly">Holiday repeating weekly</span> |
449 |
<span class="key repeatableyearly">Holiday repeating yearly</span> |
449 |
<span class="key repeatableyearly">Holiday repeating yearly</span> |
450 |
<span class="key exception">Holiday exception</span> |
450 |
<span class="key exception">Holiday exception</span> |
451 |
</p> |
451 |
</p> |
452 |
</div> |
452 |
</div> |
453 |
<div id="holiday-list"> |
453 |
<div id="holiday-list"> |
454 |
<!-- Exceptions First --> |
454 |
<!-- Exceptions First --> |
455 |
- |
|
|