cleaned up vestigal item import API call; repaired some faulty assumptions in vandela...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 4 Jan 2011 16:28:56 +0000 (16:28 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 4 Jan 2011 16:28:56 +0000 (16:28 +0000)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19103 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Open-ILS/web/js/ui/default/vandelay/vandelay.js
Open-ILS/web/templates/default/vandelay/inc/upload.tt2

index 4f2d630..1311800 100644 (file)
@@ -998,48 +998,6 @@ sub retrieve_queue_summary {
     };
 }
 
-
-__PACKAGE__->register_method(  
-    api_name    => "open-ils.vandelay.bib_record.list.asset.import",
-    method      => 'noop_import_items',
-    api_level   => 1,
-    argc        => 2,
-    stream      => 1,
-    record_type => 'bib'
-);
-__PACKAGE__->register_method(  
-    api_name    => "open-ils.vandelay.bib_record.queue.asset.import",
-    method      => 'noop_import_items',
-    api_level   => 1,
-    argc        => 2,
-    stream      => 1,
-    record_type => 'bib'
-);
-
-sub noop_import_items { return {complete => 1} }
-
-#sub import_record_list_assets {
-#    my($self, $conn, $auth, $import_def, $rec_ids) = @_;
-#    my $e = new_editor(xact=>1, authtoken => $auth);
-#    return $e->die_event unless $e->checkauth;
-#    my $err = import_record_asset_list_impl($conn, $import_def, $rec_ids, $e->requestor);
-#    $e->rollback;
-#    return $err if $err;
-#    return {complete => 1};
-#}
-#
-#sub import_record_queue_assets {
-#    my($self, $conn, $auth, $import_def, $q_id) = @_;
-#    my $e = new_editor(xact=>1, authtoken => $auth);
-#    return $e->die_event unless $e->checkauth;
-#    my $rec_ids = $e->search_vandelay_queued_bib_record(
-#        {queue => $q_id, import_time => {'!=' => undef}}, {idlist => 1});
-#    my $err = import_record_asset_list_impl($conn, $import_def, $rec_ids, $e->requestor);
-#    $e->rollback;
-#    return $err if $err;
-#    return {complete => 1};
-#}
-
 # --------------------------------------------------------------------------------
 # Given a list of queued record IDs, imports all items attached to those records
 # --------------------------------------------------------------------------------
index ed8c153..a54005f 100644 (file)
@@ -941,21 +941,6 @@ function vlImportRecordQueue(type, queueId, noMatchOnly, onload) {
 }
 
 
-function vlImportHoldings(queueId, importProfile, onload) {
-    displayGlobalDiv('vl-generic-progress-with-total');
-    fieldmapper.standardRequest(
-        ['open-ils.vandelay', 'open-ils.vandelay.bib_record.queue.asset.import'],
-        {   async: true,
-            params: [authtoken, importProfile, queueId],
-            onresponse: function(r) {
-                var resp = openils.Util.readResponse(r);
-                vlControlledProgressBar.update({maximum:resp.total, progress:resp.progress});
-            },
-            oncomplete: function() {onload();}
-        }
-    );
-}
-
 /**
   * Create queue, upload MARC, process spool, load the newly created queue 
   */
@@ -965,23 +950,13 @@ function batchUpload() {
 
     var handleProcessSpool = function() {
         if(vlUploadQueueAutoImport.checked || vlUploadQueueAutoOverlayExact.checked || vlUploadQueueAutoOverlay1Match.checked) {
-
+            var noMatchOnly = !vlUploadQueueAutoOverlayExact.checked && !vlUploadQueueAutoOverlay1Match.checked;
             vlImportRecordQueue(
                 currentType, 
                 currentQueueId, 
-                vlUploadQueueAutoImport.checked,  
+                noMatchOnly,
                 function() {
-                    if(vlUploadQueueHoldingsImport.checked) {
-                        vlImportHoldings(
-                            currentQueueId, 
-                            vlUploadQueueHoldingsImportProfile.attr('value'), 
-                            function() { 
-                                retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords);
-                            }
-                        );
-                    } else {
-                        retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords);
-                    }
+                    retrieveQueuedRecords(currentType, currentQueueId, handleRetrieveRecords);
                 }
             );
         } else {
@@ -1025,15 +1000,6 @@ function vlShowUploadForm() {
     vlUploadSourceSelector.setValue(vlBibSources[0].id());
     vlUploadQueueHoldingsImportProfile.store = 
         new dojo.data.ItemFileReadStore({data:viiad.toStoreData(importItemDefs)});
-    vlUploadQueueHoldingsImportProfile.attr('disabled', true);
-    dojo.connect(vlUploadQueueHoldingsImport, 'onChange',
-        function(val) {
-            if(val)
-                vlUploadQueueHoldingsImportProfile.attr('disabled', false);
-            else
-                vlUploadQueueHoldingsImportProfile.attr('disabled', true);
-        }
-    );
 }
 
 function vlShowQueueSelect() {
index 8ab8687..aca6320 100644 (file)
             </td>
         </tr>
         <tr>
-            <td>Import Attached Holdings</td>
-            <td colspan='4'>
-                <input jsId='vlUploadQueueHoldingsImport' dojoType='dijit.form.CheckBox'/>
-            </td>
-        </tr>
-        <tr>
             <td>Holdings Import Profile</td>
             <td>
                 <input jsId='vlUploadQueueHoldingsImportProfile'