[pve-devel] [PATCH manager 21/49] use Button from widget toolkit

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jan 23 11:05:38 CET 2018


From: Dominik Csapak <d.csapak at proxmox.com>

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 www/manager6/Makefile                |  1 -
 www/manager6/button/Button.js        | 96 ------------------------------------
 www/manager6/ceph/Monitor.js         |  6 +--
 www/manager6/ceph/OSD.js             |  2 +-
 www/manager6/ceph/Pool.js            |  2 +-
 www/manager6/dc/ACLView.js           |  2 +-
 www/manager6/dc/AuthView.js          |  2 +-
 www/manager6/dc/Backup.js            |  2 +-
 www/manager6/dc/GroupView.js         |  2 +-
 www/manager6/dc/OptionView.js        |  2 +-
 www/manager6/dc/PoolView.js          |  2 +-
 www/manager6/dc/SecurityGroups.js    |  4 +-
 www/manager6/dc/StorageView.js       |  2 +-
 www/manager6/dc/UserView.js          |  4 +-
 www/manager6/grid/BackupView.js      |  4 +-
 www/manager6/grid/FirewallAliases.js |  2 +-
 www/manager6/grid/FirewallRules.js   |  4 +-
 www/manager6/grid/PoolMembers.js     |  2 +-
 www/manager6/grid/Replication.js     |  6 +--
 www/manager6/ha/Groups.js            |  2 +-
 www/manager6/ha/Resources.js         |  2 +-
 www/manager6/lxc/Config.js           |  2 +-
 www/manager6/lxc/DNS.js              |  2 +-
 www/manager6/lxc/Network.js          |  4 +-
 www/manager6/lxc/Options.js          |  2 +-
 www/manager6/lxc/Resources.js        |  6 +--
 www/manager6/lxc/SnapshotTree.js     |  6 +--
 www/manager6/node/Config.js          |  4 +-
 www/manager6/node/Disks.js           |  6 +--
 www/manager6/panel/IPSet.js          |  8 +--
 www/manager6/qemu/Config.js          |  2 +-
 www/manager6/qemu/HardwareView.js    | 12 ++---
 www/manager6/qemu/Options.js         |  2 +-
 www/manager6/qemu/SnapshotTree.js    |  6 +--
 www/manager6/storage/ContentView.js  | 10 ++--
 35 files changed, 63 insertions(+), 160 deletions(-)
 delete mode 100644 www/manager6/button/Button.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 47982b17..0bc49f47 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -5,7 +5,6 @@ JSSRC= 				                 	\
 	Toolkit.js					\
 	Parser.js					\
 	StateProvider.js				\
-	button/Button.js				\
 	menu/MenuItem.js				\
 	button/ConsoleButton.js				\
 	button/Split.js					\
