[open-ils-commits] r7666 - in trunk/Open-ILS/xul/staff_client/server: cat circ

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Aug 15 10:03:36 EDT 2007


Author: phasefx
Date: 2007-08-15 09:59:36 -0400 (Wed, 15 Aug 2007)
New Revision: 7666

Modified:
   trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js
   trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js
Log:
Handle a VOLUME_LABEL_EXISTS event.  We might want to consider offering a magic item transfer or volume merge when this happens.  Dan, I apologize for not using messageCatalog here yet; I'm still tinkering with that.

Modified: trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js	2007-08-15 13:30:17 UTC (rev 7665)
+++ trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js	2007-08-15 13:59:36 UTC (rev 7666)
@@ -572,8 +572,16 @@
 											api.FM_ACN_TREE_UPDATE.method,
 											[ ses(), volumes, true ]
 										);
-										if (typeof r.ilsevent != 'undefined') throw(r);
-										alert('Volumes modified.');
+										if (typeof r.ilsevent != 'undefined') {
+                                            switch(r.ilsevent) {
+                                                case 1705 /* VOLUME_LABEL_EXISTS */ :
+                                                    alert("Edit failed:  You tried to change a volume's callnumber to one that is already in use for the given library.  You should transfer the items to the desired callnumber instead.");
+                                                    break;
+                                                default: throw(r);
+                                            }
+                                        } else {
+    										alert('Volumes modified.');
+                                        }
 									} catch(E) {
 										obj.error.standard_unexpected_error_alert('volume update error: ',E);
 									}

Modified: trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js	2007-08-15 13:30:17 UTC (rev 7665)
+++ trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js	2007-08-15 13:59:36 UTC (rev 7666)
@@ -721,8 +721,16 @@
 											api.FM_ACN_TREE_UPDATE.method,
 											[ ses(), volumes, false ]
 										);
-										if (typeof r.ilsevent != 'undefined') throw(r);
-										alert('Volumes modified.');
+                                        if (typeof r.ilsevent != 'undefined') {
+                                            switch(r.ilsevent) {
+                                                case 1705 /* VOLUME_LABEL_EXISTS */ :
+                                                    alert("Edit failed:  You tried to change a volume's callnumber to one that is already in use for the given library.  You should transfer the items to the desired callnumber instead.");
+                                                    break;
+                                                default: throw(r);
+                                            }
+                                        } else {
+    										alert('Volumes modified.');
+                                        }
 									} catch(E) {
 										obj.error.standard_unexpected_error_alert('volume update error: ',E);
 									}



More information about the open-ils-commits mailing list