diff options
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r-- | ui/jquery.ui.button.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 1d9393d37..18a950563 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -174,7 +174,7 @@ $.widget( "ui.button", { } $( this ).addClass( "ui-state-active" ); lastActive = this; - $( document ).one( "mouseup", function() { + self.document.one( "mouseup", function() { lastActive = null; }); }) @@ -269,7 +269,7 @@ $.widget( "ui.button", { }, _setOption: function( key, value ) { - this._super( "_setOption", key, value ); + this._super( key, value ); if ( key === "disabled" ) { if ( value ) { this.element.prop( "disabled", true ); @@ -319,14 +319,14 @@ $.widget( "ui.button", { return; } var buttonElement = this.buttonElement.removeClass( typeClasses ), - buttonText = $( "<span></span>" ) + buttonText = $( "<span></span>", this.document[0] ) .addClass( "ui-button-text" ) .html( this.options.label ) .appendTo( buttonElement.empty() ) .text(), icons = this.options.icons, multipleIcons = icons.primary && icons.secondary, - buttonClasses = []; + buttonClasses = []; if ( icons.primary || icons.secondary ) { if ( this.options.text ) { @@ -365,7 +365,7 @@ $.widget( "ui.buttonset", { _create: function() { this.element.addClass( "ui-buttonset" ); }, - + _init: function() { this.refresh(); }, @@ -375,12 +375,12 @@ $.widget( "ui.buttonset", { this.buttons.button( "option", key, value ); } - this._super( "_setOption", key, value ); + this._super( key, value ); }, - + refresh: function() { var rtl = this.element.css( "direction" ) === "rtl"; - + this.buttons = this.element.find( this.options.items ) .filter( ":ui-button" ) .button( "refresh" ) |