X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/Button.html diff --git a/docs/source/Button.html b/docs/source/Button.html index 6bf0c6f7..3c1bda4b 100644 --- a/docs/source/Button.html +++ b/docs/source/Button.html @@ -15,15 +15,15 @@
-
* @class Ext.button.Button
* @extends Ext.Component
-Create simple buttons with this component. Customisations include {@link #config-iconAlign aligned}
-{@link #config-iconCls icons}, {@link #config-menu dropdown menus}, {@link #config-tooltip tooltips}
-and {@link #config-scale sizing options}. Specify a {@link #config-handler handler} to run code when
-a user clicks the button, or use {@link #config-listeners listeners} for other events such as
-{@link #events-mouseover mouseover}.
+Create simple buttons with this component. Customisations include {@link #iconAlign aligned}
+{@link #iconCls icons}, {@link #menu dropdown menus}, {@link #tooltip tooltips}
+and {@link #scale sizing options}. Specify a {@link #handler handler} to run code when
+a user clicks the button, or use {@link #listeners listeners} for other events such as
+{@link #mouseover mouseover}.
{@img Ext.button.Button/Ext.button.Button1.png Ext.button.Button component}
Example usage:
@@ -142,10 +142,6 @@ Example usage:
}
});
- * @constructor
- * Create a new button
- * @param {Object} config The config object
- * @xtype button
* @markdown
* @docauthor Robert Dougan <rob@sencha.com>
*/
@@ -358,7 +354,10 @@ Ext.define('Ext.button.Button', {
'<em class="{splitCls}">' +
'<tpl if="href">' +
'<a href="{href}" target="{target}"<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="link">' +
- '<span class="{baseCls}-inner">{text}</span>' +
+ '<span class="{baseCls}-inner">' +
+ '{text}' +
+ '</span>' +
+ '<span class="{baseCls}-icon"></span>' +
'</a>' +
'</tpl>' +
'<tpl if="!href">' +
@@ -366,7 +365,10 @@ Ext.define('Ext.button.Button', {
// the autocomplete="off" is required to prevent Firefox from remembering
// the button's disabled state between page reloads.
'<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="button" autocomplete="off">' +
- '<span class="{baseCls}-inner" style="{innerSpanStyle}">{text}</span>' +
+ '<span class="{baseCls}-inner" style="{innerSpanStyle}">' +
+ '{text}' +
+ '</span>' +
+ '<span class="{baseCls}-icon"></span>' +
'</button>' +
'</tpl>' +
'</em>' ,
@@ -614,7 +616,8 @@ Ext.define('Ext.button.Button', {
Ext.applyIf(me.renderSelectors, {
btnEl : me.href ? 'a' : 'button',
btnWrap: 'em',
- btnInnerEl: '.' + me.baseCls + '-inner'
+ btnInnerEl: '.' + me.baseCls + '-inner',
+ btnIconEl: '.'+ me.baseCls + '-icon'
});
if (me.scale) {
@@ -780,11 +783,11 @@ Ext.define('Ext.button.Button', {
*/
setIconCls: function(cls) {
var me = this,
- btnInnerEl = me.btnInnerEl;
- if (btnInnerEl) {
+ btnIconEl = me.btnIconEl;
+ if (btnIconEl) {
// Remove the previous iconCls from the button
- btnInnerEl.removeCls(me.iconCls);
- btnInnerEl.addCls(cls || '');
+ btnIconEl.removeCls(me.iconCls);
+ btnIconEl.addCls(cls || '');
me.setButtonCls();
}
me.iconCls = cls;
* @class Ext.button.Button
+