mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-05 14:29:30 +00:00
safe destroy: allow specifing additional items
to be used to add more checkboxes for PVE's guest destroy use case. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
2b1f7bb066
commit
1488907695
@ -15,6 +15,8 @@ Ext.define('Proxmox.window.SafeDestroy', {
|
|||||||
defaultFocus: 'confirmField',
|
defaultFocus: 'confirmField',
|
||||||
showProgress: false,
|
showProgress: false,
|
||||||
|
|
||||||
|
additionalItems: [],
|
||||||
|
|
||||||
config: {
|
config: {
|
||||||
item: {
|
item: {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
@ -96,56 +98,6 @@ Ext.define('Proxmox.window.SafeDestroy', {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
xtype: 'component',
|
|
||||||
cls: [Ext.baseCSSPrefix + 'message-box-icon',
|
|
||||||
Ext.baseCSSPrefix + 'message-box-warning',
|
|
||||||
Ext.baseCSSPrefix + 'dlg-icon'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
xtype: 'container',
|
|
||||||
flex: 1,
|
|
||||||
layout: {
|
|
||||||
type: 'vbox',
|
|
||||||
align: 'stretch',
|
|
||||||
},
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
xtype: 'component',
|
|
||||||
reference: 'messageCmp',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
itemId: 'confirmField',
|
|
||||||
reference: 'confirmField',
|
|
||||||
xtype: 'textfield',
|
|
||||||
name: 'confirm',
|
|
||||||
labelWidth: 300,
|
|
||||||
hideTrigger: true,
|
|
||||||
allowBlank: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
xtype: 'container',
|
|
||||||
reference: 'noteContainer',
|
|
||||||
flex: 1,
|
|
||||||
hidden: true,
|
|
||||||
layout: {
|
|
||||||
type: 'vbox',
|
|
||||||
align: 'middle',
|
|
||||||
},
|
|
||||||
height: 25,
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
xtype: 'component',
|
|
||||||
reference: 'noteCmp',
|
|
||||||
width: '300px',
|
|
||||||
style: 'font-size: smaller; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
reference: 'removeButton',
|
reference: 'removeButton',
|
||||||
@ -157,6 +109,58 @@ Ext.define('Proxmox.window.SafeDestroy', {
|
|||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
let me = this;
|
let me = this;
|
||||||
|
|
||||||
|
me.items = [
|
||||||
|
{
|
||||||
|
xtype: 'component',
|
||||||
|
cls: [Ext.baseCSSPrefix + 'message-box-icon',
|
||||||
|
Ext.baseCSSPrefix + 'message-box-warning',
|
||||||
|
Ext.baseCSSPrefix + 'dlg-icon'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'container',
|
||||||
|
flex: 1,
|
||||||
|
layout: {
|
||||||
|
type: 'vbox',
|
||||||
|
align: 'stretch',
|
||||||
|
},
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
xtype: 'component',
|
||||||
|
reference: 'messageCmp',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
itemId: 'confirmField',
|
||||||
|
reference: 'confirmField',
|
||||||
|
xtype: 'textfield',
|
||||||
|
name: 'confirm',
|
||||||
|
labelWidth: 300,
|
||||||
|
hideTrigger: true,
|
||||||
|
allowBlank: false,
|
||||||
|
},
|
||||||
|
].concat(me.additionalItems).concat([
|
||||||
|
{
|
||||||
|
xtype: 'container',
|
||||||
|
reference: 'noteContainer',
|
||||||
|
flex: 1,
|
||||||
|
hidden: true,
|
||||||
|
layout: {
|
||||||
|
type: 'vbox',
|
||||||
|
align: 'middle',
|
||||||
|
},
|
||||||
|
height: 25,
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
xtype: 'component',
|
||||||
|
reference: 'noteCmp',
|
||||||
|
width: '300px',
|
||||||
|
style: 'font-size: smaller; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
|
||||||
const item = me.getItem();
|
const item = me.getItem();
|
||||||
|
Loading…
Reference in New Issue
Block a user