]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu: Changed closeAll to collapseAll and updated in Menubar, also updated a referenc...
authorkborchers <k_borchers@yahoo.com>
Thu, 14 Jul 2011 15:20:47 +0000 (10:20 -0500)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 14 Jul 2011 15:38:03 +0000 (11:38 -0400)
ui/jquery.ui.menu.js
ui/jquery.ui.menubar.js

index 66601ef385d0bba6df3680934716fd6afa64ac46..f6012de4f38d08bf153f254e1a62081721a88027 100644 (file)
@@ -176,7 +176,7 @@ $.widget( "ui.menu", {
                this._bind( document, {
                        click: function( event ) {
                                if ( !$( event.target ).closest( ".ui-menu" ).length ) {
-                                       this.closeAll();
+                                       this.collapseAll();
                                }
                        }
                });
@@ -336,7 +336,7 @@ $.widget( "ui.menu", {
                        .position( position );
        },
 
-       closeAll: function() {
+       collapseAll: function() {
                this.element
                        .find( "ul" )
                                .hide()
@@ -466,11 +466,11 @@ $.widget( "ui.menu", {
        },
 
        select: function( event ) {
-               // save active reference before closeAll triggers blur
+               // save active reference before collapseAll triggers blur
                var ui = {
                        item: this.active
                };
-               this.closeAll();
+               this.collapseAll();
                this._trigger( "select", event, ui );
        }
 });
index e28ea3e3c1ca9ad7e87266c2bf4e05701ac33ca4..fd6d92d6b2b60eee5c774f76b56b17c5d701e65b 100644 (file)
@@ -151,7 +151,7 @@ $.widget( "ui.menubar", {
                });
                that._bind( {
                        keydown: function( event ) {
-                               if ( event.keyCode == $.ui.keyCode.ESCAPE && that.active && that.active.menu( "left", event ) !== true ) {
+                               if ( event.keyCode == $.ui.keyCode.ESCAPE && that.active && that.active.menu( "collapse", event ) !== true ) {
                                        var active = that.active;
                                        that.active.blur();
                                        that._close( event );
@@ -206,7 +206,7 @@ $.widget( "ui.menubar", {
                if ( !this.active || !this.active.length )
                        return;
                this.active
-                       .menu( "closeAll" )
+                       .menu( "collapseAll" )
                        .hide()
                        .attr( "aria-hidden", "true" )
                        .attr( "aria-expanded", "false" );
@@ -226,7 +226,7 @@ $.widget( "ui.menubar", {
                // TODO refactor, almost the same as _close above, but don't remove tabIndex
                if ( this.active ) {
                        this.active
-                               .menu( "closeAll" )
+                               .menu( "collapseAll" )
                                .hide()
                                .attr( "aria-hidden", "true" )
                                .attr( "aria-expanded", "false" );