aboutsummaryrefslogtreecommitdiff
path: root/js/panels/presets/style-presets.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/presets/style-presets.reel')
-rw-r--r--js/panels/presets/style-presets.reel/style-presets.html2
-rw-r--r--js/panels/presets/style-presets.reel/style-presets.js61
2 files changed, 7 insertions, 56 deletions
diff --git a/js/panels/presets/style-presets.reel/style-presets.html b/js/panels/presets/style-presets.reel/style-presets.html
index b5c40d9c..0db4d3c0 100644
--- a/js/panels/presets/style-presets.reel/style-presets.html
+++ b/js/panels/presets/style-presets.reel/style-presets.html
@@ -29,7 +29,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
29 "bindings": { 29 "bindings": {
30 "content": { 30 "content": {
31 "boundObject": {"@": "owner"}, 31 "boundObject": {"@": "owner"},
32 "boundObjectPropertyPath": "data2" 32 "boundObjectPropertyPath": "presetData"
33 } 33 }
34 } 34 }
35 }, 35 },
diff --git a/js/panels/presets/style-presets.reel/style-presets.js b/js/panels/presets/style-presets.reel/style-presets.js
index f25c8067..0c44e20c 100644
--- a/js/panels/presets/style-presets.reel/style-presets.js
+++ b/js/panels/presets/style-presets.reel/style-presets.js
@@ -5,78 +5,29 @@
5 </copyright> */ 5 </copyright> */
6 6
7var Montage = require("montage/core/core").Montage, 7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component; 8 Component = require("montage/ui/component").Component,
9 DefaultPresets = require("js/panels/presets/default-style-presets").stylePresets;
9 10
10exports.StylesLibrary = Montage.create(Component, { 11exports.StylesLibrary = Montage.create(Component, {
11 hasTemplate: { 12 hasTemplate: {
12 value: true 13 value: true
13 }, 14 },
15 presetData : {
16 value : null
17 },
14 contentPanel : { 18 contentPanel : {
15 value: "presets" // get from local storage 19 value: "presets" // get from local storage
16 }, 20 },
17 templateDidLoad : { 21 templateDidLoad : {
18 value: function() { 22 value: function() {
19 console.log('deserialized'); 23 this.presetData = DefaultPresets;
20 } 24 }
21 }, 25 },
22 treeList : { 26 treeList : {
23 value : null 27 value : null
24 }, 28 },
25 data2: {
26 value: {
27 "text": "styles",
28 "children": [{
29 "text": "Box Styles",
30 "children": [
31 {
32 "text": "Border-Radius",
33 "classNameBase" : "border-radius",
34 "styles" : {
35 "border-radius": "100px",
36 "border" : "1px solid #333"
37 }
38 },
39 {
40 "text": "Drop Shadow",
41 "classNameBase" : "drop-shadow",
42 "styles" : {
43 "box-shadow": "2px 2px 50px rgba(0,0,0,0.5)",
44 "border" : "1px solid #CCC"
45 }
46 },
47 {
48 "text": "Fancy Box",
49 "classNameBase" : "fancy-box",
50 "styles" : {
51 "box-shadow": "inset 0 0 0 1px #666, inset 0 0 0 2px rgba(225, 225, 225, 0.4), 0 0 20px -10px #333",
52 "border" : "1px solid #FFF",
53 "border-radius": "30px",
54 "background-color": "#7db9e8",
55 "background-image": "-webkit-linear-gradient(top, rgba(255,255,255,0.74) 0%,rgba(255,255,255,0) 100%)"
56 }
57 }]
58 }, {
59 "text": "Text Styles",
60 "children": [
61 { "text": "Italic" },
62 { "text": "Text Shadow" },
63 { "text": "Text Color" } ]
64 }, {
65 "text": "Color Styles",
66 "children": [
67 { "text": "Background Gradient" },
68 { "text": "Background Color" },
69 { "text": "Text Highlight" } ]
70 }]
71 }
72 },
73 didDraw: { 29 didDraw: {
74 value : function() { 30 value : function() {
75 console.log('Presets Panel prepare for draw.');
76// this.treeList.items.push({
77// label : "Box Style",
78// type : 'leaf'
79// });
80 } 31 }
81 }, 32 },
82 handleNodeActivation: { 33 handleNodeActivation: {