Here is the 3.1.1 version of the Ext.SubmitButton to whom needs it:
Code:
Ext.SubmitButton = Ext.extend(Ext.Button, {
onRender : function(ct, position){
var buttonTemplate = 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"><button type="submit" name="{6}" value="{5}"></button></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>');
buttonTemplate.compile();
this.template = buttonTemplate;
var btn, targs = this.getTemplateArgs();
targs.push(this.text || ' ', this.name);
if(position){
btn = this.template.insertBefore(position, targs, true);
}else{
btn = this.template.append(ct, targs, true);
}
/**
* An {@link Ext.Element Element} encapsulating the Button's clickable element. By default,
* this references a <tt><button></tt> element. Read only.
* @type Ext.Element
* @property btnEl
*/
this.btnEl = btn.child(this.buttonSelector);
this.mon(this.btnEl, {
scope: this,
focus: this.onFocus,
blur: this.onBlur
});
this.initButtonEl(btn, this.btnEl);
btn.un(this.clickEvent, this.onClick, this);
Ext.ButtonToggleMgr.register(this);
}
});
// register ptype
Ext.preg('submitbutton', Ext.SubmitButton);