aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.js48
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.html6
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.js61
-rwxr-xr-xjs/components/layout/document-entry.reel/close_button.gifbin139 -> 0 bytes
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.css20
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.html21
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.js58
-rwxr-xr-xjs/components/layout/documents-tab.reel/documents-tab.html13
-rwxr-xr-xjs/components/layout/documents-tab.reel/documents-tab.js5
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.html6
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.js40
-rwxr-xr-xjs/components/layout/tools-properties.reel/tools-properties.js46
-rwxr-xr-xjs/components/menu/menu-entry.reel/menu-entry.html13
-rwxr-xr-xjs/components/menu/menu-item.reel/menu-item.html13
-rwxr-xr-xjs/components/menu/menu-item.reel/menu-item.js18
-rwxr-xr-xjs/components/menu/menu.reel/menu.html25
-rwxr-xr-xjs/components/menu/menu.reel/menu.js17
-rwxr-xr-xjs/controllers/document-controller.js264
-rwxr-xr-xjs/controllers/elements/shapes-controller.js4
-rwxr-xr-xjs/controllers/selection-controller.js32
-rwxr-xr-xjs/controllers/styles-controller.js93
-rwxr-xr-xjs/controllers/undo-controller.js8
-rwxr-xr-xjs/data/menu-data.js147
-rwxr-xr-xjs/document/_toDelete/html-document.js874
-rwxr-xr-xjs/document/_toDelete/text-document.js198
-rwxr-xr-xjs/document/models/text.js2
-rwxr-xr-xjs/document/views/code.js6
-rwxr-xr-xjs/mediators/element-mediator.js6
-rwxr-xr-xjs/ninja.reel/ninja.html85
-rwxr-xr-xjs/ninja.reel/ninja.js71
-rwxr-xr-xjs/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js29
-rwxr-xr-xjs/panels/Panel.reel/Panel.js29
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html21
-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.js1
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js4
-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/style-sheets-view.reel/style-sheets-view.js8
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.js31
-rwxr-xr-xjs/panels/properties.reel/properties.js49
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.js91
-rwxr-xr-xjs/stage/layout.js39
-rwxr-xr-xjs/stage/stage-deps.js31
-rwxr-xr-xjs/stage/stage.reel/stage.html18
-rwxr-xr-xjs/stage/stage.reel/stage.js35
-rwxr-xr-xjs/tools/PanTool.js1
48 files changed, 818 insertions, 1835 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js
index 49dbe3cb..ac131f2c 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.js
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.js
@@ -9,21 +9,44 @@ var Montage = require("montage/core/core").Montage,
9 9
10exports.Breadcrumb = Montage.create(Component, { 10exports.Breadcrumb = Montage.create(Component, {
11 11
12 disabled: { 12 _currentDocument: {
13 value: true 13 enumerable: false,
14 value: null
14 }, 15 },
15 16
16 handleOpenDocument: { 17 currentDocument: {
17 value: function(){ 18 enumerable: false,
18 this.disabled = false; 19 get: function() {
20 return this._currentDocument;
21 },
22 set: function(value) {
23 if (value === this._currentDocument) {
24 return;
25 }
26
27 this._currentDocument = value;
28
29 if(!value) {
30 this.disabled = true;
31 } else {
32 this.disabled = this._currentDocument.currentView !== "design";
33 }
34
19 } 35 }
20 }, 36 },
21 37
22 handleCloseDocument: { 38
23 value: function(){ 39 _disabled: {
24 if(!this.application.ninja.documentController.activeDocument && this.application.ninja.currentDocument.currentView !== "code") { 40 value: true
25 this.disabled = true; 41 },
26 this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.model.documentRoot : null); 42
43 disabled: {
44 get: function() {
45 return this._disabled;
46 },
47 set: function(value) {
48 if(value !== this._disabled) {
49 this._disabled = value;
27 } 50 }
28 } 51 }
29 }, 52 },
@@ -50,8 +73,6 @@ exports.Breadcrumb = Montage.create(Component, {
50 73
51 prepareForDraw: { 74 prepareForDraw: {
52 value: function() { 75 value: function() {
53 this.eventManager.addEventListener("openDocument", this, false);
54 this.eventManager.addEventListener("closeDocument", this, false);
55 this.breadcrumbBt.addEventListener("action", this, false); 76 this.breadcrumbBt.addEventListener("action", this, false);
56 } 77 }
57 }, 78 },
@@ -65,7 +86,7 @@ exports.Breadcrumb = Montage.create(Component, {
65 86
66 parentNode = this.container; 87 parentNode = this.container;
67 88
68 while(parentNode !== this.application.ninja.currentDocument.model.documentRoot) { 89 while(parentNode !== this.currentDocument.model.documentRoot) {
69 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); 90 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName});
70 parentNode = parentNode.parentNode; 91 parentNode = parentNode.parentNode;
71 } 92 }
@@ -87,6 +108,7 @@ exports.Breadcrumb = Montage.create(Component, {
87 this.containerElements.pop(); 108 this.containerElements.pop();
88 } 109 }
89 110
111 // TODO: This is bound 2 ways, update the internal property
90 this.application.ninja.currentSelectedContainer = this.containerElements[i].node; 112 this.application.ninja.currentSelectedContainer = this.containerElements[i].node;
91 } 113 }
92 } 114 }
diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html
index 760186ba..a35b5590 100755
--- a/js/components/layout/document-bar.reel/document-bar.html
+++ b/js/components/layout/document-bar.reel/document-bar.html
@@ -37,11 +37,7 @@
37 "element": {"#": "disabledCondition"} 37 "element": {"#": "disabledCondition"}
38 }, 38 },
39 "bindings": { 39 "bindings": {
40 "condition": { 40 "condition": {"<-": "@owner.disabled"}
41 "boundObject": {"@": "owner"},
42 "boundObjectPropertyPath": "disabled",
43 "oneway": true
44 }
45 } 41 }
46 }, 42 },
47 43
diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js
index 56b61f1d..90d3a207 100755
--- a/js/components/layout/document-bar.reel/document-bar.js
+++ b/js/components/layout/document-bar.reel/document-bar.js
@@ -9,13 +9,32 @@ var Component = require("montage/ui/component").Component;
9 9
10exports.DocumentBar = Montage.create(Component, { 10exports.DocumentBar = Montage.create(Component, {
11 11
12 _currentDocument: {
13 enumerable: false,
14 value: null
15 },
16
17 currentDocument: {
18 enumerable: false,
19 get: function() {
20 return this._currentDocument;
21 },
22 set: function(value) {
23 if (value === this._currentDocument) {
24 return;
25 }
26
27 this._currentDocument = value;
28
29 this.disabled = !this._currentDocument;
30