Tweaks to opac-detail, opac-results. Many changes to opac-shelves.tmpl following...
[koha_fer] / koha-tmpl / opac-tmpl / prog / en / js / script.js
1 /**
2          * this function checks all checkbox 
3          * or uncheck all if there are already checked.
4          */
5         function CheckAll(){
6                 var checkboxes = document.getElementsByTagName('input');
7                 var nbCheckbox = checkboxes.length;
8                 var check = areAllChecked();
9                 check = !check;
10                 for(var i=0;i<nbCheckbox;i++){
11                         if(checkboxes[i].getAttribute('type') == "checkbox" ){
12                                 checkboxes[i].checked = check;
13                         }
14                 }
15         }
16         /**
17          * this function return true if all checkbox are checked
18          */
19         function areAllChecked(){
20                 var checkboxes = document.getElementsByTagName('input');
21                 var nbCheckbox = checkboxes.length;
22                 for(var i=0;i<nbCheckbox;i++){
23                         if(checkboxes[i].getAttribute('type') == "checkbox" ){
24                                 if(checkboxes[i].checked == 0){
25                                         return false;
26                                 }
27                         }
28                 }
29                 return true;
30         }
31
32 function confirmDelete(message) {
33         var agree = confirm(message);
34         if(agree) {
35                 return true;
36         } else {
37                 return false;
38         }
39 }
40
41 function Dopop(link) {
42         newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
43         }