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) {
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'},