[open-ils-commits] r16913 - in trunk/Open-ILS: src/perlmods/OpenILS/Application/Circ xul/staff_client/server/admin (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jul 12 15:24:32 EDT 2010
Author: senator
Date: 2010-07-12 15:24:28 -0400 (Mon, 12 Jul 2010)
New Revision: 16913
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm
trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.js
trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
Log:
Make a translate button available in the name column of copy locations editor
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm 2010-07-12 18:12:55 UTC (rev 16912)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm 2010-07-12 19:24:28 UTC (rev 16913)
@@ -14,7 +14,7 @@
__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 @@
/);
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(
Modified: trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.js 2010-07-12 18:12:55 UTC (rev 16912)
+++ trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.js 2010-07-12 19:24:28 UTC (rev 16913)
@@ -49,7 +49,7 @@
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 @@
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');
Modified: trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml 2010-07-12 18:12:55 UTC (rev 16912)
+++ trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml 2010-07-12 19:24:28 UTC (rev 16913)
@@ -10,14 +10,18 @@
<head>
<title>&staff.server.admin.copy_locations.title;</title>
+ <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/dojo.js"></script>
+ <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/openils_dojo.js"></script>
+ <script type="text/javascript">
+ dojo.require("fieldmapper.AutoIDL");
+ dojo.require("openils.widget.TranslatorPopup");
+ </script>
<script language='javascript' src='/opac/common/js/utils.js'> </script>
<script language='javascript' src='/opac/common/js//config.js'> </script>
<script language='javascript' src='/opac/common/js/CGI.js'> </script>
<script language='javascript' src='/opac/common/js/Cookie.js'> </script>
<script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
- <script language='javascript' src='/opac/common/js/fmall.js'> </script>
- <script language='javascript' src='/opac/common/js/fmgen.js'> </script>
<script language='javascript' src='/opac/common/js/Cookies.js'> </script>
<script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
<script language='javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
@@ -118,7 +122,10 @@
</thead>
<tbody id='cl_tbody'>
<tr id='cl_row'>
- <td name='cl_name'> </td>
+ <td>
+ <span name='cl_name'></span>
+ <span name="cl_xlate_popup"></span>
+ </td>
<td name='cl_owner'> </td>
<td name='cl_holdable'> </td>
<td name='cl_hold_verify'> </td>
More information about the open-ils-commits
mailing list