LP#1611495 Don't use .xml for MARC21 files in Vandelay Export
authorDan Wells <dbw2@calvin.edu>
Tue, 9 Aug 2016 19:50:50 +0000 (15:50 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 10 Aug 2016 14:35:05 +0000 (10:35 -0400)
The new 'Export Non-imported Records' feature in Vandelay (see bug
LP#1548147) was tweaked before merge to export MARC21 files by default
(rather than MARC-XML). However, the file save dialog still defaults to
(and filters by) ".xml" for the file extension. This is confusing and
otherwise problematic.

Let's go ahead and save the export using a ".mrc" extension instead.
While not an official extension (as far as I know), it is widely used,
easy to understand, and far less likely to cause issues with other
software.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/web/js/ui/default/vandelay/vandelay.js

index ba2cbee..928ef05 100644 (file)
@@ -578,10 +578,10 @@ function vlExportRecordQueue(opts) {
         if (req.readyState == 4) {
             var file_tag = opts.nonimported ? '_nonimported' : '';
             openils.XUL.contentToFileSaveDialog(req.responseText, null, {
-                defaultString : currentQueueName + file_tag + '.xml',
-                defaultExtension : '.xml',
-                filterName : 'XML',
-                filterExtension : '*.xml',
+                defaultString : currentQueueName + file_tag + '.mrc',
+                defaultExtension : '.mrc',
+                filterName : 'MARC21',
+                filterExtension : '*.mrc',
                 filterAll : true
             } );
         }