steffenk
18 May 2010, 8:46 AM
Ext version tested:
Ext 3.2.1 and earlier versions
Adapter used:
ext
I first tried to add a tooltip to a Toolbar button, no problem:
{
text: 'button',
tooltip: 'show tooltip'
}
Then i used a template: no tooltip is showed:
{
text: 'button',
tooltip: 'show tooltip'
template : new Ext.Template(
'<p class="x-btn">',
'<a class="x-btn-text">{0}</a>',
'</p>').compile(),
buttonSelector : 'a:first'
}
Even direct in template it doesn't work:
{
text: 'button',
template : new Ext.Template(
'<p class="x-btn">',
'<a class="x-btn-text" ext:qtip="show tooltip">{0}</a>',
'</p>').compile(),
buttonSelector : 'a:first'
}
only a dirty workarround works:
{
text: '<span ext:qtip="show tooltip">button</span>',
template : new Ext.Template(
'<p class="x-btn">',
'<a class="x-btn-text">{0}</a>',
'</p>').compile(),
buttonSelector : 'a:first'
}
Same tested in DataView with XTemplate: render ext:qtip="..." never works, funny that using a function inside XTemplate with simple string
return 'ext:qwidth="180" ext:qtip=" ... this is the tip "';
works in DataView!
Remark: looking to generated source shows that the not working examples all have ext:qtip="..." in HTML, but it seems that the Quicktips init is before the HTML is generated, so it doesn't affect.
Ext 3.2.1 and earlier versions
Adapter used:
ext
I first tried to add a tooltip to a Toolbar button, no problem:
{
text: 'button',
tooltip: 'show tooltip'
}
Then i used a template: no tooltip is showed:
{
text: 'button',
tooltip: 'show tooltip'
template : new Ext.Template(
'<p class="x-btn">',
'<a class="x-btn-text">{0}</a>',
'</p>').compile(),
buttonSelector : 'a:first'
}
Even direct in template it doesn't work:
{
text: 'button',
template : new Ext.Template(
'<p class="x-btn">',
'<a class="x-btn-text" ext:qtip="show tooltip">{0}</a>',
'</p>').compile(),
buttonSelector : 'a:first'
}
only a dirty workarround works:
{
text: '<span ext:qtip="show tooltip">button</span>',
template : new Ext.Template(
'<p class="x-btn">',
'<a class="x-btn-text">{0}</a>',
'</p>').compile(),
buttonSelector : 'a:first'
}
Same tested in DataView with XTemplate: render ext:qtip="..." never works, funny that using a function inside XTemplate with simple string
return 'ext:qwidth="180" ext:qtip=" ... this is the tip "';
works in DataView!
Remark: looking to generated source shows that the not working examples all have ext:qtip="..." in HTML, but it seems that the Quicktips init is before the HTML is generated, so it doesn't affect.