From d70bb1da472d8ecb3888089970aad4c0d05d2486 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 23 Sep 2009 03:28:17 +0000 Subject: [PATCH] fix bug where oils persist was instigating the behavior associated with checkboxes prematurely. This fixes the duplicate rows problem in the various holds lists git-svn-id: svn://svn.open-ils.org/ILS/trunk@14111 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/chrome/content/OpenILS/global_util.js | 13 ++++++++++--- Open-ILS/xul/staff_client/server/patron/holds_overlay.xul | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js index 0ab8fef44b..c524f632d9 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js @@ -52,9 +52,16 @@ if (value) nodes[i].setAttribute( attribute_list[j], value ); } if (nodes[i].nodeName == 'checkbox' && attribute_list.indexOf('checked') > -1) { - var evt = document.createEvent("Events"); - evt.initEvent( 'command', true, true ); - nodes[i].dispatchEvent(evt); + if (nodes[i].disabled == false && nodes[i].hidden == false) { + var no_poke = nodes[i].getAttribute('oils_persist_no_poke'); + if (no_poke && no_poke == 'true') { + // Timing issue for some checkboxes; don't poke them with an event + } else { + var evt = document.createEvent("Events"); + evt.initEvent( 'command', true, true ); + nodes[i].dispatchEvent(evt); + } + } nodes[i].addEventListener( 'command', function(bk) { diff --git a/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul b/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul index 45e603aeb7..be22ef7fe0 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul @@ -87,7 +87,7 @@