From ea2497539b9ac4d403d92046cc632690c7db2c74 Mon Sep 17 00:00:00 2001 From: senator Date: Mon, 12 Jul 2010 19:24:28 +0000 Subject: [PATCH] Make a translate button available in the name column of copy locations editor git-svn-id: svn://svn.open-ils.org/ILS/trunk@16913 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../OpenILS/Application/Circ/CopyLocations.pm | 8 ++++---- .../xul/staff_client/server/admin/copy_locations.js | 11 ++++++++++- .../staff_client/server/admin/copy_locations.xhtml | 13 ++++++++++--- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm index 8172d4434a..0ebe1c7bc5 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm @@ -14,7 +14,7 @@ my $U = "OpenILS::Application::AppUtils"; __PACKAGE__->register_method( api_name => "open-ils.circ.copy_location.retrieve.all", method => 'cl_retrieve_all', - argc => 1, + argc => 2, signature => q/ Retrieves the ranged set of copy locations for the requested org. If no org is provided, all copy locations are returned @@ -24,16 +24,16 @@ __PACKAGE__->register_method( /); sub cl_retrieve_all { - my( $self, $client, $org_id ) = @_; + my( $self, $client, $org_id, $no_i18n ) = @_; if(!$org_id) { my $otree = $U->get_org_tree(); $org_id = $otree->id; } - return new_editor()->search_asset_copy_location({ + return new_editor()->search_asset_copy_location([{ owning_lib => $U->get_org_full_path($org_id) - }); + }, {"no_i18n" => scalar($no_i18n)}]); } __PACKAGE__->register_method( diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.js b/Open-ILS/xul/staff_client/server/admin/copy_locations.js index 253942ff68..51e5da0a25 100644 --- a/Open-ILS/xul/staff_client/server/admin/copy_locations.js +++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.js @@ -49,7 +49,7 @@ function clGo() { function clGo2() { locationSet = {}; - var req = new Request(RETRIEVE_CL, focusOrg); + var req = new Request(RETRIEVE_CL, focusOrg, true /* no i18n */); req.request._last = true; req.callback(clAppendLocation); req.send(); @@ -165,6 +165,15 @@ function clBuildRow( tbody, row, cl ) { edit.onclick = function() { clEdit( cl, tbody, row ); }; checkPermOrgDisabled(edit, cl.owning_lib(), 'UPDATE_COPY_LOCATION'); + if (!window._cl_per_row) + window._cl_per_row = []; + window._cl_per_row.push(cl); + new openils.widget.TranslatorPopup({ + "targetObject": + "window._cl_per_row[" + (window._cl_per_row.length - 1) + "]", + "field": "name" + }, $n(row, "cl_xlate_popup")); + var del = $n( row, 'cl_delete' ); del.onclick = function() { clDelete( cl, tbody, row ); }; checkPermOrgDisabled(del, cl.owning_lib(), 'DELETE_COPY_LOCATION'); diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml index 7be5e240a7..b1f5906556 100644 --- a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml @@ -10,14 +10,18 @@ &staff.server.admin.copy_locations.title; + + + - - @@ -118,7 +122,10 @@ - + + + + -- 2.43.2