[open-ils-commits] r11906 - trunk/Open-ILS/xul/staff_client/server/patron
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jan 22 10:04:44 EST 2009
Author: erickson
Date: 2009-01-22 10:04:42 -0500 (Thu, 22 Jan 2009)
New Revision: 11906
Modified:
trunk/Open-ILS/xul/staff_client/server/patron/ue_config.js
Log:
better support for handling detachment of last address
Modified: trunk/Open-ILS/xul/staff_client/server/patron/ue_config.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/ue_config.js 2009-01-22 15:03:02 UTC (rev 11905)
+++ trunk/Open-ILS/xul/staff_client/server/patron/ue_config.js 2009-01-22 15:04:42 UTC (rev 11906)
@@ -576,9 +576,14 @@
}
)
);
- if(!patron.addresses())
- patron.addresses([]);
+ if(!patron.addresses()) {
+ patron.addresses([]);
+ patron.billing_address(null);
+ patron.mailing_address(null);
+ patron.ischanged(1);
+ }
+
} else {
address.isdeleted(1);
}
@@ -587,10 +592,10 @@
tbody.removeChild(row);
var bid = patron.billing_address();
- bid = (typeof bid == 'object') ? bid.id() : bid;
+ bid = (bid != null && typeof bid == 'object') ? bid.id() : bid;
var mid = patron.mailing_address();
- mid = (typeof mid == 'object') ? mid.id() : mid;
+ mid = (mid != null && typeof mid == 'object') ? mid.id() : mid;
/* -----------------------------------------------------------------------
More information about the open-ils-commits
mailing list