From: pines Date: Tue, 6 Feb 2007 06:28:27 +0000 (+0000) Subject: 'Print Export' is a non-templated print option that prints the csv dump for a list... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fcebcbbb53692e2a35187d85305a762ff8e0eca0;p=Evergreen.git 'Print Export' is a non-templated print option that prints the csv dump for a list instead of copying it to the clipboard. This is a quick and dirty way of letting staff print line-item billings and payments, and other things. Also merging in a more async'ed copy status interface from head git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0@6900 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js b/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js index 03288a3a66..2d20e1bb24 100644 --- a/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js +++ b/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js @@ -337,6 +337,32 @@ admin.offline_manage_xacts.prototype = { }, false ); + + var print_export_button = document.getElementById('print_export_btn'); + if (print_export_button) print_export_button.addEventListener( + 'command', + function(ev) { + try { + obj.error_list.on_all_fleshed = + function() { + try { + dump( obj.error_list.dump_csv() + '\n' ); + //copy_to_clipboard(obj.error_list.dump_csv()); + JSAN.use('util.print'); var p = new util.print(); + p.simple( obj.error_list.dump_csv(), { 'content_type' : 'text/plain' } ); + setTimeout(function(){ obj.error_list.on_all_fleshed = null; },0); + } catch(E) { + obj.error.standard_unexpected_error_alert('export',E); + } + } + obj.error_list.full_retrieve(); + } catch(E) { + obj.error.standard_unexpected_error_alert('print export',E); + } + }, + false + ); + }, 'check_perm' : function(perms) { diff --git a/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul b/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul index 3b1877b324..c8d991ca62 100644 --- a/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul +++ b/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul @@ -88,6 +88,7 @@