From c3c2ffc8d057660b7c42b45442885cd0d2d598bc Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Sun, 20 May 2012 15:16:06 -0700 Subject: use documents parent container property Signed-off-by: Ananya Sen --- js/document/views/code.js | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'js/document/views/code.js') diff --git a/js/document/views/code.js b/js/document/views/code.js index de12881c..711479a8 100755 --- a/js/document/views/code.js +++ b/js/document/views/code.js @@ -41,18 +41,6 @@ var CodeDocumentView = exports.CodeDocumentView = Montage.create(BaseDocumentVie get: function() {return this._textArea;}, set: function(value) {this._textArea= value;} }, - - //////////////////////////////////////////////////////////////////// - //remove _extParentContainer after moving to bucket structure for documents - _textParentContainer: { - value: null - }, - //////////////////////////////////////////////////////////////////// - // - textParentContainer: { - get: function() {return this._textParentContainer;}, - set: function(value) {this._textParentContainer= value;} - }, //////////////////////////////////////////////////////////////////// // _textViewContainer: { @@ -71,15 +59,12 @@ var CodeDocumentView = exports.CodeDocumentView = Montage.create(BaseDocumentVie * Public method */ initialize:{ - value: function(){ - //populate _textParentContainer - this.textParentContainer = document.getElementById("codeViewContainer"); - + value: function(parentContainer){ //create contianer this.textViewContainer = document.createElement("div"); //this.textViewContainer.id = "codemirror_" + uuid; this.textViewContainer.style.display = "block"; - this.textParentContainer.appendChild(this.textViewContainer); + parentContainer.appendChild(this.textViewContainer); //create text area this.textArea = this.createTextAreaElement(); @@ -200,7 +185,7 @@ var CodeDocumentView = exports.CodeDocumentView = Montage.create(BaseDocumentVie applyTheme:{ value:function(themeClass){ //Todo: change for bucket structure of documents - this.textParentContainer.className = "codeViewContainer "+themeClass; + this.textViewContainer.className = "codeViewContainer "+themeClass; } } -- cgit v1.2.3