]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/form/ContentTypeSelector.js
add snippets content type to the gui
[pve-manager.git] / www / manager6 / form / ContentTypeSelector.js
CommitLineData
825fc90b 1Ext.define('PVE.form.ContentTypeSelector', {
09cacce7 2 extend: 'Proxmox.form.KVComboBox',
825fc90b 3 alias: ['widget.pveContentTypeSelector'],
a9f71282 4
825fc90b
DM
5 cts: undefined,
6
7 initComponent: function() {
8 var me = this;
9
8f8e8a2e 10 me.comboItems = [];
825fc90b
DM
11
12 if (me.cts === undefined) {
aef28e04 13 me.cts = ['images', 'iso', 'vztmpl', 'backup', 'rootdir', 'snippets'];
825fc90b
DM
14 }
15
16 Ext.Array.each(me.cts, function(ct) {
871df316 17 me.comboItems.push([ct, PVE.Utils.format_content_types(ct)]);
825fc90b
DM
18 });
19
20 me.callParent();
21 }
22});