From ddeb291801a49b90062510d4e05f8531216cdff9 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 19 Jun 2012 11:30:15 -0700 Subject: IKNINJA 1754 menu not opening on hover Signed-off-by: Valerio Virgillito --- js/components/menu/menu-entry.reel/menu-entry.js | 26 ++++++------------------ js/components/menu/menu-item.reel/menu-item.js | 9 +++----- js/components/menu/menu.reel/menu.html | 3 ++- 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/js/components/menu/menu-entry.reel/menu-entry.js b/js/components/menu/menu-entry.reel/menu-entry.js index b9c546ed..4fea0fe9 100755 --- a/js/components/menu/menu-entry.reel/menu-entry.js +++ b/js/components/menu/menu-entry.reel/menu-entry.js @@ -9,18 +9,15 @@ var Component = require("montage/ui/component").Component; exports.MenuEntry = Montage.create(Component, { topHeader: { - value: null, - serializable: true + value: null }, topHeaderText: { - value: null, - serializable: true + value: null }, subEntries: { - value: null, - serializable: true + value: null }, // Reference to the parent Menu component @@ -36,8 +33,7 @@ exports.MenuEntry = Montage.create(Component, { if(value !== this._menu) { this._menu = value; } - }, - serializable: true + } }, _data: { @@ -52,8 +48,7 @@ exports.MenuEntry = Montage.create(Component, { if(this._data !== value) { this._data = value; } - }, - serializable: true + } }, select: { @@ -79,7 +74,7 @@ exports.MenuEntry = Montage.create(Component, { return this._menuIsActive; }, set: function(value) { - if(value) this.topHeader.addEventListener("mouseover", this, false); + if(value) this.element.addEventListener("mouseover", this, false); } }, @@ -87,14 +82,12 @@ exports.MenuEntry = Montage.create(Component, { value: function(event) { // TODO: Hack! Rework this! this.parentComponent.ownerComponent.toggleActivation(this); -// this._menu.toggleActivation(this); } }, handleMouseover: { value: function(event) { this.parentComponent.ownerComponent.activeEntry = this; -// this._menu.activeEntry = this; } }, @@ -106,13 +99,6 @@ exports.MenuEntry = Montage.create(Component, { this.topHeaderText.innerHTML = this.data.header; this.element.addEventListener("click", this, false); - - Object.defineBinding(this, "menuIsActive", { - boundObject: this._menu, - boundObjectPropertyPath: "active", - oneway: true - }); - } } }); \ No newline at end of file diff --git a/js/components/menu/menu-item.reel/menu-item.js b/js/components/menu/menu-item.reel/menu-item.js index f9a625a3..3a5bf4ab 100755 --- a/js/components/menu/menu-item.reel/menu-item.js +++ b/js/components/menu/menu-item.reel/menu-item.js @@ -10,18 +10,15 @@ var Component = require("montage/ui/component").Component; exports.MenuItem = Montage.create(Component, { itemBackground: { - value: null, - serializable: true + value: null }, itemText: { - value: null, - serializable: true + value: null }, subMenu: { - value: null, - serializable: true + value: null }, data: { diff --git a/js/components/menu/menu.reel/menu.html b/js/components/menu/menu.reel/menu.html index f18c1a0f..98ffa92c 100755 --- a/js/components/menu/menu.reel/menu.html +++ b/js/components/menu/menu.reel/menu.html @@ -44,7 +44,8 @@ "element": { "#": "menuItem" } }, "bindings": { - "data": {"<-": "@repetition.objectAtCurrentIteration"} + "data": {"<-": "@repetition.objectAtCurrentIteration"}, + "menuIsActive": {"<-": "@owner.active"} } }, -- cgit v1.2.3