mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-08-10 23:22:08 +00:00
let the default token be chosen by the view
instead of the application, since we want a different default token for the admin view and the quarantine view Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
fc7de588fd
commit
033228c06d
@ -3,9 +3,6 @@ Ext.define('PMG.Application', {
|
|||||||
|
|
||||||
name: 'PMG',
|
name: 'PMG',
|
||||||
|
|
||||||
// default fragment for the router
|
|
||||||
defaultToken: 'pmgDashboard',
|
|
||||||
|
|
||||||
stores: [
|
stores: [
|
||||||
'NavigationStore'
|
'NavigationStore'
|
||||||
],
|
],
|
||||||
|
@ -142,7 +142,7 @@ Ext.define('PMG.MainView', {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// select treeitem and load page from url fragment
|
// select treeitem and load page from url fragment
|
||||||
var token = Ext.util.History.getToken();
|
var token = Ext.util.History.getToken() || 'pmgDashboard';
|
||||||
this.redirectTo(token, true);
|
this.redirectTo(token, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -179,8 +179,7 @@ Ext.define('PMG.QuarantineView', {
|
|||||||
me.execQuarantineAction(qa);
|
me.execQuarantineAction(qa);
|
||||||
} else {
|
} else {
|
||||||
// select treeitem and load page from url fragment
|
// select treeitem and load page from url fragment
|
||||||
var token = Ext.util.History.getToken();
|
var token = Ext.util.History.getToken() || 'pmgSpamQuarantine';
|
||||||
if (!token || token === 'pmgDashboard') token = 'pmgSpamQuarantine'; // hack
|
|
||||||
this.redirectTo(token, true);
|
this.redirectTo(token, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user