github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 411
    • 52
  • Source
  • Commits
  • Network (52)
  • Graphs
  • Tree: 01ad6ce

click here to add a description

click here to add a homepage

  • Switch Branches (6)
    • bind
    • formcontrols
    • master
    • menu
    • panel
    • tooltip
  • Switch Tags (16)
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 1.8.1
    • 1.8
    • 1.7
    • 1.6rc6
    • 1.6rc5
    • 1.6rc3
    • 1.6rc2
    • 1.6
    • 1.5.2
    • 1.5.1
  • Comments
  • Contributors
Sending Request…

The official jQuery user interface library. — Read more

  Cancel

http://jqueryui.com/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

Remove previous text/icon classes when updating buttons.

Fixes #5567 - button text, hide then show again.
scottgonzalez (author)
Thu Apr 29 18:38:23 -0700 2010
commit  01ad6ce83e7d33c4a510
tree    5974c306c80df43cd9a0
parent  888725a17b66e73ecfb4
M ui/jquery.ui.button.js 8 ••••
Txt ui/jquery.ui.button.js
  • View file @ 01ad6ce
... ...
@@ -15,8 +15,8 @@
15 15
 
16 16
 var lastActive,
17 17
   baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
18  
-  otherClasses = "ui-state-hover ui-state-active " +
19  
-    "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon ui-button-text-only",
  18
+  stateClasses = "ui-state-hover ui-state-active ",
  19
+  typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon ui-button-text-only",
20 20
   formResetHandler = function( event ) {
21 21
     $( ":ui-button", event.target.form ).each(function() {
22 22
       var inst = $( this ).data( "button" );
... ...
@@ -217,7 +217,7 @@ $.widget( "ui.button", {
217 217
     this.element
218 218
       .removeClass( "ui-helper-hidden-accessible" );
219 219
     this.buttonElement
220  
-      .removeClass( baseClasses + " " + otherClasses )
  220
+      .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
221 221
       .removeAttr( "role" )
222 222
       .removeAttr( "aria-pressed" )
223 223
       .html( this.buttonElement.find(".ui-button-text").html() );
... ...
@@ -278,7 +278,7 @@ $.widget( "ui.button", {
278 278
       }
279 279
       return;
280 280
     }
281  
-    var buttonElement = this.buttonElement,
  281
+    var buttonElement = this.buttonElement.removeClass( typeClasses ),
282 282
       buttonText = $( "<span></span>" )
283 283
         .addClass( "ui-button-text" )
284 284
         .html( this.options.label )

0 notes on commit 01ad6ce

Please log in to comment.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server