[open-ils-commits] [GIT] Evergreen ILS branch master updated. 710b3409c23358b99fcc7f2ce4cec08c54132b83

Evergreen Git git at git.evergreen-ils.org
Wed Mar 27 12:57:06 EDT 2013


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  710b3409c23358b99fcc7f2ce4cec08c54132b83 (commit)
      from  aebfcb20799b9893723aadee121d5b3f3f4b4c89 (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 710b3409c23358b99fcc7f2ce4cec08c54132b83
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Mar 21 09:45:39 2013 -0400

    MARC strip fields for Acquisitions
    
    Added MARC strip field group selector to acquisitions upload interface
    in the same manner as the group selector for non-acq Vandelay
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/templates/acq/common/vlagent.tt2 b/Open-ILS/src/templates/acq/common/vlagent.tt2
index 8d5ede7..98792ca 100644
--- a/Open-ILS/src/templates/acq/common/vlagent.tt2
+++ b/Open-ILS/src/templates/acq/common/vlagent.tt2
@@ -1,3 +1,6 @@
+<style type="text/css">
+    @import "[% ctx.media_prefix %]/js/dojo/dojox/form/resources/CheckedMultiSelect.css";
+</style>
 [% BLOCK vlagent_form %]
     <tr>
         <td>[% l('Upload to Queue') %]</td>
@@ -43,6 +46,15 @@
         <td>[% l('Insufficient Quality Fall-Through Profile') %]</td>
         <td><div id='acq_vl:fall_through_merge_profile'></div></td>
     </tr>
+    <tr id='vl-trash-groups-row'>
+        <td>[% l('Remove MARC Field Groups') %]</td>
+        <td colspan='4'>
+            <select style='overflow-y:auto; height:6em; width:12em' multiple='true' 
+                id='acq_vl:strip_field_groups'
+                dojoType="dojox.form.CheckedMultiSelect">
+            </select>
+        </td>
+    </tr>
     [% IF vl_show_copy_option %]
     <tr>
         <td>[% l('Load Items for Imported Records') %]</td>
diff --git a/Open-ILS/web/js/ui/default/acq/common/vlagent.js b/Open-ILS/web/js/ui/default/acq/common/vlagent.js
index 38df792..827e183 100644
--- a/Open-ILS/web/js/ui/default/acq/common/vlagent.js
+++ b/Open-ILS/web/js/ui/default/acq/common/vlagent.js
@@ -1,6 +1,7 @@
 dojo.require('openils.widget.AutoFieldWidget');
 dojo.require('openils.PermaCrud');
 dojo.require('openils.XUL');
+dojo.require('dojox.form.CheckedMultiSelect');
 
 var xulStorage = openils.XUL.localStorage();
 var storekey = 'eg.acq.upload.';
@@ -43,7 +44,8 @@ function VLAgent(args) {
         {key : 'bib_source', cls : 'cbs'},
         {key : 'merge_profile', cls : 'vmp'},
         {key : 'fall_through_merge_profile', cls : 'vmp'},
-        {key : 'existing_queue', cls : 'vbq'}
+        {key : 'existing_queue', cls : 'vbq'},
+        {key : 'strip_field_groups', cls : 'vibtg'}
     ];
 
     this.loaded = false;
@@ -83,11 +85,60 @@ function VLAgent(args) {
 
     this.init2 = function() {
         var self = this;
+        // fetch the strip field groups, then continue init-ing
+
+        var owner = fieldmapper.aou.orgNodeTrail(
+            fieldmapper.aou.findOrgUnit(new openils.User().user.ws_ou()));
+
+        new openils.PermaCrud().search('vibtg',
+            {   always_apply : 'f',
+                owner: owner.map(function(org) { return org.id(); })
+            }, 
+            {   order_by : {vibtg : ['label']},
+                async: true,
+                oncomplete: function(r) {
+                    var trashGroups = openils.Util.readResponse(r);
+                    var sel = dijit.byId('acq_vl:strip_field_groups');
+
+                    var widg = self.widgets.filter(function(w) {
+                        return w.key == 'strip_field_groups'})[0];
+                    widg.dijit = sel;
+
+                    if (trashGroups.length == 0) {
+                        openils.Util.hide('vl-trash-groups-row');
+
+                    } else {
+
+                        dojo.forEach(trashGroups, function(grp) {
+                            var sn = fieldmapper.aou.findOrgUnit(
+                                grp.owner()).shortname();
+                            var opt = {
+                                label : grp.label() + '&nbsp;(' + sn + ')',
+                                value : grp.id()
+                            };
+                            sel.addOption(opt);
+                        });
+
+                        self.readCachedValue(sel, 'strip_field_groups');
+                    }
+
+                    self.init3();
+                }
+            }
+        );
+
+    },
+
+    this.init3 = function() {
+        var self = this;
 
         dojo.forEach(this.widgets,
             function(widg) {
                 var key = widg.key;
 
+                // strip-fields widget built above
+                if (key == 'strip_field_groups') return;
+
                 if (widg.cls) { // selectors
 
                     new openils.widget.AutoFieldWidget({

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

Summary of changes:
 Open-ILS/src/templates/acq/common/vlagent.tt2    |   12 +++++
 Open-ILS/web/js/ui/default/acq/common/vlagent.js |   53 +++++++++++++++++++++-
 2 files changed, 64 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list