From 14bfcdf9172e1748d3137b1301bbb5ebe3f04802 Mon Sep 17 00:00:00 2001 From: Rolux Date: Thu, 18 Feb 2010 20:53:43 +0530 Subject: [PATCH] autocomplete, continued --- build/js/ox.ui.js | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 18656ef..0fd3972 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -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();