From f47dace72a81cddfa29d89540629cfdd76d54b18 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Mon, 18 Jun 2012 11:36:20 -0700 Subject: Fixed - IKNINJA-1313 - File menu drop down should close when New File dialog is opened Signed-off-by: Ananya Sen --- js/components/menu/menu-entry.reel/menu-entry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/components/menu/menu-entry.reel/menu-entry.js') diff --git a/js/components/menu/menu-entry.reel/menu-entry.js b/js/components/menu/menu-entry.reel/menu-entry.js index b9c546ed..ae3469c6 100755 --- a/js/components/menu/menu-entry.reel/menu-entry.js +++ b/js/components/menu/menu-entry.reel/menu-entry.js @@ -83,7 +83,7 @@ exports.MenuEntry = Montage.create(Component, { } }, - handleClick: { + captureMousedown: { value: function(event) { // TODO: Hack! Rework this! this.parentComponent.ownerComponent.toggleActivation(this); @@ -105,7 +105,7 @@ exports.MenuEntry = Montage.create(Component, { this.topHeaderText.innerHTML = this.data.header; - this.element.addEventListener("click", this, false); + this.element.addEventListener("mousedown", this, true); Object.defineBinding(this, "menuIsActive", { boundObject: this._menu, -- cgit v1.2.3 From 0f59f00621c371ccee6793c57e17314d0a5a8fbe Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 19 Jun 2012 10:55:36 -0700 Subject: Fix for IKNINJA-1754 (CLONE) - Menu Component: Hovering over another main menu does not work when a main menu drop down is already displayed. Signed-off-by: Ananya Sen --- js/components/menu/menu-entry.reel/menu-entry.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/components/menu/menu-entry.reel/menu-entry.js') diff --git a/js/components/menu/menu-entry.reel/menu-entry.js b/js/components/menu/menu-entry.reel/menu-entry.js index ae3469c6..b765471b 100755 --- a/js/components/menu/menu-entry.reel/menu-entry.js +++ b/js/components/menu/menu-entry.reel/menu-entry.js @@ -107,6 +107,9 @@ exports.MenuEntry = Montage.create(Component, { this.element.addEventListener("mousedown", this, true); + this.topHeader.addEventListener("mouseover", this, false);//Todo: check why this listener as not getting added menuIsActive + + //Todo: check this binding Object.defineBinding(this, "menuIsActive", { boundObject: this._menu, boundObjectPropertyPath: "active", -- cgit v1.2.3 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 ++++++------------------ 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'js/components/menu/menu-entry.reel/menu-entry.js') 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 -- cgit v1.2.3 From fb553a8054162b2aa0848d86b11d4e27002bffa9 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 19 Jun 2012 13:50:10 -0700 Subject: Reverting last change since this is is being made in a different pull request. Signed-off-by: Ananya Sen --- js/components/menu/menu-entry.reel/menu-entry.js | 3 --- 1 file changed, 3 deletions(-) (limited to 'js/components/menu/menu-entry.reel/menu-entry.js') diff --git a/js/components/menu/menu-entry.reel/menu-entry.js b/js/components/menu/menu-entry.reel/menu-entry.js index b765471b..ae3469c6 100755 --- a/js/components/menu/menu-entry.reel/menu-entry.js +++ b/js/components/menu/menu-entry.reel/menu-entry.js @@ -107,9 +107,6 @@ exports.MenuEntry = Montage.create(Component, { this.element.addEventListener("mousedown", this, true); - this.topHeader.addEventListener("mouseover", this, false);//Todo: check why this listener as not getting added menuIsActive - - //Todo: check this binding Object.defineBinding(this, "menuIsActive", { boundObject: this._menu, boundObjectPropertyPath: "active", -- cgit v1.2.3