api-viewer: tree-tools: use modern callback and add tooltips

The 'handler' config is deprecated since ExtJS 4.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-12-11 15:45:51 +01:00
parent f081718e44
commit afbe0fcce5

View File

@ -416,15 +416,15 @@ Ext.onReady(function() {
tools: [ tools: [
{ {
type: 'expand', type: 'expand',
handler: function() { tooltip: 'Expand all',
tree.expandAll(); tooltipType: 'title',
}, callback: (tree) => tree.expandAll(),
}, },
{ {
type: 'collapse', type: 'collapse',
handler: function() { tooltip: 'Collapse all',
tree.collapseAll(); tooltipType: 'title',
} callback: (tree) => tree.collapseAll(),
}, },
], ],
store: store, store: store,