]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/QuarantineView.js
check if load is successfull in GeneralMailStatistics
[pmg-gui.git] / js / QuarantineView.js
index 2721d2280d7c893fe0eb4cea5d55f7e02fafce47..fd1e238cde2a70e0f584b4437801fc06f65a4978 100644 (file)
@@ -21,13 +21,13 @@ Ext.define('PMG.QuarantineNavigationTree', {
                    children: [
                        {
                            text: gettext('Whitelist'),
-                           //iconCls: 'fa fa-cubes',
+                           iconCls: 'fa fa-file-o',
                            path: 'pmgUserWhitelist',
                            leaf: true
                        },
                        {
                            text: gettext('Blacklist'),
-                           //iconCls: 'fa fa-cubes',
+                           iconCls: 'fa fa-file',
                            path: 'pmgUserBlacklist',
                            leaf: true
                        }
@@ -56,8 +56,8 @@ Ext.define('PMG.QuarantineView', {
                action: 'changePath',
                before: 'beforeChangePath',
                 conditions : {
-                   ':path'    : '(?:([%a-zA-Z0-9\-\_\s,]+))',
-                   ':subpath' : '(?:(?::)([%a-zA-Z0-9\-\_\s,]+))?'
+                   ':path'    : '(?:([%a-zA-Z0-9\\-\\_\\s,]+))',
+                   ':subpath' : '(?:(?::)([%a-zA-Z0-9\\-\\_\\s,]+))?'
                }
            }
        },
@@ -79,12 +79,11 @@ Ext.define('PMG.QuarantineView', {
                subpath = subpath || 0;
                if (lastpanel.getActiveTab) {
                    // we assume lastpanel is a tabpanel
-                   if (lastpanel.getActiveTab().getItemId() === subpath) {
-                       // we are already there
-                   } else {
+                   if (lastpanel.getActiveTab().getItemId() !== subpath) {
                        // set the active tab
                        lastpanel.setActiveTab(subpath);
                    }
+                   // else we are already there
                }
                action.stop();
                return;
@@ -161,8 +160,9 @@ Ext.define('PMG.QuarantineView', {
            });
 
            var qa = PMG.Utils.extractQuarantineAction();
+           var token;
            if (qa) {
-               var token = 'pmgSpamQuarantine';
+               token = 'pmgSpamQuarantine';
                if (qa.action === 'blacklist') { token = 'pmgUserBlacklist'; }
                if (qa.action === 'whitelist') { token = 'pmgUserWhitelist'; }
                if (qa.cselect) {
@@ -175,7 +175,7 @@ Ext.define('PMG.QuarantineView', {
            } else {
                // select treeitem and load page from url fragment
                
-               var token = Ext.util.History.getToken() || 'pmgSpamQuarantine';
+               token = Ext.util.History.getToken() || 'pmgSpamQuarantine';
                this.redirectTo(token, true);
            }
        }
@@ -183,7 +183,9 @@ Ext.define('PMG.QuarantineView', {
 
     plugins: 'viewport',
 
-    layout: 'border',
+    layout: {
+       type: 'border'
+    },
 
     items: [
        {
@@ -234,7 +236,9 @@ Ext.define('PMG.QuarantineView', {
        },
        {
            xtype: 'panel',
-           layout: 'card',
+           layout: {
+               type: 'card'
+           },
            region: 'center',
            border: false,
            reference: 'contentpanel'