diff options
author | Valerio Virgillito | 2012-02-12 21:50:49 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-12 21:50:49 -0800 |
commit | dcd147265ad0339448ea4466253b03b2899e0cea (patch) | |
tree | a2afd9a3f4b4545141b21a31002d81bb5f79f44b /js | |
parent | a30d76ff641ce89686cf5fbd9f04ac9ab4e9c830 (diff) | |
parent | e142611e22718b1f1d1696902ad9161ec5f33f98 (diff) | |
download | ninja-dcd147265ad0339448ea4466253b03b2899e0cea.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into stage-color
Diffstat (limited to 'js')
105 files changed, 7342 insertions, 2921 deletions
diff --git a/js/components/button.reel/button.js b/js/components/button.reel/button.js index ce5ac1af..2d26c8b4 100644 --- a/js/components/button.reel/button.js +++ b/js/components/button.reel/button.js | |||
@@ -179,7 +179,7 @@ var Button = exports.Button = Montage.create(Component, { | |||
179 | value: function() { | 179 | value: function() { |
180 | if(this.isToggleButton) | 180 | if(this.isToggleButton) |
181 | { | 181 | { |
182 | if(this._value) | 182 | if(this._value === true) |
183 | { | 183 | { |
184 | this.element.classList.remove(this.offState); | 184 | this.element.classList.remove(this.offState); |
185 | this.element.classList.add(this.onState); | 185 | this.element.classList.add(this.onState); |
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js new file mode 100644 index 00000000..1d0ad776 --- /dev/null +++ b/js/components/editable.reel/editable.js | |||
@@ -0,0 +1,250 @@ | |||
1 | /* ComputedStyleSubPanel.js */ | ||
2 | var Montage = require("montage").Montage, | ||
3 | Component = require("montage/ui/component").Component; | ||
4 | |||
5 | |||
6 | /* | ||
7 | |||
8 | EDITABLE - Methods | ||
9 | - startEdit | ||
10 | - stopEdit | ||
11 | - value | ||
12 | - | ||
13 | - _suggest | ||
14 | - _suggestNext | ||
15 | - _suggestPrev | ||
16 | - _clearSuggest | ||
17 | - _accept | ||
18 | - _revert | ||
19 | - _setCaret | ||
20 | |||
21 | */ | ||
22 | |||
23 | |||
24 | exports.Editable = Montage.create(Component, { | ||
25 | hasTemplate: { value: false }, | ||
26 | |||
27 | _element : { value : null }, | ||
28 | element : { | ||
29 | get : function() { | ||
30 | return this._element; | ||
31 | }, | ||
32 | set : function(el) { | ||
33 | this._element = el; | ||
34 | this._element.addEventListener('keydown', this, false); | ||
35 | this._element.addEventListener('input', this, false); | ||
36 | |||
37 | if(this.startOnEvent) { | ||
38 | this._element.addEventListener(this.startOnEvent, this, false); | ||
39 | } | ||
40 | |||
41 |