aboutsummaryrefslogtreecommitdiff
path: root/js/document/views
diff options
context:
space:
mode:
authorAnanya Sen2012-05-20 15:16:06 -0700
committerAnanya Sen2012-05-20 15:16:06 -0700
commitc3c2ffc8d057660b7c42b45442885cd0d2d598bc (patch)
treea7696419538abda2a7534c33f7200c4e3c3eae5d /js/document/views
parent6f5ffa17c72dd0aef7a02e3496154514750143c2 (diff)
downloadninja-c3c2ffc8d057660b7c42b45442885cd0d2d598bc.tar.gz
use documents parent container property
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/document/views')
-rwxr-xr-xjs/document/views/code.js21
1 files changed, 3 insertions, 18 deletions
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
41 get: function() {return this._textArea;}, 41 get: function() {return this._textArea;},
42 set: function(value) {this._textArea= value;} 42 set: function(value) {this._textArea= value;}
43 }, 43 },
44
45 ////////////////////////////////////////////////////////////////////
46 //remove _extParentContainer after moving to bucket structure for documents
47 _textParentContainer: {
48 value: null
49 },
50 ////////////////////////////////////////////////////////////////////
51 //
52 textParentContainer: {
53 get: function() {return this._textParentContainer;},
54 set: function(value) {this._textParentContainer= value;}
55 },
56 //////////////////////////////////////////////////////////////////// 44 ////////////////////////////////////////////////////////////////////
57 // 45 //
58 _textViewContainer: { 46 _textViewContainer: {
@@ -71,15 +59,12 @@ var CodeDocumentView = exports.CodeDocumentView = Montage.create(BaseDocumentVie
71 * Public method 59 * Public method
72 */ 60 */
73 initialize:{ 61 initialize:{
74 value: function(){ 62 value: function(parentContainer){
75 //populate _textParentContainer
76 this.textParentContainer = document.getElementById("codeViewContainer");
77
78 //create contianer 63 //create contianer
79 this.textViewContainer = document.createElement("div"); 64 this.textViewContainer = document.createElement("div");
80 //this.textViewContainer.id = "codemirror_" + uuid; 65 //this.textViewContainer.id = "codemirror_" + uuid;
81 this.textViewContainer.style.display = "block"; 66 this.textViewContainer.style.display = "block";
82 this.textParentContainer.appendChild(this.textViewContainer); 67 parentContainer.appendChild(this.textViewContainer);
83 68
84 //create text area 69 //create text area
85 this.textArea = this.createTextAreaElement(); 70 this.textArea = this.createTextAreaElement();
@@ -200,7 +185,7 @@ var CodeDocumentView = exports.CodeDocumentView = Montage.create(BaseDocumentVie
200 applyTheme:{ 185 applyTheme:{
201 value:function(themeClass){ 186 value:function(themeClass){
202 //Todo: change for bucket structure of documents 187 //Todo: change for bucket structure of documents
203 this.textParentContainer.className = "codeViewContainer "+themeClass; 188 this.textViewContainer.className = "codeViewContainer "+themeClass;
204 } 189 }
205 } 190 }
206 191