]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: backup view: add scrolling overflow handler for the toolbar
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 18 Jan 2023 14:35:20 +0000 (15:35 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 19 Jan 2023 17:07:26 +0000 (18:07 +0100)
As we got reports that some buttons get cut-off on resolutions close
to our minimal 720p one, especially if the "guest not in backup" jobs
hint is shown.

Link: https://forum.proxmox.com/threads/120714/
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ T: resolve merge conflict and reword commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/dc/Backup.js

index c6f51a0a52357d311729b6757f31d8ac2142feb1..9d305984151750bd94d34c44648b1cb4493487f2 100644 (file)
@@ -740,41 +740,46 @@ Ext.define('PVE.dc.BackupView', {
            viewConfig: {
                trackOver: false,
            },
-           tbar: [
-               {
-                   text: gettext('Add'),
-                   handler: function() {
-                       var win = Ext.create('PVE.dc.BackupEdit', {});
-                       win.on('destroy', reload);
-                       win.show();
+           dockedItems: [{
+               xtype: 'toolbar',
+               overflowHandler: 'scroller',
+               dock: 'top',
+               items: [
+                   {
+                       text: gettext('Add'),
+                       handler: function() {
+                           var win = Ext.create('PVE.dc.BackupEdit', {});
+                           win.on('destroy', reload);
+                           win.show();
+                       },
                    },
-               },
-               '-',
-               remove_btn,
-               edit_btn,
-               detail_btn,
-               '-',
-               run_btn,
-               '->',
-               noBackupJobInfoButton,
-               '-',
-               {
-                   xtype: 'proxmoxButton',
-                   selModel: null,
-                   text: gettext('Schedule Simulator'),
-                   handler: () => {
-                       let record = sm.getSelection()[0];
-                       let schedule;
-                       if (record) {
-                           schedule = record.data.schedule;
-                       }
-                       Ext.create('PVE.window.ScheduleSimulator', {
-                           autoShow: true,
-                           schedule,
-                       });
+                   '-',
+                   remove_btn,
+                   edit_btn,
+                   detail_btn,
+                   '-',
+                   run_btn,
+                   '->',
+                   noBackupJobInfoButton,
+                   '-',
+                   {
+                       xtype: 'proxmoxButton',
+                       selModel: null,
+                       text: gettext('Schedule Simulator'),
+                       handler: () => {
+                           let record = sm.getSelection()[0];
+                           let schedule;
+                           if (record) {
+                               schedule = record.data.schedule;
+                           }
+                           Ext.create('PVE.window.ScheduleSimulator', {
+                               autoShow: true,
+                               schedule,
+                           });
+                       },
                    },
-               },
-           ],
+               ],
+           }],
            columns: [
                {
                    header: gettext('Enabled'),