all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Dominic Jäger" <d.jaeger@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/5] ui: panel/ConfigPanel: eslint fixes
Date: Wed, 19 May 2021 12:56:18 +0200	[thread overview]
Message-ID: <20210519105622.6514-1-d.jaeger@proxmox.com> (raw)

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
---
 www/manager6/panel/ConfigPanel.js | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/www/manager6/panel/ConfigPanel.js b/www/manager6/panel/ConfigPanel.js
index 23a6ee58..788615aa 100644
--- a/www/manager6/panel/ConfigPanel.js
+++ b/www/manager6/panel/ConfigPanel.js
@@ -68,11 +68,11 @@ Ext.define('PVE.panel.Config', {
 	    singleExpand: false,
 	    listeners: {
 		selectionchange: function(treeList, selection) {
-		    var me = this.up('panel');
-		    me.suspendLayout = true;
-		    me.activateCard(selection.data.id);
-		    me.suspendLayout = false;
-		    me.updateLayout();
+		    let view = this.up('panel');
+		    view.suspendLayout = true;
+		    view.activateCard(selection.data.id);
+		    view.suspendLayout = false;
+		    view.updateLayout();
 		},
 		itemclick: function(treelist, info) {
 		    var olditem = treelist.getSelection();
@@ -123,6 +123,7 @@ Ext.define('PVE.panel.Config', {
 	    menu.setSelection(selection);
 	    return cardid;
 	}
+	return '';
     },
 
     activateCard: function(cardid) {
@@ -160,7 +161,7 @@ Ext.define('PVE.panel.Config', {
 	var activeTab; // leaving this undefined means items[0] will be the default tab
 
 	if (stateid) {
-	    var state = me.sp.get(stateid);
+	    let state = me.sp.get(stateid);
 	    if (state && state.value) {
 		// if this tab does not exist, it chooses the first
 		activeTab = state.value;
@@ -259,7 +260,7 @@ Ext.define('PVE.panel.Config', {
 		var acard = me.getLayout().getActiveItem().itemId;
 		// get the itemid of the new value
 		var ncard = state.value || me.firstItem;
-		if (ncard && acard != ncard) {
+		if (ncard && acard !== ncard) {
 		    // select the chosen item
 		    menu.setSelection(root.findChild('id', ncard, true) || root.firstChild);
 		}
-- 
2.20.1





             reply	other threads:[~2021-05-19 10:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 10:56 Dominic Jäger [this message]
2021-05-19 10:56 ` [pve-devel] [PATCH manager 2/5] ui: panel/IPSet: " Dominic Jäger
2021-05-19 10:56 ` [pve-devel] [PATCH manager 3/5] ui: panel/NotesView: " Dominic Jäger
2021-05-19 10:56 ` [pve-devel] [PATCH manager 4/5] ui: panel/RunningChart: " Dominic Jäger
2021-05-19 10:56 ` [pve-devel] [PATCH manager 5/5] ui: panel/StatusPanel: " Dominic Jäger
2021-05-19 12:10 ` [pve-devel] applied-series: [PATCH manager 1/5] ui: panel/ConfigPanel: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210519105622.6514-1-d.jaeger@proxmox.com \
    --to=d.jaeger@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal