From 13ae16997d4bbca14e255d5989d1c44a76eac72c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 15:23:48 -0700 Subject: montage v.0.10 integration Signed-off-by: Valerio Virgillito --- .../autocomplete/result-item.reel/result-item.js | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 node_modules/montage/ui/autocomplete/result-item.reel/result-item.js (limited to 'node_modules/montage/ui/autocomplete/result-item.reel') 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 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ +var Montage = require("montage").Montage, + Component = require("ui/component").Component, + DynamicText = require("ui/dynamic-text.reel").DynamicText; + +exports.ResultItem = Montage.create(DynamicText, { + + textPropertyPath: {value: null}, + + _object: {value: null}, + object: { + get: function() { + return this._object; + }, + set: function(aValue) { + if(aValue) { + this._object = aValue; + } + if(this._object) { + if(this.textPropertyPath) { + this.value = this._object[this.textPropertyPath]; + } else { + this.value = this._object; + } + } + } + } + +}); -- cgit v1.2.3