Skip to content
Permalink
Browse files

Dialog: Added hover and focus states to all buttons.

  • Loading branch information
scottgonzalez committed Dec 21, 2008
1 parent 77d17fc commit c688dab9636eb95c2ea1d8d544adeaf6f090925b
Showing with 22 additions and 2 deletions.
  1. +22 −2 ui/ui.dialog.js
@@ -95,12 +95,18 @@ $.widget("ui.dialog", {
.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 @@ $.widget("ui.dialog", {
)
.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);
});
}

0 comments on commit c688dab

Please sign in to comment.
You can’t perform that action at this time.