From 122bed95f094edd0c358fbb67418e3fe560186cf Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 3 Aug 2006 18:18:10 +0000 Subject: [PATCH] select all for trees, and renew all for items out git-svn-id: svn://svn.open-ils.org/ILS/trunk@5251 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/chrome/content/util/list.js | 13 +++++++++++++ Open-ILS/xul/staff_client/server/patron/items.js | 10 ++++++++++ Open-ILS/xul/staff_client/server/patron/items.xul | 1 + Open-ILS/xul/staff_client/server/patron/items_overlay.xul | 2 ++ 4 files changed, 26 insertions(+) diff --git a/Open-ILS/xul/staff_client/chrome/content/util/list.js b/Open-ILS/xul/staff_client/chrome/content/util/list.js index 0154aa87c9..1607429c11 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/list.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/list.js @@ -577,6 +577,19 @@ util.list.prototype = { this.error.sdump('D_LIST',s); }, + 'select_all' : function(params) { + var obj = this; + switch(this.node.nodeName) { + case 'tree' : return this._select_all_from_tree(params); break; + default: throw('NYI: Need ._select_all_from_() for ' + this.node.nodeName); break; + } + }, + + '_select_all_from_tree' : function(params) { + var obj = this; + this.node.view.selection.selectAll(); + }, + 'retrieve_selection' : function(params) { var obj = this; switch(this.node.nodeName) { diff --git a/Open-ILS/xul/staff_client/server/patron/items.js b/Open-ILS/xul/staff_client/server/patron/items.js index be3d9d6a5b..b62fcb4472 100644 --- a/Open-ILS/xul/staff_client/server/patron/items.js +++ b/Open-ILS/xul/staff_client/server/patron/items.js @@ -26,6 +26,7 @@ patron.items.prototype = { 'cmd_items_print' : [ ['command'], function() { obj.items_print(1); } ], 'cmd_items_print2' : [ ['command'], function() { obj.items_print(2); } ], 'cmd_items_renew' : [ ['command'], function() { obj.items_renew(1); } ], + 'cmd_items_renew_all' : [ ['command'], function() { obj.items_renew_all(); } ], 'cmd_items_renew2' : [ ['command'], function() { obj.items_renew(2); } ], 'cmd_items_edit' : [ ['command'], function() { obj.items_edit(1); } ], 'cmd_items_edit2' : [ ['command'], function() { obj.items_edit(2); } ], @@ -92,6 +93,15 @@ patron.items.prototype = { } }, + 'items_renew_all' : function() { + try { + this.list.select_all(); + this.items_renew(1); + } catch(E) { + this.error.standard_unexpected_error_alert('Items were not likely renewed',E); + } + }, + 'items_renew' : function(which) { var obj = this; try{ diff --git a/Open-ILS/xul/staff_client/server/patron/items.xul b/Open-ILS/xul/staff_client/server/patron/items.xul index bb5f8212f8..f1f99e3787 100644 --- a/Open-ILS/xul/staff_client/server/patron/items.xul +++ b/Open-ILS/xul/staff_client/server/patron/items.xul @@ -66,6 +66,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/patron/items_overlay.xul b/Open-ILS/xul/staff_client/server/patron/items_overlay.xul index 34ae66b5b3..1008149f2e 100644 --- a/Open-ILS/xul/staff_client/server/patron/items_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/items_overlay.xul @@ -16,6 +16,7 @@ + @@ -70,6 +71,7 @@ + -- 2.11.0