[open-ils-commits] r7516 -
trunk/Open-ILS/xul/staff_client/server/cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jul 5 07:15:23 EDT 2007
Author: phasefx
Date: 2007-07-05 07:11:28 -0400 (Thu, 05 Jul 2007)
New Revision: 7516
Modified:
trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js
Log:
'mo better consortial copy; it updates when the tree refreshes.. but also found a pesky race condition with the copy_count call returning null
Modified: trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js 2007-07-05 10:36:52 UTC (rev 7515)
+++ trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js 2007-07-05 11:11:28 UTC (rev 7516)
@@ -919,6 +919,16 @@
obj.show_my_libs( ml.value );
+ obj.show_consortial_count();
+
+ } catch(E) {
+ this.error.standard_unexpected_error_alert('cat.copy_browser.init: ',E);
+ }
+ },
+
+ 'show_consortial_count' : function() {
+ var obj = this;
+ try {
obj.network.simple_request('FM_ACP_COUNT',[ obj.data.tree.aou.id(), obj.docid ],function(req){
try {
var robj = req.getResultObject();
@@ -930,9 +940,8 @@
obj.error.standard_unexpected_error_alert('Error retrieving consortial copy count.',E);
}
});
-
} catch(E) {
- this.error.standard_unexpected_error_alert('cat.copy_browser.init: ',E);
+ this.error.standard_unexpected_error_alert('cat.copy_browser.show_consortial_count: ',E);
}
},
@@ -1633,6 +1642,8 @@
obj.show_libs( org );
*/
obj.show_my_libs( document.getElementById('lib_menu').value );
+ // FIXME - we get a null from the copy_count call if we call it too quickly here
+ setTimeout( function() { obj.show_consortial_count(); }, 2000 );
} catch(E) {
this.error.standard_unexpected_error_alert('Problem refreshing the volume/copy tree.',E);
}
More information about the open-ils-commits
mailing list