mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
improve Sonia.History.handleChange method
This commit is contained in:
@@ -145,8 +145,16 @@ Sonia.History = {
|
|||||||
} else {
|
} else {
|
||||||
el.fn.call(el.scope, params);
|
el.fn.call(el.scope, params);
|
||||||
}
|
}
|
||||||
} else if (debug){
|
} else if (Ext.ComponentMgr.isRegistered(id)) {
|
||||||
console.debug('could not find history element for ' + id);
|
try {
|
||||||
|
main.addTabPanel(id);
|
||||||
|
} catch (e){
|
||||||
|
if (debug){
|
||||||
|
console.debug('could not handle history event: ' + e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (debug) {
|
||||||
|
console.debug('could not find xtype ' + id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -285,13 +285,18 @@ Sonia.scm.Main = Ext.extend(Ext.util.Observable, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
addTabPanel: function(id, xtype, title){
|
addTabPanel: function(id, xtype, title){
|
||||||
|
if (!xtype){
|
||||||
|
xtype = id;
|
||||||
|
}
|
||||||
var panel = {
|
var panel = {
|
||||||
id: id,
|
id: id,
|
||||||
xtype: xtype,
|
xtype: xtype,
|
||||||
title: title,
|
|
||||||
closable: true,
|
closable: true,
|
||||||
autoScroll: true
|
autoScroll: true
|
||||||
};
|
};
|
||||||
|
if (title){
|
||||||
|
panel.title = title;
|
||||||
|
}
|
||||||
this.addTab(panel);
|
this.addTab(panel);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user