From afbe0fcce51a72a54b5d72e66d1d0f76c0eae61b Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 11 Dec 2019 15:45:51 +0100 Subject: [PATCH] api-viewer: tree-tools: use modern callback and add tooltips The 'handler' config is deprecated since ExtJS 4.2 Signed-off-by: Thomas Lamprecht --- api-viewer/PVEAPI.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api-viewer/PVEAPI.js b/api-viewer/PVEAPI.js index 8122ff9..2416161 100644 --- a/api-viewer/PVEAPI.js +++ b/api-viewer/PVEAPI.js @@ -416,15 +416,15 @@ Ext.onReady(function() { tools: [ { type: 'expand', - handler: function() { - tree.expandAll(); - }, + tooltip: 'Expand all', + tooltipType: 'title', + callback: (tree) => tree.expandAll(), }, { type: 'collapse', - handler: function() { - tree.collapseAll(); - } + tooltip: 'Collapse all', + tooltipType: 'title', + callback: (tree) => tree.collapseAll(), }, ], store: store,