From 19ab89718293f1ae761a0237cea47ecbfda76f9c Mon Sep 17 00:00:00 2001 From: berick Date: Mon, 23 May 2011 14:17:08 -0400 Subject: [PATCH] avoid pile-up of dojo-attached event handlers for queue upload inputs --- Open-ILS/web/js/ui/default/vandelay/vandelay.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/ui/default/vandelay/vandelay.js b/Open-ILS/web/js/ui/default/vandelay/vandelay.js index 57e220bf87..de1361e96e 100644 --- a/Open-ILS/web/js/ui/default/vandelay/vandelay.js +++ b/Open-ILS/web/js/ui/default/vandelay/vandelay.js @@ -1032,9 +1032,13 @@ function vlFetchQueueSummary(qId, type, onload) { ); } +var _importCancelHandler; +var _importGoHandler; function vlHandleQueueItemsAction(action) { - dojo.connect( + if(_importCancelHandler) dojo.disconnect(_importCancelHandler); + + _importCancelHandler = dojo.connect( queueItemsImportCancelButton, 'onClick', function() { @@ -1042,7 +1046,10 @@ function vlHandleQueueItemsAction(action) { } ); - dojo.connect( + if(_importGoHandler) + dojo.disconnect(_importGoHandler); + + _importGoHandler = dojo.connect( queueItemsImportGoButton, 'onClick', function() { -- 2.11.0