Changeset 9559 for trunk/themes/default/js/ui/jquery.ui.button.js
- Timestamp:
- Mar 7, 2011, 1:58:34 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/default/js/ui/jquery.ui.button.js
r9172 r9559 1 1 /* 2 * jQuery UI Button 1.8. 92 * jQuery UI Button 1.8.10 3 3 * 4 4 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) … … 291 291 .text(), 292 292 icons = this.options.icons, 293 multipleIcons = icons.primary && icons.secondary; 293 multipleIcons = icons.primary && icons.secondary, 294 buttonClasses = []; 295 294 296 if ( icons.primary || icons.secondary ) { 295 button Element.addClass( "ui-button-text-icon" +296 ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) ); 297 buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) ); 298 297 299 if ( icons.primary ) { 298 300 buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" ); 299 301 } 302 300 303 if ( icons.secondary ) { 301 304 buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" ); 302 305 } 306 303 307 if ( !this.options.text ) { 304 button Element305 .addClass( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" )306 .removeClass( "ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary" ); 308 buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" ); 309 buttonElement.removeClass( "ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary" ); 310 307 311 if ( !this.hasTitle ) { 308 312 buttonElement.attr( "title", buttonText ); … … 310 314 } 311 315 } else { 312 buttonElement.addClass( "ui-button-text-only" ); 313 } 316 buttonClasses.push( "ui-button-text-only" ); 317 } 318 buttonElement.addClass( buttonClasses.join( " " ) ); 314 319 } 315 320 });
Note: See TracChangeset
for help on using the changeset viewer.