From c51a1317a767dcd5dfded822815305d4330f4892 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Mon, 7 May 2012 15:43:24 -0700 Subject: removed incorrect id selector css for code view container since its breaking it. Signed-off-by: Ananya Sen --- css/ninja.css | 8 -------- js/stage/stage-view.reel/stage-view.css | 29 ++++++++++------------------- scss/imports/scss/_Stage.scss | 27 --------------------------- 3 files changed, 10 insertions(+), 54 deletions(-) diff --git a/css/ninja.css b/css/ninja.css index 6a804e99..cd7a35ab 100755 --- a/css/ninja.css +++ b/css/ninja.css @@ -204,14 +204,6 @@ body { position: absolute; margin: 0px; width: 100%; height: 100%; background-co .layoutCanvas { position: absolute; margin: 0px; border: none; padding: 0px; top: 0px; left: 0px; z-index: 4; } -#codeViewContainer { position: absolute; top: 0px; left: 0px; margin: 0px; padding: 0px; background: black; width: 100%; height: 100%; display: none; } - -#mainContent #codeMirror_1 { height: 100%; } - -#mainContent .CodeMirror { width: 100%; height: 100%; background: white; } - -#mainContent .CodeMirror-scroll { height: 100%; overflow: auto; } - .montage-editor-frame { position: absolute; z-index: 7; top: 0; left: 0; display: none; -webkit-user-select: initial; } .montage-editor { padding: 0px; word-wrap: normal; } diff --git a/js/stage/stage-view.reel/stage-view.css b/js/stage/stage-view.reel/stage-view.css index e2c4bb0e..8afb52a2 100755 --- a/js/stage/stage-view.reel/stage-view.css +++ b/js/stage/stage-view.reel/stage-view.css @@ -17,29 +17,20 @@ cursor:text; } -.codeViewContainer>div{ - width:2500px;/*to prevent scrolling of editor container in the middle of the page for short files*/ +.codeViewContainer .CodeMirror { + width: 100%; + height: 100%; + background: white; } -/* OLD CSS for reference -#mainContent #codeMirror_1 { - height:100%; +.codeViewContainer .CodeMirror-scroll { + height: 100%; + overflow: auto; } -*/ - -/*.CodeMirror {*/ - /*width: 100%;*/ - /*height: 100%;*/ - /*background: white;*/ -/*}*/ - -/*.CodeMirror .CodeMirror-scroll {*/ - /*height: 100%;*/ - /*overflow: scroll;*/ - /*overflow-x: auto;*/ - /*overflow-y: auto;*/ -/*}*/ +.codeViewContainer>div{ + width:2500px;/*to prevent scrolling of editor container in the middle of the page for short files*/ +} span.CodeMirror-matchhighlight { background: #e9e9e9 } .CodeMirror-focused span.CodeMirror-matchhighlight { background: #e7e4ff; !important } diff --git a/scss/imports/scss/_Stage.scss b/scss/imports/scss/_Stage.scss index 4644e3ba..ed8d0656 100644 --- a/scss/imports/scss/_Stage.scss +++ b/scss/imports/scss/_Stage.scss @@ -164,33 +164,6 @@ z-index: 4; } -#codeViewContainer { - position: absolute; - top: 0px; - left: 0px; - margin: 0px; - padding: 0px; - background: $color-app-bg; - width:100%; - height:100%; - display:none; -} - -#mainContent #codeMirror_1 { - height:100%; -} - -#mainContent .CodeMirror { - width: 100%; - height: 100%; - background: white; -} - -#mainContent .CodeMirror-scroll { - height: 100%; - overflow: auto; -} - .montage-editor-frame { position:absolute; z-index:7; -- cgit v1.2.3 From a00be41613cb952470cc952aa63f67e61745379a Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Mon, 7 May 2012 17:19:19 -0700 Subject: fixed javascript errors Signed-off-by: Ananya Sen --- js/controllers/document-controller.js | 4 ---- js/controllers/styles-controller.js | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 6d11bd0e..c6bf4c6b 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js @@ -427,10 +427,6 @@ var DocumentController = exports.DocumentController = Montage.create(Component, closeDocument: { value: function(id) { - if(this.activeDocument.needsSave === true){ - //if file dirty then alert user to save - } - var doc = this._findDocumentByUUID(id); var closeDocumentIndex = this._findIndexByUUID(id); diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index ec4314f9..647c0870 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js @@ -1102,7 +1102,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { ///// The dominant rule might not have the style property defined - why? ///// If no rules have the property defined, we can use the ///// most-specific single-target rule as the dominant rule (for setting styles) - return element.ownerDocument.defaultView.getComputedStyle(element).getPropertyValue(property); + return (element.ownerDocument.defaultView ? element.ownerDocument.defaultView.getComputedStyle(element).getPropertyValue(property) : null); } return value; -- cgit v1.2.3 From 157632ce32b4e71e1f08278cf712ff4f2c835226 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 8 May 2012 10:23:51 -0700 Subject: IKNINJA-1603 Uncaught TypeError: Cannot read property 'documentRoot' of null js/components/layout/bread-crumb.reel/bread-crumb.js:26 Signed-off-by: Ananya Sen --- js/components/layout/bread-crumb.reel/bread-crumb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index e396bdbf..c1b021a3 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -23,7 +23,7 @@ exports.Breadcrumb = Montage.create(Component, { value: function(){ if(!this.application.ninja.documentController.activeDocument) { this.disabled = true; - this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; + this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.documentRoot : null); } } }, -- cgit v1.2.3