mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 13:45:21 +00:00
ext6migrate: fix ContentView
we move the static configuration to the class definition we change the deprecated autoScroll to scrollable we change applyIf to apply (when appropriate) we change "new Ext..." to Ext.create we change the event from show to activate also we change the button height of the upload to 32 so that it matches the textfield (looks weird otherwise) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
c2317525f0
commit
3b422683cf
@ -3,6 +3,10 @@ Ext.define('PVE.grid.TemplateSelector', {
|
|||||||
|
|
||||||
alias: 'widget.pveTemplateSelector',
|
alias: 'widget.pveTemplateSelector',
|
||||||
|
|
||||||
|
stateful: false,
|
||||||
|
viewConfig: {
|
||||||
|
trackOver: false
|
||||||
|
},
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
@ -35,10 +39,6 @@ Ext.define('PVE.grid.TemplateSelector', {
|
|||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
selModel: sm,
|
selModel: sm,
|
||||||
stateful: false,
|
|
||||||
viewConfig: {
|
|
||||||
trackOver: false
|
|
||||||
},
|
|
||||||
features: [ groupingFeature ],
|
features: [ groupingFeature ],
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@ -88,14 +88,17 @@ Ext.define('PVE.storage.TemplateDownload', {
|
|||||||
alias: 'widget.pveTemplateDownload',
|
alias: 'widget.pveTemplateDownload',
|
||||||
|
|
||||||
modal: true,
|
modal: true,
|
||||||
|
title: gettext('Templates'),
|
||||||
|
layout: 'fit',
|
||||||
|
width: 600,
|
||||||
|
height: 400,
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
/*jslint confusion: true */
|
/*jslint confusion: true */
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
var grid = Ext.create('PVE.grid.TemplateSelector', {
|
var grid = Ext.create('PVE.grid.TemplateSelector', {
|
||||||
border: false,
|
border: false,
|
||||||
autoScroll: true,
|
scrollable: true,
|
||||||
nodename: me.nodename
|
nodename: me.nodename
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -129,11 +132,7 @@ Ext.define('PVE.storage.TemplateDownload', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Ext.applyIf(me, {
|
Ext.apply(me, {
|
||||||
title: gettext('Templates'),
|
|
||||||
layout: 'fit',
|
|
||||||
width: 600,
|
|
||||||
height: 400,
|
|
||||||
items: grid,
|
items: grid,
|
||||||
buttons: [ submitBtn ]
|
buttons: [ submitBtn ]
|
||||||
});
|
});
|
||||||
@ -193,7 +192,10 @@ Ext.define('PVE.storage.Upload', {
|
|||||||
xtype: 'filefield',
|
xtype: 'filefield',
|
||||||
name: 'filename',
|
name: 'filename',
|
||||||
buttonText: gettext('Select File...'),
|
buttonText: gettext('Select File...'),
|
||||||
allowBlank: false
|
allowBlank: false,
|
||||||
|
buttonConfig: {
|
||||||
|
height: 32
|
||||||
|
}
|
||||||
},
|
},
|
||||||
pbar
|
pbar
|
||||||
]
|
]
|
||||||
@ -298,7 +300,7 @@ Ext.define('PVE.storage.Upload', {
|
|||||||
submitBtn.setDisabled(!valid);
|
submitBtn.setDisabled(!valid);
|
||||||
});
|
});
|
||||||
|
|
||||||
Ext.applyIf(me, {
|
Ext.apply(me, {
|
||||||
title: gettext('Upload'),
|
title: gettext('Upload'),
|
||||||
items: me.formPanel,
|
items: me.formPanel,
|
||||||
buttons: [ abortBtn, submitBtn ],
|
buttons: [ abortBtn, submitBtn ],
|
||||||
@ -334,7 +336,7 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var baseurl = "/nodes/" + nodename + "/storage/" + storage + "/content";
|
var baseurl = "/nodes/" + nodename + "/storage/" + storage + "/content";
|
||||||
var store = new Ext.data.Store({
|
var store = Ext.create('Ext.data.Store',{
|
||||||
model: 'pve-storage-content',
|
model: 'pve-storage-content',
|
||||||
groupField: 'content',
|
groupField: 'content',
|
||||||
proxy: {
|
proxy: {
|
||||||
@ -487,7 +489,7 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
listeners: {
|
listeners: {
|
||||||
show: reload
|
activate: reload
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user