r3556 committed - Button: minor tweaks.

r3556 committed - Button: minor tweaks.

Revision: 3556
Author: scott.gonzalez
Date: Tue Dec 29 20:21:23 2009
Log: Button: minor tweaks.
http://code.google.com/p/jquery-ui/source/detail?r=3556
Modified:
/branches/dev/ui/jquery.ui.button.js
=======================================
--- /branches/dev/ui/jquery.ui.button.js    Sun Dec 27 08:04:09 2009
+++ /branches/dev/ui/jquery.ui.button.js    Tue Dec 29 20:21:23 2009
@@ -79,10 +79,9 @@
    },
    destroy: function() {
-        this.element.html(this.element.find(".ui-button-text").html());
        this.element
            .removeClass(baseClasses + " " + otherClasses)
-            .unbind(".button");
+            .html(this.element.find(".ui-button-text").html());
        $.Widget.prototype.destroy.call(this);
    },
@@ -92,10 +91,11 @@
    },
    _resetButton: function() {
-        $("<span></span>")
+        var buttonText = $("<span></span>")
            .addClass("ui-button-text")
            .html(this.options.label)
-            .appendTo(this.element.empty());
+            .appendTo(this.element.empty())
+            .text();
        var icons = this.options.icons,
            multipleIcons = icons.primary && icons.secondary;
@@ -113,7 +113,7 @@
                
    .addClass(multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only")
                    .removeClass("ui-button-text-icons ui-button-text-icon");
                if (!this.element.attr("title")) {
-                    this.element.attr("title",
this.element.find(".ui-button-text").text());
+                    this.element.attr("title", buttonText);
                }
            }
        } else {
--