From 544cd66cbfba220e29fc33d96f79d0fe74d2a1e3 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 29c71356..4f77023d 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) {