Dialog: Use :data(resizable) instead of :ui-resizable to check if the dialog is resizable. Fixes a bug when the resizable plugin isn't loaded and the :ui-resizable selector therefore doesn't exist.

This commit is contained in:
Scott González 2009-07-24 02:00:31 +00:00
parent d6f7a57eb1
commit 30bfc47c35

View File

@ -461,7 +461,7 @@ $.widget("ui.dialog", {
self._position(value); self._position(value);
break; break;
case "resizable": case "resizable":
var isResizable = uiDialog.is(':ui-resizable'); var isResizable = uiDialog.is(':data(resizable)');
// currently resizable, becoming non-resizable // currently resizable, becoming non-resizable
(isResizable && !value && uiDialog.resizable('destroy')); (isResizable && !value && uiDialog.resizable('destroy'));
@ -515,7 +515,7 @@ $.widget("ui.dialog", {
height: Math.max(options.height - nonContentHeight, 0) height: Math.max(options.height - nonContentHeight, 0)
}); });
(this.uiDialog.is(':ui-resizable') && (this.uiDialog.is(':data(resizable)') &&
this.uiDialog.resizable('option', 'minHeight', this._minHeight())); this.uiDialog.resizable('option', 'minHeight', this._minHeight()));
} }
}); });