@@ -46,19 +46,19 @@ $.widget( "ui.button", {
4646 iconPosition : "begining"
4747 } ,
4848
49- _getCreateOptions : function ( ) {
49+ _getCreateOptions : function ( ) {
5050 var label ,
5151 isDisabled = this . element . prop ( "disabled" ) ,
5252 options = { } ;
5353
5454 this . isInput = this . element . is ( "input" ) ;
5555 label = ( this . isInput ? this . element . val ( ) : this . element . html ( ) ) ;
5656
57- if ( typeof isDisabled !== "undefined" ) {
57+ if ( typeof isDisabled !== "undefined" ) {
5858 options . disabled = isDisabled ;
5959 }
6060
61- if ( typeof label !== "undefined" && label !== "" ) {
61+ if ( typeof label !== "undefined" && label !== "" ) {
6262 options . label = label ;
6363 }
6464
@@ -75,34 +75,34 @@ $.widget( "ui.button", {
7575 } else {
7676 this . options . disabled = ! ! this . element . prop ( "disabled" ) ;
7777 }
78- if ( this . options . disabled === true ) {
78+ if ( this . options . disabled === true ) {
7979 this . _setOption ( "disabled" , true ) ;
8080 }
8181
8282 this . element
8383 . addClass ( baseClasses )
8484 . attr ( "role" , "button" ) ;
8585
86- if ( this . options . icon ) {
86+ if ( this . options . icon ) {
8787 this . icon = $ ( "<span>" ) ;
8888 this . icon . addClass ( " ui-icon " + this . options . icon ) ;
89- if ( this . options . iconPosition ) {
89+ if ( this . options . iconPosition ) {
9090 this . element . addClass ( "ui-icon-" + this . options . iconPosition ) ;
9191 }
92- if ( ! this . options . showLabel ) {
92+ if ( ! this . options . showLabel ) {
9393 this . element . addClass ( " ui-button-icon-only" ) ;
9494 }
9595 this . element . append ( this . icon ) ;
9696 this . _setTitle ( ) ;
9797 }
98- if ( this . options . label ) {
99- if ( this . isInput ) {
98+ if ( this . options . label ) {
99+ if ( this . isInput ) {
100100 this . element . val ( this . options . label ) ;
101101 } else {
102102 var textNode = this . element . contents ( ) . filter ( function ( ) {
103103 return this . nodeType === 3 ;
104104 } ) [ 0 ] ;
105- if ( textNode !== undefined ) {
105+ if ( textNode !== undefined ) {
106106 textNode . nodeValue = this . options . label ;
107107 } else {
108108 this . element . html ( this . options . label + this . element . html ( ) ) ;
@@ -124,7 +124,7 @@ $.widget( "ui.button", {
124124 this . title = this . element . attr ( "title" ) ;
125125 this . hasTitle = ! ! this . title ;
126126
127- if ( ! this . options . showLabel ) {
127+ if ( ! this . options . showLabel ) {
128128 if ( ! this . hasTitle ) {
129129 this . element . attr ( "title" , this . title ) ;
130130 }
@@ -144,21 +144,21 @@ $.widget( "ui.button", {
144144 } ,
145145
146146 _setOption : function ( key , value ) {
147- if ( key === "icon" ) {
147+ if ( key === "icon" ) {
148148 this . icon . addClass ( " ui-icon " + value )
149149 . removeClass ( this . options . icon ) ;
150150 }
151- if ( key === "showLabel" ) {
151+ if ( key === "showLabel" ) {
152152 this . element . toggleClass ( ".ui-button-icon-only" , ! ( ! ! value ) )
153153 . toggleClass ( this . options . iconPosition , ! ! value ) ;
154154 this . _setTitle ( ) ;
155155 }
156- if ( key === "iconPosition" && this . options . showLabel ) {
156+ if ( key === "iconPosition" && this . options . showLabel ) {
157157 this . element . addClass ( value )
158158 . removeClass ( this . options . iconPosition ) ;
159159 }
160- if ( key === "label" ) {
161- if ( this . element . is ( "input" ) ) {
160+ if ( key === "label" ) {
161+ if ( this . element . is ( "input" ) ) {
162162 this . element . val ( value ) ;
163163 } else {
164164 this . element . html ( value ) ;
0 commit comments