[open-ils-commits] r11905 - branches/rel_1_2_4/Evergreen/xul/staff_client/server/patron
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jan 22 10:03:04 EST 2009
Author: erickson
Date: 2009-01-22 10:03:02 -0500 (Thu, 22 Jan 2009)
New Revision: 11905
Modified:
branches/rel_1_2_4/Evergreen/xul/staff_client/server/patron/ue_config.js
Log:
better support for handling detachment of last address
Modified: branches/rel_1_2_4/Evergreen/xul/staff_client/server/patron/ue_config.js
===================================================================
--- branches/rel_1_2_4/Evergreen/xul/staff_client/server/patron/ue_config.js 2009-01-22 15:02:21 UTC (rev 11904)
+++ branches/rel_1_2_4/Evergreen/xul/staff_client/server/patron/ue_config.js 2009-01-22 15:03:02 UTC (rev 11905)
@@ -509,6 +509,8 @@
}
)
);
+ if(!patron.addresses())
+ patron.addresses([]);
/* XXX */
for( var f in dataFields ) {
@@ -530,6 +532,12 @@
}
)
);
+ if(!patron.addresses()) {
+ patron.addresses([]);
+ patron.billing_address(null);
+ patron.mailing_address(null);
+ patron.ischanged(1);
+ }
} else {
address.isdeleted(1);
@@ -539,10 +547,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