aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnanya Sen2012-06-15 15:20:27 -0700
committerAnanya Sen2012-06-15 15:20:27 -0700
commitd7123dd2f0ec035648ecf7bdec0cb66bdea72e04 (patch)
tree55c0f26ed225ba57486346645e67d1261d908cbd
parent8e5cfac34edc9772ba89e0206890c23afa0a6fcc (diff)
downloadninja-d7123dd2f0ec035648ecf7bdec0cb66bdea72e04.tar.gz
Fixed - IKNINJA-1313 - File menu drop down should close when New File dialog is opened
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
-rwxr-xr-xjs/components/menu/menu-entry.reel/menu-entry.js4
-rwxr-xr-xjs/components/menu/menu-item.reel/menu-item.js1
-rwxr-xr-xjs/components/menu/menu.reel/menu.js9
3 files changed, 3 insertions, 11 deletions
diff --git a/js/components/menu/menu-entry.reel/menu-entry.js b/js/components/menu/menu-entry.reel/menu-entry.js
index 57e6ec87..1cea19b3 100755
--- a/js/components/menu/menu-entry.reel/menu-entry.js
+++ b/js/components/menu/menu-entry.reel/menu-entry.js
@@ -47,7 +47,7 @@ exports.MenuEntry = Montage.create(Component, {
47 } 47 }
48 }, 48 },
49 49
50 handleClick: { 50 captureMousedown: {
51 value: function(event) { 51 value: function(event) {
52 this._menu.toggleActivation(this); 52 this._menu.toggleActivation(this);
53 } 53 }
@@ -66,7 +66,7 @@ exports.MenuEntry = Montage.create(Component, {
66 66
67 this.topHeaderText.innerHTML = this.data.header; 67 this.topHeaderText.innerHTML = this.data.header;
68 68
69 this.element.addEventListener("click", this, false); 69 this.element.addEventListener("mousedown", this, true);
70 70
71 Object.defineBinding(this, "menuIsActive", { 71 Object.defineBinding(this, "menuIsActive", {
72 boundObject: this._menu, 72 boundObject: this._menu,
diff --git a/js/components/menu/menu-item.reel/menu-item.js b/js/components/menu/menu-item.reel/menu-item.js
index c00c4412..9d204b72 100755
--- a/js/components/menu/menu-item.reel/menu-item.js
+++ b/js/components/menu/menu-item.reel/menu-item.js
@@ -122,7 +122,6 @@ exports.MenuItem = Montage.create(Component, {
122 122
123 captureMousedown: { 123 captureMousedown: {
124 value: function(event) { 124 value: function(event) {
125
126 if(this.data.radio && this.checked) return; 125 if(this.data.radio && this.checked) return;
127 126
128 if( ( this.enabled === true || this.enabled > 0 ) && (this.submenu === false) ) { 127 if( ( this.enabled === true || this.enabled > 0 ) && (this.submenu === false) ) {
diff --git a/js/components/menu/menu.reel/menu.js b/js/components/menu/menu.reel/menu.js
index 50d3f0bc..1560100a 100755
--- a/js/components/menu/menu.reel/menu.js
+++ b/js/components/menu/menu.reel/menu.js
@@ -83,19 +83,12 @@ exports.Menu = Montage.create(Component, {
83 83
84 handleMousedown: { 84 handleMousedown: {
85 value: function(evt) { 85 value: function(evt) {
86
87 if(this.active && (this.getZIndex(evt.target) < 9000 || evt.target.id === "topMenu")) { 86 if(this.active && (this.getZIndex(evt.target) < 9000 || evt.target.id === "topMenu")) {
88 this._activeEntry.deselect(); 87 this._activeEntry.deselect();
89 this._activeEntry = null; 88 this._activeEntry = null;
90 this.active = false; 89 this.active = false;
91 90 this.element.ownerDocument.removeEventListener('mousedown', this, false);
92 //console.log(this.rep.objects[1]);
93 //this.controller.content[1].header = "BLAH";
94 } 91 }
95
96// console.log(evt.target.style['z-index']);
97// console.log(this.getZIndex(evt.target));
98
99 } 92 }
100 }, 93 },
101 94