autocomplete, continued

This commit is contained in:
Rolux 2010-02-18 20:53:43 +05:30
parent adb452f855
commit 14bfcdf917

View File

@ -1565,8 +1565,8 @@ requires
size: self.options.size
});
that.bindEvent("click_" + self.menuId, onClick);
that.bindEvent("deselect_" + self.menuId, onDeselect);
that.bindEvent("select_" + self.menuId, onSelect);
//that.bindEvent("deselect_" + self.menuId, onDeselect);
//that.bindEvent("select_" + self.menuId, onSelect);
}
if (options.type != "textarea") {
that.attr({
@ -2129,9 +2129,9 @@ requires
change_groupId {id, value} checked item of a group has changed
click_itemId item not belonging to a group was clicked
click_menuId {id, value} item not belonging to a group was clicked
deselect_menuId {id, value} item was deselected
deselect_menuId {id, value} item was deselected not needed, not implemented
hide_menuId menu was hidden
select_menuId {id, value} item was selected
select_menuId {id, value} item was selected not needed, not implemented
*/
@ -2160,7 +2160,6 @@ requires
.mouseenter(mouseenter)
.mouseleave(mouseleave)
.mousemove(mousemove),
hiding = false,
itemHeight = self.options.size == "small" ? 12 : (self.options.size == "medium" ? 16 : 20),
// menuHeight,
scrollSpeed = 1,
@ -2436,12 +2435,6 @@ requires
if (self.options.selected > -1) {
item = that.items[self.options.selected]
item.removeClass("OxSelected");
if (!hiding) {
that.triggerEvent("deselect", {
id: item.options("id"),
title: item.options("title")[0] // fixme: value or title?
});
}
}
if (position > -1) {
item = that.items[position];
@ -2453,10 +2446,6 @@ requires
});
item.options("items").length && that.submenus[item.options("id")].showMenu(); // fixme: do we want to switch to this style?
item.addClass("OxSelected");
that.triggerEvent("select", {
id: item.options("id"),
title: item.options("title")[0] // fixme: value or title?
});
}
self.options.selected = position;
}
@ -2585,9 +2574,7 @@ requires
return false;
}
});
hiding = true;
selectItem(-1);
hiding = false;
scrollMenuUp();
that.$scrollbars.up.is(":visible") && that.$scrollbars.up.hide();
that.$scrollbars.down.is(":visible") && that.$scrollbars.down.hide();