]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: browser local settings: add new edit-notes-on-double-click option
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 20 Apr 2024 15:27:44 +0000 (17:27 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 20 Apr 2024 18:32:32 +0000 (20:32 +0200)
The NotesView in the widget-toolkit learned to respect this opt-out
setting recently.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/window/Settings.js

index 5cf7a70f8aa63387cff9ca56639099e266131253..9af118508b15b54a6931e2ddd2cdecd4d897d150 100644 (file)
@@ -41,6 +41,7 @@ Ext.define('PVE.window.Settings', {
            me.lookup('summarycolumns').setValue(summarycolumns);
 
            me.lookup('guestNotesCollapse').setValue(sp.get('guest-notes-collapse', 'never'));
+           me.lookup('editNotesOnDoubleClick').setValue(sp.get('edit-notes-on-double-click', false));
 
            var settings = ['fontSize', 'fontFamily', 'letterSpacing', 'lineHeight'];
            settings.forEach(function(setting) {
@@ -146,6 +147,9 @@ Ext.define('PVE.window.Settings', {
            'field[reference=guestNotesCollapse]': {
                change: (e, v) => Ext.state.Manager.getProvider().set('guest-notes-collapse', v),
            },
+           'field[reference=editNotesOnDoubleClick]': {
+               change: (e, v) => Ext.state.Manager.getProvider().set('edit-notes-on-double-click', v),
+           },
        },
     },
 
@@ -250,7 +254,7 @@ Ext.define('PVE.window.Settings', {
            {
                xtype: 'proxmoxKVComboBox',
                fieldLabel: gettext('Summary columns') + ':',
-               labelWidth: 150,
+               labelWidth: 125,
                stateId: 'summarycolumns',
                reference: 'summarycolumns',
                comboItems: [
@@ -263,7 +267,7 @@ Ext.define('PVE.window.Settings', {
            {
                xtype: 'proxmoxKVComboBox',
                fieldLabel: gettext('Guest Notes') + ':',
-               labelWidth: 150,
+               labelWidth: 125,
                stateId: 'guest-notes-collapse',
                reference: 'guestNotesCollapse',
                comboItems: [
@@ -272,6 +276,15 @@ Ext.define('PVE.window.Settings', {
                    ['auto', 'auto (Collapse if empty)'],
                ],
            },
+           {
+               xtype: 'checkbox',
+               fieldLabel: gettext('Notes'),
+               labelWidth: 125,
+               boxLabel: gettext('Open editor on double-click'),
+               reference: 'editNotesOnDoubleClick',
+               inputValue: true,
+               uncheckedValue: false,
+           },
        ],
     },
     {