r3338 committed - Dialog (dev): Removed button dependency.
Revision: 3338
Author: scott.gonzalez
Date: Wed Sep 30 06:59:05 2009
Log: Dialog (dev): Removed button dependency.
http://code.google.com/p/jquery-ui/source/detail?r=3338
Modified:
/branches/dev/ui/jquery.ui.dialog.js
=======================================
--- /branches/dev/ui/jquery.ui.dialog.js Tue Sep 29 16:52:01 2009
+++ /branches/dev/ui/jquery.ui.dialog.js Wed Sep 30 06:59:05 2009
@@ -277,11 +277,11 @@
$.each(buttons, function() { return !(hasButtons = true); }));
if (hasButtons) {
$.each(buttons, function(name, fn) {
- $('<button type="button"></button>')
+ var button = $('<button type="button"></button>')
.text(name)
.click(function() { fn.apply(self.element[0], arguments); })
- .button()
.appendTo(uiDialogButtonPane);
+ ($.fn.button && button.button());
});
uiDialogButtonPane.appendTo(self.uiDialog);
}