fix for main menu
This commit is contained in:
parent
f31c8aaf62
commit
aa80fc4d51
1 changed files with 16 additions and 6 deletions
|
@ -1906,10 +1906,12 @@ requires
|
||||||
|
|
||||||
function onHideMenu() {
|
function onHideMenu() {
|
||||||
Ox.print("hideMenu self.selected", self.selected)
|
Ox.print("hideMenu self.selected", self.selected)
|
||||||
|
if (self.selected > -1) {
|
||||||
that.titles[self.selected].removeClass("OxSelected");
|
that.titles[self.selected].removeClass("OxSelected");
|
||||||
self.focused = false;
|
|
||||||
self.selected = -1;
|
self.selected = -1;
|
||||||
}
|
}
|
||||||
|
self.focused = false;
|
||||||
|
}
|
||||||
|
|
||||||
self.onChange = function(key, value) {
|
self.onChange = function(key, value) {
|
||||||
|
|
||||||
|
@ -2035,10 +2037,13 @@ requires
|
||||||
item = that.items[position];
|
item = that.items[position];
|
||||||
if (!item.options("disabled")) {
|
if (!item.options("disabled")) {
|
||||||
clickItem(position);
|
clickItem(position);
|
||||||
}
|
} else {
|
||||||
}
|
|
||||||
that.hideMenu();
|
that.hideMenu();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
that.hideMenu();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function clickItem(position) {
|
function clickItem(position) {
|
||||||
var item = that.items[position];
|
var item = that.items[position];
|
||||||
|
@ -2047,21 +2052,26 @@ requires
|
||||||
if (that.options("parent")) {
|
if (that.options("parent")) {
|
||||||
that.options("parent").hideMenu().triggerEvent("click");
|
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"))) {
|
if (item.options("checked") !== null && (!item.options("group") || !item.options("checked"))) {
|
||||||
item.options({
|
item.options({
|
||||||
checked: !item.options("checked")
|
checked: !item.options("checked")
|
||||||
});
|
});
|
||||||
Ox.Event.trigger("click_" + self.options.id, {
|
Ox.Event.trigger("change_" + item.options("group"), {
|
||||||
id: item.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"), {
|
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
Ox.Event.trigger("click_" + item.options("id"));
|
||||||
}
|
}
|
||||||
if (item.options("title").length == 2) {
|
if (item.options("title").length == 2) {
|
||||||
item.toggleTitle();
|
item.toggleTitle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
that.hideMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickSelectedItem() {
|
function clickSelectedItem() {
|
||||||
|
|
Loading…
Reference in a new issue