From 0e1a276f19ea70009c5a649e9667861d7c346a7e Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 6 Jun 2012 00:25:27 -0700 Subject: first iteration of adding serializable to ninja plus other changes to run the latest montage Signed-off-by: Valerio Virgillito --- .../layout/bread-crumb.reel/bread-crumb.html | 2 +- .../layout/bread-crumb.reel/bread-crumb.js | 5 + .../layout/document-bar.reel/document-bar.html | 2 - .../layout/document-bar.reel/document-bar.js | 7 +- .../layout/documents-tab.reel/documents-tab.js | 3 +- .../layout/tool-button.reel/tool-button.html | 2 +- .../layout/tools-list.reel/tools-list.html | 5 +- js/components/layout/tools-list.reel/tools-list.js | 106 +++++++++++++++++---- .../tools-properties.reel/tools-properties.html | 54 +++++------ .../tools-properties.reel/tools-properties.js | 82 +++++++++++++++- 10 files changed, 211 insertions(+), 57 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html index 0dabc781..68f3be2b 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.html +++ b/js/components/layout/bread-crumb.reel/bread-crumb.html @@ -40,7 +40,7 @@ "buttonsListController": { "prototype": "montage/ui/controller/array-controller", "bindings": { - "content": {"<<->": "@owner.containerElements"} + "content": {"<->": "@owner.containerElements"} } }, diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index ac131f2c..d525c813 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -9,6 +9,11 @@ var Montage = require("montage/core/core").Montage, exports.Breadcrumb = Montage.create(Component, { + breadcrumbBt: { + value: null, + serializable: true + }, + _currentDocument: { enumerable: false, value: null diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html index a35b5590..889160ad 100755 --- a/js/components/layout/document-bar.reel/document-bar.html +++ b/js/components/layout/document-bar.reel/document-bar.html @@ -45,8 +45,6 @@ "prototype": "js/components/layout/document-bar.reel", "properties": { "element": {"#": "documentBar"}, - "designView": {"#": "design"}, - "codeView": {"#": "code"}, "zoomControl": {"@": "hottext1"} } } diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js index 1cb0bd90..74ba11c2 100755 --- a/js/components/layout/document-bar.reel/document-bar.js +++ b/js/components/layout/document-bar.reel/document-bar.js @@ -61,7 +61,8 @@ exports.DocumentBar = Montage.create(Component, { }, zoomControl: { - value: null + value: null, + serializable: true }, _type: { @@ -148,8 +149,8 @@ exports.DocumentBar = Montage.create(Component, { prepareForDraw: { value: function() { - this.designView.addEventListener("click", this, false); - this.codeView.addEventListener("click", this, false); +// this.designView.addEventListener("click", this, false); +// this.codeView.addEventListener("click", this, false); } }, diff --git a/js/components/layout/documents-tab.reel/documents-tab.js b/js/components/layout/documents-tab.reel/documents-tab.js index 41c98b30..b72056f8 100755 --- a/js/components/layout/documents-tab.reel/documents-tab.js +++ b/js/components/layout/documents-tab.reel/documents-tab.js @@ -9,6 +9,7 @@ var Component = require("montage/ui/component").Component; exports.DocumentsTab = Montage.create(Component, { contentController: { - value: null + value: null, + serializable: true } }); \ No newline at end of file diff --git a/js/components/layout/tool-button.reel/tool-button.html b/js/components/layout/tool-button.reel/tool-button.html index a329f646..936c47ef 100755 --- a/js/components/layout/tool-button.reel/tool-button.html +++ b/js/components/layout/tool-button.reel/tool-button.html @@ -18,7 +18,7 @@ "element": {"#": "toolBarButton"} }, "bindings": { - "selected": {"<<->": "@owner.data.selected"}, + "selected": {"<->": "@owner.data.selected"}, "subselected": {"<-": "@owner.data.subtools.selected"} } } diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index 4e5b85ee..3a9661f5 100755 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html @@ -126,10 +126,7 @@ "EraserTool": {"@": "EraserTool1"}, "RotateStageTool3D": {"@": "RotateStageTool3D1"}, "PanTool": {"@": "PanTool1"}, - "ZoomTool": {"@": "ZoomTool1"}, - "components": [ - {"@": "repetition1"} - ] + "ZoomTool": {"@": "ZoomTool1"} } } } diff --git a/js/components/layout/tools-list.reel/tools-list.js b/js/components/layout/tools-list.reel/tools-list.js index c46c065e..e36001a3 100755 --- a/js/components/layout/tools-list.reel/tools-list.js +++ b/js/components/layout/tools-list.reel/tools-list.js @@ -9,23 +9,95 @@ var Component = require("montage/ui/component").Component; exports.ToolsList = Montage.create(Component, { - SelectionTool: { value: null }, - Rotate3DTool: { value: null }, - Translate3DTool: { value: null }, - TagTool: { value: null }, - PenTool: { value: null }, - TextTool: { value: null }, - ShapeTool: { value: null }, - OvalTool: { value: null }, - RectTool: { value: null }, - LineTool: { value: null }, - BrushTool: { value: null }, - FillTool: { value: null }, - InkBottleTool: { value: null }, - EraserTool: { value: null }, - RotateStageTool3D: { value: null }, - PanTool: { value: null }, - ZoomTool: { value: null }, + toolsData: { + value: null, + serializable: true + }, + + SelectionTool: { + value: null, + serializable: true + }, + + Rotate3DTool: { + value: null, + serializable: true + }, + + Translate3DTool: { + value: null, + serializable: true + }, + + TagTool: { + value: null, + serializable: true + }, + + PenTool: { + value: null, + serializable: true + }, + + TextTool: { + value: null, + serializable: true + }, + + ShapeTool: { + value: null, + serializable: true + }, + + OvalTool: { + value: null, + serializable: true + }, + + RectTool: { + value: null, + serializable: true + }, + + LineTool: { + value: null, + serializable: true + }, + + BrushTool: { + value: null, + serializable: true + }, + + FillTool: { + value: null, + serializable: true + }, + + InkBottleTool: { + value: null, + serializable: true + }, + + EraserTool: { + value: null, + serializable: true + }, + + RotateStageTool3D: { + value: null, + serializable: true + }, + + PanTool: { + value: null, + serializable: true + }, + + ZoomTool: { + value: null, + serializable: true + }, _currentDocument: { enumerable: false, diff --git a/js/components/layout/tools-properties.reel/tools-properties.html b/js/components/layout/tools-properties.reel/tools-properties.html index e7d1ac8b..6b766532 100755 --- a/js/components/layout/tools-properties.reel/tools-properties.html +++ b/js/components/layout/tools-properties.reel/tools-properties.html @@ -12,37 +12,37 @@