From 8fe92b94ce5e1e2857d088752d94e19db7e3d8a8 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Sun, 17 Jun 2012 22:31:44 -0700 Subject: montage v11 merge into ninja Signed-off-by: Valerio Virgillito --- node_modules/montage/ui/textarea.reel/textarea.css | 26 +++++ .../montage/ui/textarea.reel/textarea.html | 14 +++ node_modules/montage/ui/textarea.reel/textarea.js | 125 ++------------------- 3 files changed, 51 insertions(+), 114 deletions(-) create mode 100644 node_modules/montage/ui/textarea.reel/textarea.css create mode 100644 node_modules/montage/ui/textarea.reel/textarea.html (limited to 'node_modules/montage/ui/textarea.reel') diff --git a/node_modules/montage/ui/textarea.reel/textarea.css b/node_modules/montage/ui/textarea.reel/textarea.css new file mode 100644 index 00000000..67a9738d --- /dev/null +++ b/node_modules/montage/ui/textarea.reel/textarea.css @@ -0,0 +1,26 @@ +/* + 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. +
*/ + +.montage-textarea { + outline: none; + box-sizing: border-box; + font-size: 12px; + width: 10em; + min-width: 10em; + padding: 0.5em; + resize: vertical; + border: 1px solid #b3b3b3; + border-radius: 3px; + background-color: #fff; +} + +.montage-textarea:hover { + border-color: #ccc; +} + +.montage-textarea:focus { + border-color: #7f7f7f; +} \ No newline at end of file diff --git a/node_modules/montage/ui/textarea.reel/textarea.html b/node_modules/montage/ui/textarea.reel/textarea.html new file mode 100644 index 00000000..d323bb53 --- /dev/null +++ b/node_modules/montage/ui/textarea.reel/textarea.html @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/node_modules/montage/ui/textarea.reel/textarea.js b/node_modules/montage/ui/textarea.reel/textarea.js index 4fa0d23e..bb0b6570 100644 --- a/node_modules/montage/ui/textarea.reel/textarea.js +++ b/node_modules/montage/ui/textarea.reel/textarea.js @@ -3,125 +3,22 @@ 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. */ - -/** - @module "montage/ui/textarea.reel" - @requires montage/ui/component - @requires montage/ui/text-input -*/ - +/*global require,exports */ var Montage = require("montage").Montage, -Component = require("ui/component").Component, -TextInput = require("ui/text-input").TextInput; + Component = require("ui/component").Component, + NativeTextarea = require("ui/native/textarea.reel").Textarea; /** - * Wraps the a <textarea> element with binding support for the element's standard attributes. Uses an ArrayController instance to manage the element's contents and selection. - @class module:"montage/ui/textarea.reel".Textarea - @extends module:montage/text-input.TextInput + * Textarea */ +exports.Textarea = Montage.create(NativeTextarea, { -var Textarea = exports.Textarea = Montage.create(TextInput, /** @lends module:"montage/ui/textarea.reel".Textarea# */ { - - select: { value: function() { this._element.select(); } }, + hasTemplate: {value: true}, -/** - The text display by the Textarea component's element. - @type {string} - @default "" -*/ - textContent: { - get: function() { - return this.value; - }, - set: function(v) { - this.value = v; + didSetElement: { + value: function() { + NativeTextarea.didSetElement.call(this); + this['class'] = (this['class'] || '') + ' montage-textarea'; } } - -}); - -Textarea.addAttributes( /** @lends module:"montage/ui/textarea.reel".Textarea# */ { -/** - Specifies whether the element should be focused as soon as the page is loaded. - @type {boolean} - @default false -*/ - autofocus: {dataType: 'boolean'}, - -/** - The maximum number of characters per line of text to display. - @type {number} - @default null -*/ - cols: null, - -/** - The name of the field that contains that value that specifies the element's directionality. - @type {string} - @default null -*/ - dirname: null, - -/** - When true, the textarea element is disabled to user input, and "disabled" is added to the element's CSS class list. - @type {boolean} - @default false -*/ - disabled: {dataType: 'boolean'}, - -/** - The value of the id attribute of the form with which to associate the component's element. - @type string} - @default null -*/ - form: null, - -/** - The maximum allowed value length of the element. - @type {number} - @default null -*/ - maxlength: null, - -/** - The name associated with the textarea element. - @type {string} - @default null -*/ - name: null, - -/** - Placeholder text to display in the textarea before the user has entered any text. - @type {string} - @default null -*/ - placeholder: null, - -/** - Specifies if this control is readonly. - @type {boolean} - @default false -*/ - readonly: {dataType: 'boolean'}, - -/** - When true, the user will be required to enter a value in the textarea before submitting the form. - @type {string} - @default false -*/ - required: {dataType: 'boolean'}, - -/** - The number of lines of text the browser should render for the textarea. - @type {number} - @default null -*/ - rows: null, - -/** - If the value of this property is "hard", the browser will insert line breaks such that each line of user input has no more characters than the value specified by the cols property. If the value is "soft" then no line breaks will be added. - @type {string} - @default -*/ - wrap: null -}); +}); \ No newline at end of file -- cgit v1.2.3