first attempt at record exporting interface
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 8 Aug 2007 15:28:12 +0000 (15:28 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 8 Aug 2007 15:28:12 +0000 (15:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@7633 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/record_buckets.js
Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul

index c4ae5f3..aeef65c 100644 (file)
@@ -467,6 +467,29 @@ cat.record_buckets.prototype = {
                         }
                     ],
 
+                                       'cmd_export_records' : [
+                                               ['command'],
+                                               function() {
+                                                       try {
+                                                               obj.list2.select_all();
+                                                               obj.data.stash_retrieve();
+                                                               JSAN.use('util.functional');
+
+                                                               var record_ids = util.functional.map_list(
+                                                                       obj.list2.dump_retrieve_ids(),
+                                                                       function (o) {
+                                                                               return JSON2js(o).docid; // docid
+                                                                       }
+                                                               );
+                                                               var id_string = 'id=' + record_ids.join('&id=');
+
+                                                               window.location("/export?" + id_string);
+                                                       } catch(E) {
+                                                               obj.error.standard_unexpected_error_alert('Records could not be exported.',E);
+                                                       }
+                                               }
+                                       ],
+
                                        'cmd_merge_records' : [
                                                ['command'],
                                                function() {
index d408896..b484276 100644 (file)
@@ -72,6 +72,7 @@
                <button command="cmd_sel_opac" label="Show All in Catalog" accesskey="S"/>
                <button id="record_buckets_delete_records" command="cmd_delete_records" label="Delete All Records"/>
                <button id="record_buckets_merge_records" command="cmd_merge_records" label="Merge All Records"/>
+               <button id="record_buckets_export_records" command="cmd_export_records" label="Export All Records"/>
        </hbox>
 </hbox>