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 --- js/components/SliderBase.js | 9 +- js/components/combobox.reel/combobox.js | 6 +- js/components/controllers/tree-controller.js | 11 ++- .../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 +++++++++++++++- js/components/menu/menu-entry.reel/menu-entry.html | 6 +- js/components/menu/menu-entry.reel/menu-entry.js | 49 +++++++++- js/components/menu/menu-item.reel/menu-item.js | 15 +++ js/components/menu/menu.reel/menu.html | 14 ++- js/components/radio.reel/radio.js | 21 ++-- js/components/slider.reel/slider.js | 15 +++ js/components/toolbar.reel/toolbar-button.js | 4 + js/components/toolbar.reel/toolbar.js | 5 + .../brush-properties.reel/brush-properties.js | 40 ++++++++ .../fill-properties.reel/fill-properties.js | 20 ++++ .../ink-bottle-properties.js | 65 +++++++++++++ .../line-properties.reel/line-properties.js | 5 +- .../object3d-properties.js | 11 ++- .../oval-properties.reel/oval-properties.js | 11 ++- .../pen-properties.reel/pen-properties.html | 4 - .../pen-properties.reel/pen-properties.js | 15 +++ .../rect-properties.reel/rect-properties.html | 1 - .../rect-properties.reel/rect-properties.js | 20 ++-- .../selection-properties.js | 86 ++++++++++++++++- .../shape-properties.reel/shape-properties.html | 7 +- .../shape-properties.reel/shape-properties.js | 71 ++++++++++++++ .../tag-properties.reel/tag-properties.js | 26 +++-- .../text-properties.reel/text-properties.html | 18 +--- .../text-properties.reel/text-properties.js | 44 ++++----- .../zoom-properties.reel/zoom-properties.js | 12 ++- .../treeview/ninja-branch.reel/ninja-branch.html | 2 +- .../treeview/ninja-branch.reel/ninja-branch.js | 35 ++++++- js/components/treeview/treeview.reel/treeview.html | 2 +- js/components/treeview/treeview.reel/treeview.js | 43 +++++++-- 42 files changed, 791 insertions(+), 170 deletions(-) (limited to 'js/components') diff --git a/js/components/SliderBase.js b/js/components/SliderBase.js index 8df868a2..a6c3ff6d 100755 --- a/js/components/SliderBase.js +++ b/js/components/SliderBase.js @@ -83,7 +83,8 @@ var SliderBase = exports.SliderBase = Montage.create(Component, { } this.needsDraw = true; } - } + }, + serializable: true }, // Internal flags to determine what the change/changing events will contain @@ -153,7 +154,8 @@ var SliderBase = exports.SliderBase = Montage.create(Component, { } this.needsDraw = true; } - } + }, + serializable: true }, _maxValue: { @@ -175,7 +177,8 @@ var SliderBase = exports.SliderBase = Montage.create(Component, { } this.needsDraw = true; } - } + }, + serializable: true }, _valueCoef: { diff --git a/js/components/combobox.reel/combobox.js b/js/components/combobox.reel/combobox.js index bc433f52..29f49b7b 100755 --- a/js/components/combobox.reel/combobox.js +++ b/js/components/combobox.reel/combobox.js @@ -20,7 +20,8 @@ exports.Combobox = Montage.create(Component, { }, labelField: { - value: null + value: null, + serializable: true }, labelFunction: { @@ -28,7 +29,8 @@ exports.Combobox = Montage.create(Component, { }, dataField: { - value: null + value: null, + serializable: true }, dataFunction: { diff --git a/js/components/controllers/tree-controller.js b/js/components/controllers/tree-controller.js index cb95ca1d..bc3d0860 100644 --- a/js/components/controllers/tree-controller.js +++ b/js/components/controllers/tree-controller.js @@ -30,7 +30,8 @@ var TreeController = exports.TreeController = Montage.create(ObjectController, / }, set: function(value) { this._delegate = value; - } + }, + serializable: true }, rootKey : { @@ -38,7 +39,13 @@ var TreeController = exports.TreeController = Montage.create(ObjectController, / }, branchKey : { - value: null + value: null, + serializable: true + }, + + labelKey: { + value: null, + serializable: true }, _root : { 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 @@ - + diff --git a/js/components/tools-properties/pen-properties.reel/pen-properties.js b/js/components/tools-properties/pen-properties.reel/pen-properties.js index 5ae03adc..78065b99 100755 --- a/js/components/tools-properties/pen-properties.reel/pen-properties.js +++ b/js/components/tools-properties/pen-properties.reel/pen-properties.js @@ -9,9 +9,21 @@ var ToolProperties = require("js/components/tools-properties/tool-properties").T var PenProperties = exports.PenProperties = Montage.create(ToolProperties, { addedColorChips: { value: false }, - _penToolRadio: { value: null, enumerable: false }, - _penPlusRadio: { value: null, enumerable: false }, - _penMinusRadio: { value: null, enumerable: false }, + + _penToolRadio: { + value: null, + serializable: true + }, + + _penPlusRadio: { + value: null, + serializable: true + }, + + _penMinusRadio: { + value: null, + serializable: true + }, _subPrepare: { value: function() { diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.js b/js/components/treeview/ninja-branch.reel/ninja-branch.js index 48271c2d..72ef3ccd 100644 --- a/js/components/treeview/ninja-branch.reel/ninja-branch.js +++ b/js/components/treeview/ninja-branch.reel/ninja-branch.js @@ -9,38 +9,38 @@ var Montage = require("montage").Montage, var Branch = exports.Branch = Montage.create(TreeNode, { label: { - value: null, - serializable: true + value: null +// serializable: true }, branchList: { - value: null, - serializable: true + value: null +// serializable: true }, arrayController: { -