Ignore:
Timestamp:
Mar 7, 2011, 1:58:34 AM (13 years ago)
Author:
patdenice
Message:

Update jQuery UI to 1.8.10.
Improve jquery ui management in template class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/js/ui/jquery.ui.button.js

    r9172 r9559  
    11/*
    2  * jQuery UI Button 1.8.9
     2 * jQuery UI Button 1.8.10
    33 *
    44 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
     
    291291                                .text(),
    292292                        icons = this.options.icons,
    293                         multipleIcons = icons.primary && icons.secondary;
     293                        multipleIcons = icons.primary && icons.secondary,
     294                        buttonClasses = []; 
     295
    294296                if ( icons.primary || icons.secondary ) {
    295                         buttonElement.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
    297299                        if ( icons.primary ) {
    298300                                buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
    299301                        }
     302
    300303                        if ( icons.secondary ) {
    301304                                buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
    302305                        }
     306
    303307                        if ( !this.options.text ) {
    304                                 buttonElement
    305                                         .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
    307311                                if ( !this.hasTitle ) {
    308312                                        buttonElement.attr( "title", buttonText );
     
    310314                        }
    311315                } else {
    312                         buttonElement.addClass( "ui-button-text-only" );
    313                 }
     316                        buttonClasses.push( "ui-button-text-only" );
     317                }
     318                buttonElement.addClass( buttonClasses.join( " " ) );
    314319        }
    315320});
Note: See TracChangeset for help on using the changeset viewer.