From fb7688b5b3d4d49a23780b6cd63ff16d29e64ef4 Mon Sep 17 00:00:00 2001 From: Rolux Date: Tue, 9 Feb 2010 17:55:42 +0530 Subject: [PATCH] adding change event for option groups, updating select --- build/js/ox.ui.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index a1ec7cf..aaa3a7c 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -1753,12 +1753,13 @@ requires .options(options) .addClass("OxSelect Ox" + Ox.toTitleCase(self.options.size)); self.buttonId = self.options.id + "_button" + self.groupId = self.options.id + "_group" self.menuId = self.options.id + "_menu", $.each(self.options.items, function(i, item) { self.options.items[i] = $.extend(self.options.items[i], { checked: item.checked || false, - group: self.options.id, + group: self.groupId }); if (item.checked) { self.selected = i; @@ -1794,7 +1795,7 @@ requires size: self.options.size }); - that.bindEvent("click_" + self.menuId, clickMenu); + that.bindEvent("change_" + self.groupId, clickMenu); function clickButton() { that.$menu.toggleMenu(); @@ -2052,10 +2053,6 @@ requires if (that.options("parent")) { that.options("parent").hideMenu().triggerEvent("click"); } - Ox.Event.trigger("click_" + self.options.id, { - id: item.options("id"), - value: item.options("title")[0] // fixme: value or title? - }); if (item.options("checked") !== null && (!item.options("group") || !item.options("checked"))) { item.options({ checked: !item.options("checked")