r3523 committed - Update buttons for new widget factory.

r3523 committed - Update buttons for new widget factory.

Revision: 3523
Author: scott.gonzalez
Date: Tue Dec 22 20:09:21 2009
Log: Update buttons for new widget factory.
http://code.google.com/p/jquery-ui/source/detail?r=3523
Modified:
/branches/dev/ui/jquery.ui.button.js
=======================================
--- /branches/dev/ui/jquery.ui.button.js    Wed Dec 16 17:44:16 2009
+++ /branches/dev/ui/jquery.ui.button.js    Tue Dec 22 20:09:21 2009
@@ -19,6 +19,14 @@
        "ui-button-icons-only ui-button-icon-only ui-button-text-icons
ui-button-text-icon";
$.widget("ui.button", {
+    options: {
+        text: true,
+        label: null,
+        icons: {
+            primary: null,
+            secondary: null
+        }
+    },
    _init: function() {
        var options = this.options;
@@ -63,8 +71,8 @@
        $.widget.prototype.destroy.call(this);
    },
-    _setData: function(key, value) {
-        $.widget.prototype._setData.apply(this, arguments);
+    _setOption: function(key, value) {
+        $.widget.prototype._setOption.apply(this, arguments);
        this._resetButton();
    },
@@ -99,15 +107,6 @@
    }
});
-$.ui.button.defaults = {
-    text: true,
-    label: null,
-    icons: {
-        primary: null,
-        secondary: null
-    }
-};
-
// TODO merge with button-widget
$.widget("ui.toggleButton", {
    _init: function() {
--