Ext.define('pmg-action-list', {
extend: 'Ext.data.Model',
fields: [
- 'id', 'name', 'info', 'descr',
+ 'id', 'name', 'info', 'descr', 'editable',
{ name: 'otype', type: 'integer' }
],
idProperty: 'id'
getUrl: function(rec) {
return me.baseurl + '/objects/' + rec.data.id;
},
+ enableFn: rec => !!rec.data.editable,
callback: reload,
getRecordName: function(rec) { return rec.data.descr; },
waitMsgTarget: me
text: gettext('Edit'),
disabled: true,
selModel: me.selModel,
+ enableFn: rec => !!rec.data.editable,
handler: run_editor
},
remove_btn
flex: 1,
dataIndex: 'info',
renderer: Ext.String.htmlEncode
+ },
+ {
+ header: gettext('Editable'),
+ dataIndex: 'editable',
+ renderer: Proxmox.Utils.format_boolean,
}
],
listeners: {