diff --git a/www/manager6/button/Button.js b/www/manager6/button/Button.js
deleted file mode 100644
index a661bb45..00000000
--- a/www/manager6/button/Button.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Button features:
- * - observe selection changes to enable/disable the button using enableFn()
- * - pop up confirmation dialog using confirmMsg()
- */
-Ext.define('PVE.button.Button', {
-    extend: 'Ext.button.Button',
-    alias: 'widget.pveButton',
-
-    // the selection model to observe
-    selModel: undefined,
-
-    // if 'false' handler will not be called (button disabled)
-    enableFn: function(record) { },
-
-    // function(record) or text
-    confirmMsg: false,
-
-    // take special care in confirm box (select no as default).
-    dangerous: false,
-
-    initComponent: function() {
-	/*jslint confusion: true */
-
-        var me = this;
-	var grid;
-
-	if (me.handler) {
-
-	    // Note: me.realHandler may be a string (see named scopes)
-	    var realHandler = me.handler;
-
-	    me.handler = function(button, event) {
-		var rec, msg;
-		if (me.selModel) {
-		    rec = me.selModel.getSelection()[0];
-		    if (!rec || (me.enableFn(rec) === false)) {
-			return;
-		    }
-		}
-
-		if (me.confirmMsg) {
-		    msg = me.confirmMsg;
-		    if (Ext.isFunction(me.confirmMsg)) {
-			msg = me.confirmMsg(rec);
-		    }
-		    Ext.MessageBox.defaultButton = me.dangerous ? 2 : 1;
-		    Ext.Msg.show({
-			title: gettext('Confirm'),
-			icon: me.dangerous ? Ext.Msg.WARNING : Ext.Msg.QUESTION,
-			msg: msg,
-			buttons: Ext.Msg.YESNO,
-			defaultFocus: me.dangerous ? 'no' : 'yes',
-			callback: function(btn) {
-			    if (btn !== 'yes') {
-				return;
-			    }
-			    Ext.callback(realHandler, me.scope, [button, event, rec], 0, me);
-			}
-		    });
-		} else {
-		    Ext.callback(realHandler, me.scope, [button, event, rec], 0, me);
-		}
-	    };
-	}
-
-	me.callParent();
-
-	if (!me.selModel && me.selModel !== null) {
-	    grid = me.up('grid');
-	    if (grid && grid.selModel) {
-		me.selModel = grid.selModel;
-	    }
-	}
-
-	if (me.waitMsgTarget === true) {
-	    grid = me.up('grid');
-	    if (grid) {
-		me.waitMsgTarget = grid;
-	    } else {
-		throw "unable to find waitMsgTarget";
-	    }
-	}
-
-	if (me.selModel) {
-
-	    me.mon(me.selModel, "selectionchange", function() {
-		var rec = me.selModel.getSelection()[0];
-		if (!rec || (me.enableFn(rec) === false)) {
-		    me.setDisabled(true);
-		} else  {
-		    me.setDisabled(false);
-		}
-	    });
-	}
-    }
-});
diff --git a/www/manager6/ceph/Monitor.js b/www/manager6/ceph/Monitor.js
index c27b5d27..026d3e59 100644
--- a/www/manager6/ceph/Monitor.js
+++ b/www/manager6/ceph/Monitor.js
@@ -105,7 +105,7 @@ Ext.define('PVE.node.CephMonList', {
 	    });
 	};
 
