diff options
author | Eric Guzman | 2012-03-13 15:52:33 -0700 |
---|---|---|
committer | Eric Guzman | 2012-03-13 15:52:33 -0700 |
commit | 40e03e102c14a343efee1bdcf32d0d244e3f8344 (patch) | |
tree | 30061979dd9a766c61777d6f1d98f9c79d047886 /js/panels/css-panel/style-shorthand.reel | |
parent | 4979ee361a11225f19b991810ca8d8c429a22620 (diff) | |
download | ninja-40e03e102c14a343efee1bdcf32d0d244e3f8344.tar.gz |
CSS Panel - Style updates for collapsing branches
Diffstat (limited to 'js/panels/css-panel/style-shorthand.reel')
3 files changed, 36 insertions, 5 deletions
diff --git a/js/panels/css-panel/style-shorthand.reel/style-shorthand.css b/js/panels/css-panel/style-shorthand.reel/style-shorthand.css index b29a8fd6..e746146a 100644 --- a/js/panels/css-panel/style-shorthand.reel/style-shorthand.css +++ b/js/panels/css-panel/style-shorthand.reel/style-shorthand.css | |||
@@ -5,10 +5,38 @@ | |||
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | .css-tree-branch { | 7 | .css-tree-branch { |
8 | /*padding-left: 10px;*/ | ||
9 | } | ||
10 | .style-item { | ||
8 | padding-left: 10px; | 11 | padding-left: 10px; |
9 | } | 12 | } |
10 | .css-tree-branch .css-tree-branch { | 13 | .css-tree-branch .css-tree-branch { |
11 | padding-left: 20px; | 14 | padding-left: 20px; |
12 | margin-top: 0; | 15 | margin-top: 0; |
13 | margin-bottom: 0; | 16 | margin-bottom: 0; |
14 | } \ No newline at end of file | 17 | } |
18 | .style-shorthand-branch > div { | ||
19 | background-color: #fafafa; | ||
20 | border-bottom: 1px solid #ededed; | ||
21 | position: relative; | ||
22 | } | ||
23 | .style-shorthand-branch > div:hover { | ||
24 | background-color: #f1f1f1; | ||
25 | border-bottom: 1px solid #e1e1e1; | ||
26 | position: relative; | ||
27 | } | ||
28 | .style-shorthand-branch > div:hover:after { | ||
29 | opacity: 1; | ||
30 | } | ||
31 | .style-shorthand-branch > div:after { | ||
32 | background-image: url(data:image/png;base64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TEwODZFNjU2RjExRTE4MzJFRDBDMDEzNTEyNTFGIi8%2BIDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY%2BIDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8%2BaoqKDgAAAGhJREFUeNpibG9vP8DAwGDPgAkuMAGJ6QzYwXSQ5Bogfoom8RGIFzNVVFT8xaJ7FlD8OxOUMxeIf0HZIMWzQAywJFDVC6jxILADyL8Dl4SCKWg0A8P%2F%2F%2F%2FhGOitFch8JjSHxCFzAAIMACCjLJNKELwVAAAAAElFTkSuQmCC); | ||
33 | background-repeat: no-repeat; | ||
34 | content: "\00a0"; | ||
35 | height: 10px; | ||
36 | position: absolute; | ||
37 | right: 8px; | ||
38 | top: 4px; | ||
39 | width: 10px; | ||
40 | opacity: .3; | ||
41 | } | ||
42 | |||
diff --git a/js/panels/css-panel/style-shorthand.reel/style-shorthand.html b/js/panels/css-panel/style-shorthand.reel/style-shorthand.html index 391aa846..63aa64f8 100644 --- a/js/panels/css-panel/style-shorthand.reel/style-shorthand.html +++ b/js/panels/css-panel/style-shorthand.reel/style-shorthand.html | |||
@@ -21,7 +21,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
21 | "arrayController": {"@": "arrayController" }, | 21 | "arrayController": {"@": "arrayController" }, |
22 | "repetition": {"@": "repetition"}, | 22 | "repetition": {"@": "repetition"}, |
23 | "leafComponent": {"@": "leaf"}, | 23 | "leafComponent": {"@": "leaf"}, |
24 | "branchComponent": {"@": "branch"} | 24 | "branchComponent": {"@": "branch"}, |
25 | "branchCollapser": {"#": "collapser"} | ||
25 | 26 | ||
26 | } | 27 | } |
27 | }, | 28 | }, |
@@ -154,10 +155,9 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
154 | </head> | 155 | </head> |
155 | <body> | 156 | <body> |
156 | <div id="branch" class="style-shorthand-branch"> | 157 | <div id="branch" class="style-shorthand-branch"> |
157 | <div> | 158 | <div class="style-item" id="collapser"> |
158 | <dt id="property" class="css-property"></dt> | 159 | <dt id="property" class="css-property"></dt> |
159 | <dd id="value" class="css-value"></dd> | 160 | <dd id="value" class="css-value"></dd> |
160 | <a href="#" id="style-list-disclosure" class="list-disclorue">A</a> | ||
161 | </div> | 161 | </div> |
162 | <dl id="branchList" class="css-tree-branch"> | 162 | <dl id="branchList" class="css-tree-branch"> |
163 | <div id="treeItem"></div> | 163 | <div id="treeItem"></div> |
diff --git a/js/panels/css-panel/style-shorthand.reel/style-shorthand.js b/js/panels/css-panel/style-shorthand.reel/style-shorthand.js index 00749faa..e64d64c7 100644 --- a/js/panels/css-panel/style-shorthand.reel/style-shorthand.js +++ b/js/panels/css-panel/style-shorthand.reel/style-shorthand.js | |||
@@ -20,13 +20,16 @@ var styleShorthand = exports.StyleShorthand= Montage.create(TreeNode, { | |||
20 | }, | 20 | }, |
21 | prepareForDraw : { | 21 | prepareForDraw : { |
22 | value: function() { | 22 | value: function() { |
23 | this.styleListDisclosure.addEventListener('click', this, false); | 23 | // this.styleListDisclosure.addEventListener('click', this, false); |
24 | this.treeView.contentController.addBranchController(this.arrayController); | 24 | this.treeView.contentController.addBranchController(this.arrayController); |
25 | } | 25 | } |
26 | }, | 26 | }, |
27 | templateDidLoad: { | 27 | templateDidLoad: { |
28 | value: function() { | 28 | value: function() { |
29 | this.arrayController.delegate = this.treeView.contentController; | 29 | this.arrayController.delegate = this.treeView.contentController; |
30 | |||
31 | this.branchCollapser.removeAttribute('id'); | ||
32 | this.branchCollapser.addEventListener('click', this, false); | ||
30 | } | 33 | } |
31 | }, | 34 | }, |
32 | willDraw : { | 35 | willDraw : { |