adding barcode generator to Koha
[koha.git] / koha-tmpl / intranet-tmpl / default / en / barcodes / barcodes-top.inc
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
2 \r
3 <html>\r
4 <head>\r
5 <title>KOHA: INTRANET: Parameters</title>\r
6 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
7 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">\r
8 <style>\r
9 .parameters {\r
10         background-color: #86c268;\r
11         color: #FFFFFF;\r
12         text-decoration: normal;\r
13         font-weight: bold;\r
14         }\r
15 a.parameters:hover {\r
16         background-color: #86c268;\r
17         color: #FFFFFF;\r
18         text-decoration: normal;\r
19         font-weight: bold;\r
20         }\r
21 .ranges {\r
22         border:0;\r
23 }\r
24 \r
25 .myTable TD{\r
26   border-width: 0px;\r
27   border-color: navy;\r
28   border-style: solid;\r
29 }\r
30 \r
31 .panel { \r
32         position:relative;\r
33 }\r
34 \r
35 .countryPanel {\r
36         z-index:1;\r
37         width:300px;\r
38         display:none;\r
39         border:1px solid #000000;\r
40         padding:0px;\r
41 }\r
42 </style>\r
43 \r
44 \r
45 <script type="text/javascript">\r
46         // Captura el evento onmousemove para cualquier navegador\r
47         if (document.layers) { // Netscape\r
48                 document.captureEvents(Event.MOUSEMOVE);\r
49             document.onmousemove = captureMousePosition;\r
50         } else if (document.all) { // Internet Explorer\r
51             document.onmousemove = captureMousePosition;\r
52         } else if (document.getElementById) { // Netcsape 6\r
53             document.onmousemove = captureMousePosition;\r
54         }\r
55 \r
56         var mouseXMax = 0;\r
57         var mouseYMax = 0;\r
58         var mouseX = 0;\r
59         var mouseY = 0;\r
60 \r
61         function captureMousePosition(e) {\r
62             if (document.layers) {\r
63                     mouseX = e.pageX;\r
64                         mouseY = e.pageY;\r
65                 mouseXMax = window.innerWidth + window.pageXOffset;\r
66                     mouseYMax = window.innerHeight + window.pageYOffset;\r
67             } else if (document.all) {\r
68                     mouseX = window.event.x + document.body.scrollLeft;\r
69                 mouseY = window.event.y + document.body.scrollTop;\r
70                 mouseXMax = document.body.clientWidth + document.body.scrollLeft;\r
71                 mouseYMax = document.body.clientHeight + document.body.scrollTop;\r
72             } else if (document.getElementById) {\r
73                 mouseX = e.pageX;\r
74                     mouseY = e.pageY;\r
75                 mouseXMax = window.innerWidth + window.pageXOffset;\r
76                 mouseYMax = window.innerHeight + window.pageYOffset;\r
77             }\r
78         }\r
79 \r
80 /* Devuelve true si el explorador es Internet Explorer */\r
81 var IE = document.all?true:false;\r
82 \r
83 function Help() {\r
84         newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');\r
85 }\r
86 \r
87 function correctRange (from, to) {\r
88         if (from <= to) {\r
89                 return true;\r
90         } else {\r
91                 return false;\r
92         }\r
93 }\r
94 \r
95 function emptyField (field) {\r
96         if ((field == null) || (field == "")) {\r
97                 return true;\r
98         } else {\r
99                 return false;\r
100         }\r
101 }\r
102 \r
103 function checkFields (aForm) {\r
104   var option = document.getElementById('rangeType').value;\r
105   if (option == 'continuous') {\r
106         if (emptyField(aForm.from.value) || emptyField(aForm.to.value)) {\r
107                 alert("Please, complete all fields");\r
108             return false;\r
109         } else {\r
110                 if (correctRange(aForm.from.value, aForm.to.value)) {\r
111                         return true;                    \r
112                 } else {\r
113                         alert("The selected range is not correct");\r
114                         return false;\r
115                 }\r
116         }\r
117   } else {\r
118         var codeCount = document.getElementById('inventaryList').options.length;\r
119         if (codeCount == 0) {\r
120                 alert("Please, complete all fields"); \r
121             return false;\r
122         } else {\r
123                 var inventaryList = document.getElementById('inventaryList');\r
124                 var allCodes = '';\r
125                 for (i = 0; i <= inventaryList.options.length - 1; i++) {\r
126                         allCodes = allCodes + "'" + inventaryList.options[i].text + "',";\r
127                 }\r
128                 allCodes = '(' + allCodes.substr(0, allCodes.length - 1) + ')';\r
129                 document.getElementById('individualCodes').value = allCodes;\r
130             return true;\r
131         }\r
132   }\r
133 }\r
134 \r
135 function changeRange(selectBox) {\r
136         var option = selectBox.value;\r
137         var panel = document.getElementById(option);\r
138         panel.style.display = 'inline';\r
139         if (option == 'continuous') {\r
140                 document.getElementById('inventaryList').options.length = 0;\r
141                 document.getElementById('individuals').style.display = 'none';\r
142                 document.getElementById('individualCodes').value = "";\r
143         } else {\r
144                 document.getElementById('from').value = "";\r
145                 document.getElementById('to').value = "";\r
146                 document.getElementById('continuous').style.display = 'none';\r
147         }\r
148 }\r
149 \r
150 function itemExists(code, list) {\r
151   var ok = false;\r
152   var listLength = list.length - 1;\r
153   var count = 0;\r
154   while (!(ok) && (count <= listLength)) {\r
155         if (code == list[count].value) {\r
156           ok = true;\r
157         }\r
158         count = count + 1;\r
159   }\r
160   return ok;    \r
161 }\r
162 \r
163 function addItem() {\r
164   var codeObject = document.getElementById('inventaryCode');\r
165   var inventaryCode = document.getElementById('inventaryCode').value;\r
166   var inventaryList = document.getElementById('inventaryList');\r
167   if (inventaryCode == "") {\r
168     alert('You canĀ“t add an empty code.');\r
169   } else {\r
170     if (itemExists(inventaryCode, inventaryList.options)) {\r
171           codeObject.value = "";\r
172           alert("The code is already included."); \r
173     } else {    \r
174           var optionObject = new Option(inventaryCode, inventaryCode);\r
175            if (!IE) {\r
176              inventaryList.add(optionObject, inventaryList.options[inventaryList.options.length]); \r
177       } else {\r
178             inventaryList.add(optionObject, inventaryList.options.length);\r
179           }\r
180       codeObject.value = "";\r
181     }\r
182   }     \r
183 }\r
184 \r
185 function removeItem() {\r
186   var inventaryList = document.getElementById('inventaryList');\r
187   if (inventaryList.selectedIndex == -1) {\r
188         alert('You have to select a code first.');\r
189   } else {\r
190         inventaryList.options[inventaryList.selectedIndex] = null;\r
191   }\r
192 }\r
193 \r
194         function addCountryCode() {\r
195                 var panel = document.getElementById('addCountryCode');\r
196                 panel.style.display = 'inline';\r
197                 panel.style.top = mouseY;\r
198                 panel.style.left = mouseX;\r
199         }\r
200 </script>\r
201 </head>\r
202 <body onload="javascript: changeRange(document.getElementById('rangeType'))">\r
203 <!-- MENUS -->\r
204 <div id="menubar">\r
205         <span class="koha">KOHA</span>\r
206         <a class="home" href="/cgi-bin/koha/mainpage.pl">Home</a>\r
207         <a class="catalogue" href="/cgi-bin/koha/loadmodules.pl?module=search&amp;type=intranet">Catalogue</a>\r
208         <a class="members" href="/cgi-bin/koha/members/members-home.pl">Members</a>\r
209         <a class="acquisition" href="/cgi-bin/koha/loadmodules.pl?module=acquisitions">Acquisitions</a>\r
210         <a class="circulation"  href="/cgi-bin/koha/circ/circulation.pl">Circulation</a>\r
211         <a class="authority" href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a>\r
212         <a class="reports" href="/cgi-bin/koha/reports-home.pl">Reports</a>\r
213         <a class="parameters" href="/cgi-bin/koha/admin-home.pl">Parameters</a>\r
214         <a class="about" href="/cgi-bin/koha/about.pl">About</a>\r
215         <a class="catalogue" href="/cgi-bin/koha/help.pl" onclick="Help(); return false;">Help</a>\r
216 </div>\r
217 <div id="submenu">\r
218         <span class="koha">options &gt;&gt;&nbsp;&nbsp;</span>\r
219         <a href="/cgi-bin/koha/admin/aqbookfund.pl" class="submenu">Funds</a>\r
220         <a href="/cgi-bin/koha/admin/authorised_values.pl" class="submenu2">Auth value</a>\r
221         <a href="/cgi-bin/koha/admin/thesaurus.pl" class="submenu">Thesaurus</a>\r
222         <a href="/cgi-bin/koha/admin/currency.pl" class="submenu2">Currencies</a>\r
223         <a href="/cgi-bin/koha/admin/printers.pl" class="submenu">Printers</a>\r
224 </div>\r
225 <!-- TMPL_IF NAME="loggedinusername" -->\r
226     <p align="left">Logged in as: <!-- TMPL_VAR NAME="loggedinusername" --> [<a href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log Out</a>]</p>\r
227 <!-- TMPL_ELSE -->\r
228     <p align="left"><a href="/cgi-bin/koha/opac-user.pl">Log In</a> to Koha</p>\r
229 <!-- /TMPL_IF -->\r