diff options
author | Richard D. Worth <rdworth@gmail.com> | 2010-04-09 14:43:44 -0400 |
---|---|---|
committer | Richard D. Worth <rdworth@gmail.com> | 2010-04-09 14:43:44 -0400 |
commit | 3291d3951ab177cde692f9c763248027b3c5a128 (patch) | |
tree | 368b5d5542d263e2d48378ac053e218cb10e6af7 /ui/jquery.ui.sortable.js | |
parent | ffc29bba052e4bc8b84e4c2e16036140148b6f9c (diff) | |
download | jquery-ui-3291d3951ab177cde692f9c763248027b3c5a128.tar.gz jquery-ui-3291d3951ab177cde692f9c763248027b3c5a128.zip |
sortable: don't call the base widget _setOption for disabled to avoid the ui-state-disabled class being added. Fixes #5501 - sortable: disabled should not have the ui-state-disabled class
Diffstat (limited to 'ui/jquery.ui.sortable.js')
-rw-r--r-- | ui/jquery.ui.sortable.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 28be062f6..0fa3a1253 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -73,6 +73,18 @@ $.widget("ui.sortable", $.ui.mouse, { return this; }, + _setOption: function(key, value){ + if ( key === "disabled" ) { + this.options[ key ] = value; + + this.widget() + [ value ? "addClass" : "removeClass"]( "ui-sortable-disabled" ); + } else { + // Don't call widget base _setOption for disable as it adds ui-state-disabled class + $.Widget.prototype._setOption.apply(self, arguments); + } + }, + _mouseCapture: function(event, overrideHandle) { if (this.reverting) { |