[Koha-patches] [PATCH 30/54] MT3531 add a parameter for confirmation or not to basket emptying

paul.poulain at biblibre.com paul.poulain at biblibre.com
Thu Dec 16 11:54:24 CET 2010


From: Paul Poulain <paul.poulain at biblibre.com>

The confirmation is not required if the delBasket is called when the user logout
---
 koha-tmpl/intranet-tmpl/prog/en/js/basket.js |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js
index 0ab6711..373dc17 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js
+++ b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js
@@ -299,10 +299,17 @@ function delRecord (n, s) {
 }
 
 
-function delBasket() {
+// Empty the basket
+// If no_confirmation is set, no dialog message asking the user to confirm will be shown
+function delBasket(no_confirmation) {
 
     var rep = false;
+
+    if (no_confirmation) {
+	rep = true;
+    } else {
     rep = confirm(MSG_CONFIRM_DEL_BASKET);
+    }
     if (rep) {
         delCookie(nameCookie);
         document.location = "about:blank";
-- 
1.7.1



More information about the Koha-patches mailing list