From: erickson Date: Tue, 12 May 2009 14:28:10 +0000 (+0000) Subject: apply a formatter so dojo-1.3 will render the html links X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=aa7a49ae64fc732b0018f70b0fa545b53ba8f979;p=evergreen%2Ftadl.git apply a formatter so dojo-1.3 will render the html links git-svn-id: svn://svn.open-ils.org/ILS/trunk@13143 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js index e00abdd769..13bd9b34b6 100644 --- a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js +++ b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js @@ -155,7 +155,11 @@ function osGetGridData(rowIdx) { function osGetEditLink(rowIdx) { var data = this.grid.model.getRow(rowIdx); if(!data) return ''; - return this.value.replace(/SETTING/, data.name); + return data.name; +} + +function osFormatEditLink(name) { + return this.value.replace(/SETTING/, name); } function osLaunchEditor(name) { diff --git a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml index 33d8d7bcab..bfbb43cff5 100644 --- a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml @@ -200,8 +200,11 @@ var osGridLayout = [{ defaultCell: {styles: 'text-align: center;'}, cells : [[ - {name: 'Edit', get: osGetEditLink, - value: '<a href="javascript:void(0);" onclick="osLaunchEditor(\'SETTING\');">Edit</a>'}, + { name: 'Edit', + value: '<a href="javascript:void(0);" onclick="osLaunchEditor(\'SETTING\');">Edit</a>', + get: osGetEditLink, + formatter : osFormatEditLink + }, {name: 'Setting', get: osGetGridData, field:'label', width:'auto', styles:'text-align:left;'}, {name: 'Context', get: osGetGridData, field:'context'}, {name: 'Value', get: osGetGridData, field:'value', width:'auto'},