1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Outils › Jours de fermeture</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
5 <script language="JavaScript" type="text/javascript">
6 // Captura el evento onmousemove para cualquier navegador
7 if (document.layers) { // Netscape
8 document.captureEvents(Event.MOUSEMOVE);
9 document.onmousemove = captureMousePosition;
10 } else if (document.all) { // Internet Explorer
11 document.onmousemove = captureMousePosition;
12 } else if (document.getElementById) { // Netcsape 6
13 document.onmousemove = captureMousePosition;
21 function captureMousePosition(e) {
22 if (document.layers) {
25 mouseXMax = window.innerWidth + window.pageXOffset;
26 mouseYMax = window.innerHeight + window.pageYOffset;
27 } else if (document.all) {
28 mouseX = window.event.x + document.body.scrollLeft;
29 mouseY = window.event.y + document.body.scrollTop;
30 mouseXMax = document.body.clientWidth + document.body.scrollLeft;
31 mouseYMax = document.body.clientHeight + document.body.scrollTop;
32 } else if (document.getElementById) {
35 mouseXMax = window.innerWidth + window.pageXOffset;
36 mouseYMax = window.innerHeight + window.pageYOffset;
40 function holidayOperation(formObject, opType) {
41 var op = document.getElementsByName('operation');
46 // This function shows the "Show Holiday" panel //
47 function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description) {
49 var panel = document.getElementById('showHoliday');
50 panel.style.display = 'inline';
51 document.getElementById('newHoliday').style.display = 'none';
52 panel.style.top = mouseYMax/2;
53 panel.style.left = (mouseXMax/2) - 250;
54 document.getElementById('showDayname').value = dayName;
55 document.getElementById('showBranchName').value = document.getElementById('branch').value;
56 document.getElementById('showDay').value = day;
57 document.getElementById('showMonth').value = month;
58 document.getElementById('showYear').value = year;
59 document.getElementById('showDescription').value = description;
60 document.getElementsByName('showWeekday')[0].value = weekDay;
61 document.getElementById('showTitle').value = title;
63 if (exceptionPosibility == 1) {
64 document.getElementById('exceptionPosibility').style.display = 'inline';
66 document.getElementById('exceptionPosibility').style.display = 'none';
70 // This function shows the "Add Holiday" panel //
71 function newHoliday (dayName, day, month, year, weekDay) {
72 var panel = document.getElementById('newHoliday');
73 panel.style.display = 'inline';
74 document.getElementById('showHoliday').style.display = 'none';
75 panel.style.top = mouseYMax/2;
76 panel.style.left = (mouseXMax/2) - 250;
77 document.getElementById('newDayname').value = dayName;
78 document.getElementById('newBranchName').value = document.getElementById('branch').value;
79 document.getElementById('newDay').value = day;
80 document.getElementById('newMonth').value = month;
81 document.getElementById('newYear').value = year;
82 document.getElementsByName('newWeekday')[0].value = weekDay;
85 function hidePanel(aPanelName) {
86 document.getElementById(aPanelName).style.display = 'none';
89 function changeBranch () {
90 var branch = document.getElementById('branch').options[document.getElementById('branch').selectedIndex].value;
91 location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + branch;
94 function additionalInformation (anExplanation) {
95 var panel = document.getElementById('information');
96 var paragraph = document.getElementById('explanation');
97 panel.style.display = 'inline'
98 panel.style.top = mouseY;
99 panel.style.left = mouseX;
100 var info = document.createTextNode(anExplanation);
101 if (paragraph.hasChildNodes()) {
102 paragraph.removeChild(paragraph.lastChild);
104 paragraph.appendChild(info);
108 newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
112 <style type="text/css">
114 background-color : #EDEDED;
116 border : 1px solid #000000;
120 background-color : #EDEDED;
122 border : 1px solid #000000;
126 background-color : red;
128 border : 1px solid #000000;
132 background-color : yellow;
134 border : 1px solid #000000;
139 background-color : #DCD2F1;
142 border : 1px solid #000000;
146 background-color : #FFD700;
155 border : 1px solid #000000;
162 <!-- TMPL_INCLUDE NAME="header.inc" -->
163 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
165 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl"> Accueil </a> ›<a href="/cgi-bin/koha/reports/tools-home.pl">Outils</a> › Jours de fermeture</div>
167 <div id="doc3" class="yui-t2">
174 <!-- ******************************** FLAT PANELS ******************************************* -->
175 <!-- ***** Makes all the flat panel to deal with holidays ***** -->
176 <!-- **************************************************************************************** -->
178 <!-- ********************** Panel for showing already loaded holidays *********************** -->
179 <div class="panel" style="position:absolute;background-color:#CCCCCC" id="showHoliday">
180 <form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post">
181 <p onclick=" hidePanel('showHoliday');hidePanel('information')" style="cursor:pointer">
183 <img src="<!-- TMPL_VAR NAME="themelang" -->/images/signClose.gif" border="0" alt="" style="vertical-align:middle" />
186 <label for="showDayname">Nom du jour</label>
187 <input type="text" size="20" id="showDayname" name="showDayname" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
188 <input type="hidden" name="showWeekday" />
191 <label for="showBranchName">Site</label>
192 <input type="text" size="20" id="showBranchName" name="showBranchName" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
194 <div style="display:inline">
195 <label for="showDay">Jour</label> <input type="text" size="2" id="showDay" name="showDay" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
196 <label for="showMonth">Mois</label> <input type="text" size="2" id="showMonth" name="showMonth" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
197 <label for="showYear">Année</label> <input type="text" size="4" id="showYear" name="showYear" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
199 <p><label for="showDescription">Ajouter une description au jour de fermeture</label></p>
201 <textarea rows="2" cols="40" id="showDescription" name="showDescription"></textarea>
203 <div id="exceptionPosibility" style="position:static">
204 <input type="radio" name="showOperation" id="showOperationExc" value="exception" /> <label for="showOperationExc">Créer une exception à ce jour de fermeture</label>
205 <a href="#" onclick=" additionalInformation('You can make an exception for this holiday rule. This means that you will be able to say for a repeatable holiday, that there is one of those days that is going to be an exception.')"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" border="0" alt="Plus d'information"></a>
207 <input type="radio" name="showOperationDel" value="delete" checked="checked" /> <label for="showOperationDel">Supprimer ce jour de fermeture</label>. <a href="#" onclick=" additionalInformation('This will delete this holiday rule. In case it is a repeatable holiday, this option checks for posible exceptions. In case those exists, this option take care of set this exceptions to regular holidays.')"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" border="0" alt="Plus d'information"></a>
209 <input type="submit" name="submit" value="Valider">
210 <input type="button" name="cancel2" value="Annuler" onclick=" hidePanel('showHoliday');hidePanel('information')">
215 <!-- ***************************** Panel to deal with new holidays ********************** -->
216 <div class="panel" style="position:absolute;background-color:#CCCCCC" id="newHoliday">
217 <form action="/cgi-bin/koha/tools/newHolidays.pl" method="post">
219 Ajouter un nouveau jour férié
222 <label for="newDayname">Nom du jour</label>
223 <input type="text" size="20" id="newDayname" name="newDayname" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
224 <input type="hidden" name="newWeekday" />
227 <label for="newBranchName">Site</label>
228 <input type="text" size="20" id="newBranchName" name="newBranchName" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
230 <div style="display:inline">
231 <label for="newDay">Jour</label> <input type="text" size="2" id="newDay" name="newDay" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
232 <label for="newMonth">Mois</label> <input type="text" size="2" id="newMonth" name="newMonth" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
233 <label for="newYear">Année</label> <input type="text" size="4" id="newYear" name="newYear" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
236 <label for="newDescription">Ajouter la description d'un jour férié</label>
237 <textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea>
239 <input type="radio" name="newOperation" id="newOperationOnce" value="holiday" checked="checked" /> <label for="newOperationOnce">Fermeture seulement ce jour là</label>. <a href="#" onclick=" additionalInformation('This will take this date to make it holiday just for this time. Through this option, you can set a single holiday. For example, suppose you are in August 1st, and only for this year you want to make it holiday.')"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" border="0" alt="Plus d'information"></a>
241 <input type="radio" name="newOperation" id="newOperationDay" value="weekday" /> <label for="newOperationDay">Jour de fermeture répété toujours le même jour de la semaine</label>
242 <a href="#" onclick=" additionalInformation('This will take this week day and make it holiday. No matter what date it is, this option will repeat this rule for every week. For example, if this date correspond to a saturday, every saturdays will be holidays.')"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" border="0" alt="Plus d'information"></a>
244 <input type="radio" name="newOperation" id="newOperationYear" value="repeatable" /><label for="newOperationYear">Jour de fermeture répété chaque année à la même date</label>. <a href="#" onclick=" additionalInformation('This will take this day and month as a reference to make it holiday. Through this option, you can repeat this rule for every year. For example, if this date correspond to a August 1st, every August 1st will be holiday, no matter what year you are.')"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" border="0" alt="Plus d'information"></a>
246 <input type="submit" name="submit" value="Valider">
247 <input type="button" name="cancel2" value="Annuler" onclick=" hidePanel('newHoliday');hidePanel('information')">
253 <!-- *************************************************************************************** -->
254 <!-- ****** END OF FLAT PANELS ****** -->
255 <!-- *************************************************************************************** -->
259 <!-- *************************************************************************************** -->
260 <!-- ****** START OF INFORMATION PANEL ****** -->
261 <!-- *************************************************************************************** -->
263 <div class="information" style="position:absolute" id="information" onclick=" hidePanel('information')">
267 <img src="<!-- TMPL_VAR NAME="themelang" -->/images/info.gif" border="0" style="vertical-align:middle" alt="" />
270 <p id="explanation" style="display:inline;align:justify"></p>
276 <!-- ************************************************************************************** -->
277 <!-- ****** END OF INFORMATION PANEL ****** -->
278 <!-- ************************************************************************************** -->
282 <h1>Définir les jours fériés du site <!-- TMPL_VAR name="BRANCHES" --></h1>
284 <li>Rechercher dans le calendrier le jour que vous voulez définir comme férié.</li>
285 <li>Compléter l'information dans le champ adéquat.</li>
286 <li>Après avoir fini l'étape ci-dessus, cliquer sur Valider.</li>
289 <span class="normalday">Jour ouvrable</span>
290 <span class="holiday">Jour férié unique</span>
291 <span class="repeatableday">Jour férié répétable</span>
292 <span class="exception">Exception à un jour férié</span>
295 <!-- ************************************************************************************** -->
296 <!-- ****** MAIN SCREEN CODE ****** -->
297 <!-- ************************************************************************************** -->
299 <div id="calendar-container">
300 <script type="text/javascript">
301 /* Creates all the structures to deal with all diferents kinds of holidays */
302 var week_days = new Array();
303 var holidays = new Array();
304 var exception_holidays = new Array();
305 var day_month_holidays = new Array();
306 var hola= "<!-- TMPL_VAR NAME="code" -->";
307 <!-- TMPL_LOOP NAME="WEEK_DAYS_LOOP" -->
308 week_days["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
310 <!-- TMPL_LOOP NAME="HOLIDAYS_LOOP" -->
311 holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
313 <!-- TMPL_LOOP NAME="EXCEPTION_HOLIDAYS_LOOP" -->
314 exception_holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
316 <!-- TMPL_LOOP NAME="DAY_MONTH_HOLIDAYS_LOOP" -->
317 day_month_holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
320 /* This function gives css clases to each kind of day */
321 function dateStatusHandler(date) {
322 var day = date.getDate();
323 var month = date.getMonth() + 1;
324 var year = date.getFullYear();
325 var weekDay = date.getDay();
326 var dayMonth = month + '/' + day;
327 var dateString = year + '/' + month + '/' + day;
328 if (exception_holidays[dateString] != null) {
330 } else if ((week_days[weekDay] != null) || (day_month_holidays[dayMonth] != null)) {
331 return 'repeatableday';
332 } else if (holidays[dateString] != null) {
339 /* This function is in charge of showing the correct panel considering the kind of holiday */
340 function dateChanged(calendar) {
341 var day = calendar.date.getDate();
342 var month = calendar.date.getMonth() + 1;
343 var year = calendar.date.getFullYear();
344 var weekDay = calendar.date.getDay();
345 var dayName = calendar.date.print('%A');
346 var dayMonth = month + '/' + day;
347 var dateString = year + '/' + month + '/' + day;
348 if (calendar.dateClicked) {
349 if (holidays[dateString] != null) {
350 showHoliday(0, dayName, day, month, year, weekDay, holidays[dateString].title, holidays[dateString].description);
351 } else if (exception_holidays[dateString] != null) {
352 showHoliday(0, dayName, day, month, year, weekDay, exception_holidays[dateString].title, exception_holidays[dateString].description);
353 } else if (week_days[weekDay] != null) {
354 showHoliday(1, dayName, day, month, year, weekDay, week_days[weekDay].title, week_days[weekDay].description);
355 } else if (day_month_holidays[dayMonth] != null) {
356 showHoliday(1, dayName, day, month, year, weekDay, day_month_holidays[dayMonth].title, day_month_holidays[dayMonth].description);
358 newHoliday(dayName, day, month, year, weekDay);
364 flat : "calendar-container",
365 flatCallback : dateChanged,
366 dateStatusFunc : dateStatusHandler
374 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
377 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->