diff options
author | Jose Antonio Marquez | 2012-06-20 16:47:37 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-20 16:47:37 -0700 |
commit | 313a62245400e6c8cfa6d2f02c603cc7f01ddfc6 (patch) | |
tree | c207d1290be0e894a57b03098bbb7bbe5f2aee86 /node_modules/montage/ui/composer/key-composer.js | |
parent | 2496e0d0b0ac5f8c53b12de77f0feda69ce4a2f4 (diff) | |
parent | 392a559e90357d48c910a07617261483b2b45476 (diff) | |
download | ninja-313a62245400e6c8cfa6d2f02c603cc7f01ddfc6.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'node_modules/montage/ui/composer/key-composer.js')
-rw-r--r-- | node_modules/montage/ui/composer/key-composer.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/node_modules/montage/ui/composer/key-composer.js b/node_modules/montage/ui/composer/key-composer.js index 9d2c0f14..015ab115 100644 --- a/node_modules/montage/ui/composer/key-composer.js +++ b/node_modules/montage/ui/composer/key-composer.js | |||
@@ -103,9 +103,9 @@ var KeyComposer = exports.KeyComposer = Montage.create(Composer, /** @lends modu | |||
103 | @default null | 103 | @default null |
104 | */ | 104 | */ |
105 | identifier: { | 105 | identifier: { |
106 | get: function() { | 106 | get: function() { |
107 | return this._identifier; | 107 | return this._identifier; |
108 | }, | 108 | }, |
109 | set: function(identifier) { | 109 | set: function(identifier) { |
110 | this._identifier = identifier; | 110 | this._identifier = identifier; |
111 | } | 111 | } |
@@ -234,7 +234,7 @@ var KeyComposer = exports.KeyComposer = Montage.create(Composer, /** @lends modu | |||
234 | this._keyRegistered = true; | 234 | this._keyRegistered = true; |
235 | } | 235 | } |
236 | } else if (component && typeof component.addComposer !== "function") { | 236 | } else if (component && typeof component.addComposer !== "function") { |
237 | // this keyComposer is associated with an element, let's make it a global key | 237 | // this keyComposer is not associated with an element, let's make it a global key |
238 | if (!this.element) { | 238 | if (!this.element) { |
239 | this.element = window; | 239 | this.element = window; |
240 | } | 240 | } |
@@ -264,11 +264,15 @@ var KeyComposer = exports.KeyComposer = Montage.create(Composer, /** @lends modu | |||
264 | value: function() { | 264 | value: function() { |
265 | var component = this.component; | 265 | var component = this.component; |
266 | 266 | ||
267 | if (this.identifier === null) { | ||
268 | this.identifier = Montage.getInfoForObject(this).label; | ||
269 | } | ||
270 | |||
267 | if (component) { | 271 | if (component) { |
268 | if (typeof component.addComposer == "function") { | 272 | if (typeof component.addComposer == "function") { |
269 | component.addComposer(this); | 273 | component.addComposer(this); |
270 | } else if (!this._isLoaded) { | 274 | } else if (!this._isLoaded) { |
271 | // this keyComposer is associated with an element, let's make it a global key | 275 | // this keyComposer is not associated with an element, let's make it a global key |
272 | if (!this.element) { | 276 | if (!this.element) { |
273 | this.element = window; | 277 | this.element = window; |
274 | } | 278 | } |
@@ -284,7 +288,7 @@ var KeyComposer = exports.KeyComposer = Montage.create(Composer, /** @lends modu | |||
284 | /** | 288 | /** |
285 | @class KeyManagerProxy | 289 | @class KeyManagerProxy |
286 | @classdesc Provide a proxy for lazy load of module:montage/core/event/key-manager.KeyManager. | 290 | @classdesc Provide a proxy for lazy load of module:montage/core/event/key-manager.KeyManager. |
287 | @extends module:montage | 291 | @extends module:montage/core/core.Montage |
288 | @private | 292 | @private |
289 | */ | 293 | */ |
290 | var _keyManagerProxy= null; | 294 | var _keyManagerProxy= null; |