aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.button.js
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2013-02-18 21:18:40 +0000
committerrvelices <rv-github@modusoptimus.com>2013-02-18 21:18:40 +0000
commit74373ea7175bcf6be2732e6d59f037f79f88ca96 (patch)
treee8799eea7707f9aae6ba3ccb2aa7ce315f0be383 /themes/default/js/ui/jquery.ui.button.js
parentf2da009c0f744c9197c652c5012323e69dd96308 (diff)
upgraded jquery ui from 1.9.0 to 1.10.1
git-svn-id: http://piwigo.org/svn/trunk@20824 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--themes/default/js/ui/jquery.ui.button.js28
1 files changed, 16 insertions, 12 deletions
diff --git a/themes/default/js/ui/jquery.ui.button.js b/themes/default/js/ui/jquery.ui.button.js
index 50b5b4268..74c072b33 100644
--- a/themes/default/js/ui/jquery.ui.button.js
+++ b/themes/default/js/ui/jquery.ui.button.js
@@ -1,8 +1,8 @@
/*!
- * jQuery UI Button 1.9.0
+ * jQuery UI Button 1.10.1
* http://jqueryui.com
*
- * Copyright 2012 jQuery Foundation and other contributors
+ * Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
@@ -29,6 +29,7 @@ var lastActive, startXPos, startYPos, clickDragged,
form = radio.form,
radios = $( [] );
if ( name ) {
+ name = name.replace( /'/g, "\\'" );
if ( form ) {
radios = $( form ).find( "[name='" + name + "']" );
} else {
@@ -42,7 +43,7 @@ var lastActive, startXPos, startYPos, clickDragged,
};
$.widget( "ui.button", {
- version: "1.9.0",
+ version: "1.10.1",
defaultElement: "<button>",
options: {
disabled: null,
@@ -70,13 +71,15 @@ $.widget( "ui.button", {
var that = this,
options = this.options,
toggleButton = this.type === "checkbox" || this.type === "radio",
- hoverClass = "ui-state-hover" + ( !toggleButton ? " ui-state-active" : "" ),
+ activeClass = !toggleButton ? "ui-state-active" : "",
focusClass = "ui-state-focus";
if ( options.label === null ) {
options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
}
+ this._hoverable( this.buttonElement );
+
this.buttonElement
.addClass( baseClasses )
.attr( "role", "button" )
@@ -84,7 +87,6 @@ $.widget( "ui.button", {
if ( options.disabled ) {
return;
}
- $( this ).addClass( "ui-state-hover" );
if ( this === lastActive ) {
$( this ).addClass( "ui-state-active" );
}
@@ -93,7 +95,7 @@ $.widget( "ui.button", {
if ( options.disabled ) {
return;
}
- $( this ).removeClass( hoverClass );
+ $( this ).removeClass( activeClass );
})
.bind( "click" + this.eventNamespace, function( event ) {
if ( options.disabled ) {
@@ -145,8 +147,6 @@ $.widget( "ui.button", {
if ( options.disabled || clickDragged ) {
return false;
}
- $( this ).toggleClass( "ui-state-active" );
- that.buttonElement.attr( "aria-pressed", that.element[0].checked );
});
} else if ( this.type === "radio" ) {
this.buttonElement.bind( "click" + this.eventNamespace, function() {
@@ -191,7 +191,9 @@ $.widget( "ui.button", {
$( this ).addClass( "ui-state-active" );
}
})
- .bind( "keyup" + this.eventNamespace, function() {
+ // see #8559, we bind to blur here in case the button element loses
+ // focus between keydown and keyup, it would be left in an "active" state
+ .bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
$( this ).removeClass( "ui-state-active" );
});
@@ -282,7 +284,9 @@ $.widget( "ui.button", {
},
refresh: function() {
- var isDisabled = this.element.is( ":disabled" );
+ //See #8237 & #8828
+ var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
+
if ( isDisabled !== this.options.disabled ) {
this._setOption( "disabled", isDisabled );
}
@@ -356,9 +360,9 @@ $.widget( "ui.button", {
});
$.widget( "ui.buttonset", {
- version: "1.9.0",
+ version: "1.10.1",
options: {
- items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"
+ items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
},
_create: function() {