[pve-devel] [PATCH manager v3 2/4] gui: add tagEditBtn

Dominik Csapak d.csapak at proxmox.com
Thu Oct 31 13:36:29 CET 2019


which is just the pencil symbol and opens the tageditor

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/Makefile          |  1 +
 www/manager6/button/TagEdit.js | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 www/manager6/button/TagEdit.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 2f635b2b..2f8fab00 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -10,6 +10,7 @@ JSSRC= 				                 	\
 	button/ConsoleButton.js				\
 	button/Revert.js				\
 	button/Split.js					\
+	button/TagEdit.js				\
 	controller/StorageEdit.js			\
 	qemu/CmdMenu.js					\
 	lxc/CmdMenu.js					\
diff --git a/www/manager6/button/TagEdit.js b/www/manager6/button/TagEdit.js
new file mode 100644
index 00000000..c7b869f0
--- /dev/null
+++ b/www/manager6/button/TagEdit.js
@@ -0,0 +1,34 @@
+Ext.define('PVE.button.TagEditButton', {
+    extend: 'Proxmox.button.Button',
+    xtype: 'pveTagEditButton',
+
+    margin: 0,
+    userCls: 'pointer',
+    baseCls: 'x-plain',
+    iconCls: 'fa fa-pencil',
+
+    handler: function() {
+	var me = this;
+
+	var win = Ext.create('Proxmox.window.Edit', {
+	    subject: gettext('Tags'),
+	    url: me.editurl,
+	    autoLoad: true,
+	    apiCallDone: me.callback,
+	    items: {
+		xtype: 'pveTagSelector',
+		name: 'tags',
+	    }
+	}).show();
+    },
+
+    initComponent: function() {
+	var me = this;
+
+	if (!me.editurl) {
+	    throw "no editurl given";
+	}
+
+	me.callParent();
+    }
+});
-- 
2.20.1





More information about the pve-devel mailing list