check UPDATE_COPY perm against circ_lib for pre-cats
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Sep 2006 02:37:02 +0000 (02:37 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Sep 2006 02:37:02 +0000 (02:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5938 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/admin/transit_list.js
Open-ILS/xul/staff_client/server/cat/copy_browser.js
Open-ILS/xul/staff_client/server/cat/copy_buckets.js
Open-ILS/xul/staff_client/server/circ/checkin.js
Open-ILS/xul/staff_client/server/circ/copy_status.js

index ee5e33f..1444a99 100644 (file)
@@ -444,7 +444,7 @@ admin.transit_list.prototype = {
                                        util.functional.map_list(
                                                copies,
                                                function (o) {
-                                                       return obj.network.simple_request('FM_ACN_RETRIEVE',[o.call_number()]).owning_lib();
+                                                       return o.call_number() == -1 ? o.circ_lib() : obj.network.simple_request('FM_ACN_RETRIEVE',[o.call_number()]).owning_lib();
                                                }
                                        ),
                                        copies.length == 1 ? [ 'UPDATE_COPY' ] : [ 'UPDATE_COPY', 'UPDATE_BATCH_COPY' ]
index f5c071d..4d514d8 100644 (file)
@@ -305,7 +305,12 @@ cat.copy_browser.prototype = {
                                                                                                util.functional.map_list(
                                                                                                        list,
                                                                                                        function (o) {
-                                                                                                               return obj.map_acn[ 'acn_' + obj.map_acp[ 'acp_' + o ].call_number() ].owning_lib();
+                                                                                                               var o_acp = obj.map_acp[ 'acp_' + o ].call_number();
+                                                                                                               if (o_acp.call_number() == -1) {
+                                                                                                                       return o_acp.circ_lib();
+                                                                                                               } else {
+                                                                                                                       return obj.map_acn[ 'acn_' + o_acp.call_number() ].owning_lib();
+                                                                                                               }
                                                                                                        }
                                                                                                ),
                                                                                                list.length == 1 ? [ 'UPDATE_COPY' ] : [ 'UPDATE_COPY', 'UPDATE_BATCH_COPY' ]
index 6ea2c18..3231e09 100644 (file)
@@ -344,7 +344,7 @@ cat.copy_buckets.prototype = {
                                                                                        util.functional.map_list(
                                                                                                copies,
                                                                                                function (o) {
-                                                                                                       return obj.network.simple_request('FM_ACN_RETRIEVE',[o.call_number()]).owning_lib();
+                                                                                                       return o.call_number() == -1 ? o.circ_lib() : obj.network.simple_request('FM_ACN_RETRIEVE',[o.call_number()]).owning_lib();
                                                                                                }
                                                                                        ),
                                                                                        copies.length == 1 ? [ 'UPDATE_COPY' ] : [ 'UPDATE_COPY', 'UPDATE_BATCH_COPY' ]
index 716464c..13faade 100644 (file)
@@ -363,7 +363,7 @@ circ.checkin.prototype = {
                                        util.functional.map_list(
                                                copies,
                                                function (o) {
-                                                       return obj.network.simple_request('FM_ACN_RETRIEVE',[o.call_number()]).owning_lib();
+                                                       return o.call_number() == -1 ? o.circ_lib() : obj.network.simple_request('FM_ACN_RETRIEVE',[o.call_number()]).owning_lib();
                                                }
                                        ),
                                        copies.length == 1 ? [ 'UPDATE_COPY' ] : [ 'UPDATE_COPY', 'UPDATE_BATCH_COPY' ]
index a03419a..09c7811 100644 (file)
@@ -381,7 +381,7 @@ circ.copy_status.prototype = {
                                        util.functional.map_list(
                                                copies,
                                                function (o) {
-                                                       return obj.network.simple_request('FM_ACN_RETRIEVE',[o.call_number()]).owning_lib();
+                                                       return o.call_number() == -1 ? o.circ_lib() : obj.network.simple_request('FM_ACN_RETRIEVE',[o.call_number()]).owning_lib();
                                                }
                                        ),
                                        copies.length == 1 ? [ 'UPDATE_COPY' ] : [ 'UPDATE_COPY', 'UPDATE_BATCH_COPY' ]