r1199 - trunk/ui
r1199 - trunk/ui
Author: scott.gonzalez
Date: Sun Dec 21 10:00:42 2008
New Revision: 1199
Modified:
trunk/ui/ui.dialog.js
Log:
Dialog: Added hover and focus states to all buttons.
Modified: trunk/ui/ui.dialog.js
==============================================================================
--- trunk/ui/ui.dialog.js (original)
+++ trunk/ui/ui.dialog.js Sun Dec 21 10:00:42 2008
@@ -95,12 +95,18 @@
.attr('role', 'button')
.hover(
function() {
- $(this).addClass('ui-state-hover');
+ uiDialogTitlebarClose.addClass('ui-state-hover');
},
function() {
- $(this).removeClass('ui-state-hover');
+ uiDialogTitlebarClose.removeClass('ui-state-hover');
}
)
+ .focus(function() {
+ uiDialogTitlebarClose.addClass('ui-state-focus');
+ })
+ .blur(function() {
+ uiDialogTitlebarClose.removeClass('ui-state-focus');
+ })
.mousedown(function(ev) {
ev.stopPropagation();
})
@@ -255,6 +261,20 @@
)
.text(name)
.click(function() { fn.apply(self.element[0], arguments); })
+ .hover(
+ function() {
+ $(this).addClass('ui-state-hover');
+ },
+ function() {
+ $(this).removeClass('ui-state-hover');
+ }
+ )
+ .focus(function() {
+ $(this).addClass('ui-state-focus');
+ })
+ .blur(function() {
+ $(this).removeClass('ui-state-focus');
+ })
.appendTo(uiDialogButtonPane);
});
}