26
26
27
27
var baseClasses = "ui-button ui-widget ui-corner-all" ,
28
28
typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons" +
29
- " ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only" +
30
- " ui-icon-begining ui-icon-end ui-icon-top ui-icon-bottom" ,
29
+ "ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only" +
30
+ "ui-icon-begining ui-icon-end ui-icon-top ui-icon-bottom" ,
31
31
formResetHandler = function ( ) {
32
32
var form = $ ( this ) ;
33
33
setTimeout ( function ( ) {
@@ -111,9 +111,8 @@ $.widget( "ui.button", {
111
111
}
112
112
113
113
if ( this . element . is ( "a" ) ) {
114
- this . element . keyup ( function ( event ) {
114
+ this . element . keyup ( function ( event ) {
115
115
if ( event . keyCode === $ . ui . keyCode . SPACE ) {
116
-
117
116
// TODO pass through original event correctly (just as 2nd argument doesn't work)
118
117
$ ( this ) . click ( ) ;
119
118
}
@@ -149,7 +148,7 @@ $.widget( "ui.button", {
149
148
this . icon . addClass ( " ui-icon " + value )
150
149
. removeClass ( this . options . icon ) ;
151
150
}
152
- if ( key === "text " ) {
151
+ if ( key === "showLabel " ) {
153
152
this . element . toggleClass ( ".ui-button-icon-only" , ! ( ! ! value ) )
154
153
. toggleClass ( this . options . iconPosition , ! ! value ) ;
155
154
this . _setTitle ( ) ;
@@ -174,9 +173,9 @@ $.widget( "ui.button", {
174
173
} ,
175
174
176
175
refresh : function ( ) {
177
-
178
176
//See #8237 & #8828
179
- var isDisabled = this . element . is ( "input, button" ) ? this . element . is ( ":disabled" ) : this . element . hasClass ( "ui-button-disabled" ) ;
177
+ var isDisabled = this . element . is ( "input, button" ) ?
178
+ this . element . is ( ":disabled" ) : this . element . hasClass ( "ui-button-disabled" ) ;
180
179
181
180
if ( isDisabled !== this . options . disabled ) {
182
181
this . _setOptions ( { "disabled" : isDisabled } ) ;
0 commit comments