diff options
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 | }); | ||