aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-06-01 06:53:58 -0700
committerNivesh Rajbhandari2012-06-01 06:53:58 -0700
commit69ca67093bb53188dca5437e0bfbfb7f676ada85 (patch)
treecc2b387c796b0f34f1ab00a7c542c335d52005e9 /js/stage
parentb7f048624c07a1186cca080bf4c9a87af7d53f35 (diff)
parent7fcb10270f9e19415f8452c261c2d0c86916a29a (diff)
downloadninja-69ca67093bb53188dca5437e0bfbfb7f676ada85.tar.gz
Merge branch 'refs/heads/valerio-document-bindings-fix' into document-bindings-fix
Conflicts: js/stage/stage.reel/stage.js Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.css50
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.html30
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js62
-rwxr-xr-xjs/stage/stage.reel/stage.css47
-rwxr-xr-xjs/stage/stage.reel/stage.html10
-rwxr-xr-xjs/stage/stage.reel/stage.js64
6 files changed, 73 insertions, 190 deletions
diff --git a/js/stage/stage-view.reel/stage-view.css b/js/stage/stage-view.reel/stage-view.css
deleted file mode 100755
index 8afb52a2..00000000
--- a/js/stage/stage-view.reel/stage-view.css
+++ /dev/null
@@ -1,50 +0,0 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7.codeViewContainer {
8 position: absolute;
9 top: 0px;
10 left: 0px;
11 margin: 0px;
12 padding: 0px;
13 background-color: #ffffff;
14 width: 100%;
15 height: 100%;
16 overflow:auto;
17 cursor:text;
18}
19
20.codeViewContainer .CodeMirror {
21 width: 100%;
22 height: 100%;
23 background: white;
24}
25
26.codeViewContainer .CodeMirror-scroll {
27 height: 100%;
28 overflow: auto;
29}
30
31.codeViewContainer>div{
32 width:2500px;/*to prevent scrolling of editor container in the middle of the page for short files*/
33}
34
35span.CodeMirror-matchhighlight { background: #e9e9e9 }
36.CodeMirror-focused span.CodeMirror-matchhighlight { background: #e7e4ff; !important }
37div.CodeMirror span.CodeMirror-matchingbracket {color: #000 !important;background-color: #ffd500;}
38.CodeMirror-completions select {background-color:#e8f2ff;border:1px solid #c1c1c1;box-shadow: 8px 8px 8px rgba(0, 0, 0, 0.8);}
39.CodeMirror-completions {z-index:6001 !important;}
40
41.cm-s-default .activeline {background: #e8f2ff; !important}
42.cm-s-eclipse .activeline {background: #e8f2ff; !important}
43.cm-s-elegant .activeline {background: #e8f2ff; !important}
44.cm-s-neat .activeline {background: #e8f2ff; !important}
45.cm-s-night .activeline {background: #8da6ce; !important}
46.cm-s-cobalt .activeline {background: #8da6ce; !important}
47.cm-s-monokai .activeline {background: #8da6ce; !important}
48.cm-s-rubyblue .activeline {background: #3E7087; !important}
49.cm-s-lesser-dark .activeline {background: #8da6ce; !important}
50.cm-s-xq-dark .activeline {background: #8da6ce; !important} \ No newline at end of file
diff --git a/js/stage/stage-view.reel/stage-view.html b/js/stage/stage-view.reel/stage-view.html
deleted file mode 100755
index 3680e8b5..00000000
--- a/js/stage/stage-view.reel/stage-view.html
+++ /dev/null
@@ -1,30 +0,0 @@
1<!DOCTYPE html>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html>
8<head>
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10 <link rel="stylesheet" type="text/css" href="stage-view.css">
11
12 <script type="text/montage-serialization">
13 {
14 "owner": {
15 "prototype": "js/stage/stage-view.reel",
16 "properties": {
17 "element": {"#": "codeViewContainer"}
18 }
19 }
20 }
21 </script>
22
23</head>
24<body>
25
26
27 <section id="codeViewContainer" class="codeViewContainer"></section>
28
29</body>
30</html>
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js
deleted file mode 100755
index 2c129ee2..00000000
--- a/js/stage/stage-view.reel/stage-view.js
+++ /dev/null
@@ -1,62 +0,0 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7/**
8@requires montage/core/core
9@requires montage/ui/component
10*/
11var Montage = require("montage/core/core").Montage,
12 Component = require("montage/ui/component").Component;
13
14exports.StageView = Montage.create(Component, {
15 _documents: {
16 value : []
17 },
18
19 docs: {
20 get: function() {
21 return this._documents;
22 },
23 set: function(value) {
24 //console.log(value);
25 }
26 },
27
28 didDraw:{
29 value: function() {
30 if(!this.application.ninja.documentController._textHolder) this.application.ninja.documentController._textHolder = this.element;
31 }
32 },
33
34 /**
35 * Public method
36 * Switches between documents. Document state data is saved and restored whereever applicable
37 */
38 switchDocument:{
39 value: function(doc){
40
41
42 //focus editor
43 if(!!this.application.ninja.documentController.activeDocument && !!this.application.ninja.documentController.activeDocument.editor){
44 this.application.ninja.documentController.activeDocument.editor.focus();
45
46 this.showCodeViewBar(true);
47 this.application.ninja.codeEditorController.applySettings();
48 this.collapseAllPanels();
49 }
50
51 if(this.application.ninja.documentController.activeDocument.currentView === "design") {
52 this.application.ninja.stage._scrollFlag = true; // TODO HACK to prevent type error on Hide/Show Iframe
53 this.application.ninja.stage.stageDeps.reinitializeForSwitchDocument();//reinitialize draw-util, snapmanager and view-util
54
55 this.showCodeViewBar(false);
56 this.restoreAllPanels();
57 }
58
59 NJevent("switchDocument");
60 }
61 }
62}); \ No newline at end of file
diff --git a/js/stage/stage.reel/stage.css b/js/stage/stage.reel/stage.css
index 54b9761b..13537ba1 100755
--- a/js/stage/stage.reel/stage.css
+++ b/js/stage/stage.reel/stage.css
@@ -10,4 +10,49 @@
10 box-flex: 1; 10 box-flex: 1;
11 position: relative; 11 position: relative;
12 overflow: hidden; 12 overflow: hidden;
13} \ No newline at end of file 13}
14
15.codeViewContainer {
16 position: absolute;
17 top: 0px;
18 left: 0px;
19 margin: 0px;
20 padding: 0px;
21 background-color: #ffffff;
22 width: 100%;
23 height: 100%;
24 overflow:auto;
25 cursor:text;
26}
27
28.codeViewContainer .CodeMirror {
29 width: 100%;
30 height: 100%;
31 background: white;
32}
33
34.codeViewContainer .CodeMirror-scroll {
35 height: 100%;
36 overflow: auto;
37}
38
39.codeViewContainer>div{
40 width:2500px;/*to prevent scrolling of editor container in the middle of the page for short files*/
41}
42
43span.CodeMirror-matchhighlight { background: #e9e9e9 }
44.CodeMirror-focused span.CodeMirror-matchhighlight { background: #e7e4ff; !important }
45div.CodeMirror span.CodeMirror-matchingbracket {color: #000 !important;background-color: #ffd500;}
46.CodeMirror-completions select {background-color:#e8f2ff;border:1px solid #c1c1c1;box-shadow: 8px 8px 8px rgba(0, 0, 0, 0.8);}
47.CodeMirror-completions {z-index:6001 !important;}
48
49.cm-s-default .activeline {background: #e8f2ff; !important}
50.cm-s-eclipse .activeline {background: #e8f2ff; !important}
51.cm-s-elegant .activeline {background: #e8f2ff; !important}
52.cm-s-neat .activeline {background: #e8f2ff; !important}
53.cm-s-night .activeline {background: #8da6ce; !important}
54.cm-s-cobalt .activeline {background: #8da6ce; !important}
55.cm-s-monokai .activeline {background: #8da6ce; !important}
56.cm-s-rubyblue .activeline {background: #3E7087; !important}
57.cm-s-lesser-dark .activeline {background: #8da6ce; !important}
58.cm-s-xq-dark .activeline {background: #8da6ce; !important} \ No newline at end of file
diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html
index 45667e06..7a9619cd 100755
--- a/js/stage/stage.reel/stage.html
+++ b/js/stage/stage.reel/stage.html
@@ -11,13 +11,6 @@
11 11
12 <script type="text/montage-serialization"> 12 <script type="text/montage-serialization">
13 { 13 {
14 "stageView" : {
15 "prototype": "js/stage/stage-view.reel",
16 "properties": {
17 "element": {"#": "stageView"}
18 }
19 },
20
21 "stageDeps": { 14 "stageDeps": {
22 "prototype": "js/stage/stage-deps", 15 "prototype": "js/stage/stage-deps",
23 "properties": { 16 "properties": {
@@ -59,7 +52,6 @@
59 "_drawingCanvas": {"#": "drawingCanvas"},