mitigate update/display race. check return value
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 11 Sep 2006 05:44:17 +0000 (05:44 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 11 Sep 2006 05:44:17 +0000 (05:44 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6058 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/util.js

index a93d2b7..2901bf6 100644 (file)
@@ -218,12 +218,15 @@ cat.util.spawn_copy_editor = function(list,edit) {
                                api.FM_ACP_FLESHED_BATCH_UPDATE.method,
                                [ ses(), copies, true ]
                        );
-                       /* FIXME -- revisit the return value here */
+                       if (typeof r.ilsevent != 'undefined') {
+                               if (r.ilsevent != 0) throw(r);
+                       }
+                       alert('Copies modified.');
                } catch(E) {
                        obj.error.standard_unexpected_error_alert('copy update error',E);
                }
        } else {
-               //alert('not updating');
+               if (edit=='1') alert('Copies not modified.');
        }
        } catch(E) {
                alert(E);