aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/style-shorthand.reel/style-shorthand.js
diff options
context:
space:
mode:
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.js56
1 files changed, 56 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..00749faa
--- /dev/null
+++ b/js/panels/css-panel/style-shorthand.reel/style-shorthand.js
@@ -0,0 +1,56 @@
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
7var Montage = require("montage").Montage,
8 TreeNode = require("js/components/treeview/tree-node").TreeNode;
9
10var 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 },
32 willDraw : {
33 value: function() {
34
35 }
36 },
37 draw:{
38 value: function () {
39
40console.log("style shorthand - draw");
41 shorthand = this;
42 if (this.sourceObject[this.labelKey]) {
43 this._labelText = this.sourceObject[this.labelKey];
44 }
45
46 }
47 },
48
49 handleClick : {
50 value: function(e) {
51 e.preventDefault();
52 this.toggleExpand();
53 }
54 }
55
56});