],
layout: {
- type: 'hbox',
+ type: 'column',
align: 'top'
},
me.lookupReference('savedUserName').setValue(username);
var vncMode = sp.get('novnc-scaling');
if (vncMode !== undefined) {
- me.lookupReference('noVNCScalingGroup').setValue(vncMode);
+ me.lookupReference('noVNCScalingGroup').setValue({ noVNCScalingField: vncMode });
}
+ let summarycolumns = sp.get('summarycolumns');
+ me.lookup('summarycolumns').setValue(summarycolumns || 'auto');
+
var settings = ['fontSize', 'fontFamily', 'letterSpacing', 'lineHeight'];
settings.forEach(function(setting) {
var val = localStorage.getItem('pve-xterm-' + setting);
me.getSelectionModel().select(items);
me.resumeEvent('selectionchange');
}
+ },
+ 'field[reference=summarycolumns]': {
+ change: function(el, newValue) {
+ var sp = Ext.state.Manager.getProvider();
+ sp.set('summarycolumns', newValue);
+ }
}
}
},
items: [{
xtype: 'fieldset',
- width: '50%',
+ columnWidth: 0.5,
title: gettext('Webinterface Settings'),
margin: '5',
layout: {
items: [
{
xtype: 'displayfield',
- fieldLabel: gettext('Saved User Name:'),
+ fieldLabel: gettext('Saved User Name') + ':',
labelWidth: '150',
stateId: 'login-username',
reference: 'savedUserName',
items: [
{
xtype: 'displayfield',
- fieldLabel: gettext('Layout:'),
+ fieldLabel: gettext('Layout') + ':',
flex: 1,
},
{
},
]
},
+ {
+ xtype: 'box',
+ autoEl: { tag: 'hr'}
+ },
+ {
+ xtype: 'proxmoxKVComboBox',
+ fieldLabel: gettext('Summary columns') + ':',
+ labelWidth: 150,
+ stateId: 'summarycolumns',
+ reference: 'summarycolumns',
+ comboItems: [
+ ['auto', 'auto'],
+ ['1', '1'],
+ ['2', '2'],
+ ['3', '3'],
+ ],
+ },
]
- },{
+ },
+ {
xtype: 'container',
layout: 'vbox',
- width: '50%',
+ columnWidth: 0.5,
margin: '5',
defaults: {
width: '100%',
listeners: {
change: function(el, newValue, undefined) {
var sp = Ext.state.Manager.getProvider();
- sp.set('novnc-scaling', newValue);
+ sp.set('novnc-scaling', newValue.noVNCScalingField);
}
},
},
},
]
}],
-
- onShow: function() {
- var me = this;
- me.callParent();
- }
});