mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 14:51:37 +00:00
Move removeButton in a variable
The move is necessary to hide the removeButton.
This commit is contained in:
parent
5cdb27225f
commit
c5e224fc73
@ -401,6 +401,20 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var removeButton = Ext.create('Proxmox.button.StdRemoveButton',{
|
||||||
|
selModel: sm,
|
||||||
|
enableFn: function(rec) {
|
||||||
|
if (rec && rec.data.content !== 'images') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
callback: function() {
|
||||||
|
reload();
|
||||||
|
},
|
||||||
|
baseurl: baseurl + '/'
|
||||||
|
});
|
||||||
|
|
||||||
me.statusStore = Ext.create('Proxmox.data.ObjectStore', {
|
me.statusStore = Ext.create('Proxmox.data.ObjectStore', {
|
||||||
url: '/api2/json/nodes/' + nodename + '/storage/' + storage + '/status'
|
url: '/api2/json/nodes/' + nodename + '/storage/' + storage + '/status'
|
||||||
});
|
});
|
||||||
@ -437,17 +451,7 @@ Ext.define('PVE.storage.ContentView', {
|
|||||||
win.on('destroy', reload);
|
win.on('destroy', reload);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
removeButton,
|
||||||
xtype: 'proxmoxStdRemoveButton',
|
|
||||||
selModel: sm,
|
|
||||||
enableFn: function(rec) {
|
|
||||||
return rec && rec.data.content !== 'images';
|
|
||||||
},
|
|
||||||
callback: function() {
|
|
||||||
reload();
|
|
||||||
},
|
|
||||||
baseurl: baseurl + '/'
|
|
||||||
},
|
|
||||||
templateButton,
|
templateButton,
|
||||||
uploadButton,
|
uploadButton,
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user