diff options
Diffstat (limited to 'js/panels/css-panel/style-shorthand.reel/style-shorthand.js')
-rw-r--r-- | js/panels/css-panel/style-shorthand.reel/style-shorthand.js | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/js/panels/css-panel/style-shorthand.reel/style-shorthand.js b/js/panels/css-panel/style-shorthand.reel/style-shorthand.js new file mode 100644 index 00000000..e64d64c7 --- /dev/null +++ b/js/panels/css-panel/style-shorthand.reel/style-shorthand.js | |||
@@ -0,0 +1,59 @@ | |||
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 | var Montage = require("montage").Montage, | ||
8 | TreeNode = require("js/components/treeview/tree-node").TreeNode; | ||
9 | |||
10 | var styleShorthand = exports.StyleShorthand= Montage.create(TreeNode, { | ||
11 | repetition: { value: null }, | ||
12 | propertyText : { value: "property" }, | ||
13 | valueText : { value: "value" }, | ||
14 | |||
15 | handleSourceObjectSet: { | ||
16 | value: function() { | ||
17 | this.propertyText = this.sourceObject.name; | ||
18 | this.valueText = this.sourceObject.value; | ||
19 | } | ||
20 | }, | ||
21 | prepareForDraw : { | ||
22 | value: function() { | ||
23 | // this.styleListDisclosure.addEventListener('click', this, false); | ||
24 | this.treeView.contentController.addBranchController(this.arrayController); | ||
25 | } | ||
26 | }, | ||
27 | templateDidLoad: { | ||
28 | value: function() { | ||
29 | this.arrayController.delegate = this.treeView.contentController; | ||
30 | |||
31 | this.branchCollapser.removeAttribute('id'); | ||
32 | this.branchCollapser.addEventListener('click', this, false); | ||
33 | } | ||
34 | }, | ||
35 | willDraw : { | ||
36 | value: function() { | ||
37 | |||
38 | } | ||
39 | }, | ||
40 | draw:{ | ||
41 | value: function () { | ||
42 | |||
43 | console.log("style shorthand - draw"); | ||
44 | shorthand = this; | ||
45 | if (this.sourceObject[this.labelKey]) { | ||
46 | this._labelText = this.sourceObject[this.labelKey]; | ||
47 | } | ||
48 | |||
49 | } | ||
50 | }, | ||
51 | |||
52 | handleClick : { | ||
53 | value: function(e) { | ||
54 | e.preventDefault(); | ||
55 | this.toggleExpand(); | ||
56 | } | ||
57 | } | ||
58 | |||
59 | }); | ||