Skip to content

Commit

Permalink
Renamed menu event selected to select to be consistent with naming co…
Browse files Browse the repository at this point in the history
…nventions, already updated spec on wiki
  • Loading branch information
jzaefferer committed Apr 30, 2010
1 parent abfdb2a commit adf19a1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tests/visual/menu/drilldown.html
Expand Up @@ -33,7 +33,7 @@
focus: function(event, ui) {
self.activeItem = ui.item;
},
selected: function(event, ui) {
select: function(event, ui) {
if (this != self.active[0]) {
return;
}
Expand All @@ -42,7 +42,7 @@
self._open(nested);
} else {
self.element.find("h3").text(ui.item.text());
self.options.selected.apply(this, arguments);
self.options.select.apply(this, arguments);
}
}
});
Expand Down Expand Up @@ -124,7 +124,7 @@
});

var drilldown = $("#drilldown").drilldown({
selected: function(event, ui) {
select: function(event, ui) {
$("#log").append("<div>Selected " + ui.item.text() + "</div>");
}
});
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/menu/menu.html
Expand Up @@ -18,7 +18,7 @@
}).appendTo(document.body).themeswitcher();

$("#menu1, #menu2").menu({
selected: function(event, ui) {
select: function(event, ui) {
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
}
});
Expand Down
4 changes: 2 additions & 2 deletions tests/visual/menu/nested.html
Expand Up @@ -30,7 +30,7 @@
this.element.find("ul").andSelf().menu({
// disable built-in key handling
input: $(),
selected: this.options.selected,
select: this.options.select,
focus: function(event, ui) {
self.active = ui.item.parent();
self.activeItem = ui.item;
Expand Down Expand Up @@ -77,7 +77,7 @@
});

var nestedmenu = $("#menu").nestedmenu({
selected: function(event, ui) {
select: function(event, ui) {
$("#log").append("<div>Selected " + ui.item.text() + "</div>");
}
}).hide();
Expand Down
2 changes: 1 addition & 1 deletion ui/jquery.ui.autocomplete.js
Expand Up @@ -115,7 +115,7 @@ $.widget( "ui.autocomplete", {
}
}
},
selected: function( event, ui ) {
select: function( event, ui ) {
var item = ui.item.data( "item.autocomplete" );
if ( false !== self._trigger( "select", event, { item: item } ) ) {
self.element.val( item.value );
Expand Down
2 changes: 1 addition & 1 deletion ui/jquery.ui.menu.js
Expand Up @@ -208,7 +208,7 @@ $.widget("ui.menu", {
},

select: function( event ) {
this._trigger("selected", event, { item: this.active });
this._trigger("select", event, { item: this.active });
}
});

Expand Down

0 comments on commit adf19a1

Please sign in to comment.