]> git.proxmox.com Git - pmg-gui.git/commitdiff
qlist: code cleanup
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 21 Mar 2021 17:02:07 +0000 (18:02 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 21 Mar 2021 17:02:07 +0000 (18:02 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
js/QuarantineList.js

index a59b966df256a4b1eabaff543950994307a51c20..3c46a9bac2c46cf1135ccf486e863b45315b2fc3 100644 (file)
@@ -57,13 +57,12 @@ Ext.define('PMG.QuarantineList', {
                }
            });
         },
-       // extjs has no method to dynamically change the emptytext on
-       // grids, so we have to do it this way
+       // ExtJS cannot dynamically change the emptyText on grids, so implement ourself
        setEmptyText: function(emptyText) {
            let me = this;
            let view = me.getView();
            let tableview = view.getView();
-           tableview.emptyText = '<div class="x-grid-empty">'+ (emptyText || view.notFoundText) + '</div>';
+           tableview.emptyText = `<div class="x-grid-empty">${emptyText || view.notFoundText}</div>`;
        },
 
        load: function(callback) {
@@ -73,8 +72,7 @@ Ext.define('PMG.QuarantineList', {
            let store = view.getStore();
            if (view.emailSelection) {
                if (!me.lookupReference('email').getSelection()) {
-                   // if the combobox has no selection we do not reload
-                   return;
+                   return; // if the combobox has no selection we do not reload
                }
                me.setEmptyText();
            }