[pve-devel] [PATCH pve-manager 2/3] ext6migrate: replace new with Ext.create()

Emmanuel Kasper e.kasper at proxmox.com
Wed Feb 3 12:11:46 CET 2016


This allows us in the future to use the ExtJS class
autoloader if we want
---
 www/manager6/grid/FirewallRules.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/manager6/grid/FirewallRules.js b/www/manager6/grid/FirewallRules.js
index 37fc262..7c5cfc0 100644
--- a/www/manager6/grid/FirewallRules.js
+++ b/www/manager6/grid/FirewallRules.js
@@ -494,7 +494,7 @@ Ext.define('PVE.FirewallRules', {
 	    throw "no list_refs_url specified";
 	}
 
-	var store = new Ext.data.Store({
+	var store = Ext.create('Ext.data.Store',{
 	    model: 'pve-fw-rule'
 	});
 
@@ -532,7 +532,7 @@ Ext.define('PVE.FirewallRules', {
 	    win.on('destroy', reload);
 	};
 
-	me.editBtn = new PVE.button.Button({
+	me.editBtn = Ext.create('PVE.button.Button',{
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
@@ -569,7 +569,7 @@ Ext.define('PVE.FirewallRules', {
 	    });
 	}
 
-	me.removeBtn = new PVE.button.Button({
+	me.removeBtn = Ext.create('PVE.button.Button',{
 	    text: gettext('Remove'),
 	    selModel: sm,
 	    disabled: true,
-- 
2.1.4





More information about the pve-devel mailing list