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/document/models/text.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/document/models') diff --git a/js/document/models/text.js b/js/document/models/text.js index d1252b7d..0135b9ba 100755 --- a/js/document/models/text.js +++ b/js/document/models/text.js @@ -22,7 +22,7 @@ exports.TextDocumentModel = Montage.create(BaseDocumentModel, { save: { enumerable: false, value: function (callback) { - this.application.ninja.documentController.activeDocument.model.views.code.editor.save();//save to textarea + this.application.ninja.currentDocument.model.views.code.editor.save();//save to textarea var self = this; -- cgit v1.2.3 From e1fe603a7c002073f8ac13623f8cc8dc43efb59d Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 31 May 2012 10:27:46 -0700 Subject: fixing selection when switching documents Signed-off-by: Valerio Virgillito --- js/document/models/base.js | 5 +++++ js/document/models/html.js | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'js/document/models') diff --git a/js/document/models/base.js b/js/document/models/base.js index 6d9d2e89..886a4ef0 100755 --- a/js/document/models/base.js +++ b/js/document/models/base.js @@ -62,6 +62,11 @@ exports.BaseDocumentModel = Montage.create(Component, { }, //////////////////////////////////////////////////////////////////// // + selection: { + value: [] + }, + //////////////////////////////////////////////////////////////////// + // fileTemplate: { value: null }, diff --git a/js/document/models/html.js b/js/document/models/html.js index fd42d4de..9f5599a2 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js @@ -19,11 +19,6 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { }, //////////////////////////////////////////////////////////////////// // - selection: { - value: [] - }, - //////////////////////////////////////////////////////////////////// - // selectionContainer: { value: [] }, -- cgit v1.2.3 From 6079ceedb5b340c78ecd02f27dfa734eedccf512 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 1 Jun 2012 00:39:14 -0700 Subject: making the document bar handle the current document to hide/show itself Signed-off-by: Valerio Virgillito --- js/document/models/text.js | 1 - 1 file changed, 1 deletion(-) (limited to 'js/document/models') diff --git a/js/document/models/text.js b/js/document/models/text.js index 0135b9ba..6cb61d48 100755 --- a/js/document/models/text.js +++ b/js/document/models/text.js @@ -60,7 +60,6 @@ exports.TextDocumentModel = Montage.create(BaseDocumentModel, { } // this.parentContainer.removeChild(this.views.code.textViewContainer); - this.application.ninja.stage.showCodeViewBar(false); this.application.ninja.stage.restoreAllPanels(); this.views.code = null; -- cgit v1.2.3 From 75fc82ce49d6f1eb05dc950b46292d42b5856005 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 1 Jun 2012 16:19:04 -0700 Subject: fixing some selection container changes and the breadcrumb not drawing initially Signed-off-by: Valerio Virgillito --- js/document/models/base.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'js/document/models') diff --git a/js/document/models/base.js b/js/document/models/base.js index 886a4ef0..76a5e62b 100755 --- a/js/document/models/base.js +++ b/js/document/models/base.js @@ -62,9 +62,18 @@ exports.BaseDocumentModel = Montage.create(Component, { }, //////////////////////////////////////////////////////////////////// // - selection: { + _selection: { value: [] }, + + selection: { + get: function() { + return this._selection; + }, + set: function(value) { + this._selection = value; + } + }, //////////////////////////////////////////////////////////////////// // fileTemplate: { -- cgit v1.2.3