[pve-devel] [PATCH manager v2] fix #1698: add_integer_row should add an integer row
Dominik Csapak
d.csapak at proxmox.com
Fri Mar 16 10:55:57 CET 2018
this got mixed up during the change to the widget toolkit
also set deleteEmpty and give a renderer
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes from v1:
* add deleteEmpty
* add renderer
this needs the widget toolkit patch:
[PATCH widget-toolkit] add an optional renderer for integer rows in ObjectGrid
for the renderer to work
www/manager6/grid/FirewallOptions.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/www/manager6/grid/FirewallOptions.js b/www/manager6/grid/FirewallOptions.js
index 819ebb8d..4121f90f 100644
--- a/www/manager6/grid/FirewallOptions.js
+++ b/www/manager6/grid/FirewallOptions.js
@@ -29,7 +29,13 @@ Ext.define('PVE.FirewallOptions', {
me.add_boolean_row(name, text, { defaultValue: defaultValue });
};
var add_integer_row = function(name, text, minValue) {
- me.add_boolean_row(name, text, { minValue: minValue });
+ me.add_integer_row(name, text, {
+ minValue: minValue,
+ deleteEmpty: true,
+ renderer: function(value) {
+ return value || Proxmox.Utils.defaultText;
+ }
+ });
};
var add_log_row = function(name, labelWidth) {
--
2.11.0
More information about the pve-devel
mailing list