From 64811c10ec6e9d1bb79ec4aa06b8eb1a1344532c Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 2 Mar 2010 05:29:35 +0000 Subject: Button: Add disabled class on init if the disabled option is set to true. Fixes #5250 - Button: initializing with disabled = true isn't visually disabled. --- ui/jquery.ui.button.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ui/jquery.ui.button.js') diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 62f7a02f5..9adf0c193 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -141,6 +141,10 @@ $.widget( "ui.button", { } } + // TODO: pull out $.Widget's handling for the disabled option into + // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can + // be overridden by individual plugins + $.Widget.prototype._setOption.call( this, "disabled", options.disabled ); this._resetButton(); }, -- cgit v1.2.3