From 17c580c2a39f51041352cc453223484bb0be9c5f Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 18 Oct 2021 07:06:53 +0200 Subject: [PATCH] code style: text-width, indentation improvements Signed-off-by: Thomas Lamprecht --- src/panel/InputPanel.js | 3 +-- src/window/Edit.js | 33 +++++++++++++++------------------ 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/panel/InputPanel.js b/src/panel/InputPanel.js index a9c7263..85a13bd 100644 --- a/src/panel/InputPanel.js +++ b/src/panel/InputPanel.js @@ -23,8 +23,7 @@ Ext.define('Proxmox.panel.InputPanel', { // will be set if the inputpanel has advanced items hasAdvanced: false, - // if the panel has advanced items, - // this will determine if they are shown by default + // if the panel has advanced items, this will determine if they are shown by default showAdvanced: false, // overwrite this to modify submit data diff --git a/src/window/Edit.js b/src/window/Edit.js index 53d0e73..afbffaa 100644 --- a/src/window/Edit.js +++ b/src/window/Edit.js @@ -322,8 +322,7 @@ Ext.define('Proxmox.window.Edit', { resetBtn.setDisabled(!dirty); if (inputPanel && inputPanel.hasAdvanced) { - // we want to show the advanced options - // as soon as some of it is not valid + // we want to show the advanced options as soon as some of it is not valid let advancedItems = me.down('#advancedContainer').query('field'); let allAdvancedValid = true; advancedItems.forEach(function(field) { @@ -362,22 +361,20 @@ Ext.define('Proxmox.window.Edit', { let sp = Ext.state.Manager.getProvider(); let advchecked = sp.get('proxmox-advanced-cb'); inputPanel.setAdvancedVisible(advchecked); - me.buttons.unshift( - { - xtype: 'proxmoxcheckbox', - itemId: 'advancedcb', - boxLabelAlign: 'before', - boxLabel: gettext('Advanced'), - stateId: 'proxmox-advanced-cb', - value: advchecked, - listeners: { - change: function(cb, val) { - inputPanel.setAdvancedVisible(val); - sp.set('proxmox-advanced-cb', val); - }, - }, - }, - ); + me.buttons.unshift({ + xtype: 'proxmoxcheckbox', + itemId: 'advancedcb', + boxLabelAlign: 'before', + boxLabel: gettext('Advanced'), + stateId: 'proxmox-advanced-cb', + value: advchecked, + listeners: { + change: function(cb, val) { + inputPanel.setAdvancedVisible(val); + sp.set('proxmox-advanced-cb', val); + }, + }, + }); } let onlineHelp = me.onlineHelp; -- 2.39.2