-	var start_btn = new PVE.button.Button({
+	var start_btn = new Proxmox.button.Button({
 	    text: gettext('Start'),
 	    selModel: sm,
 	    disabled: true,
@@ -114,7 +114,7 @@ Ext.define('PVE.node.CephMonList', {
 	    }
 	});
 
-	var stop_btn = new PVE.button.Button({
+	var stop_btn = new Proxmox.button.Button({
 	    text: gettext('Stop'),
 	    selModel: sm,
 	    disabled: true,
@@ -133,7 +133,7 @@ Ext.define('PVE.node.CephMonList', {
 	    }
 	});
 
-	var remove_btn = new PVE.button.Button({
+	var remove_btn = new Proxmox.button.Button({
 	    text: gettext('Remove'),
 	    selModel: sm,
 	    disabled: true,
diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
index ed147672..c029d3a2 100644
--- a/www/manager6/ceph/OSD.js
+++ b/www/manager6/ceph/OSD.js
@@ -413,7 +413,7 @@ Ext.define('PVE.node.CephOsdTree', {
 	    });
 	};
 
-	var create_btn = new PVE.button.Button({
+	var create_btn = new Proxmox.button.Button({
 	    text: gettext('Create') + ': OSD',
 	    handler: function() {
 		var rec = sm.getSelection()[0];
diff --git a/www/manager6/ceph/Pool.js b/www/manager6/ceph/Pool.js
index 100e6777..d1c59b32 100644
--- a/www/manager6/ceph/Pool.js
+++ b/www/manager6/ceph/Pool.js
@@ -179,7 +179,7 @@ Ext.define('PVE.node.CephPoolList', {
 	    }
 	});
 
-	var destroy_btn = Ext.create('PVE.button.Button', {
+	var destroy_btn = Ext.create('Proxmox.button.Button', {
 	    text: gettext('Destroy'),
 	    selModel: sm,
 	    disabled: true,
diff --git a/www/manager6/dc/ACLView.js b/www/manager6/dc/ACLView.js
index f6688f94..b011e506 100644
--- a/www/manager6/dc/ACLView.js
+++ b/www/manager6/dc/ACLView.js
@@ -151,7 +151,7 @@ Ext.define('PVE.dc.ACLView', {
 	    store.load();
 	};
 
-	var remove_btn = new PVE.button.Button({
+	var remove_btn = new Proxmox.button.Button({
 	    text: gettext('Remove'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/dc/AuthView.js b/www/manager6/dc/AuthView.js
index d2d152a8..841b2c06 100644
--- a/www/manager6/dc/AuthView.js
+++ b/www/manager6/dc/AuthView.js
@@ -39,7 +39,7 @@ Ext.define('PVE.dc.AuthView', {
             win.show();
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index 64f99e32..c4f68407 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -355,7 +355,7 @@ Ext.define('PVE.dc.BackupView', {
             win.show();
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/dc/GroupView.js b/www/manager6/dc/GroupView.js
index ce679732..14d62f6c 100644
--- a/www/manager6/dc/GroupView.js
+++ b/www/manager6/dc/GroupView.js
@@ -46,7 +46,7 @@ Ext.define('PVE.dc.GroupView', {
             win.show();
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js
index 44ca096b..4e62197f 100644
--- a/www/manager6/dc/OptionView.js
+++ b/www/manager6/dc/OptionView.js
@@ -207,7 +207,7 @@ Ext.define('PVE.dc.OptionView', {
 	    win.on('destroy', reload);
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/dc/PoolView.js b/www/manager6/dc/PoolView.js
index b844f724..94b53938 100644
--- a/www/manager6/dc/PoolView.js
+++ b/www/manager6/dc/PoolView.js
@@ -46,7 +46,7 @@ Ext.define('PVE.dc.PoolView', {
             win.show();
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/dc/SecurityGroups.js b/www/manager6/dc/SecurityGroups.js
index 906f2171..b2f9f27d 100644
--- a/www/manager6/dc/SecurityGroups.js
+++ b/www/manager6/dc/SecurityGroups.js
@@ -132,14 +132,14 @@ Ext.define('PVE.SecurityGroupList', {
 	    win.on('destroy', reload);
 	};
 
-	me.editBtn = new PVE.button.Button({
+	me.editBtn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
 	    handler: run_editor
 	});
 
-	me.addBtn = new PVE.button.Button({
+	me.addBtn = new Proxmox.button.Button({
 	    text: gettext('Create'),
 	    handler: function() {
 		sm.deselectAll();
diff --git a/www/manager6/dc/StorageView.js b/www/manager6/dc/StorageView.js
index 9255c6e6..d98fda6f 100644
--- a/www/manager6/dc/StorageView.js
+++ b/www/manager6/dc/StorageView.js
@@ -70,7 +70,7 @@ Ext.define('PVE.dc.StorageView', {
 	    win.on('destroy', reload);
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/dc/UserView.js b/www/manager6/dc/UserView.js
index b14d8d9e..d976d54c 100644
--- a/www/manager6/dc/UserView.js
+++ b/www/manager6/dc/UserView.js
@@ -108,7 +108,7 @@ Ext.define('PVE.dc.UserView', {
             win.show();
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    enableFn: function(rec) {
@@ -118,7 +118,7 @@ Ext.define('PVE.dc.UserView', {
 	    handler: run_editor
 	});
 
-	var pwchange_btn = new PVE.button.Button({
+	var pwchange_btn = new Proxmox.button.Button({
 	    text: gettext('Password'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/grid/BackupView.js b/www/manager6/grid/BackupView.js
index a15b77b1..cb7b86c5 100644
--- a/www/manager6/grid/BackupView.js
+++ b/www/manager6/grid/BackupView.js
@@ -134,7 +134,7 @@ Ext.define('PVE.grid.BackupView', {
 	    }
 	});
 
-	var restore_btn = Ext.create('PVE.button.Button', {
+	var restore_btn = Ext.create('Proxmox.button.Button', {
 	    text: gettext('Restore'),
 	    disabled: true,
 	    selModel: sm,
@@ -175,7 +175,7 @@ Ext.define('PVE.grid.BackupView', {
 	    }
 	});
 
-	var config_btn = Ext.create('PVE.button.Button', {
+	var config_btn = Ext.create('Proxmox.button.Button', {
 	    text: gettext('Show Configuration'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/grid/FirewallAliases.js b/www/manager6/grid/FirewallAliases.js
index f3ec3d5b..eb9a9aa2 100644
--- a/www/manager6/grid/FirewallAliases.js
+++ b/www/manager6/grid/FirewallAliases.js
@@ -134,7 +134,7 @@ Ext.define('PVE.FirewallAliases', {
 	    win.on('destroy', reload);
 	};
 
-	me.editBtn = new PVE.button.Button({
+	me.editBtn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/grid/FirewallRules.js b/www/manager6/grid/FirewallRules.js
index 64834c40..47687ee0 100644
--- a/www/manager6/grid/FirewallRules.js
+++ b/www/manager6/grid/FirewallRules.js
@@ -516,7 +516,7 @@ Ext.define('PVE.FirewallRules', {
 	    win.on('destroy', reload);
 	};
 
-	me.editBtn = Ext.create('PVE.button.Button',{
+	me.editBtn = Ext.create('Proxmox.button.Button',{
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
@@ -561,7 +561,7 @@ Ext.define('PVE.FirewallRules', {
 	    win.on('destroy', reload);
 	};
 
-	me.copyBtn = Ext.create('PVE.button.Button',{
+	me.copyBtn = Ext.create('Proxmox.button.Button',{
 	    text: gettext('Copy'),
 	    selModel: sm,
 	    enableFn: function(rec) {
diff --git a/www/manager6/grid/PoolMembers.js b/www/manager6/grid/PoolMembers.js
index 5d020f7b..337f2c13 100644
--- a/www/manager6/grid/PoolMembers.js
+++ b/www/manager6/grid/PoolMembers.js
@@ -170,7 +170,7 @@ Ext.define('PVE.grid.PoolMembers', {
 
 	var sm = Ext.create('Ext.selection.RowModel', {});
 
-	var remove_btn = new PVE.button.Button({
+	var remove_btn = new Proxmox.button.Button({
 	    text: gettext('Remove'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/grid/Replication.js b/www/manager6/grid/Replication.js
index 6c2fc529..bae7d7dd 100644
--- a/www/manager6/grid/Replication.js
+++ b/www/manager6/grid/Replication.js
@@ -247,7 +247,7 @@ Ext.define('PVE.grid.ReplicaView', {
 	    handler: 'addJob'
 	},
 	{
-	    xtype: 'pveButton',
+	    xtype: 'proxmoxButton',
 	    text: gettext('Edit'),
 	    itemId: 'editButton',
 	    handler: 'editJob',
@@ -261,14 +261,14 @@ Ext.define('PVE.grid.ReplicaView', {
 	    callback: 'reload'
 	},
 	{
-	    xtype: 'pveButton',
+	    xtype: 'proxmoxButton',
 	    text: gettext('Log'),
 	    itemId: 'logButton',
 	    handler: 'showLog',
 	    disabled: true
 	},
 	{
-	    xtype: 'pveButton',
+	    xtype: 'proxmoxButton',
 	    text: gettext('Schedule now'),
 	    itemId: 'scheduleNowButton',
 	    handler: 'scheduleJobNow',
diff --git a/www/manager6/ha/Groups.js b/www/manager6/ha/Groups.js
index 466a5232..7d2cd911 100644
--- a/www/manager6/ha/Groups.js
+++ b/www/manager6/ha/Groups.js
@@ -44,7 +44,7 @@ Ext.define('PVE.ha.GroupsView', {
 	    }
 	});
 	
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/ha/Resources.js b/www/manager6/ha/Resources.js
index 189f90e1..a6bc76b4 100644
--- a/www/manager6/ha/Resources.js
+++ b/www/manager6/ha/Resources.js
@@ -79,7 +79,7 @@ Ext.define('PVE.ha.ResourcesView', {
 	    }
 	});
 	
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/lxc/Config.js b/www/manager6/lxc/Config.js
index 9a5a508b..51fd332d 100644
--- a/www/manager6/lxc/Config.js
+++ b/www/manager6/lxc/Config.js
@@ -90,7 +90,7 @@ Ext.define('PVE.lxc.Config', {
 	    iconCls: 'fa fa-send-o'
 	});
 
-	var moreBtn = Ext.create('PVE.button.Button', {
+	var moreBtn = Ext.create('Proxmox.button.Button', {
 	    text: gettext('More'),
 	    menu: { items: [
 		{
diff --git a/www/manager6/lxc/DNS.js b/www/manager6/lxc/DNS.js
index 5437967f..31900d3e 100644
--- a/www/manager6/lxc/DNS.js
+++ b/www/manager6/lxc/DNS.js
@@ -249,7 +249,7 @@ Ext.define('PVE.lxc.DNS', {
 	    win.on('destroy', reload);
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/lxc/Network.js b/www/manager6/lxc/Network.js
index 504ee6be..15cf914c 100644
--- a/www/manager6/lxc/Network.js
+++ b/www/manager6/lxc/Network.js
@@ -395,7 +395,7 @@ Ext.define('PVE.lxc.NetworkView', {
 
 	var sm = Ext.create('Ext.selection.RowModel', {});
 
-	var remove_btn = new PVE.button.Button({
+	var remove_btn = new Proxmox.button.Button({
 	    text: gettext('Remove'),
 	    disabled: true,
 	    selModel: sm,
@@ -442,7 +442,7 @@ Ext.define('PVE.lxc.NetworkView', {
 	    win.show();
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    selModel: sm,
 	    disabled: true,
diff --git a/www/manager6/lxc/Options.js b/www/manager6/lxc/Options.js
index 4a855d52..46e488b1 100644
--- a/www/manager6/lxc/Options.js
+++ b/www/manager6/lxc/Options.js
@@ -177,7 +177,7 @@ Ext.define('PVE.lxc.Options', {
 	    win.on('destroy', reload);
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js
index 3359e37e..b430bcd4 100644
--- a/www/manager6/lxc/Resources.js
+++ b/www/manager6/lxc/Resources.js
@@ -186,7 +186,7 @@ Ext.define('PVE.lxc.RessourceView', {
 	    });
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    selModel: sm,
 	    disabled: true,
@@ -200,14 +200,14 @@ Ext.define('PVE.lxc.RessourceView', {
 	    handler: run_editor
 	});
 
-	var resize_btn = new PVE.button.Button({
+	var resize_btn = new Proxmox.button.Button({
 	    text: gettext('Resize disk'),
 	    selModel: sm,
 	    disabled: true,
 	    handler: run_resize
 	});
 
-	var remove_btn = new PVE.button.Button({
+	var remove_btn = new Proxmox.button.Button({
 	    text: gettext('Remove'),
 	    selModel: sm,
 	    disabled: true,
diff --git a/www/manager6/lxc/SnapshotTree.js b/www/manager6/lxc/SnapshotTree.js
index c80fb439..6e2c649d 100644
--- a/www/manager6/lxc/SnapshotTree.js
+++ b/www/manager6/lxc/SnapshotTree.js
@@ -145,7 +145,7 @@ Ext.define('PVE.lxc.SnapshotTree', {
 	    }
 	};
 
-	var editBtn = new PVE.button.Button({
+	var editBtn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
@@ -153,7 +153,7 @@ Ext.define('PVE.lxc.SnapshotTree', {
 	    handler: run_editor
 	});
 
-	var rollbackBtn = new PVE.button.Button({
+	var rollbackBtn = new Proxmox.button.Button({
 	    text: gettext('Rollback'),
 	    disabled: true,
 	    selModel: sm,
@@ -188,7 +188,7 @@ Ext.define('PVE.lxc.SnapshotTree', {
 	    }
 	});
 
-	var removeBtn = new PVE.button.Button({
+	var removeBtn = new Proxmox.button.Button({
 	    text: gettext('Remove'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js
index 9e8549f2..e0a6cc0b 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -80,7 +80,7 @@ Ext.define('PVE.node.Config', {
 	    })
 	});
 
-	var restartBtn = Ext.create('PVE.button.Button', {
+	var restartBtn = Ext.create('Proxmox.button.Button', {
 	    text: gettext('Restart'),
 	    disabled: !caps.nodes['Sys.PowerMgmt'],
 	    dangerous: true,
@@ -91,7 +91,7 @@ Ext.define('PVE.node.Config', {
 	    iconCls: 'fa fa-undo'
 	});
 
-	var shutdownBtn = Ext.create('PVE.button.Button', {
+	var shutdownBtn = Ext.create('Proxmox.button.Button', {
 	    text: gettext('Shutdown'),
 	    disabled: !caps.nodes['Sys.PowerMgmt'],
 	    dangerous: true,
diff --git a/www/manager6/node/Disks.js b/www/manager6/node/Disks.js
index 9bfaad22..723b76d1 100644
--- a/www/manager6/node/Disks.js
+++ b/www/manager6/node/Disks.js
@@ -153,14 +153,14 @@ Ext.define('PVE.node.DiskList', {
 	    ]
 	});
 
-	var reloadButton = Ext.create('PVE.button.Button', {
+	var reloadButton = Ext.create('Proxmox.button.Button', {
 	    text: gettext('Reload'),
 	    handler: function() {
 		me.store.load();
 	    }
 	});
 
-	var smartButton = Ext.create('PVE.button.Button', {
+	var smartButton = Ext.create('Proxmox.button.Button', {
 	    text: gettext('Show S.M.A.R.T. values'),
 	    selModel: sm,
 	    enableFn: function() {
@@ -178,7 +178,7 @@ Ext.define('PVE.node.DiskList', {
 	    }
 	});
 
-	var initButton = Ext.create('PVE.button.Button', {
+	var initButton = Ext.create('Proxmox.button.Button', {
 	    text: gettext('Initialize Disk with GPT'),
 	    selModel: sm,
 	    enableFn: function() {
diff --git a/www/manager6/panel/IPSet.js b/www/manager6/panel/IPSet.js
index d4b36928..c4a9bdb7 100644
--- a/www/manager6/panel/IPSet.js
+++ b/www/manager6/panel/IPSet.js
@@ -92,14 +92,14 @@ Ext.define('PVE.IPSetList', {
 	    win.on('destroy', reload);
 	};
 
-	me.editBtn = new PVE.button.Button({
+	me.editBtn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
 	    handler: run_editor
 	});
 
-	me.addBtn = new PVE.button.Button({
+	me.addBtn = new Proxmox.button.Button({
 	    text: gettext('Create'),
 	    handler: function() {
 		sm.deselectAll();
@@ -313,14 +313,14 @@ Ext.define('PVE.IPSetGrid', {
 	    win.on('destroy', reload);
 	};
 
-	me.editBtn = new PVE.button.Button({
+	me.editBtn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
 	    handler: run_editor
 	});
 
-	me.addBtn = new PVE.button.Button({
+	me.addBtn = new Proxmox.button.Button({
 	    text: gettext('Add'),
 	    disabled: true,
 	    handler: function() {
diff --git a/www/manager6/qemu/Config.js b/www/manager6/qemu/Config.js
index c10c7e00..0abb19c7 100644
--- a/www/manager6/qemu/Config.js
+++ b/www/manager6/qemu/Config.js
@@ -77,7 +77,7 @@ Ext.define('PVE.qemu.Config', {
 	    iconCls: 'fa fa-send-o'
 	});
 
-	var moreBtn = Ext.create('PVE.button.Button', {
+	var moreBtn = Ext.create('Proxmox.button.Button', {
 	    text: gettext('More'),
 	    menu: { items: [
 		{
diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index 112410c2..2bbf5283 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -361,28 +361,28 @@ Ext.define('PVE.qemu.HardwareView', {
 	    win.on('destroy', reload);
 	};
 
-	var edit_btn = new PVE.button.Button({
+	var edit_btn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    selModel: sm,
 	    disabled: true,
 	    handler: run_editor
         });
 
-	var resize_btn = new PVE.button.Button({
+	var resize_btn = new Proxmox.button.Button({
 	    text: gettext('Resize disk'),
 	    selModel: sm,
 	    disabled: true,
 	    handler: run_resize
 	});
 
-	var move_btn = new PVE.button.Button({
+	var move_btn = new Proxmox.button.Button({
 	    text: gettext('Move disk'),
 	    selModel: sm,
 	    disabled: true,
 	    handler: run_move
 	});
 
-	var diskthrottle_btn = new PVE.button.Button({
+	var diskthrottle_btn = new Proxmox.button.Button({
 	    text: gettext('Disk Throttle'),
 	    selModel: sm,
 	    disabled: true,
@@ -394,7 +394,7 @@ Ext.define('PVE.qemu.HardwareView', {
 	    handler: run_cpuoptions
 	});
 
-	var remove_btn = new PVE.button.Button({
+	var remove_btn = new Proxmox.button.Button({
 	    text: gettext('Remove'),
 	    defaultText: gettext('Remove'),
 	    altText: gettext('Detach'),
@@ -451,7 +451,7 @@ Ext.define('PVE.qemu.HardwareView', {
 	    }
 	});
 
-	var revert_btn = new PVE.button.Button({
+	var revert_btn = new Proxmox.button.Button({
 	    text: gettext('Revert'),
 	    selModel: sm,
 	    disabled: true,
diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
index 016d68aa..36a83dda 100644
--- a/www/manager6/qemu/Options.js
+++ b/www/manager6/qemu/Options.js
@@ -344,7 +344,7 @@ Ext.define('PVE.qemu.Options', {
 	    handler: run_editor
 	});
 
-        var revert_btn = new PVE.button.Button({
+        var revert_btn = new Proxmox.button.Button({
             text: gettext('Revert'),
             disabled: true,
             handler: function() {
diff --git a/www/manager6/qemu/SnapshotTree.js b/www/manager6/qemu/SnapshotTree.js
index 35b02459..32f07938 100644
--- a/www/manager6/qemu/SnapshotTree.js
+++ b/www/manager6/qemu/SnapshotTree.js
@@ -143,7 +143,7 @@ Ext.define('PVE.qemu.SnapshotTree', {
 	    }
 	};
 
-	var editBtn = new PVE.button.Button({
+	var editBtn = new Proxmox.button.Button({
 	    text: gettext('Edit'),
 	    disabled: true,
 	    selModel: sm,
@@ -151,7 +151,7 @@ Ext.define('PVE.qemu.SnapshotTree', {
 	    handler: run_editor
 	});
 
-	var rollbackBtn = new PVE.button.Button({
+	var rollbackBtn = new Proxmox.button.Button({
 	    text: gettext('Rollback'),
 	    disabled: true,
 	    selModel: sm,
@@ -186,7 +186,7 @@ Ext.define('PVE.qemu.SnapshotTree', {
 	    }
 	});
 
-	var removeBtn = new PVE.button.Button({
+	var removeBtn = new Proxmox.button.Button({
 	    text: gettext('Remove'),
 	    disabled: true,
 	    selModel: sm,
diff --git a/www/manager6/storage/ContentView.js b/www/manager6/storage/ContentView.js
index c5d856cb..86b1a86d 100644
--- a/www/manager6/storage/ContentView.js
+++ b/www/manager6/storage/ContentView.js
@@ -106,7 +106,7 @@ Ext.define('PVE.storage.TemplateDownload', {
 
 	var sm = grid.getSelectionModel();
 
-	var submitBtn = Ext.create('PVE.button.Button', {
+	var submitBtn = Ext.create('Proxmox.button.Button', {
 	    text: gettext('Download'),
 	    disabled: true,
 	    selModel: sm,
@@ -373,7 +373,7 @@ Ext.define('PVE.storage.ContentView', {
 
 	PVE.Utils.monStoreErrors(me, store);
 
-	var templateButton = Ext.create('PVE.button.Button',{
+	var templateButton = Ext.create('Proxmox.button.Button',{
 	    itemId: 'tmpl-btn',
 	    text: gettext('Templates'),
 	    handler: function() {
@@ -386,7 +386,7 @@ Ext.define('PVE.storage.ContentView', {
 	    }
 	});
 
-	var uploadButton = Ext.create('PVE.button.Button', {
+	var uploadButton = Ext.create('Proxmox.button.Button', {
 	    contents : ['iso','vztmpl'],
 	    text: gettext('Upload'),
 	    handler: function() {
@@ -410,7 +410,7 @@ Ext.define('PVE.storage.ContentView', {
 	    selModel: sm,
 	    tbar: [
 		{
-		    xtype: 'pveButton',
+		    xtype: 'proxmoxButton',
 		    text: gettext('Restore'),
 		    selModel: sm,
 		    disabled: true,
@@ -451,7 +451,7 @@ Ext.define('PVE.storage.ContentView', {
 		templateButton,
 		uploadButton,
 		{
-		    xtype: 'pveButton',
+		    xtype: 'proxmoxButton',
 		    text: gettext('Show Configuration'),
 		    disabled: true,
 		    selModel: sm,
-- 
2.14.2





More information about the pve-devel mailing list