]> git.proxmox.com Git - pve-docs.git/commitdiff
api-viewer: tree-tools: use modern callback and add tooltips
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 11 Dec 2019 14:45:51 +0000 (15:45 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 11 Dec 2019 14:45:53 +0000 (15:45 +0100)
The 'handler' config is deprecated since ExtJS 4.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
api-viewer/PVEAPI.js

index 8122ff9e78cd8fc1c8e24ff9289ac6461a28c05f..24161612dcf8780254d13c2a7bda32ff00fd990d 100644 (file)
@@ -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,