r2582 - Spinner: stopped hover/focus show with autoHide when disabled

r2582 - Spinner: stopped hover/focus show with autoHide when disabled


Author: btburnett3
Date: Sat May 16 14:32:43 2009
New Revision: 2582
Modified:
branches/dev/spinner/ui/ui.spinner.js
Log:
Spinner: stopped hover/focus show with autoHide when disabled
Modified: branches/dev/spinner/ui/ui.spinner.js
==============================================================================
--- branches/dev/spinner/ui/ui.spinner.js    (original)
+++ branches/dev/spinner/ui/ui.spinner.js    Sat May 16 14:32:43 2009
@@ -162,7 +162,7 @@
            .end()
            .hover(function() {
                self.hovered = true;
-                if (self.options.autoHide && !self.focused)
+                if (self.options.autoHide && !self.focused && !self.disabled)
                    self._delay(self.showButtons, 100, 'hide');
            }, function() {
                self.hovered = false;
@@ -223,7 +223,7 @@
        })
        .bind('focus'+namespace, function() {
            self.focused = true;
-            if (!self.hovered && self.options.autoHide)
+            if (!self.hovered && self.options.autoHide && !self.disabled)
                self._delay(self.showButtons, 100, 'hide');
        })
        .bind('blur'+namespace, function(event) {
@@ -238,7 +238,7 @@
        }
        
        // disable spinner if element was already disabled
-        if (self.element.disabled)
+        if (self.element.attr("disabled"))
            self.disable();
    },