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

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 249
    • 27
  • Source
  • Commits
  • Network (27)
  • Graphs
  • Tree: 2a8271c

click here to add a description

click here to add a homepage

  • Switch Branches (4)
    • bind
    • master
    • panel
    • tooltip
  • Switch Tags (15)
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 1.8
    • 1.7
    • 1.6rc6
    • 1.6rc5
    • 1.6rc3
    • 1.6rc2
    • 1.6
    • 1.5.2
    • 1.5.1
  • Comments
Sending Request…

The official jQuery user interface library. — Read more

  Cancel

http://jqueryui.com/

  Cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Button: Added refresh method to buttonset, futher fixes #5278 - ui.buttons 
doesn't visually reset on form "reset" event or input "change" event
rdworth (author)
Wed Mar 17 06:07:46 -0700 2010
commit  2a8271c7016be902aed15cd2ccadc23164159a8d
tree    d05aff7e21b7de307ededad19c66ab2a3f6adab9
parent  124f84635f8f17a0af5085f64466050d1b0e263b
M ui/jquery.ui.button.js 33 ••••
Txt ui/jquery.ui.button.js
  • View file @ 2a8271c
... ...
@@ -312,12 +312,33 @@ $.widget( "ui.button", {
312 312
 $.widget( "ui.buttonset", {
313 313
   _create: function() {
314 314
     this.element.addClass( "ui-button-set" );
  315
+    this._init();
  316
+  },
  317
+  
  318
+  _init: function() {
  319
+    this.refresh();
  320
+  },
  321
+
  322
+  _setOption: function( key, value ) {
  323
+    if ( key === "disabled" ) {
  324
+      this.buttons.button( "option", key, value );
  325
+    }
  326
+
  327
+    $.Widget.prototype._setOption.apply( this, arguments );
  328
+  },
  329
+  
  330
+  refresh: function() {
315 331
     this.buttons = this.element.find( ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" )
316  
-      .button()
  332
+      .filter( ":ui-button" )
  333
+        .button( "refresh" )
  334
+      .end()
  335
+      .not( ":ui-button" )
  336
+        .button()
  337
+      .end()
317 338
       .map(function() {
318 339
         return $( this ).button( "widget" )[ 0 ];
319 340
       })
320  
-        .removeClass( "ui-corner-all" )
  341
+        .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
321 342
         .filter( ":first" )
322 343
           .addClass( "ui-corner-left" )
323 344
         .end()
... ...
@@ -327,14 +348,6 @@ $.widget( "ui.buttonset", {
327 348
       .end();
328 349
   },
329 350
 
330  
-  _setOption: function( key, value ) {
331  
-    if ( key === "disabled" ) {
332  
-      this.buttons.button( "option", key, value );
333  
-    }
334  
-
335  
-    $.Widget.prototype._setOption.apply( this, arguments );
336  
-  },
337  
-
338 351
   destroy: function() {
339 352
     this.element.removeClass( "ui-button-set" );
340 353
     this.buttons

0 notes on commit 2a8271c

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