From c26de5fa7b909a53b103b72027b5cbe7c3e1c49f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 22:48:39 -0700 Subject: code cleanup and refactoring of the document controller and stage view Signed-off-by: Valerio Virgillito --- js/stage/stage-view.reel/stage-view.js | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'js/stage') 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, { } }, - templateDidLoad: { - value: function() { - this.eventManager.addEventListener("appLoaded", this, false); - } - }, - didDraw:{ value: function() { if(!this.application.ninja.documentController._textHolder) this.application.ninja.documentController._textHolder = this.element; } }, - handleAppLoaded: { - value: function() { - - // Don't bind for now - /* - Object.defineBinding(this, "docs", { - boundObject: this.application.ninja.documentController, - boundObjectPropertyPath: "_documents" - }); - */ - - } - }, - /** * Public method * Creates a textarea element which will contain the content of the opened text document. @@ -172,17 +152,6 @@ exports.StageView = Montage.create(Component, { } }, - hideOtherDocuments:{ - value:function(docUuid){ - this.application.ninja.documentController._documents.forEach(function(aDoc){ - if(aDoc.currentView === "design"){ - aDoc.container.parentNode.style["display"] = "none"; - }else if((aDoc.currentView === "code") && (aDoc.uuid !== docUuid)){ - aDoc.container.style["display"] = "none"; - } - }, this); - } - }, showRulers:{ value:function(){ this.application.ninja.rulerTop.style.display = "block"; @@ -200,7 +169,7 @@ exports.StageView = Montage.create(Component, { if(isCodeView === true) { this.application.ninja.editorViewOptions.element.style.display = "block"; this.application.ninja.documentBar.element.style.display = "none"; - }else{ + } else { this.application.ninja.documentBar.element.style.display = "block"; this.application.ninja.editorViewOptions.element.style.display = "none"; } -- cgit v1.2.3