From d799a03a52fbf4eaad4e469fabbf84c9bf2cb41d Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 18 Jul 2012 12:26:08 -0700 Subject: parameterize the parentContainer for text document Signed-off-by: Ananya Sen --- js/controllers/document-controller.js | 2 +- js/document/document-text.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 5020e27d..ee7ca82c 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js @@ -356,7 +356,7 @@ exports.DocumentController = Montage.create(Component, { break; default: //Open in code view - Montage.create(TextDocument).init(file, this.application.ninja, this.application.ninja.openDocument, 'code'); + Montage.create(TextDocument).init(file, this.application.ninja, this.application.ninja.openDocument, 'code', document.getElementById("codeViewContainer")); break; } } diff --git a/js/document/document-text.js b/js/document/document-text.js index 1fe43494..d06bdefb 100755 --- a/js/document/document-text.js +++ b/js/document/document-text.js @@ -51,13 +51,13 @@ exports.TextDocument = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // init:{ - value: function(file, context, callback, view){ + value: function(file, context, callback, view, parentContainer){ // var codeDocumentView = CodeDocumentView.create(), container = null; //TODO: Why is this initilzied to null? //Creating instance of Text Document Model this.model = Montage.create(TextDocumentModel,{ file: {value: file}, - parentContainer: {value: document.getElementById("codeViewContainer")}, //TODO: Remove reference to this element, should be dynamic + parentContainer: {value: parentContainer}, //TODO: Remove reference to this element, should be dynamic views: {value: {'code': codeDocumentView, 'design': null}} //TODO: Add check if file might have design view, if so, then create it }); //TODO: Add design view logic -- cgit v1.2.3