},
},
- beforeChangePath: function(path, subpath, action) {
+ beforeChangePath: function(path, subpathOrAction, action) {
let me = this;
+ let subpath = subpathOrAction;
+ if (!action) {
+ action = subpathOrAction;
+ subpath = undefined;
+ }
+
if (!Ext.ClassManager.getByAlias('widget.'+ path)) {
console.warn('xtype "'+path+'" not found');
action.stop();
// select treeitem and load page from url fragment
let token = Ext.util.History.getToken() || 'pmgDashboard';
- this.redirectTo(token, true);
+ this.redirectTo(token, { force: true });
},
},
margin: '0 5 0 0',
iconCls: 'fa fa-user',
menu: [
+ {
+ iconCls: 'fa fa-gear',
+ text: gettext('My Settings'),
+ handler: () => Ext.create('PMG.window.Settings').show(),
+ },
{
iconCls: 'fa fa-language',
text: gettext('Language'),
type: 'vbox',
align: 'stretch',
},
- items: [{
- xtype: 'navigationtree',
- minWidth: 180,
- reference: 'navtree',
- // we have to define it here until extjs 6.2
- // because of a bug where a viewcontroller does not detect
- // the selectionchange event of a treelist
- listeners: {
- selectionchange: 'navigate',
+ items: [
+ {
+ xtype: 'navigationtree',
+ minWidth: 180,
+ reference: 'navtree',
+ // we have to define it here until extjs 6.2 because of a bug where a
+ // viewcontroller does not detect the selectionchange event of a treelist
+ listeners: {
+ selectionchange: 'navigate',
+ },
},
- }, {
- xtype: 'box',
- cls: 'x-treelist-nav',
- flex: 1,
- }],
+ {
+ xtype: 'box',
+ cls: 'x-treelist-pve-nav',
+ flex: 1,
+ },
+ ],
},
{
xtype: 'panel',