aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-16 22:48:39 -0700
committerValerio Virgillito2012-05-16 22:49:50 -0700
commitc26de5fa7b909a53b103b72027b5cbe7c3e1c49f (patch)
treed87f20b71cce36a8e23ee3b77f0a496d113b679a /js/stage
parentb1e5ef1949eeddc39a1e9570a65612879cbdadef (diff)
downloadninja-c26de5fa7b909a53b103b72027b5cbe7c3e1c49f.tar.gz
code cleanup and refactoring of the document controller and stage view
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js33
1 files changed, 1 insertions, 32 deletions
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js
index 518c3bdd..7680103d 100755
--- a/js/stage/stage-view.reel/stage-view.js
+++ b/js/stage/stage-view.reel/stage-view.js
@@ -25,32 +25,12 @@ exports.StageView = Montage.create(Component, {
25 } 25 }
26 }, 26 },
27 27
28 templateDidLoad: {
29 value: function() {
30 this.eventManager.addEventListener("appLoaded", this, false);
31 }
32 },
33
34 didDraw:{ 28 didDraw:{
35 value: function() { 29 value: function() {
36 if(!this.application.ninja.documentController._textHolder) this.application.ninja.documentController._textHolder = this.element; 30 if(!this.application.ninja.documentController._textHolder) this.application.ninja.documentController._textHolder = this.element;
37 } 31 }
38 }, 32 },
39 33
40 handleAppLoaded: {
41 value: function() {
42
43 // Don't bind for now
44 /*
45 Object.defineBinding(this, "docs", {
46 boundObject: this.application.ninja.documentController,
47 boundObjectPropertyPath: "_documents"
48 });
49 */
50
51 }
52 },
53
54 /** 34 /**
55 * Public method 35 * Public method
56 * Creates a textarea element which will contain the content of the opened text document. 36 * Creates a textarea element which will contain the content of the opened text document.
@@ -172,17 +152,6 @@ exports.StageView = Montage.create(Component, {
172 } 152 }
173 }, 153 },
174 154
175 hideOtherDocuments:{
176 value:function(docUuid){
177 this.application.ninja.documentController._documents.forEach(function(aDoc){
178 if(aDoc.currentView === "design"){
179 aDoc.container.parentNode.style["display"] = "none";
180 }else if((aDoc.currentView === "code") && (aDoc.uuid !== docUuid)){
181 aDoc.container.style["display"] = "none";
182 }
183 }, this);
184 }
185 },
186 showRulers:{ 155 showRulers:{
187 value:function(){ 156 value:function(){
188 this.application.ninja.rulerTop.style.display = "block"; 157 this.application.ninja.rulerTop.style.display = "block";
@@ -200,7 +169,7 @@ exports.StageView = Montage.create(Component, {
200 if(isCodeView === true) { 169 if(isCodeView === true) {
201 this.application.ninja.editorViewOptions.element.style.display = "block"; 170 this.application.ninja.editorViewOptions.element.style.display = "block";
202 this.application.ninja.documentBar.element.style.display = "none"; 171 this.application.ninja.documentBar.element.style.display = "none";
203 }else{ 172 } else {
204 this.application.ninja.documentBar.element.style.display = "block"; 173 this.application.ninja.documentBar.element.style.display = "block";
205 this.application.ninja.editorViewOptions.element.style.display = "none"; 174 this.application.ninja.editorViewOptions.element.style.display = "none";
206 } 175 }