ObjectGrid: new helper add_text_row

This commit is contained in:
Dietmar Maurer 2017-02-25 10:52:31 +01:00
parent 28e54f37df
commit 5dea30d081

View File

@ -24,6 +24,32 @@ Ext.define('Proxmox.grid.ObjectGrid', {
rows: {},
add_text_row: function(name, text, opts) {
var me = this;
opts = opts || {};
me.rows[name] = {
required: true,
defaultValue: opts.defaultValue,
header: text,
renderer: opts.renderer,
editor: {
xtype: 'proxmoxWindowEdit',
subject: text,
items: {
xtype: 'proxmoxtextfield',
name: name,
deleteEmpty: true,
emptyText: opts.defaultValue,
labelWidth: Proxmox.Utils.compute_min_label_width(
text, opts.labelWidth),
fieldLabel: text
}
}
};
},
add_boolean_row: function(name, text, opts) {
var me = this;