fix for select

This commit is contained in:
Rolux 2010-02-09 17:20:29 +05:30
parent 1cfaacd79e
commit 544cd66cbf

View file

@ -1794,21 +1794,18 @@ requires
size: self.options.size size: self.options.size
}); });
that.bindEvent("change_" + self.buttonId, changeButton); that.bindEvent("click_" + self.menuId, clickMenu);
that.bindEvent("click_" + self.menuId + "_menu", clickMenu);
function changeButton(event, data) {
that.triggerEvent("change", data);
}
function clickButton() { function clickButton() {
that.$menu.toggleMenu(); that.$menu.toggleMenu();
} }
function clickMenu(event, data) { function clickMenu(event, data) {
Ox.print("clickMenu", event, data)
that.$button.options({ that.$button.options({
value: data.value value: data.value
}); });
that.triggerEvent("change", data.value);
} }
self.onChange = function(key, value) { self.onChange = function(key, value) {
@ -2054,8 +2051,11 @@ requires
item.options({ item.options({
checked: !item.options("checked") 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? value: item.options("title")[0] // fixme: value or title?
})
Ox.Event.trigger("click_" + item.options("id"), {
}); });
} }
if (item.options("title").length == 2) { if (item.options("title").length == 2) {