diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-05-04 11:14:32 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-05-04 11:14:32 +0200 |
commit | b96126b398777b5ed2ecf795c234f99c544ee61c (patch) | |
tree | 242d0347d257a4504690bc6b9a71f14c54e8f548 /tests/visual | |
parent | bba4cb2be68ae6ca71be987bf13f8c7834242221 (diff) | |
download | jquery-ui-b96126b398777b5ed2ecf795c234f99c544ee61c.tar.gz jquery-ui-b96126b398777b5ed2ecf795c234f99c544ee61c.zip |
Popup: Rename _close to close and use it when selecting something within a popup.
Diffstat (limited to 'tests/visual')
-rw-r--r-- | tests/visual/menu/popup.html | 2 | ||||
-rw-r--r-- | tests/visual/menu/popup.js | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/visual/menu/popup.html b/tests/visual/menu/popup.html index 52a5bdd98..2a712b00a 100644 --- a/tests/visual/menu/popup.html +++ b/tests/visual/menu/popup.html @@ -25,7 +25,7 @@ var selected = { select: function( event, ui ) { $( "<div/>" ).text( "Selected: " + ui.item.text() ).appendTo( "#log" ); - $(this).hide(); + $(this).popup("close"); } }; diff --git a/tests/visual/menu/popup.js b/tests/visual/menu/popup.js index 947888eec..503bb93b7 100644 --- a/tests/visual/menu/popup.js +++ b/tests/visual/menu/popup.js @@ -34,7 +34,7 @@ $.widget( "ui.popup", { this.element .addClass("ui-popup") - this._close(); + this.close(); this._bind(this.options.trigger, { click: function( event ) { @@ -53,7 +53,7 @@ $.widget( "ui.popup", { this._bind(this.element, { // TODO also triggered when open and clicking the trigger again // figure out how to close in that case, while still closing on regular blur - //blur: "_close" + //blur: "close" }); this._bind({ @@ -61,7 +61,7 @@ $.widget( "ui.popup", { // bind to document instead? keyup: function( event ) { if (event.keyCode == $.ui.keyCode.ESCAPE && this.element.is( ":visible" )) { - this._close( event ); + this.close( event ); this.options.trigger.focus(); } } @@ -70,7 +70,7 @@ $.widget( "ui.popup", { this._bind(document, { click: function( event ) { if (this.open && !$(event.target).closest(".ui-popup").length) { - this._close( event ); + this.close( event ); } } }) @@ -114,7 +114,7 @@ $.widget( "ui.popup", { this._trigger( "open", event ); }, - _close: function( event ) { + close: function( event ) { this.element .hide() .attr( "aria-hidden", true ) |