diff options
Diffstat (limited to 'js/components/layout')
6 files changed, 24 insertions, 89 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html index ae3e2022..0dabc781 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.html +++ b/js/components/layout/bread-crumb.reel/bread-crumb.html | |||
@@ -32,30 +32,23 @@ | |||
32 | } | 32 | } |
33 | ], | 33 | ], |
34 | "bindings": { | 34 | "bindings": { |
35 | "label": { | 35 | "label": {"<-": "@buttonsList.objectAtCurrentIteration.label"}, |
36 | "boundObject": {"@": "repetition1"}, | 36 | "value": {"<-": "@buttonsList.objectAtCurrentIteration.nodeUuid"} |
37 | "boundObjectPropertyPath": "objectAtCurrentIteration.label", | 37 | } |
38 | "oneway": true | 38 | }, |
39 | }, | 39 | |
40 | "value": { | 40 | "buttonsListController": { |
41 | "boundObject": {"@": "repetition1"}, | 41 | "prototype": "montage/ui/controller/array-controller", |
42 | "boundObjectPropertyPath": "objectAtCurrentIteration.nodeUuid", | 42 | "bindings": { |
43 | "oneway": true | 43 | "content": {"<<->": "@owner.containerElements"} |
44 | } | ||
45 | } | 44 | } |
46 | }, | 45 | }, |
47 | 46 | ||
48 | "repetition1": { | 47 | "buttonsList": { |
49 | "prototype": "montage/ui/repetition.reel", | 48 | "prototype": "montage/ui/repetition.reel", |
50 | "properties": { | 49 | "properties": { |
51 | "element": {"#": "breadcrumb_container"} | 50 | "element": {"#": "breadcrumb_container"}, |
52 | }, | 51 | "contentController": {"@": "buttonsListController"} |
53 | "bindings": { | ||
54 | "objects": { | ||
55 | "boundObject": {"@": "owner"}, | ||
56 | "boundObjectPropertyPath": "containerElements", | ||
57 | "oneway": true | ||
58 | } | ||
59 | } | 52 | } |
60 | }, | 53 | }, |
61 | 54 | ||
@@ -65,11 +58,7 @@ | |||
65 | "element": {"#": "disabledCondition"} | 58 | "element": {"#": "disabledCondition"} |
66 | }, | 59 | }, |
67 | "bindings": { | 60 | "bindings": { |
68 | "condition": { | 61 | "condition": {"<-": "@owner.disabled"} |
69 | "boundObject": {"@": "owner"}, | ||
70 | "boundObjectPropertyPath": "disabled", | ||
71 | "oneway": true | ||
72 | } | ||
73 | } | 62 | } |
74 | } | 63 | } |
75 | } | 64 | } |
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index c1b021a3..d2a6b1e4 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js | |||
@@ -60,30 +60,18 @@ exports.Breadcrumb = Montage.create(Component, { | |||
60 | value: function() { | 60 | value: function() { |
61 | var parentNode; | 61 | var parentNode; |
62 | 62 | ||
63 | this.containerElements.length = 0; | 63 | // delete this.containerElements; |
64 | this.containerElements = []; | ||
64 | 65 | ||
65 | parentNode = this.container; | 66 | parentNode = this.container; |
66 | 67 | ||
67 | // This is for the old template support. | 68 | while(parentNode !== this.application.ninja.currentDocument.documentRoot) { |
68 | // TODO: Remove marker for old template: NINJA-STAGE-REWORK | ||
69 | if(this.application.ninja.currentDocument.documentRoot.id === "UserContent") { | ||
70 | while(parentNode.id !== "UserContent") { | ||
71 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | ||
72 | parentNode = parentNode.parentNode; | ||
73 | } | ||
74 | |||
75 | // This is always the top container which is now hardcoded to body | ||
76 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": "Body"}); | ||
77 | } else { | ||
78 | while(parentNode !== this.application.ninja.currentDocument.documentRoot) { | ||
79 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | ||
80 | parentNode = parentNode.parentNode; | ||
81 | } | ||
82 | |||
83 | // This is always the top container which is now hardcoded to body | ||
84 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | 69 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); |
70 | parentNode = parentNode.parentNode; | ||
85 | } | 71 | } |
86 | 72 | ||
73 | // This is always the top container which is now hardcoded to body | ||
74 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | ||
87 | } | 75 | } |
88 | }, | 76 | }, |
89 | 77 | ||
diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 81a63c90..ad0236c6 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js | |||
@@ -33,8 +33,10 @@ exports.DocumentEntry = Montage.create(Component, { | |||
33 | } | 33 | } |
34 | 34 | ||
35 | this._document = value; | 35 | this._document = value; |
36 | this._uuid = value.uuid; | 36 | |
37 | //this.needsDraw = true; | 37 | if(value) { |
38 | this._uuid = value.uuid; | ||
39 | } | ||
38 | } | 40 | } |
39 | }, | 41 | }, |
40 | 42 | ||
@@ -117,7 +119,7 @@ exports.DocumentEntry = Montage.create(Component, { | |||
117 | handleClick: { | 119 | handleClick: { |
118 | value: function(event) { | 120 | value: function(event) { |
119 | if(event._event.target.nodeName === "IMG") { | 121 | if(event._event.target.nodeName === "IMG") { |
120 | this.application.ninja.documentController.closeDocument(this._uuid); | 122 | this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); |
121 | } else { | 123 | } else { |
122 | if(!this._document.isActive) { | 124 | if(!this._document.isActive) { |
123 | this.application.ninja.stage.stageView.switchDocument(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); | 125 | this.application.ninja.stage.stageView.switchDocument(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); |
diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index 25aac8fb..cbbcace4 100755 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html | |||
@@ -55,9 +55,6 @@ | |||
55 | "SelectionTool1": { | 55 | "SelectionTool1": { |
56 | "prototype": "js/tools/SelectionTool" | 56 | "prototype": "js/tools/SelectionTool" |
57 | }, | 57 | }, |
58 | "SubselectionTool1": { | ||
59 | "prototype": "js/tools/SubSelectTool" | ||
60 | }, | ||
61 | "Rotate3DTool1": { | 58 | "Rotate3DTool1": { |
62 | "prototype": "js/tools/RotateObject3DTool" | 59 | "prototype": "js/tools/RotateObject3DTool" |
63 | }, | 60 | }, |
@@ -85,9 +82,6 @@ | |||
85 | "LineTool1": { | 82 | "LineTool1": { |
86 | "prototype": "js/tools/LineTool" | 83 | "prototype": "js/tools/LineTool" |
87 | }, | 84 | }, |
88 | "PencilTool1": { | ||
89 | "prototype": "js/tools/PencilTool" | ||
90 | }, | ||
91 | "BrushTool1": { | 85 | "BrushTool1": { |
92 | "prototype": "js/tools/BrushTool" | 86 | "prototype": "js/tools/BrushTool" |
93 | }, | 87 | }, |
@@ -97,9 +91,6 @@ | |||
97 | "InkBottleTool1": { | 91 | "InkBottleTool1": { |
98 | "prototype": "js/tools/InkBottleTool" | 92 | "prototype": "js/tools/InkBottleTool" |
99 | }, | 93 | }, |
100 | "EyedropperTool1": { | ||
101 | "prototype": "js/tools/EyedropperTool" | ||
102 | }, | ||
103 | "EraserTool1": { | 94 | "EraserTool1": { |
104 | "prototype": "js/tools/EraserTool" | 95 | "prototype": "js/tools/EraserTool" |
105 | }, | 96 | }, |
@@ -135,7 +126,6 @@ | |||
135 | "properties": { | 126 | "properties": { |
136 | "element": {"#": "toolsList"}, | 127 | "element": {"#": "toolsList"}, |
137 | "SelectionTool": {"@": "SelectionTool1"}, | 128 | "SelectionTool": {"@": "SelectionTool1"}, |
138 | "SubselectionTool": {"@": "SubselectionTool1"}, | ||
139 | "Rotate3DTool": {"@": "Rotate3DTool1"}, | 129 | "Rotate3DTool": {"@": "Rotate3DTool1"}, |
140 | "Translate3DTool": {"@": "Translate3DTool1"}, | 130 | "Translate3DTool": {"@": "Translate3DTool1"}, |
141 | "TagTool": {"@": "TagTool1"}, | 131 | "TagTool": {"@": "TagTool1"}, |
@@ -145,11 +135,9 @@ | |||
145 | "OvalTool": {"@": "OvalTool1"}, | 135 | "OvalTool": {"@": "OvalTool1"}, |
146 | "RectTool": {"@": "RectTool1"}, | 136 | "RectTool": {"@": "RectTool1"}, |
147 | "LineTool": {"@": "LineTool1"}, | 137 | "LineTool": {"@": "LineTool1"}, |
148 | "PencilTool": {"@": "PencilTool1"}, | ||
149 | "BrushTool": {"@": "BrushTool1"}, | 138 | "BrushTool": {"@": "BrushTool1"}, |
150 | "FillTool": {"@": "FillTool1"}, | 139 | "FillTool": {"@": "FillTool1"}, |
151 | "InkBottleTool": {"@": "InkBottleTool1"}, | 140 | "InkBottleTool": {"@": "InkBottleTool1"}, |
152 | "EyedropperTool": {"@": "EyedropperTool1"}, | ||
153 | "EraserTool": {"@": "EraserTool1"}, | 141 | "EraserTool": {"@": "EraserTool1"}, |
154 | "RotateStageTool3D": {"@": "RotateStageTool3D1"}, | 142 | "RotateStageTool3D": {"@": "RotateStageTool3D1"}, |
155 | "PanTool": {"@": "PanTool1"}, | 143 | "PanTool": {"@": "PanTool1"}, |
@@ -173,8 +161,6 @@ | |||
173 | <hr /> |