PDA

View Full Version : Ext.LinkButton code from Animal needs update for ExtJS 3.2



grEvenX
22 Apr 2010, 11:19 PM
I'm wondering how come the ExtJS development team still hasn't been able to either respond or fulfill this feature request by Animal:
http://www.extjs.com/forum/showthread.php?12288-OPEN-635-Ext.Button-config-option-href-foo

Anyway, for those using his code, it seems to need an update to the template to work correctly in Ext JS 3.2 (I'm guessing there has been changes to the button template code between versions). The new working template is:


template: new Ext.Template(
'<table id="{4}" cellspacing="0" class="x-btn {3}"><tbody class="{1}">',
'<tr><td class="x-btn-tl"><i> </i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i> </i></td></tr>',
'<tr>',
'<td class="x-btn-ml"><i> </i></td>',
'<td class="x-btn-mc">',
'<em class="{2}" unselectable="on">',
'<a href="{5}" style="display:block" target="{6}" class="x-btn-text">{0}</a>',
'</em>',
'</td>',
'<td class="x-btn-mr"><i> </i></td>',
'</tr>',
'<tr><td class="x-btn-bl"><i> </i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i> </i></td></tr>',
'</tbody></table>'
).compile(),