From 7fa0c53c14e9029d2e3960cc81edf91592fd1768 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 25 Jul 2012 12:26:20 -0700 Subject: added save for code view, fixed code view editor bug, reuse code editor options component in document bar Signed-off-by: Ananya Sen Conflicts: js/document/views/design-code.js Signed-off-by: Ananya Sen --- js/components/layout/document-bar.reel/document-bar.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html index 3e3ac936..fb505a7c 100755 --- a/js/components/layout/document-bar.reel/document-bar.html +++ b/js/components/layout/document-bar.reel/document-bar.html @@ -77,6 +77,13 @@ POSSIBILITY OF SUCH DAMAGE. "label": "Preview" } }, + + "codeEditorControls":{ + "prototype": "js/code-editor/ui/code-editor-view-options.reel", + "properties": { + "element": {"#": "codeViewOptions"} + } + }, "owner": { "prototype": "js/components/layout/document-bar.reel", @@ -85,7 +92,8 @@ POSSIBILITY OF SUCH DAMAGE. "zoomControl": {"@": "hottext1"}, "btnDesign": {"#": "buttonDesign"}, "btnCode": {"#": "buttonCode"}, - "btnPreview": {"#": "buttonPreview"} + "btnPreview": {"#": "buttonPreview"}, + "codeEditorControls": {"@": "codeEditorControls"} } } } @@ -129,7 +137,11 @@ POSSIBILITY OF SUCH DAMAGE. -
+
+ +
+ +
-- cgit v1.2.3 From fa2e82cf10aaa4900a462410cbb99b5b0433a1b1 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 25 Jul 2012 12:28:58 -0700 Subject: fixing code editor double vertical scrollbar bug Signed-off-by: Ananya Sen Conflicts: js/document/views/design-code.js Signed-off-by: Ananya Sen --- js/components/layout/document-bar.reel/document-bar.html | 9 +-------- js/components/layout/document-bar.reel/document-bar.js | 6 ++++++ 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html index fb505a7c..f073b0e7 100755 --- a/js/components/layout/document-bar.reel/document-bar.html +++ b/js/components/layout/document-bar.reel/document-bar.html @@ -78,12 +78,6 @@ POSSIBILITY OF SUCH DAMAGE. } }, - "codeEditorControls":{ - "prototype": "js/code-editor/ui/code-editor-view-options.reel", - "properties": { - "element": {"#": "codeViewOptions"} - } - }, "owner": { "prototype": "js/components/layout/document-bar.reel", @@ -92,8 +86,7 @@ POSSIBILITY OF SUCH DAMAGE. "zoomControl": {"@": "hottext1"}, "btnDesign": {"#": "buttonDesign"}, "btnCode": {"#": "buttonCode"}, - "btnPreview": {"#": "buttonPreview"}, - "codeEditorControls": {"@": "codeEditorControls"} + "btnPreview": {"#": "buttonPreview"} } } } diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js index bf84c652..c1d77668 100755 --- a/js/components/layout/document-bar.reel/document-bar.js +++ b/js/components/layout/document-bar.reel/document-bar.js @@ -217,6 +217,9 @@ exports.DocumentBar = Montage.create(Component, { value: function () { // this.showView('design', this.renderDesignView, this.btnDesign, this.btnCode); + + //todo - temp + this.application.ninja.documentBar.codeEditorControls.visible = false; } }, //////////////////////////////////////////////////////////////////// @@ -225,6 +228,9 @@ exports.DocumentBar = Montage.create(Component, { value: function () { // this.showView('code', this.renderCodeView, this.btnCode, this.btnDesign); + + //todo - temp + this.application.ninja.documentBar.codeEditorControls.visible = true; } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From e7509af2b2fad6ab23ea07e6e46e88a4ee0d03f1 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 25 Jul 2012 12:29:16 -0700 Subject: adding null check for currentDocument to prevent error Signed-off-by: Ananya Sen --- js/components/layout/document-bar.reel/document-bar.js | 6 ------ 1 file changed, 6 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js index c1d77668..bf84c652 100755 --- a/js/components/layout/document-bar.reel/document-bar.js +++ b/js/components/layout/document-bar.reel/document-bar.js @@ -217,9 +217,6 @@ exports.DocumentBar = Montage.create(Component, { value: function () { // this.showView('design', this.renderDesignView, this.btnDesign, this.btnCode); - - //todo - temp - this.application.ninja.documentBar.codeEditorControls.visible = false; } }, //////////////////////////////////////////////////////////////////// @@ -228,9 +225,6 @@ exports.DocumentBar = Montage.create(Component, { value: function () { // this.showView('code', this.renderCodeView, this.btnCode, this.btnDesign); - - //todo - temp - this.application.ninja.documentBar.codeEditorControls.visible = true; } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3