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

Evergreen Git git at git.evergreen-ils.org
Thu Feb 14 17:43:59 EST 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  c26ef914b2b460b4cbaaf2aa43f10f3efd3feb87 (commit)
       via  2b5fc07b79da80c5aaf25103db3df84d543b0a02 (commit)
       via  e3909302e89cdbd4e3bd4de7ec42e3ab3ef1e4c5 (commit)
       via  d320b850c9b1637ba25b4c1f28383f26c8fcaaaf (commit)
       via  c447ff9e7b7740fd2cd1da7d19a145fa5883a726 (commit)
       via  afd6f560bb2e8e599b6dc33ab06b02a248f0c29f (commit)
       via  2317ed132b4db57973650569c23c3a31f1ead737 (commit)
      from  4e48c4a25f54c4043e492792fde1a0fe6ed0c3da (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 c26ef914b2b460b4cbaaf2aa43f10f3efd3feb87
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Feb 14 15:55:49 2013 -0500

    ACQ upload does not persist provider
    
    Do not persist upload provider.  The org unit setting for defining a
    default provide is still available.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

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 0d16c86..38df792 100644
--- a/Open-ILS/web/js/ui/default/acq/common/vlagent.js
+++ b/Open-ILS/web/js/ui/default/acq/common/vlagent.js
@@ -258,14 +258,15 @@ function VLAgent(args) {
         return false; // not yet complete
     };
 
-    this.readCachedValue = function(dij, key) {
+    this.readCachedValue = function(dij, key, ousOnly) {
         var val;
         var setname = osetkey + (setNameMap[key] ? setNameMap[key] : key);
 
         if (ouSettingTrumpsPersist && persistOrgSettings[setname]) {
             val = persistOrgSettings[setname].value;
         } else {
-            val = xulStorage.getItem(storekey + key);
+            if (!ousOnly)
+                val = xulStorage.getItem(storekey + key);
             if (!val && persistOrgSettings[setname])
                 val = persistOrgSettings[setname].value;
         }
diff --git a/Open-ILS/web/js/ui/default/acq/picklist/upload.js b/Open-ILS/web/js/ui/default/acq/picklist/upload.js
index 6b85dbc..df11b0f 100644
--- a/Open-ILS/web/js/ui/default/acq/picklist/upload.js
+++ b/Open-ILS/web/js/ui/default/acq/picklist/upload.js
@@ -37,7 +37,7 @@ function init2() {
     }).build(
         function(w) { 
             providerWidget = w;
-            vlAgent.readCachedValue(w, 'provider');
+            vlAgent.readCachedValue(w, 'provider', true);
         }
     );
 

commit 2b5fc07b79da80c5aaf25103db3df84d543b0a02
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Feb 13 15:20:37 2013 -0500

    ACQ upload persists fiscal year
    
    Persist the last used value for the fiscal year selector.  As noted in
    the code, this is a stop-gap for using the current org unit fiscal year
    as a default, which requires additional UI components.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/web/js/ui/default/acq/picklist/upload.js b/Open-ILS/web/js/ui/default/acq/picklist/upload.js
index 621e1e5..6b85dbc 100644
--- a/Open-ILS/web/js/ui/default/acq/picklist/upload.js
+++ b/Open-ILS/web/js/ui/default/acq/picklist/upload.js
@@ -73,6 +73,11 @@ function init2() {
 function setDefaultFiscalYear(org) {
     org = org || orderAgencyWidget.attr('value');
 
+    // NOTE: Evergreen does not yet offer an interface for managing
+    // fiscal years.  For now, make the fiscal year selector persistant
+    vlAgent.readCachedValue(acqUploadYearSelector, 'fiscal_year');
+    return;
+
     if (org) {
 
         fieldmapper.standardRequest(
@@ -95,6 +100,7 @@ function acqUploadRecords() {
     vlAgent.writeCachedValue(acqPlUploadActivatePo, 'activate_po');
     vlAgent.writeCachedValue(providerWidget, 'provider');
     vlAgent.writeCachedValue(orderAgencyWidget, 'ordering_agency');
+    vlAgent.writeCachedValue(acqUploadYearSelector, 'fiscal_year');
 
     openils.Util.show('acq-pl-upload-progress');
     var picklist = acqPlUploadPlSelector.attr('value');

commit e3909302e89cdbd4e3bd4de7ec42e3ab3ef1e4c5
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Feb 4 16:01:19 2013 -0500

    Repair ACQ upload defaults settings labels
    
    LP 1109258
    
    Replace "Upoad" with "Upload".  Remove preceeding "ACQ..." from labels,
    since it's redundant with the org unit settings group.
    
    Thanks to Ben Shum for finding these label errors.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 2ed62c0..db30e81 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -12157,7 +12157,7 @@ VALUES (
     'acq.upload.default.create_po',
     oils_i18n_gettext(
         'acq.upload.default.create_po',
-        'ACQ Upoad Create PO',
+        'Upload Create PO',
         'coust',
         'label'
     ),
@@ -12174,7 +12174,7 @@ VALUES (
     'acq.upload.default.activate_po',
     oils_i18n_gettext(
         'acq.upload.default.activate_po',
-        'ACQ Upoad Activate PO',
+        'Upload Activate PO',
         'coust',
         'label'
     ),
@@ -12191,7 +12191,7 @@ VALUES (
     'acq.upload.default.provider',
     oils_i18n_gettext(
         'acq.upload.default.provider',
-        'ACQ Upoad Default Provider',
+        'Upload Default Provider',
         'coust',
         'label'
     ),
@@ -12208,7 +12208,7 @@ VALUES (
     'acq.upload.default.vandelay.match_set',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.match_set',
-        'ACQ Upoad Default Match Set',
+        'Upload Default Match Set',
         'coust',
         'label'
     ),
@@ -12225,7 +12225,7 @@ VALUES (
     'acq.upload.default.vandelay.merge_profile',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.merge_profile',
-        'ACQ Upoad Default Merge Profile',
+        'Upload Default Merge Profile',
         'coust',
         'label'
     ),
@@ -12242,7 +12242,7 @@ VALUES (
     'acq.upload.default.vandelay.import_non_matching',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.import_non_matching',
-        'ACQ Upoad Import Non Matching by Default',
+        'Upload Import Non Matching by Default',
         'coust',
         'label'
     ),
@@ -12259,7 +12259,7 @@ VALUES (
     'acq.upload.default.vandelay.merge_on_exact',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.merge_on_exact',
-        'ACQ Upoad Merge on Exact Match by Default',
+        'Upload Merge on Exact Match by Default',
         'coust',
         'label'
     ),
@@ -12276,7 +12276,7 @@ VALUES (
     'acq.upload.default.vandelay.merge_on_best',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.merge_on_best',
-        'ACQ Upoad Merge on Best Match by Default',
+        'Upload Merge on Best Match by Default',
         'coust',
         'label'
     ),
@@ -12293,7 +12293,7 @@ VALUES (
     'acq.upload.default.vandelay.merge_on_single',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.merge_on_single',
-        'ACQ Upoad Merge on Single Match by Default',
+        'Upload Merge on Single Match by Default',
         'coust',
         'label'
     ),
@@ -12310,7 +12310,7 @@ VALUES (
     'acq.upload.default.vandelay.quality_ratio',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.quality_ratio',
-        'ACQ Upoad Default Min. Quality Ratio',
+        'Upload Default Min. Quality Ratio',
         'coust',
         'label'
     ),
@@ -12327,7 +12327,7 @@ VALUES (
     'acq.upload.default.vandelay.low_quality_fall_thru_profile',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.low_quality_fall_thru_profile',
-        'ACQ Upoad Default Insufficient Quality Fall-Thru Profile',
+        'Upload Default Insufficient Quality Fall-Thru Profile',
         'coust',
         'label'
     ),
@@ -12344,7 +12344,7 @@ VALUES (
     'acq.upload.default.vandelay.load_item_for_imported',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.load_item_for_imported',
-        'ACQ Upoad Load Items for Imported Records by Default',
+        'Upload Load Items for Imported Records by Default',
         'coust',
         'label'
     ),
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_po_upload_defaults.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_po_upload_defaults.sql
index a2df99a..58caa73 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_po_upload_defaults.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_po_upload_defaults.sql
@@ -9,7 +9,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.create_po',
     oils_i18n_gettext(
         'acq.upload.default.create_po',
-        'ACQ Upoad Create PO',
+        'Upload Create PO',
         'coust',
         'label'
     ),
@@ -26,7 +26,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.activate_po',
     oils_i18n_gettext(
         'acq.upload.default.activate_po',
-        'ACQ Upoad Activate PO',
+        'Upload Activate PO',
         'coust',
         'label'
     ),
@@ -43,7 +43,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.provider',
     oils_i18n_gettext(
         'acq.upload.default.provider',
-        'ACQ Upoad Default Provider',
+        'Upload Default Provider',
         'coust',
         'label'
     ),
@@ -60,7 +60,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.vandelay.match_set',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.match_set',
-        'ACQ Upoad Default Match Set',
+        'Upload Default Match Set',
         'coust',
         'label'
     ),
@@ -77,7 +77,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.vandelay.merge_profile',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.merge_profile',
-        'ACQ Upoad Default Merge Profile',
+        'Upload Default Merge Profile',
         'coust',
         'label'
     ),
@@ -94,7 +94,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.vandelay.import_non_matching',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.import_non_matching',
-        'ACQ Upoad Import Non Matching by Default',
+        'Upload Import Non Matching by Default',
         'coust',
         'label'
     ),
@@ -111,7 +111,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.vandelay.merge_on_exact',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.merge_on_exact',
-        'ACQ Upoad Merge on Exact Match by Default',
+        'Upload Merge on Exact Match by Default',
         'coust',
         'label'
     ),
@@ -128,7 +128,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.vandelay.merge_on_best',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.merge_on_best',
-        'ACQ Upoad Merge on Best Match by Default',
+        'Upload Merge on Best Match by Default',
         'coust',
         'label'
     ),
@@ -145,7 +145,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.vandelay.merge_on_single',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.merge_on_single',
-        'ACQ Upoad Merge on Single Match by Default',
+        'Upload Merge on Single Match by Default',
         'coust',
         'label'
     ),
@@ -162,7 +162,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.vandelay.quality_ratio',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.quality_ratio',
-        'ACQ Upoad Default Min. Quality Ratio',
+        'Upload Default Min. Quality Ratio',
         'coust',
         'label'
     ),
@@ -179,7 +179,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.vandelay.low_quality_fall_thru_profile',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.low_quality_fall_thru_profile',
-        'ACQ Upoad Default Insufficient Quality Fall-Thru Profile',
+        'Upload Default Insufficient Quality Fall-Thru Profile',
         'coust',
         'label'
     ),
@@ -196,7 +196,7 @@ INSERT INTO config.org_unit_setting_type
     'acq.upload.default.vandelay.load_item_for_imported',
     oils_i18n_gettext(
         'acq.upload.default.vandelay.load_item_for_imported',
-        'ACQ Upoad Load Items for Imported Records by Default',
+        'Upload Load Items for Imported Records by Default',
         'coust',
         'label'
     ),

commit d320b850c9b1637ba25b4c1f28383f26c8fcaaaf
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jan 29 15:10:08 2013 -0500

    ACQ upload form widget persistence release notes
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/docs/RELEASE_NOTES_NEXT/acq_marc_upload_defaults.txt b/docs/RELEASE_NOTES_NEXT/acq_marc_upload_defaults.txt
new file mode 100644
index 0000000..e0e709f
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/acq_marc_upload_defaults.txt
@@ -0,0 +1,7 @@
+Acquisitions MARC Upload Form Persistence
+=========================================
+Adds a two-layer persistence mechanism for the acquisitions MARC file upload
+interface.  A set of org unit settings now exist for managing default values
+for the interface.  Additionally, for each field where no org unit setting
+value is configured, the last-used value will be persisted locally and re-
+used with subsequent loads of the interface.

commit c447ff9e7b7740fd2cd1da7d19a145fa5883a726
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jan 25 15:50:48 2013 -0500

    ACQ upload form widget value persistence
    
    Provides a two-layer persistence mechanism for the ACQ MARC file upload
    interface(s).  For most of the widgets in the upload form, there is now
    a matching org unit setting for configuring values ahead of time.  When
    such a value is configured, the value will be used.  When no org unit
    setting value is configured for a field, the value selected by staff is
    stored locally (at the workstation) and re-used for future loads of the
    interface.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

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 c92a135..0d16c86 100644
--- a/Open-ILS/web/js/ui/default/acq/common/vlagent.js
+++ b/Open-ILS/web/js/ui/default/acq/common/vlagent.js
@@ -1,5 +1,29 @@
 dojo.require('openils.widget.AutoFieldWidget');
 dojo.require('openils.PermaCrud');
+dojo.require('openils.XUL');
+
+var xulStorage = openils.XUL.localStorage();
+var storekey = 'eg.acq.upload.';
+var osetkey = 'acq.upload.default.';
+var persistOrgSettings;
+
+// map local dijit keys/names to their org setting counterparts
+var setNameMap = {
+    match_set : 'vandelay.match_set',
+    merge_profile : 'vandelay.merge_profile',
+    create_assets : 'vandelay.load_item_for_imported',
+    match_quality_ratio : 'vandelay.quality_ratio',
+    auto_overlay_1match : 'vandelay.merge_on_single',
+    import_no_match : 'vandelay.import_non_matching',
+    fall_through_merge_profile : 'vandelay.low_quality_fall_thru_profile',
+    auto_overlay_exact : 'vandelay.merge_on_exact',
+    auto_overlay_best_match : 'vandelay.merge_on_best'
+}
+
+// per-UI setting to change this?
+// if true, set default widget values from org settings
+// (when defined) regardless of any locally persisted value
+var ouSettingTrumpsPersist = true;
 
 function VLAgent(args) {
     args = args || {};
@@ -21,31 +45,70 @@ function VLAgent(args) {
         {key : 'fall_through_merge_profile', cls : 'vmp'},
         {key : 'existing_queue', cls : 'vbq'}
     ];
-    
+
     this.loaded = false;
 
-    this.init = function() {
+    this.init = function(oncomplete) {
+        var self = this;
+
+        // load org unit persist setting values
+        fieldmapper.standardRequest(
+            ['open-ils.actor','open-ils.actor.ou_setting.ancestor_default.batch'],
+            {   async : true,
+                params : [
+                    new openils.User().user.ws_ou(),
+                    [   osetkey + 'create_po',
+                        osetkey + 'activate_po',
+                        osetkey + 'provider',
+                        osetkey + 'vandelay.match_set',
+                        osetkey + 'vandelay.merge_profile',
+                        osetkey + 'vandelay.import_non_matching',
+                        osetkey + 'vandelay.merge_on_exact',
+                        osetkey + 'vandelay.merge_on_best',
+                        osetkey + 'vandelay.merge_on_single',
+                        osetkey + 'vandelay.quality_ratio',
+                        osetkey + 'vandelay.low_quality_fall_thru_profile',
+                        osetkey + 'vandelay.load_item_for_imported'
+                    ]
+                ],
+                oncomplete : function(r) {
+                    persistOrgSettings = openils.Util.readResponse(r);
+                    self.init2();
+                    if (oncomplete) 
+                        oncomplete();
+                }
+            }
+        );
+    };
+
+    this.init2 = function() {
         var self = this;
 
         dojo.forEach(this.widgets,
             function(widg) {
+                var key = widg.key;
+
                 if (widg.cls) { // selectors
 
                     new openils.widget.AutoFieldWidget({
                         fmClass : widg.cls,
                         selfReference : true,
                         orgLimitPerms : [self.limitPerm || 'CREATE_PURCHASE_ORDER'],
-                        parentNode : dojo.byId('acq_vl:' + widg.key),
+                        parentNode : dojo.byId('acq_vl:' + key),
                         searchFilter : (widg.cls == 'vbq') ? {queue_type : 'acq'} : null,
                         useWriteStore :  (widg.cls == 'vbq')
-                    }).build(function(dijit) { 
-                        widg.dijit = dijit; 
+                    }).build(function(dij) { 
+                        widg.dijit = dij; 
+                        if (!key.match(/queue/))
+                            self.readCachedValue(dij, key);
                         self.attachOnChange(widg);
                     }); 
 
                 } else { // bools
-                    widg.dijit = dijit.byId('acq_vl:' + widg.key);
+                    widg.dijit = dijit.byId('acq_vl:' + key);
                     if (!widg.dijit) return; // some fields optional
+                    if (!key.match(/queue/))
+                        self.readCachedValue(widg.dijit, key);
                     self.attachOnChange(widg);
                 }
             }
@@ -131,11 +194,15 @@ function VLAgent(args) {
     }
 
     this.values = function() {
+        var self = this;
         var values = {};
         dojo.forEach(this.widgets,
             function(widg) {
-                if (widg.dijit)
+                if (widg.dijit) {
                     values[widg.key] = widg.dijit.attr('value');
+                    if (!widg.key.match(/queue/))
+                        self.writeCachedValue(widg.dijit, widg.key);
+                }
             }
         );
         return values;
@@ -189,5 +256,39 @@ function VLAgent(args) {
         }
 
         return false; // not yet complete
-    }
+    };
+
+    this.readCachedValue = function(dij, key) {
+        var val;
+        var setname = osetkey + (setNameMap[key] ? setNameMap[key] : key);
+
+        if (ouSettingTrumpsPersist && persistOrgSettings[setname]) {
+            val = persistOrgSettings[setname].value;
+        } else {
+            val = xulStorage.getItem(storekey + key);
+            if (!val && persistOrgSettings[setname])
+                val = persistOrgSettings[setname].value;
+        }
+
+        if (val) dij.attr('value', val);
+        return val;
+    };
+
+    this.writeCachedValue = function(dij, key) {
+        var setname = osetkey + (setNameMap[key] ? setNameMap[key] : key);
+
+        if (ouSettingTrumpsPersist && persistOrgSettings[setname]) {
+            // don't muck up localStorage if we're using org settings
+            xulStorage.removeItem(storekey + key);
+
+        } else {
+            var val = dij.attr('value');
+
+            if (val === null || val === false || val == '') {
+                xulStorage.removeItem(storekey + key);
+            } else {
+                xulStorage.setItem(storekey + key, val);
+            }
+        }
+    };
 }
diff --git a/Open-ILS/web/js/ui/default/acq/picklist/upload.js b/Open-ILS/web/js/ui/default/acq/picklist/upload.js
index 1eb2933..621e1e5 100644
--- a/Open-ILS/web/js/ui/default/acq/picklist/upload.js
+++ b/Open-ILS/web/js/ui/default/acq/picklist/upload.js
@@ -21,6 +21,11 @@ var usingNewPl = false;
 
 function init() {
     dojo.byId('acq-pl-upload-ses').value = openils.User.authtoken;
+    vlAgent = new VLAgent();
+    vlAgent.init(init2);
+}
+
+function init2() {
 
     loadYearSelector();
 
@@ -30,7 +35,10 @@ function init() {
         orgLimitPerms : ['CREATE_PICKLIST', 'CREATE_PURCHASE_ORDER'],
         parentNode : dojo.byId('acq-pl-upload-provider'),
     }).build(
-        function(w) { providerWidget = w }
+        function(w) { 
+            providerWidget = w;
+            vlAgent.readCachedValue(w, 'provider');
+        }
     );
 
     new openils.widget.AutoFieldWidget({
@@ -41,12 +49,13 @@ function init() {
     }).build(
         function(w) { 
             orderAgencyWidget = w 
+            vlAgent.readCachedValue(w, 'ordering_agency');
             dojo.connect(orderAgencyWidget, 'onChange', setDefaultFiscalYear);
         }
     );
 
-    vlAgent = new VLAgent();
-    vlAgent.init();
+    vlAgent.readCachedValue(acqPlUploadCreatePo, 'create_po');
+    vlAgent.readCachedValue(acqPlUploadActivatePo, 'activate_po');
 
     fieldmapper.standardRequest(
         ['open-ils.acq', 'open-ils.acq.picklist.user.retrieve.atomic'],
@@ -80,6 +89,13 @@ function setDefaultFiscalYear(org) {
 }
 
 function acqUploadRecords() {
+
+    // persist widget values
+    vlAgent.writeCachedValue(acqPlUploadCreatePo, 'create_po');
+    vlAgent.writeCachedValue(acqPlUploadActivatePo, 'activate_po');
+    vlAgent.writeCachedValue(providerWidget, 'provider');
+    vlAgent.writeCachedValue(orderAgencyWidget, 'ordering_agency');
+
     openils.Util.show('acq-pl-upload-progress');
     var picklist = acqPlUploadPlSelector.attr('value');
     if(picklist) {

commit afd6f560bb2e8e599b6dc33ab06b02a248f0c29f
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Jan 28 12:02:26 2013 -0500

    ACQ MARC upload UI default values SQL
    
    Adds a series of org unit settings for configuring the default values to
    use for the acquisistions MARC upload interface.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 6e4e460..2ed62c0 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -12150,3 +12150,214 @@ INSERT INTO config.org_unit_setting_type
         'integer',
         544
     );
+
+INSERT INTO config.org_unit_setting_type
+    (name, label, description, grp, datatype, fm_class) 
+VALUES (
+    'acq.upload.default.create_po',
+    oils_i18n_gettext(
+        'acq.upload.default.create_po',
+        'ACQ Upoad Create PO',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.create_po',
+        'Create a purchase order by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+   'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.activate_po',
+    oils_i18n_gettext(
+        'acq.upload.default.activate_po',
+        'ACQ Upoad Activate PO',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.activate_po',
+        'Activate the purchase order by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.provider',
+    oils_i18n_gettext(
+        'acq.upload.default.provider',
+        'ACQ Upoad Default Provider',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.provider',
+        'Default provider to use during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'link',
+    'acqpro'
+), (
+    'acq.upload.default.vandelay.match_set',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.match_set',
+        'ACQ Upoad Default Match Set',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.match_set',
+        'Default match set to use during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'link',
+    'vms'
+), (
+    'acq.upload.default.vandelay.merge_profile',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_profile',
+        'ACQ Upoad Default Merge Profile',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_profile',
+        'Default merge profile to use during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'link',
+    'vmp'
+), (
+    'acq.upload.default.vandelay.import_non_matching',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.import_non_matching',
+        'ACQ Upoad Import Non Matching by Default',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.import_non_matching',
+        'Import non-matching records by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.vandelay.merge_on_exact',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_exact',
+        'ACQ Upoad Merge on Exact Match by Default',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_exact',
+        'Merge records on exact match by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.vandelay.merge_on_best',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_best',
+        'ACQ Upoad Merge on Best Match by Default',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_best',
+        'Merge records on best match by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.vandelay.merge_on_single',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_single',
+        'ACQ Upoad Merge on Single Match by Default',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_single',
+        'Merge records on single match by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.vandelay.quality_ratio',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.quality_ratio',
+        'ACQ Upoad Default Min. Quality Ratio',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.quality_ratio',
+        'Default minimum quality ratio used during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'integer',
+    NULL
+), (
+    'acq.upload.default.vandelay.low_quality_fall_thru_profile',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.low_quality_fall_thru_profile',
+        'ACQ Upoad Default Insufficient Quality Fall-Thru Profile',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.low_quality_fall_thru_profile',
+        'Default low-quality fall through profile used during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'link',
+    'vmp'
+), (
+    'acq.upload.default.vandelay.load_item_for_imported',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.load_item_for_imported',
+        'ACQ Upoad Load Items for Imported Records by Default',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.load_item_for_imported',
+        'Load items for imported records by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+);
+
+
+>>>>>>> ACQ MARC upload UI default values SQL
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_po_upload_defaults.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_po_upload_defaults.sql
new file mode 100644
index 0000000..a2df99a
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_po_upload_defaults.sql
@@ -0,0 +1,214 @@
+
+BEGIN;
+
+-- TODO SET VERSION
+
+INSERT INTO config.org_unit_setting_type
+    (name, label, description, grp, datatype, fm_class) VALUES
+(
+    'acq.upload.default.create_po',
+    oils_i18n_gettext(
+        'acq.upload.default.create_po',
+        'ACQ Upoad Create PO',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.create_po',
+        'Create a purchase order by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+   'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.activate_po',
+    oils_i18n_gettext(
+        'acq.upload.default.activate_po',
+        'ACQ Upoad Activate PO',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.activate_po',
+        'Activate the purchase order by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.provider',
+    oils_i18n_gettext(
+        'acq.upload.default.provider',
+        'ACQ Upoad Default Provider',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.provider',
+        'Default provider to use during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'link',
+    'acqpro'
+), (
+    'acq.upload.default.vandelay.match_set',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.match_set',
+        'ACQ Upoad Default Match Set',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.match_set',
+        'Default match set to use during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'link',
+    'vms'
+), (
+    'acq.upload.default.vandelay.merge_profile',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_profile',
+        'ACQ Upoad Default Merge Profile',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_profile',
+        'Default merge profile to use during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'link',
+    'vmp'
+), (
+    'acq.upload.default.vandelay.import_non_matching',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.import_non_matching',
+        'ACQ Upoad Import Non Matching by Default',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.import_non_matching',
+        'Import non-matching records by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.vandelay.merge_on_exact',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_exact',
+        'ACQ Upoad Merge on Exact Match by Default',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_exact',
+        'Merge records on exact match by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.vandelay.merge_on_best',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_best',
+        'ACQ Upoad Merge on Best Match by Default',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_best',
+        'Merge records on best match by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.vandelay.merge_on_single',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_single',
+        'ACQ Upoad Merge on Single Match by Default',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.merge_on_single',
+        'Merge records on single match by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+), (
+    'acq.upload.default.vandelay.quality_ratio',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.quality_ratio',
+        'ACQ Upoad Default Min. Quality Ratio',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.quality_ratio',
+        'Default minimum quality ratio used during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'integer',
+    NULL
+), (
+    'acq.upload.default.vandelay.low_quality_fall_thru_profile',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.low_quality_fall_thru_profile',
+        'ACQ Upoad Default Insufficient Quality Fall-Thru Profile',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.low_quality_fall_thru_profile',
+        'Default low-quality fall through profile used during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'link',
+    'vmp'
+), (
+    'acq.upload.default.vandelay.load_item_for_imported',
+    oils_i18n_gettext(
+        'acq.upload.default.vandelay.load_item_for_imported',
+        'ACQ Upoad Load Items for Imported Records by Default',
+        'coust',
+        'label'
+    ),
+     oils_i18n_gettext(
+        'acq.upload.default.vandelay.load_item_for_imported',
+        'Load items for imported records by default during ACQ file upload',
+        'coust',
+        'description'
+    ),
+    'acq',
+    'bool',
+    NULL
+);
+
+COMMIT;

commit 2317ed132b4db57973650569c23c3a31f1ead737
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jan 25 15:46:39 2013 -0500

    XUL localStorage interface
    
    localStorage is so much better than cookies.  To use it inside of
    XUL-embedded web pages, we have to use the XUL localStorage interface,
    since window.localStorage is not available within the oils:// protocol.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/web/js/dojo/openils/XUL.js b/Open-ILS/web/js/dojo/openils/XUL.js
index d5f7cc1..656c055 100644
--- a/Open-ILS/web/js/dojo/openils/XUL.js
+++ b/Open-ILS/web/js/dojo/openils/XUL.js
@@ -1,7 +1,6 @@
 if(!dojo._hasResource["openils.XUL"]) {
 
     dojo.provide("openils.XUL");
-    dojo.require('dojo.cookie');
     dojo.declare('openils.XUL', null, {});
 
     openils.XUL.isXUL = function() {
@@ -175,5 +174,27 @@ if(!dojo._hasResource["openils.XUL"]) {
             return 0;
         }
     };
+
+    // returns a ref to a XUL localStorage interface
+    // localStorage is not directly accessible within oils://
+    // http://fartersoft.com/blog/2011/03/07/using-localstorage-in-firefox-extensions-for-persistent-data-storage/
+    openils.XUL.localStorage = function() {
+
+        // in browser mode, use the standard localStorage interface
+        if (!openils.XUL.isXUL()) 
+            return window.localStorage;
+
+        var url = location.protocol + '//' + location.hostname;
+        var ios = Components.classes["@mozilla.org/network/io-service;1"]
+                  .getService(Components.interfaces.nsIIOService);
+        var ssm = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
+                  .getService(Components.interfaces.nsIScriptSecurityManager);
+        var dsm = Components.classes["@mozilla.org/dom/storagemanager;1"]
+                  .getService(Components.interfaces.nsIDOMStorageManager);
+        var uri = ios.newURI(url, "", null);
+        var principal = ssm.getCodebasePrincipal(uri);
+        return dsm.getLocalStorageForPrincipal(principal, "");
+    };
+
  }catch (e) {/*meh*/}
 }

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

Summary of changes:
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |  211 +++++++++++++++++++
 .../upgrade/XXXX.data.acq_po_upload_defaults.sql   |  214 ++++++++++++++++++++
 Open-ILS/web/js/dojo/openils/XUL.js                |   23 ++-
 Open-ILS/web/js/ui/default/acq/common/vlagent.js   |  118 ++++++++++-
 Open-ILS/web/js/ui/default/acq/picklist/upload.js  |   28 +++-
 .../acq_marc_upload_defaults.txt                   |    7 +
 6 files changed, 589 insertions(+), 12 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.acq_po_upload_defaults.sql
 create mode 100644 docs/RELEASE_NOTES_NEXT/acq_marc_upload_defaults.txt


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list