From 4c3aac5eabd93052b1554a03d78235215bb49db4 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 29 May 2012 00:34:40 -0700 Subject: document bindings phase 1 - using array controller to bind the current document to all ninja components - removed open document event - removed references to the document controller Signed-off-by: Valerio Virgillito --- js/components/layout/documents-tab.reel/documents-tab.html | 13 +++++-------- js/components/layout/documents-tab.reel/documents-tab.js | 5 +++++ 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'js/components/layout/documents-tab.reel') diff --git a/js/components/layout/documents-tab.reel/documents-tab.html b/js/components/layout/documents-tab.reel/documents-tab.html index 304c8871..04b2bd7b 100755 --- a/js/components/layout/documents-tab.reel/documents-tab.html +++ b/js/components/layout/documents-tab.reel/documents-tab.html @@ -28,22 +28,19 @@ "bindings": { "document": {"<-": "@repetition1.objectAtCurrentIteration"}, "name": {"<-": "@repetition1.objectAtCurrentIteration.model.file.name"}, - "saveFlag": {"<-": "@repetition1.objectAtCurrentIteration.model.needsSave"}, - "active": {"<-": "@repetition1.objectAtCurrentIteration.model.isActive"} + "saveFlag": {"<-": "@repetition1.objectAtCurrentIteration.model.needsSave"} } }, "repetition1": { "prototype": "montage/ui/repetition.reel", "properties": { - "element": {"#": "openDocuments"} + "element": {"#": "openDocuments"}, + "isSelectionEnabled": true }, "bindings": { - "objects": { - "boundObject": {"@": "owner"}, - "boundObjectPropertyPath": "openDocuments", - "oneway": true - } + + "contentController": {"<-": "@owner.contentController"} } } diff --git a/js/components/layout/documents-tab.reel/documents-tab.js b/js/components/layout/documents-tab.reel/documents-tab.js index 982f6ecd..0be639db 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, { + /* openDocuments: { value: [] }, @@ -40,4 +41,8 @@ exports.DocumentsTab = Montage.create(Component, { } } + */ + contentController: { + value: null + } }); \ No newline at end of file -- cgit v1.2.3 From d04aa0b195826b3b3c70f68aa8aba1be9e30a648 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 31 May 2012 10:34:59 -0700 Subject: fixing the close and save Signed-off-by: Valerio Virgillito --- .../layout/documents-tab.reel/documents-tab.js | 34 ---------------------- 1 file changed, 34 deletions(-) (limited to 'js/components/layout/documents-tab.reel') diff --git a/js/components/layout/documents-tab.reel/documents-tab.js b/js/components/layout/documents-tab.reel/documents-tab.js index 0be639db..41c98b30 100755 --- a/js/components/layout/documents-tab.reel/documents-tab.js +++ b/js/components/layout/documents-tab.reel/documents-tab.js @@ -8,40 +8,6 @@ var Montage = require("montage/core/core").Montage; var Component = require("montage/ui/component").Component; exports.DocumentsTab = Montage.create(Component, { - - /* - openDocuments: { - value: [] - }, - - prepareForDraw: { - enumerable: false, - value: function() { -// console.log("Change this to be inside the Ninja Reel"); - this.openDocuments = this.application.ninja.documentController._documents; -// this.eventManager.addEventListener( "appLoaded", this, false); - } - }, - - handleAppLoaded: { - value: function() { -// this.openDocuments = this.application.ninja.currentDocument; - } - }, - - draw: { - enumerable: false, - value: function() { - - } - }, - - handleClick: { - value: function(event) { - - } - } - */ contentController: { value: null } -- cgit v1.2.3