From fe8a29d8ac058107b267f7e7d9fa7db085c2c004 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 8 Aug 2007 15:28:12 +0000 Subject: [PATCH] first attempt at record exporting interface git-svn-id: svn://svn.open-ils.org/ILS/trunk@7633 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/server/cat/record_buckets.js | 23 ++++++++++++++++++++++ .../server/cat/record_buckets_overlay.xul | 1 + 2 files changed, 24 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets.js b/Open-ILS/xul/staff_client/server/cat/record_buckets.js index c4ae5f38fb..aeef65c3b3 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets.js +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets.js @@ -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() { diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul b/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul index d408896f4d..b484276309 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul @@ -72,6 +72,7 @@