apply a formatter so dojo-1.3 will render the html links
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 12 May 2009 14:28:10 +0000 (14:28 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 12 May 2009 14:28:10 +0000 (14:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13143 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml

index e00abdd..13bd9b3 100644 (file)
@@ -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) {
index 33d8d7b..bfbb43c 100644 (file)
                     var osGridLayout = [{
                         defaultCell: {styles: 'text-align: center;'},
                         cells : [[
-                            {name: 'Edit', get: osGetEditLink, 
-                                value: '&lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;osLaunchEditor(\'SETTING\');&quot;>Edit&lt;/a>'},
+                            {   name: 'Edit', 
+                                value: '&lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;osLaunchEditor(\'SETTING\');&quot;>Edit&lt;/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'},