diff options
author | Valerio Virgillito | 2012-02-03 12:20:10 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-03 12:20:10 -0800 |
commit | e6e539f345f5e1ac36a595db5d1a1c3700715e88 (patch) | |
tree | 39846bf1570f9b5a4057b726c54905de9e9e1c02 /node_modules/montage/ui/bluemoon/button-group.reel/button-group.js | |
parent | 7950424cf704bb221971f4645406b01e6979db18 (diff) | |
parent | c630ead20487c3948fa36448d3e7d5f7b5cba782 (diff) | |
download | ninja-e6e539f345f5e1ac36a595db5d1a1c3700715e88.tar.gz |
Merge branch 'master' into components
Conflicts:
node_modules/montage/ui/bluemoon/progress.reel/progress.html
node_modules/montage/ui/image2.reel/image2.html
node_modules/ninja-components/effect/desaturate-effect.js
node_modules/ninja-components/effect/effect.js
node_modules/ninja-components/effect/invert-effect.js
node_modules/ninja-components/effect/kaliedoscope-effect.js
node_modules/ninja-components/effect/multiply-effect.js
node_modules/ninja-components/effect/sepia-effect.js
node_modules/ninja-components/flow-controller.reel/flow-controller.html
node_modules/ninja-components/flow-controller.reel/flow-controller.js
node_modules/ninja-components/flow-offset.js
node_modules/ninja-components/hottext.reel/hottext.css
node_modules/ninja-components/hottext.reel/hottext.html
node_modules/ninja-components/hottext.reel/hottext.js
node_modules/ninja-components/hottextunit.reel/hottextunit.css
node_modules/ninja-components/hottextunit.reel/hottextunit.html
node_modules/ninja-components/hottextunit.reel/hottextunit.js
node_modules/ninja-components/image2.reel/image2.html
node_modules/ninja-components/image2.reel/image2.js
node_modules/ninja-components/image3d.reel/image3d.html
node_modules/ninja-components/image3d.reel/image3d.js
node_modules/ninja-components/photo-editor.reel/photo-editor.css
node_modules/ninja-components/photo-editor.reel/photo-editor.html
node_modules/ninja-components/photo-editor.reel/photo-editor.js
node_modules/ninja-components/slider-base.js
user-document-templates/montage-application-cloud/appdelegate.js
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/bluemoon/button-group.reel/button-group.js')
-rw-r--r-- | node_modules/montage/ui/bluemoon/button-group.reel/button-group.js | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/node_modules/montage/ui/bluemoon/button-group.reel/button-group.js b/node_modules/montage/ui/bluemoon/button-group.reel/button-group.js new file mode 100644 index 00000000..6f69744f --- /dev/null +++ b/node_modules/montage/ui/bluemoon/button-group.reel/button-group.js | |||
@@ -0,0 +1,77 @@ | |||
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 | /** | ||
7 | @module "montage/ui/bluemoon/button-group.reel" | ||
8 | @requires montage/core/core | ||
9 | @requires "ui/component-group.reel" | ||
10 | */ | ||
11 | var Montage = require("montage").Montage, | ||
12 | ComponentGroup = require("ui/component-group.reel").ComponentGroup; | ||
13 | |||
14 | /** | ||
15 | @class module:"montage/ui/bluemoon/button-group.reel".ButtonGroup | ||
16 | @classdesc A group of buttons, displayed "pill" style. | ||
17 | @extends module:montage/ui/component.Component | ||
18 | */ | ||
19 | var ButtonGroup = exports.ButtonGroup = Montage.create(ComponentGroup, /** @lends module:"montage/ui/bluemoon/button-group.reel".ButtonGroup */ { | ||
20 | /** | ||
21 | Description TODO | ||
22 | @type {Boolean} | ||
23 | @default true | ||
24 | */ | ||
25 | hasTemplate: { | ||
26 | value: true | ||
27 | }, | ||
28 | |||
29 | /** | ||
30 | Description TODO | ||
31 | @private | ||
32 | */ | ||
33 | _iconic: { | ||
34 | value: false | ||
35 | }, | ||
36 | |||
37 | /** | ||
38 | Sets wether or not to hide button text for buttons with icons. | ||
39 | @type {Function} | ||
40 | @default {Boolean} false | ||
41 | */ | ||
42 | iconic: { | ||
43 | get: function() { | ||
44 | return this._iconic; | ||
45 | }, | ||
46 | set: function(value) { | ||
47 | if (this._iconic !== value) { | ||
48 | this._iconic = value; | ||
49 | this.needsDraw = true; | ||
50 | } | ||
51 | } | ||
52 | }, | ||
53 | |||
54 | /** | ||
55 | Description TODO | ||
56 | @function | ||
57 | */ | ||
58 | prepareForDraw: { | ||
59 | value: function() { | ||
60 | this.element.classList.add("montage-button-group"); | ||
61 | } | ||
62 | }, | ||
63 | |||
64 | /** | ||
65 | Description TODO | ||
66 | @function | ||
67 | */ | ||
68 | draw: { | ||
69 | value: function() { | ||
70 | if (this._iconic) { | ||
71 | this.element.classList.add("iconic"); | ||
72 | } else { | ||
73 | this.element.classList.remove("iconic"); | ||
74 | } | ||
75 | } | ||
76 | } | ||
77 | }); | ||