From db4f235dc9fd6f2242dee481d2f377005cf23596 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 24 Jul 2012 16:56:52 -0700 Subject: adding a viewIdentifier to the model to enable design/code switch Todo: - Cleanup and remove listeners - Finish stage reload - Add remaining bindings. Signed-off-by: Valerio Virgillito --- js/document/views/code.js | 4 ++-- js/document/views/design-code.js | 27 ++------------------------- js/document/views/design.js | 4 ++-- 3 files changed, 6 insertions(+), 29 deletions(-) (limited to 'js/document/views') diff --git a/js/document/views/code.js b/js/document/views/code.js index 05f671b2..0ca87fa9 100755 --- a/js/document/views/code.js +++ b/js/document/views/code.js @@ -39,8 +39,8 @@ var Montage = require("montage/core/core").Montage, exports.CodeDocumentView = Montage.create(BaseDocumentView, { //////////////////////////////////////////////////////////////////// // - hasTemplate: { - value: false + identifier: { + value: "code" }, //////////////////////////////////////////////////////////////////// // diff --git a/js/document/views/design-code.js b/js/document/views/design-code.js index 25073833..44d12549 100644 --- a/js/document/views/design-code.js +++ b/js/document/views/design-code.js @@ -40,8 +40,8 @@ var Montage = require("montage/core/core").Montage, exports.DesignCodeView = Montage.create(CodeDocumentView, { //////////////////////////////////////////////////////////////////// // - hasTemplate: { - value: false + identifier: { + value: "design-code" }, //////////////////////////////////////////////////////////////////// // @@ -75,22 +75,6 @@ exports.DesignCodeView = Montage.create(CodeDocumentView, { this.textViewContainer.style.background = "white"; this.textViewContainer.style.height = "100%"; - - ///todo-remove after the switch view logic is added in all the components - this.application.ninja.stage.collapseAllPanels(); - this.application.ninja.stage.hideCanvas(true); - this.application.ninja.stage.hideRulers(); - - document.getElementsByClassName("bindingView")[0].style.display = "none"; - - //bindingView div needs to be display noned - //timeline error on switching back to design view - - ///-end todo-remove - - - - //todo : update options bar // @@ -106,13 +90,6 @@ exports.DesignCodeView = Montage.create(CodeDocumentView, { } this.textViewContainer.style.display = "none"; - ///todo-remove after the switch view logic is added in all the components - this.application.ninja.stage.restoreAllPanels(false); - this.application.ninja.stage.hideCanvas(false); - this.application.ninja.stage.showRulers(); - ///-end todo-remove - - //todo : update options bar // diff --git a/js/document/views/design.js b/js/document/views/design.js index 548e45e9..97558408 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js @@ -39,8 +39,8 @@ var Montage = require("montage/core/core").Montage, exports.DesignDocumentView = Montage.create(BaseDocumentView, { //////////////////////////////////////////////////////////////////// // - hasTemplate: { - value: false + identifier: { + value: "design" }, //////////////////////////////////////////////////////////////////// // -- cgit v1.2.3