Renamed menu event selected to select to be consistent with naming conventions, already updated spec on wiki

This commit is contained in:
jzaefferer 2010-04-30 13:18:34 +02:00
parent abfdb2a8b6
commit adf19a1849
5 changed files with 8 additions and 8 deletions

View File

@ -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;
}
@ -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);
}
}
});
@ -124,7 +124,7 @@
});
var drilldown = $("#drilldown").drilldown({
selected: function(event, ui) {
select: function(event, ui) {
$("#log").append("<div>Selected " + ui.item.text() + "</div>");
}
});

View File

@ -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");
}
});

View File

@ -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;
@ -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();

View File

@ -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 );

View File

@ -208,7 +208,7 @@ $.widget("ui.menu", {
},
select: function( event ) {
this._trigger("selected", event, { item: this.active });
this._trigger("select", event, { item: this.active });
}
});