};
}
-
-__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
# --------------------------------------------------------------------------------
}
-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
*/
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 {
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() {