[open-ils-commits] [GIT] Evergreen ILS branch master updated. 438279618c52de4b43b5265e242e2354e818fdb2

Evergreen Git git at git.evergreen-ils.org
Mon Jul 18 16:03:00 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  438279618c52de4b43b5265e242e2354e818fdb2 (commit)
       via  5444b625ece967e379d045ffa789b74c98c92389 (commit)
      from  8de304ac0b98147ab327954d7d2e9e5d4460a469 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 438279618c52de4b43b5265e242e2354e818fdb2
Merge: 8de304a 5444b62
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Jul 18 15:48:39 2011 -0400

    Merge remote branch 'working/collab/phasefx/unified_vol_copy_ui_from_item_status_ui'
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>


commit 5444b625ece967e379d045ffa789b74c98c92389
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Fri May 20 16:42:11 2011 -0400

    Attempt at providing a per bib invocation of the unified vol/copy editor from Item Status, but it's very capable of exercising the bugs referenced below:
    
    https://bugs.launchpad.net/evergreen/+bug/787561
    https://bugs.launchpad.net/evergreen/+bug/787563
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index 4043024..8fecd66 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -2293,6 +2293,8 @@
 <!ENTITY staff.circ.copy_status_overlay.cmd_find_acq_po.accesskey "F">
 <!ENTITY staff.circ.copy_status_overlay.sel_edit.label "Edit Item Attributes">
 <!ENTITY staff.circ.copy_status_overlay.sel_edit.accesskey "E">
+<!ENTITY staff.circ.copy_status_overlay.sel_vol_copy_edit.label "Edit Items/Volumes Per Bib">
+<!ENTITY staff.circ.copy_status_overlay.sel_vol_copy_edit.accesskey "V">
 <!ENTITY staff.circ.copy_status_overlay.sel_mark_items_damaged.label "Mark Item Damaged">
 <!ENTITY staff.circ.copy_status_overlay.sel_mark_items_damaged.accesskey "D">
 <!ENTITY staff.circ.copy_status_overlay.sel_mark_items_missing.label "Mark Item Missing">
diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status.js b/Open-ILS/xul/staff_client/server/circ/copy_status.js
index bfd7b79..f7ac6dd 100644
--- a/Open-ILS/xul/staff_client/server/circ/copy_status.js
+++ b/Open-ILS/xul/staff_client/server/circ/copy_status.js
@@ -10,6 +10,8 @@ circ.copy_status = function (params) {
     JSAN.use('util.date');
     JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
     JSAN.use('util.sound'); this.sound = new util.sound();
+    JSAN.use('cat.util');
+
 };
 
 circ.copy_status.prototype = {
@@ -57,6 +59,7 @@ circ.copy_status.prototype = {
                             obj.controller.view.sel_checkin.setAttribute('disabled','true');
                             obj.controller.view.cmd_replace_barcode.setAttribute('disabled','true');
                             obj.controller.view.sel_edit.setAttribute('disabled','true');
+                            obj.controller.view.sel_vol_copy_edit.setAttribute('disabled','true');
                             obj.controller.view.sel_opac.setAttribute('disabled','true');
                             obj.controller.view.sel_bucket.setAttribute('disabled','true');
                             obj.controller.view.sel_record_bucket.setAttribute('disabled','true');
@@ -86,6 +89,7 @@ circ.copy_status.prototype = {
                             obj.controller.view.sel_checkin.setAttribute('disabled','false');
                             obj.controller.view.cmd_replace_barcode.setAttribute('disabled','false');
                             obj.controller.view.sel_edit.setAttribute('disabled','false');
+                            obj.controller.view.sel_vol_copy_edit.setAttribute('disabled','false');
                             obj.controller.view.sel_opac.setAttribute('disabled','false');
                             obj.controller.view.sel_patron.setAttribute('disabled','false');
                             obj.controller.view.cmd_triggered_events.setAttribute('disabled','false');
@@ -741,6 +745,58 @@ circ.copy_status.prototype = {
                         }
 
                     ],
+
+                    'sel_vol_copy_edit' : [
+                        ['command'],
+                        function() {
+                            try {
+                                JSAN.use('util.functional');
+
+                                var list = util.functional.map_list( obj.selection_list, function(o) { return o.copy_id; } );
+
+                                var copies = obj.network.simple_request('FM_ACP_FLESHED_BATCH_RETRIEVE',[list]);
+
+                                if (list.length == 0) { return; }
+
+                                var map_acn = {};
+                                var rec_copy_map = {};
+
+                                for (var i = 0; i < copies.length; i++) {
+                                    var volume_id = copies[i].call_number();
+                                    if (! map_acn[volume_id]) {
+                                        map_acn[ volume_id ] = obj.network.simple_request('FM_ACN_RETRIEVE.authoritative',[ volume_id ]);
+                                    }
+                                    copies[i].call_number( map_acn[ volume_id ] );
+                                    var record_id = map_acn[ volume_id ].record();
+                                    if (!rec_copy_map[record_id]) {
+                                        rec_copy_map[record_id] = [];
+                                    }
+                                    rec_copy_map[record_id].push( copies[i] );
+                                }
+
+                                var timeout = 0; // FIXME: stagger invocation of each tab or they'll break for someone unknown reason
+                                var vol_item_creator = function(items) {
+                                    setTimeout(
+                                        function() {
+                                            xulG.volume_item_creator({ 'existing_copies' : items });
+                                        }, timeout
+                                    );
+                                    timeout += 1000;
+                                }
+                                for (var r in rec_copy_map) {
+                                    if (r == -1) { /* no unified interface for pre-cats */ 
+                                        cat.util.spawn_copy_editor( { 'copy_ids' : rec_copy_map[r], 'edit' : 1 } );
+                                    } else {
+                                        vol_item_creator( rec_copy_map[r] );
+                                    }
+                                }
+
+                            } catch(E) {
+                                obj.error.standard_unexpected_error_alert('copy status -> edit items/volumes per bib',E);
+                            }
+                        }
+                    ],
+
                     'cmd_edit_volumes' : [
                         ['command'],
                         function() {
diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status.xul b/Open-ILS/xul/staff_client/server/circ/copy_status.xul
index 6a1411a..351b01b 100644
--- a/Open-ILS/xul/staff_client/server/circ/copy_status.xul
+++ b/Open-ILS/xul/staff_client/server/circ/copy_status.xul
@@ -139,6 +139,7 @@
         <command id="sel_checkin" disabled="true"/>
         <command id="sel_renew" disabled="true"/>
         <command id="sel_edit" disabled="true"/>
+        <command id="sel_vol_copy_edit" disabled="true"/>
         <command id="sel_opac" disabled="true"/>
         <command id="sel_bucket" disabled="true"/>
         <command id="sel_record_bucket" disabled="true" label="&staff.circ.copy_status_overlay.sel_record_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_record_bucket.accesskey;" />
diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul b/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul
index d8ffd77..909b547 100644
--- a/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul
+++ b/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul
@@ -25,6 +25,7 @@
         <menuitem command="cmd_find_acq_po" label="&staff.circ.copy_status_overlay.cmd_find_acq_po.label;" accesskey="&staff.circ.copy_status_overlay.cmd_find_acq_po.accesskey;"/>
         <menuseparator/>
         <menuitem command="sel_edit" label="&staff.circ.copy_status_overlay.sel_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_edit.accesskey;" />
+        <menuitem command="sel_vol_copy_edit" label="&staff.circ.copy_status_overlay.sel_vol_copy_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_vol_copy_edit.accesskey;" />
         <menuseparator/>
         <menuitem command="sel_mark_items_damaged" label="&staff.circ.copy_status_overlay.sel_mark_items_damaged.label;" accesskey="&staff.circ.copy_status_overlay.sel_mark_items_damaged.accesskey;"/>
         <menuseparator/>
@@ -52,6 +53,7 @@
         <menuitem command="sel_patron" label="&staff.circ.copy_status_overlay.sel_patron.label;" accesskey="&staff.circ.copy_status_overlay.sel_patron.accesskey;"/>
         <menuseparator/>
         <menuitem command="sel_edit" label="&staff.circ.copy_status_overlay.sel_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_edit.accesskey;" />
+        <menuitem command="sel_vol_copy_edit" label="&staff.circ.copy_status_overlay.sel_vol_copy_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_vol_copy_edit.accesskey;" />
         <menuitem command="cmd_transfer_items" label="&staff.circ.copy_status_overlay.cmd_transfer_items.label;" accesskey="&staff.circ.copy_status_overlay.cmd_transfer_items.accesskey;"/>
         <menuseparator/>
         <menuitem command="cmd_add_volumes" label="&staff.circ.copy_status_overlay.cmd_add_volumes.label;" accesskey="&staff.circ.copy_status_overlay.cmd_add_volumes.accesskey;"/>
@@ -129,6 +131,7 @@
             <menuitem command="cmd_triggered_events" label="&staff.circ.copy_status_overlay.cmd_triggered_events.label;" accesskey="&staff.circ.copy_status_overlay.cmd_triggered_events.accesskey;"/>
             <menuseparator/>
             <menuitem command="sel_edit" label="&staff.circ.copy_status_overlay.sel_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_edit.accesskey;" />
+            <menuitem command="sel_vol_copy_edit" label="&staff.circ.copy_status_overlay.sel_vol_copy_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_vol_copy_edit.accesskey;" />
             <menuitem command="cmd_transfer_items" label="&staff.circ.copy_status_overlay.cmd_transfer_items.label;" accesskey="&staff.circ.copy_status_overlay.cmd_transfer_items.accesskey;"/>
             <menuseparator/>
             <menuitem command="cmd_add_volumes" label="&staff.circ.copy_status_overlay.cmd_add_volumes.label;" accesskey="&staff.circ.copy_status_overlay.cmd_add_volumes.accesskey;"/>
@@ -167,6 +170,7 @@
             <menuitem command="cmd_find_acq_po" label="&staff.circ.copy_status_overlay.cmd_find_acq_po.label;" accesskey="&staff.circ.copy_status_overlay.cmd_find_acq_po.accesskey;"/>
             <menuseparator/>
             <menuitem command="sel_edit" label="&staff.circ.copy_status_overlay.sel_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_edit.accesskey;" />
+            <menuitem command="sel_vol_copy_edit" label="&staff.circ.copy_status_overlay.sel_vol_copy_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_vol_copy_edit.accesskey;" />
             <menuseparator />
             <menuitem command="sel_mark_items_damaged" label="&staff.circ.copy_status_overlay.sel_mark_items_damaged.label;" accesskey="&staff.circ.copy_status_overlay.sel_mark_items_damaged.accesskey;"/>
             <menuseparator />

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/opac/locale/en-US/lang.dtd            |    2 +
 .../xul/staff_client/server/circ/copy_status.js    |   56 ++++++++++++++++++++
 .../xul/staff_client/server/circ/copy_status.xul   |    1 +
 .../server/circ/copy_status_overlay.xul            |    4 ++
 4 files changed, 63 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list