[open-ils-commits] r12148 - branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Feb 11 09:38:26 EST 2009
Author: phasefx
Date: 2009-02-11 09:38:25 -0500 (Wed, 11 Feb 2009)
New Revision: 12148
Modified:
branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets.js
branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul
branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets_overlay.xul
Log:
use the standardized list actions for copy buckets
Modified: branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets.js
===================================================================
--- branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets.js 2009-02-11 04:33:16 UTC (rev 12147)
+++ branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets.js 2009-02-11 14:38:25 UTC (rev 12148)
@@ -81,7 +81,6 @@
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 @@
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 @@
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 @@
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() {
Modified: branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul
===================================================================
--- branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul 2009-02-11 04:33:16 UTC (rev 12147)
+++ branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul 2009-02-11 14:38:25 UTC (rev 12148)
@@ -77,13 +77,6 @@
<messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
<commandset id="copy_buckets_cmds">
- <command id="sel_clip1" />
- <command id="save_columns1" />
- <command id="sel_clip2" />
- <command id="save_columns2" />
- <command id="cmd_print_export1" />
- <command id="cmd_export1" />
- <command id="cmd_print_export2" />
<command id="cmd_copy_buckets_submit_barcode" />
<command id="cmd_copy_buckets_print" />
<command id="cmd_copy_buckets_export" />
Modified: branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets_overlay.xul
===================================================================
--- branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets_overlay.xul 2009-02-11 04:33:16 UTC (rev 12147)
+++ branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/copy_buckets_overlay.xul 2009-02-11 14:38:25 UTC (rev 12148)
@@ -31,10 +31,7 @@
</vbox>
<hbox id="pending_buckets_bottom_ui">
- <button id="save_button1" command="save_columns1" label="&staff.cat.copy_buckets_overlay.pending_buckets.save_columns1;" />
- <button id="clip_button1" command="sel_clip1" label="&staff.cat.copy_buckets_overlay.pending_buckets.sel_clip1;" disabled="true" />
- <button id="cmd_print_export_btn1" command="cmd_print_export1" label="&staff.cat.copy_buckets_overlay.pending_buckets.cmd_print_export1;" />
- <button id="cmd_export_btn1" command="cmd_export1" label="&staff.cat.copy_buckets_overlay.pending_buckets.cmd_export1;" />
+ <hbox id="list_actions1"/>
<spacer flex="1"/>
<button label="&staff.cat.copy_buckets_overlay.pending_buckets.copy_buckets_add.label;" command="copy_buckets_add" accesskey="&staff.cat.copy_buckets_overlay.pending_buckets.copy_buckets_add.accesskey;" image="/xul/server/skin/media/images/down_arrow.gif"/>
<button label="&staff.cat.copy_buckets_overlay.pending_buckets.copy_buckets_sel_add.label;" command="copy_buckets_sel_add" accesskey="" image="/xul/server/skin/media/images/down_arrow.gif"/>
@@ -46,8 +43,6 @@
<button command="copy_buckets_delete_bucket" label="&staff.cat.copy_buckets_overlay.copy_buckets.copy_buckets_delete_bucket.label;"/>
<button id="refresh" label="&staff.cat.copy_buckets_overlay.copy_buckets.refresh.label;"/>
<spacer flex="1"/>
- <button id="save_button2" command="save_columns2" label="&staff.cat.copy_buckets_overlay.copy_buckets.save_columns2.label;" />
- <button id="clip_button2" command="sel_clip2" label="&staff.cat.copy_buckets_overlay.copy_buckets.sel_clip2.label;" disabled="true" />
<button command="copy_buckets_delete_item" label="&staff.cat.copy_buckets_overlay.copy_buckets.delete_item.label;" disabled="true" image="/xul/server/skin/media/images/icon_delete.gif"/>
<button command="copy_buckets_export" label="&staff.cat.copy_buckets_overlay.copy_buckets.export.label;" disabled="true" image="/xul/server/skin/media/images/up_arrow.gif"/>
</hbox>
@@ -61,12 +56,7 @@
</hbox>
<hbox id="copy_buckets_bottom_ui">
- <button id="copy_buckets_print" label="&staff.cat.copy_buckets_overlay.copy_buckets.print.label;" command="cmd_copy_buckets_print" accesskey="&staff.cat.copy_buckets_overlay.copy_buckets.print.accesskey;"/>
- <button id="cmd_print_export_btn2" command="cmd_print_export2" label="&staff.cat.copy_buckets_overlay.copy_buckets.print_export.label;" />
- <button id="copy_buckets_export"
- label="&staff.cat.copy_buckets_overlay.copy_buckets.cmd_copy_buckets_export.label;"
- command="cmd_copy_buckets_export"
- accesskey=""/>
+ <hbox id="list_actions2"/>
<spacer flex="1"/>
<hbox style="background: grey">
<vbox><spacer flex="1"/><label value="&staff.cat.copy_buckets_overlay.copy_buckets.batch.label;" style="font-weight: bold"/><spacer flex="1"/></vbox>
More information about the open-ils-commits
mailing list