From f72e8b7de56e010a8d26cdac6abc726414204d2e Mon Sep 17 00:00:00 2001 From: oleonard Date: Tue, 25 Jan 2005 22:53:46 +0000 Subject: [PATCH] Three new functions: CheckAll, which toggles checkboxes in results lists; confirmDelete, which offers a warning before proceding with an action; Dopop, for popping up virtual shelves window --- koha-tmpl/opac-tmpl/npl/en/includes/script.js | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/koha-tmpl/opac-tmpl/npl/en/includes/script.js b/koha-tmpl/opac-tmpl/npl/en/includes/script.js index 5db7008aeb..bb4423348e 100644 --- a/koha-tmpl/opac-tmpl/npl/en/includes/script.js +++ b/koha-tmpl/opac-tmpl/npl/en/includes/script.js @@ -38,3 +38,29 @@ function ValidateCode() } } } + +function CheckAll() +{ +count = document.mainform.elements.length; + for (i=0; i < count; i++) + { + if(document.mainform.elements[i].checked == 1){ + document.mainform.elements[i].checked = 0; + } else { + document.mainform.elements[i].checked = 1; + } + } +} + +function confirmDelete(message) { + var agree = confirm(message); + if(agree) { + return true; + } else { + return false; + } +} + +function Dopop(link) { + newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes'); + } \ No newline at end of file -- 2.39.5