aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.tabs.js
diff options
context:
space:
mode:
authorDavid Petersen <public@petersendidit.com>2011-04-17 21:09:47 -0400
committerScott González <scott.gonzalez@gmail.com>2011-04-28 09:37:56 -0400
commit0e7769c66958a0f86ffda0209caa4039d96c79b2 (patch)
tree8684775829fa724f21bd0ce322d5ed880f261135 /ui/jquery.ui.tabs.js
parentabe4c37748628d17627493070abddbd8084b3b36 (diff)
downloadjquery-ui-0e7769c66958a0f86ffda0209caa4039d96c79b2.tar.gz
jquery-ui-0e7769c66958a0f86ffda0209caa4039d96c79b2.zip
Tabs: enable/disable handle when current state already matches, fix error when disabled = true and enable gets called
Diffstat (limited to 'ui/jquery.ui.tabs.js')
-rwxr-xr-xui/jquery.ui.tabs.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index f73799f02..5c525b34a 100755
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -513,6 +513,9 @@ $.widget( "ui.tabs", {
enable: function( index ) {
var disabled = this.options.disabled;
+ if ( disabled === false ) {
+ return;
+ }
if ( index === undefined ) {
disabled = false;
@@ -523,7 +526,9 @@ $.widget( "ui.tabs", {
return num !== index ? num : null;
});
} else {
- disabled = [ index ];
+ disabled = $.map( this.lis, function( li, num ) {
+ return num !== index ? num : null;
+ });
}
}
this._setupDisabled( disabled );
@@ -531,6 +536,9 @@ $.widget( "ui.tabs", {
disable: function( index ) {
var disabled = this.options.disabled;
+ if ( disabled === true ) {
+ return;
+ }
if ( index === undefined ) {
disabled = true;