diff options
author | Valerio Virgillito | 2012-05-16 15:23:48 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-16 15:23:48 -0700 |
commit | 13ae16997d4bbca14e255d5989d1c44a76eac72c (patch) | |
tree | d9ebb1dcc6bebee4cb910b950ecb67c1a2d593cd /node_modules/montage/ui/autocomplete/result-item.reel | |
parent | 99f16ae08fbb0a6dfe6008c9833f2253b18c19e5 (diff) | |
download | ninja-13ae16997d4bbca14e255d5989d1c44a76eac72c.tar.gz |
montage v.0.10 integration
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/autocomplete/result-item.reel')
-rw-r--r-- | node_modules/montage/ui/autocomplete/result-item.reel/result-item.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/node_modules/montage/ui/autocomplete/result-item.reel/result-item.js b/node_modules/montage/ui/autocomplete/result-item.reel/result-item.js new file mode 100644 index 00000000..61b71afa --- /dev/null +++ b/node_modules/montage/ui/autocomplete/result-item.reel/result-item.js | |||
@@ -0,0 +1,33 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | var Montage = require("montage").Montage, | ||
7 | Component = require("ui/component").Component, | ||
8 | DynamicText = require("ui/dynamic-text.reel").DynamicText; | ||
9 | |||
10 | exports.ResultItem = Montage.create(DynamicText, { | ||
11 | |||
12 | textPropertyPath: {value: null}, | ||
13 | |||
14 | _object: {value: null}, | ||
15 | object: { | ||
16 | get: function() { | ||
17 | return this._object; | ||
18 | }, | ||
19 | set: function(aValue) { | ||
20 | if(aValue) { | ||
21 | this._object = aValue; | ||
22 | } | ||
23 | if(this._object) { | ||
24 | if(this.textPropertyPath) { | ||
25 | this.value = this._object[this.textPropertyPath]; | ||
26 | } else { | ||
27 | this.value = this._object; | ||
28 | } | ||
29 | } | ||
30 | } | ||
31 | } | ||
32 | |||
33 | }); | ||