From c3ae17626013162ab6dfc7f8a75fd01fc6062550 Mon Sep 17 00:00:00 2001 From: Rolux Date: Tue, 9 Feb 2010 17:20:29 +0530 Subject: [PATCH] fix for select --- build/js/ox.ui.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 29c7135..4f77023 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -1794,21 +1794,18 @@ requires size: self.options.size }); - that.bindEvent("change_" + self.buttonId, changeButton); - that.bindEvent("click_" + self.menuId + "_menu", clickMenu); - - function changeButton(event, data) { - that.triggerEvent("change", data); - } + that.bindEvent("click_" + self.menuId, clickMenu); function clickButton() { that.$menu.toggleMenu(); } function clickMenu(event, data) { + Ox.print("clickMenu", event, data) that.$button.options({ value: data.value }); + that.triggerEvent("change", data.value); } self.onChange = function(key, value) { @@ -2054,8 +2051,11 @@ requires item.options({ checked: !item.options("checked") }); - Ox.Event.trigger("click_" + item.options("id"), { + Ox.Event.trigger("click_" + self.options.id, { + id: item.options("id"), value: item.options("title")[0] // fixme: value or title? + }) + Ox.Event.trigger("click_" + item.options("id"), { }); } if (item.options("title").length == 2) {