[pve-devel] [PATCH pve-manager 3/3] ext6migrate: adapt the Checkbox column of the firewall panel to ExtJS6

Emmanuel Kasper e.kasper at proxmox.com
Thu Jan 28 14:42:43 CET 2016


API changes in ExtJS6 involved here:
 * 'checkchange' event passes now the record index instead of the whole record
 * record.fields is now an array of Field objects, before it was an Object
---
 www/manager6/grid/FirewallRules.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/www/manager6/grid/FirewallRules.js b/www/manager6/grid/FirewallRules.js
index ae53637..c23fc76 100644
--- a/www/manager6/grid/FirewallRules.js
+++ b/www/manager6/grid/FirewallRules.js
@@ -623,10 +623,11 @@ Ext.define('PVE.FirewallRules', {
 		header: gettext('Enable'),
 		dataIndex: 'enable',
 		listeners: {
-		    checkchange: function(column, record, checked) {
+		    checkchange: function(column, recordIndex, checked) {
+			var record = me.getStore().getData().items[recordIndex];
 			record.commit();
 			var data = {};
-			record.fields.each(function(field) {
+			Ext.Array.forEach(record.getFields(), function(field) {
 			    data[field.name] = record.get(field.name);
 			});
 			if (!me.allow_iface || !data.iface) {
-- 
2.1.4





More information about the pve-devel mailing list