mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
fix bug in Sonia.util.Link
This commit is contained in:
@@ -69,12 +69,8 @@ Sonia.repository.ExtendedInfoPanel = Ext.extend(Sonia.repository.InfoPanel,{
|
|||||||
xtype: 'link',
|
xtype: 'link',
|
||||||
colspan: 2,
|
colspan: 2,
|
||||||
text: this.repositoryBrowserText,
|
text: this.repositoryBrowserText,
|
||||||
listeners: {
|
handler: this.openRepositoryBrowser,
|
||||||
click: {
|
scope: this
|
||||||
fn: this.openRepositoryBrowser,
|
|
||||||
scope: this
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -143,12 +143,8 @@ Sonia.repository.InfoPanel = Ext.extend(Ext.Panel, {
|
|||||||
xtype: 'link',
|
xtype: 'link',
|
||||||
colspan: 2,
|
colspan: 2,
|
||||||
text: this.changesetViewerText,
|
text: this.changesetViewerText,
|
||||||
listeners: {
|
handler: this.openChangesetViewer,
|
||||||
click: {
|
scope: this
|
||||||
fn: this.openChangesetViewer,
|
|
||||||
scope: this
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -31,27 +31,25 @@
|
|||||||
|
|
||||||
Sonia.util.Link = Ext.extend(Ext.BoxComponent, {
|
Sonia.util.Link = Ext.extend(Ext.BoxComponent, {
|
||||||
|
|
||||||
|
handler: null,
|
||||||
|
scope: null,
|
||||||
|
|
||||||
constructor: function(config) {
|
constructor: function(config) {
|
||||||
config = config || {};
|
config = config || {};
|
||||||
config.xtype = 'box';
|
config.xtype = 'box';
|
||||||
config.autoEl = { tag: 'a', html: config.text, href: '#' };
|
config.autoEl = { tag: 'a', html: config.text, href: '#' };
|
||||||
Sonia.util.Link.superclass.constructor.apply(this, arguments);
|
config.listeners = {
|
||||||
this.addEvents({
|
render: function(c) {
|
||||||
'click': true,
|
c.getEl().on('click', function(){
|
||||||
'mouseover': true,
|
if (this.handler){
|
||||||
'blur': true
|
this.scope ? this.handler.call(this.scope) : this.handler();
|
||||||
});
|
}
|
||||||
this.text = config.text;
|
}, this);
|
||||||
},
|
}
|
||||||
|
|
||||||
onRender: function() {
|
|
||||||
theLnk = this;
|
|
||||||
this.constructor.superclass.onRender.apply(this, arguments);
|
|
||||||
if (!theLnk.disabled) {
|
|
||||||
this.el.on('blur', function(e) { theLnk.fireEvent('blur'); });
|
|
||||||
this.el.on('click', function(e) { theLnk.fireEvent('click'); });
|
|
||||||
this.el.on('mouseover', function(e) { theLnk.fireEvent('mouseover'); });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Sonia.util.Link.superclass.constructor.apply(this, arguments);
|
||||||
|
this.text = config.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user