diff options
author | hwc487 | 2012-05-11 13:52:55 -0700 |
---|---|---|
committer | hwc487 | 2012-05-11 13:52:55 -0700 |
commit | 137bfc9d4c41cc918d969565bec28a834fe10472 (patch) | |
tree | e9fa109fc65218f45e386df48b713ff5858f3d62 /node_modules/montage/ui/textarea.reel | |
parent | d21aaca3d7093b6af968b7f9f764ab54e004f02b (diff) | |
parent | 27f4cacb39de1c2e3910748dadc9fc16d0655480 (diff) | |
download | ninja-137bfc9d4c41cc918d969565bec28a834fe10472.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts:
js/lib/geom/geom-obj.js
js/lib/geom/rectangle.js
js/tools/TagTool.js
Diffstat (limited to 'node_modules/montage/ui/textarea.reel')
-rw-r--r-- | node_modules/montage/ui/textarea.reel/textarea.js | 94 |
1 files changed, 92 insertions, 2 deletions
diff --git a/node_modules/montage/ui/textarea.reel/textarea.js b/node_modules/montage/ui/textarea.reel/textarea.js index 70d88660..4fa0d23e 100644 --- a/node_modules/montage/ui/textarea.reel/textarea.js +++ b/node_modules/montage/ui/textarea.reel/textarea.js | |||
@@ -4,12 +4,31 @@ | |||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | /** | ||
8 | @module "montage/ui/textarea.reel" | ||
9 | @requires montage/ui/component | ||
10 | @requires montage/ui/text-input | ||
11 | */ | ||
12 | |||
7 | var Montage = require("montage").Montage, | 13 | var Montage = require("montage").Montage, |
8 | Component = require("ui/component").Component, | 14 | Component = require("ui/component").Component, |
9 | TextInput = require("ui/text-input").TextInput; | 15 | TextInput = require("ui/text-input").TextInput; |
10 | 16 | ||
11 | var Textarea = exports.Textarea = Montage.create(TextInput, { | 17 | /** |
18 | * 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. | ||
19 | @class module:"montage/ui/textarea.reel".Textarea | ||
20 | @extends module:montage/text-input.TextInput | ||
21 | */ | ||
22 | |||
23 | var Textarea = exports.Textarea = Montage.create(TextInput, /** @lends module:"montage/ui/textarea.reel".Textarea# */ { | ||
12 | 24 | ||
25 | select: { value: function() { this._element.select(); } }, | ||
26 | |||
27 | /** | ||
28 | The text display by the Textarea component's element. | ||
29 | @type {string} | ||
30 | @default "" | ||
31 | */ | ||
13 | textContent: { | 32 | textContent: { |
14 | get: function() { | 33 | get: function() { |
15 | return this.value; | 34 | return this.value; |
@@ -21,17 +40,88 @@ var Textarea = exports.Textarea = Montage.create(TextInput, { | |||
21 | 40 | ||
22 | }); | 41 | }); |
23 | 42 | ||
24 | Textarea.addAttributes({ | 43 | Textarea.addAttributes( /** @lends module:"montage/ui/textarea.reel".Textarea# */ { |
44 | /** | ||
45 | Specifies whether the element should be focused as soon as the page is loaded. | ||
46 | @type {boolean} | ||
47 | @default false | ||
48 | */ | ||
25 | autofocus: {dataType: 'boolean'}, | 49 | autofocus: {dataType: 'boolean'}, |
50 | |||
51 | /** | ||
52 | The maximum number of characters per line of text to display. | ||
53 | @type {number} | ||
54 | @default null | ||
55 | */ | ||
26 | cols: null, | 56 | cols: null, |
57 | |||
58 | /** | ||
59 | The name of the field that contains that value that specifies the element's directionality. | ||
60 | @type {string} | ||
61 | @default null | ||
62 | */ | ||
27 | dirname: null, | 63 | dirname: null, |
64 | |||
65 | /** | ||
66 | When true, the textarea element is disabled to user input, and "disabled" is added to the element's CSS class list. | ||
67 | @type {boolean} | ||
68 | @default false | ||
69 | */ | ||
28 | disabled: {dataType: 'boolean'}, | 70 | disabled: {dataType: 'boolean'}, |
71 | |||
72 | /** | ||
73 | The value of the <code>id</code> attribute of the form with which to associate the component's element. | ||
74 | @type string} | ||
75 | @default null | ||
76 | */ | ||
29 | form: null, | 77 | form: null, |
78 | |||
79 | /** | ||
80 | The maximum allowed value length of the element. | ||
81 | @type {number} | ||
82 | @default null | ||
83 | */ | ||
30 | maxlength: null, | 84 | maxlength: null, |
85 | |||
86 | /** | ||
87 | The name associated with the textarea element. | ||
88 | @type {string} | ||
89 | @default null | ||
90 | */ | ||
31 | name: null, | 91 | name: null, |
92 | |||
93 | /** | ||
94 | Placeholder text to display in the textarea before the user has entered any text. | ||
95 | @type {string} | ||
96 | @default null | ||
97 | */ | ||
32 | placeholder: null, | 98 | placeholder: null, |
99 | |||
100 | /** | ||
101 | Specifies if this control is readonly. | ||
102 | @type {boolean} | ||
103 | @default false | ||
104 | */ | ||
33 | readonly: {dataType: 'boolean'}, | 105 | readonly: {dataType: 'boolean'}, |
106 | |||
107 | /** | ||
108 | When true, the user will be required to enter a value in the textarea before submitting the form. | ||
109 | @type {string} | ||
110 | @default false | ||
111 | */ | ||
34 | required: {dataType: 'boolean'}, | 112 | required: {dataType: 'boolean'}, |
113 | |||
114 | /** | ||
115 | The number of lines of text the browser should render for the textarea. | ||
116 | @type {number} | ||
117 | @default null | ||
118 | */ | ||
35 | rows: null, | 119 | rows: null, |
120 | |||
121 | /** | ||
122 | 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 <code>cols</code> property. If the value is "soft" then no line breaks will be added. | ||
123 | @type {string} | ||
124 | @default | ||
125 | */ | ||
36 | wrap: null | 126 | wrap: null |
37 | }); | 127 | }); |