]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Use ._focusable() and ._hoverable().
authorScott González <scott.gonzalez@gmail.com>
Tue, 25 Jan 2011 02:58:40 +0000 (21:58 -0500)
committerScott González <scott.gonzalez@gmail.com>
Tue, 25 Jan 2011 02:58:40 +0000 (21:58 -0500)
ui/jquery.ui.dialog.js

index 5d18b9b2114595ac178047d2f35a8c57891bafd5..0183dd80199cb824c2294c12a1265e3a1c16f493 100644 (file)
@@ -125,20 +125,6 @@ $.widget("ui.dialog", {
                        uiDialogTitlebarClose = $( "<a href='#'></a>" )
                                .addClass( "ui-dialog-titlebar-close  ui-corner-all" )
                                .attr( "role", "button" )
-                               .hover(
-                                       function() {
-                                               uiDialogTitlebarClose.addClass( "ui-state-hover" );
-                                       },
-                                       function() {
-                                               uiDialogTitlebarClose.removeClass( "ui-state-hover" );
-                                       }
-                               )
-                               .focus(function() {
-                                       uiDialogTitlebarClose.addClass( "ui-state-focus" );
-                               })
-                               .blur(function() {
-                                       uiDialogTitlebarClose.removeClass( "ui-state-focus" );
-                               })
                                .click(function( event ) {
                                        event.preventDefault();
                                        self.close( event );
@@ -157,6 +143,8 @@ $.widget("ui.dialog", {
                                .prependTo( uiDialogTitlebar );
 
                uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection();
+               this._hoverable( uiDialogTitlebarClose );
+               this._focusable( uiDialogTitlebarClose );
 
                if ( options.draggable && $.fn.draggable ) {
                        self._makeDraggable();