From 484765bd964e286b4c22934414e68f1ddbae99f6 Mon Sep 17 00:00:00 2001 From: mgalgoci Date: Wed, 18 Aug 2004 19:42:23 +0000 Subject: [PATCH] The issue that this fix addresses is the following: When using the uiaccountsel widget to select accounts, when you accidently select something and want to deselect it, when you delete the item, the item is only unhighlighted, and not removed from the uiaccountsel_popup_selection select box in the opener document. This patch simply deletes the child node from the uiaccountsel_popup_selection select box instead of setting the selected false. I've tested this with some variant of msie6/xp, mozilla 1.6/win32, firefox 0.9.3/linux and mozilla 1.4.3/linux. --- phpgwapi/templates/default/uiaccountsel.tpl | 2 +- phpgwapi/templates/edge-it/uiaccountsel.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/templates/default/uiaccountsel.tpl b/phpgwapi/templates/default/uiaccountsel.tpl index 7281039e5a..4dee41c4a7 100644 --- a/phpgwapi/templates/default/uiaccountsel.tpl +++ b/phpgwapi/templates/default/uiaccountsel.tpl @@ -30,7 +30,7 @@ if (selectBox.options[i].selected) { for (j=0; j < openerSelectBox.length; j++) { if (openerSelectBox[j].value == selectBox.options[i].value) { - openerSelectBox[j].selected = false; + openerSelectBox.removeChild(openerSelectBox[j]); } } selectBox.options[i--] = null; diff --git a/phpgwapi/templates/edge-it/uiaccountsel.tpl b/phpgwapi/templates/edge-it/uiaccountsel.tpl index edca18168c..4975b2749a 100644 --- a/phpgwapi/templates/edge-it/uiaccountsel.tpl +++ b/phpgwapi/templates/edge-it/uiaccountsel.tpl @@ -30,7 +30,7 @@ if (selectBox.options[i].selected) { for (j=0; j < openerSelectBox.length; j++) { if (openerSelectBox[j].value == selectBox.options[i].value) { - openerSelectBox[j].selected = false; + openerSelectBox.removeChild(openerSelectBox[j]); } } selectBox.options[i--] = null;