firewall rules: add fix for editable ComboGrid

This commit is contained in:
Dietmar Maurer 2014-05-22 08:43:04 +02:00
parent 1f3e956a53
commit 060b19b635

View File

@ -51,6 +51,24 @@ Ext.define('PVE.FirewallRulePanel', {
allow_iface: false, allow_iface: false,
onGetValues: function(values) {
var me = this;
// hack: editable ComboGrid returns nothing when empty, so we need to set ''
if (values.source === undefined) {
values.source = '';
}
if (values.dest === undefined) {
values.dest = '';
}
if (values.proto === undefined) {
values.proto = '';
}
return values;
},
initComponent : function() { initComponent : function() {
var me = this; var me = this;
@ -149,10 +167,12 @@ Ext.define('PVE.FirewallRulePanel', {
{ {
xtype: 'pveIPProtocolSelector', xtype: 'pveIPProtocolSelector',
name: 'proto', name: 'proto',
autoSelect: false,
queryDelay: 900000000, // disable query
editable: true,
value: '', value: '',
emptyText: 'any', emptyText: 'any',
fieldLabel: gettext('Protocol'), fieldLabel: gettext('Protocol')
allowBlank: true
}, },
{ {
xtype: 'displayfield', xtype: 'displayfield',