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 --- .../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 ++++++++++++++++++---- 4 files changed, 69 insertions(+), 13 deletions(-) (limited to 'js/components/treeview') diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.html b/js/components/treeview/ninja-branch.reel/ninja-branch.html index 60894fbc..8b808488 100644 --- a/js/components/treeview/ninja-branch.reel/ninja-branch.html +++ b/js/components/treeview/ninja-branch.reel/ninja-branch.html @@ -105,7 +105,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "properties": { "element": { "#": "branchList" }, "contentController": {"@": "arrayController" }, - "selectionEnabled": true + "isSelectionEnabled": true } }, diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.js b/js/components/treeview/ninja-branch.reel/ninja-branch.js index 0d1a1d0e..48271c2d 100644 --- a/js/components/treeview/ninja-branch.reel/ninja-branch.js +++ b/js/components/treeview/ninja-branch.reel/ninja-branch.js @@ -8,12 +8,41 @@ var Montage = require("montage").Montage, TreeNode = require("js/components/treeview/tree-node").TreeNode; var Branch = exports.Branch = Montage.create(TreeNode, { - hasTemplate:{ - value:true + label: { + value: null, + serializable: true + }, + + branchList: { + value: null, + serializable: true + }, + + arrayController: { + value: null, + serializable: true }, + repetition:{ - value: null + value: null, + serializable: true }, + + leafComponent: { + value: null, + serializable: true + }, + + branchComponent: { + value: null, + serializable: true + }, + + collapser: { + value: null, + serializable: true + }, + prepareForDraw : { value: function() { this.collapser.removeAttribute('id'); diff --git a/js/components/treeview/treeview.reel/treeview.html b/js/components/treeview/treeview.reel/treeview.html index 1bed0f0b..9ab575c6 100644 --- a/js/components/treeview/treeview.reel/treeview.html +++ b/js/components/treeview/treeview.reel/treeview.html @@ -27,7 +27,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "prototype" : "js/components/treeview/leaf.reel" }, "scrollview": { - "prototype": "montage/ui/scrollview.reel[Scrollview]", + "prototype": "montage/ui/scroller.reel", "properties": { "element": {"#": "treeView"}, "axis": "vertical" diff --git a/js/components/treeview/treeview.reel/treeview.js b/js/components/treeview/treeview.reel/treeview.js index 9f78d36d..03e28c93 100644 --- a/js/components/treeview/treeview.reel/treeview.js +++ b/js/components/treeview/treeview.reel/treeview.js @@ -13,6 +13,11 @@ exports.Treeview = Montage.create(Component, { data : { value : null }, rootBranch : { value : null }, + activationEvent: { + value: null, + serializable: true + }, + _hasBeenDeserialized: { value: false, enumerable: false @@ -27,6 +32,26 @@ exports.Treeview = Montage.create(Component, { serializable: true }, + defaultBranchComponent: { + value: null, + serializable: true + }, + + defaultLeafComponent: { + value: null, + serializable: true + }, + + scrollview: { + value: null, + serializable: true + }, + + slot: { + value: null, + serializable: true + }, + hasTemplate: { value: true }, @@ -52,17 +77,18 @@ exports.Treeview = Montage.create(Component, { rootBranch.hideLabel = !this.showRoot; rootBranch.treeView = this; - this.slot.content = rootBranch; - rootBranch.sourceObject = this.contentController.root; - rootBranch.needsDraw = true; - this.rootBranch = rootBranch; - - this.needsDraw = true; +// this.slot.content = rootBranch; +// rootBranch.sourceObject = this.contentController.root; +// rootBranch.needsDraw = true; +// this.rootBranch = rootBranch; +// +// this.needsDraw = true; } }, showRoot : { - value: null + value: null, + serializable: true }, _contentController: { @@ -109,7 +135,8 @@ exports.Treeview = Montage.create(Component, { } } - } + }, + serializable: true }, deserializedFromTemplate: { -- cgit v1.2.3 From dc503d002be8fe5f12fd3cc6f848b3190c219659 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 11 Jun 2012 23:22:20 -0700 Subject: removing serializable to the tree and adding a few more missing properties Signed-off-by: Valerio Virgillito --- .../treeview/ninja-branch.reel/ninja-branch.js | 28 ++++++------ js/components/treeview/treeview.reel/treeview.js | 52 +++++++++++----------- 2 files changed, 40 insertions(+), 40 deletions(-) (limited to 'js/components/treeview') 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: { - value: null, - serializable: true + value: null +// serializable: true }, repetition:{ - value: null, - serializable: true + value: null +// serializable: true }, leafComponent: { - value: null, - serializable: true + value: null +// serializable: true }, branchComponent: { - value: null, - serializable: true + value: null +// serializable: true }, collapser: { - value: null, - serializable: true + value: null +// serializable: true }, prepareForDraw : { diff --git a/js/components/treeview/treeview.reel/treeview.js b/js/components/treeview/treeview.reel/treeview.js index 03e28c93..81dacbca 100644 --- a/js/components/treeview/treeview.reel/treeview.js +++ b/js/components/treeview/treeview.reel/treeview.js @@ -14,42 +14,42 @@ exports.Treeview = Montage.create(Component, { rootBranch : { value : null }, activationEvent: { - value: null, - serializable: true + value: null +// serializable: true }, _hasBeenDeserialized: { - value: false, - enumerable: false + value: false +// enumerable: false }, branchComponent : { - value: null, - serializable: true + value: null +// serializable: true }, leafComponent : { - value: null, - serializable: true + value: null +// serializable: true }, defaultBranchComponent: { - value: null, - serializable: true + value: null +// serializable: true }, defaultLeafComponent: { - value: null, - serializable: true + value: null +// serializable: true }, scrollview: { - value: null, - serializable: true + value: null +// serializable: true }, slot: { - value: null, - serializable: true + value: null +// serializable: true }, hasTemplate: { @@ -77,18 +77,18 @@ exports.Treeview = Montage.create(Component, { rootBranch.hideLabel = !this.showRoot; rootBranch.treeView = this; -// this.slot.content = rootBranch; -// rootBranch.sourceObject = this.contentController.root; -// rootBranch.needsDraw = true; -// this.rootBranch = rootBranch; -// -// this.needsDraw = true; + this.slot.content = rootBranch; + rootBranch.sourceObject = this.contentController.root; + rootBranch.needsDraw = true; + this.rootBranch = rootBranch; + + this.needsDraw = true; } }, showRoot : { - value: null, - serializable: true + value: null +// serializable: true }, _contentController: { @@ -135,8 +135,8 @@ exports.Treeview = Montage.create(Component, { } } - }, - serializable: true + } +// serializable: true }, deserializedFromTemplate: { -- cgit v1.2.3 From 87ddd35160b5fb0bf6f1ad0dd6a243b19939c72c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 11 Jun 2012 23:36:37 -0700 Subject: adding more missing properties Signed-off-by: Valerio Virgillito --- js/components/treeview/ninja-leaf.reel/ninja-leaf.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/components/treeview') diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.js b/js/components/treeview/ninja-leaf.reel/ninja-leaf.js index 1bfe66a4..652d3bc0 100644 --- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.js +++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.js @@ -8,9 +8,12 @@ var Montage = require("montage/core/core").Montage, TreeNode = require("js/components/treeview/tree-node").TreeNode; exports.Leaf = Montage.create(TreeNode, { - hasTemplate: { - value: true + + label: { + value: null, + serializable: true }, + templateDidLoad : { value: function() { var event = this.treeView.activationEvent; -- cgit v1.2.3