aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js29
-rwxr-xr-xjs/panels/Panel.reel/Panel.js29
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html27
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js41
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js4
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js161
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js4
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js70
-rw-r--r--js/panels/css-panel/css-panel.reel/css-panel.html3
-rw-r--r--js/panels/css-panel/css-panel.reel/css-panel.js18
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js9
-rw-r--r--js/panels/css-panel/rule-list-container.reel/rule-list-container.js8
-rw-r--r--js/panels/css-panel/style-declaration.reel/style-declaration.css3
-rw-r--r--js/panels/css-panel/style-declaration.reel/style-declaration.js10
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js8
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.js31
-rw-r--r--js/panels/css-panel/styles-view-delegate.js11
-rwxr-xr-xjs/panels/properties.reel/properties.html5
-rwxr-xr-xjs/panels/properties.reel/properties.js68
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js2
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.js95
-rw-r--r--js/panels/resize-composer.js5
22 files changed, 396 insertions, 245 deletions
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
index b4a803b2..b496ce4a 100755
--- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
+++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
@@ -57,11 +57,6 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre
57 57
58 this.eventManager.addEventListener("selectionChange", this, true); 58 this.eventManager.addEventListener("selectionChange", this, true);
59 this.eventManager.addEventListener("elementChange", this, true); 59 this.eventManager.addEventListener("elementChange", this, true);
60 this.eventManager.addEventListener("openDocument", this, true);
61
62 if(this.application.ninja.currentDocument) {
63 this.captureOpenDocument();
64 }
65 60
66 this.addEventListener('webkitTransitionEnd', this, false); 61 this.addEventListener('webkitTransitionEnd', this, false);
67 ['sheets', 'styles'].forEach(function(section) { 62 ['sheets', 'styles'].forEach(function(section) {
@@ -73,11 +68,29 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre
73 this._setUpToolbars(); 68 this._setUpToolbars();
74 } 69 }
75 }, 70 },
76 captureOpenDocument : { 71
77 value : function(e) { 72 _currentDocument: {
78 this.populateStyleSheetList(); 73 value : null,
74 enumerable : false
75 },
76
77 currentDocument : {
78 get : function() {
79 return this._currentDocument;
80 },
81 set : function(value) {
82 if (value === this._currentDocument) {
83 return;
84 }
85
86 this._currentDocument = value;
87
88 if(this._currentDocument.currentView === "design") {
89 this.populateStyleSheetList();
90 }
79 } 91 }
80 }, 92 },
93
81 handleWebkitTransitionEnd : { 94 handleWebkitTransitionEnd : {
82 value: function(e) { 95 value: function(e) {
83 //console.log('transition end at panel base'); 96 //console.log('transition end at panel base');
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js
index bd9b4e2f..3783459e 100755
--- a/js/panels/Panel.reel/Panel.js
+++ b/js/panels/Panel.reel/Panel.js
@@ -104,6 +104,35 @@ exports.Panel = Montage.create(Component, {
104 } 104 }
105 }, 105 },
106 106
107 _currentDocument: {
108 value : null,
109 enumerable : false
110 },
111
112 currentDocument : {
113 get : function() {
114 return this._currentDocument;
115 },
116 set : function(value) {
117 if (value === this._currentDocument) {
118 return;
119 }
120
121 this._currentDocument = value;
122
123 if(typeof this.panelContent.content[0].controller._currentDocument !== "undefined") {
124 this.panelContent.content[0].controller.currentDocument = this._currentDocument;
125 }
126
127 if(!value) {
128 this.disabled = true;
129 } else {
130 this.disabled = this._currentDocument.currentView !== "design";
131 }
132
133 }
134 },
135
107 handleBtnCollapseAction: { 136 handleBtnCollapseAction: {
108 value: function() { 137 value: function() {
109 this.collapsed = !this.collapsed; 138 this.collapsed = !this.collapsed;
diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html
index 7327fb1d..9842a1d1 100755
--- a/js/panels/PanelContainer.reel/PanelContainer.html
+++ b/js/panels/PanelContainer.reel/PanelContainer.html
@@ -17,6 +17,9 @@
17 "prototype": "js/panels/Panel.reel", 17 "prototype": "js/panels/Panel.reel",
18 "properties": { 18 "properties": {
19 "element": {"#": "panel_0"} 19 "element": {"#": "panel_0"}
20 },
21 "bindings": {
22 "currentDocument": {"<-": "@owner.currentDocument"}
20 } 23 }
21 }, 24 },
22 25
@@ -24,6 +27,9 @@
24 "prototype": "js/panels/Panel.reel", 27 "prototype": "js/panels/Panel.reel",
25 "properties": { 28 "properties": {
26 "element": {"#": "panel_1"} 29 "element": {"#": "panel_1"}
30 },
31 "bindings": {
32 "currentDocument": {"<-": "@owner.currentDocument"}
27 } 33 }
28 }, 34 },
29 35
@@ -31,6 +37,9 @@
31 "prototype": "js/panels/Panel.reel", 37 "prototype": "js/panels/Panel.reel",
32 "properties": { 38 "properties": {
33 "element": {"#": "panel_2"} 39 "element": {"#": "panel_2"}
40 },
41 "bindings": {
42 "currentDocument": {"<-": "@owner.currentDocument"}
34 } 43 }
35 }, 44 },
36 45
@@ -38,6 +47,9 @@
38 "prototype": "js/panels/Panel.reel", 47 "prototype": "js/panels/Panel.reel",
39 "properties": { 48 "properties": {
40 "element": {"#": "panel_3"} 49 "element": {"#": "panel_3"}
50 },
51 "bindings": {
52 "currentDocument": {"<-": "@owner.currentDocument"}
41 } 53 }
42 }, 54 },
43 55
@@ -45,6 +57,9 @@
45 "prototype": "js/panels/Panel.reel", 57 "prototype": "js/panels/Panel.reel",
46 "properties": { 58 "properties": {
47 "element": {"#": "panel_4"} 59 "element": {"#": "panel_4"}
60 },
61 "bindings": {
62 "currentDocument": {"<-": "@owner.currentDocument"}
48 } 63 }
49 }, 64 },
50 65
@@ -52,6 +67,9 @@
52 "prototype": "js/panels/Panel.reel", 67 "prototype": "js/panels/Panel.reel",
53 "properties": { 68 "properties": {
54 "element": {"#": "panel_5"} 69 "element": {"#": "panel_5"}
70 },
71 "bindings": {
72 "currentDocument": {"<-": "@owner.currentDocument"}
55 } 73 }
56 }, 74 },
57 75
@@ -60,6 +78,9 @@
60 "name": "Panel", 78 "name": "Panel",
61 "properties": { 79 "properties": {
62 "element": {"#": "panel_6"} 80 "element": {"#": "panel_6"}
81 },
82 "bindings": {
83 "currentDocument": {"<-": "@owner.currentDocument"}
63 } 84 }
64 }, 85 },
65 86
@@ -67,6 +88,9 @@
67 "prototype": "js/panels/Panel.reel", 88 "prototype": "js/panels/Panel.reel",
68 "properties": { 89 "properties": {