public inbox for pve-devel@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 2/2] ui: storage/PBS edit: eslint fixes
Date: Wed, 19 May 2021 11:14:19 +0200	[thread overview]
Message-ID: <20210519091419.18921-2-d.jaeger@proxmox.com> (raw)
In-Reply-To: <20210519091419.18921-1-d.jaeger@proxmox.com>

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
---
 www/manager6/storage/PBSEdit.js | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/www/manager6/storage/PBSEdit.js b/www/manager6/storage/PBSEdit.js
index 2479304a..773d41e8 100644
--- a/www/manager6/storage/PBSEdit.js
+++ b/www/manager6/storage/PBSEdit.js
@@ -372,7 +372,6 @@ Ext.define('PVE.panel.PBSEncryptionKeyTab', {
 			return true;
 		    },
 		    afterRender: function() {
-			let field = this;
 			if (!window.FileReader) {
 			    // No FileReader support in this browser
 			    return;
@@ -383,15 +382,12 @@ Ext.define('PVE.panel.PBSEncryptionKeyTab', {
 				ev.preventDefault();
 			    }
 			};
-			field.inputEl.on('dragover', cancel);
-			field.inputEl.on('dragenter', cancel);
-			field.inputEl.on('drop', function(ev) {
-			    ev = ev.event;
-			    if (ev.preventDefault) {
-				ev.preventDefault();
-			    }
-			    let files = ev.dataTransfer.files;
-			    PVE.Utils.loadTextFromFile(files[0], v => field.setValue(v));
+			this.inputEl.on('dragover', cancel);
+			this.inputEl.on('dragenter', cancel);
+			this.inputEl.on('drop', ev => {
+			    cancel(ev);
+			    let files = ev.event.dataTransfer.files;
+			    PVE.Utils.loadTextFromFile(files[0], v => this.setValue(v));
 			});
 		    },
 		},
-- 
2.20.1





  reply	other threads:[~2021-05-19  9:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19  9:14 [pve-devel] [PATCH manager 1/2] ui: qemu: " Dominic Jäger
2021-05-19  9:14 ` Dominic Jäger [this message]
2021-05-19 10:30 ` [pve-devel] applied: " 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=20210519091419.18921-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal