From: phasefx Date: Wed, 11 Feb 2009 14:38:25 +0000 (+0000) Subject: use the standardized list actions for copy buckets X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=62e3d216a95479661b8ef3fb5027b843de81e44c;p=Evergreen.git use the standardized list actions for copy buckets git-svn-id: svn://svn.open-ils.org/ILS/branches/staff-client-experiment@12148 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/cat/copy_buckets.js b/Open-ILS/xul/staff_client/server/cat/copy_buckets.js index 373c840b8b..f7f7a624e1 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_buckets.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_buckets.js @@ -81,7 +81,6 @@ cat.copy_buckets.prototype = { try { JSAN.use('util.functional'); var sel = obj.list1.retrieve_selection(); - document.getElementById('clip_button1').disabled = sel.length < 1; obj.selection_list1 = util.functional.map_list( sel, function(o) { return JSON2js(o.getAttribute('retrieve_id')); } @@ -112,7 +111,6 @@ cat.copy_buckets.prototype = { try { JSAN.use('util.functional'); var sel = obj.list2.retrieve_selection(); - document.getElementById('clip_button2').disabled = sel.length < 1; obj.selection_list2 = util.functional.map_list( sel, function(o) { return JSON2js(o.getAttribute('retrieve_id')); } @@ -140,22 +138,32 @@ cat.copy_buckets.prototype = { obj.controller.init( { 'control_map' : { - 'save_columns2' : [ - ['command'], - function() { obj.list2.save_columns(); } - ], - 'save_columns1' : [ - ['command'], - function() { obj.list1.save_columns(); } - ], - 'sel_clip2' : [ - ['command'], - function() { obj.list2.clipboard(); } - ], - 'sel_clip1' : [ - ['command'], - function() { obj.list1.clipboard(); } - ], + 'list_actions1' : [ + ['render'], + function(e) { + return function() { + e.appendChild( obj.list1.render_list_actions() ); + obj.list1.set_list_actions( + { + 'on_complete' : function() { } + } + ); + }; + } + ], + 'list_actions2' : [ + ['render'], + function(e) { + return function() { + e.appendChild( obj.list2.render_list_actions() ); + obj.list2.set_list_actions( + { + 'on_complete' : function() { } + } + ); + }; + } + ], 'copy_buckets_menulist_placeholder' : [ ['render'], function(e) { @@ -580,60 +588,6 @@ cat.copy_buckets.prototype = { obj.list2.dump_csv_to_clipboard(); } ], - 'cmd_export1' : [ - ['command'], - function() { - obj.list1.dump_csv_to_clipboard(); - } - ], - - 'cmd_print_export1' : [ - ['command'], - function() { - try { - obj.list1.on_all_fleshed = - function() { - try { - dump( obj.list1.dump_csv() + '\n' ); - //copy_to_clipboard(obj.list.dump_csv()); - JSAN.use('util.print'); var print = new util.print(); - print.simple(obj.list1.dump_csv(),{'content_type':'text/plain'}); - setTimeout(function(){ obj.list1.on_all_fleshed = null; },0); - } catch(E) { - obj.error.standard_unexpected_error_alert('print export',E); - } - } - obj.list1.full_retrieve(); - } catch(E) { - obj.error.standard_unexpected_error_alert('print export',E); - } - } - ], - - - 'cmd_print_export2' : [ - ['command'], - function() { - try { - obj.list2.on_all_fleshed = - function() { - try { - dump( obj.list2.dump_csv() + '\n' ); - //copy_to_clipboard(obj.list.dump_csv()); - JSAN.use('util.print'); var print = new util.print(); - print.simple(obj.list2.dump_csv(),{'content_type':'text/plain'}); - setTimeout(function(){ obj.list2.on_all_fleshed = null; },0); - } catch(E) { - obj.error.standard_unexpected_error_alert('print export',E); - } - } - obj.list2.full_retrieve(); - } catch(E) { - obj.error.standard_unexpected_error_alert('print export',E); - } - } - ], - 'cmd_copy_buckets_reprint' : [ ['command'], function() { diff --git a/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul b/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul index a5c3cb0c7b..a312771719 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul +++ b/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul @@ -77,13 +77,6 @@ - - - - - - - diff --git a/Open-ILS/xul/staff_client/server/cat/copy_buckets_overlay.xul b/Open-ILS/xul/staff_client/server/cat/copy_buckets_overlay.xul index 6c3e06291e..ffec808514 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_buckets_overlay.xul +++ b/Open-ILS/xul/staff_client/server/cat/copy_buckets_overlay.xul @@ -31,10 +31,7 @@ -