aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/descriptor.json34
-rwxr-xr-xcss/ninja.css2
-rw-r--r--js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css3
-rw-r--r--js/components/ui/icon-list-basic/icon.reel/icon.css16
-rwxr-xr-xjs/controllers/document-controller.js39
-rwxr-xr-xjs/document/controllers/base-controller.js32
-rwxr-xr-xjs/document/html-document.js (renamed from js/io/document/html-document.js)8
-rwxr-xr-xjs/document/mediators/base-mediator.js32
-rwxr-xr-xjs/document/models/base-model.js32
-rwxr-xr-xjs/document/text-document.js195
-rwxr-xr-xjs/document/views/base-view.js32
-rwxr-xr-xjs/io/document/base-document.js93
-rwxr-xr-xjs/io/document/text-document.js156
-rwxr-xr-xjs/io/system/coreioapi.js4
-rw-r--r--js/io/system/ninjalibrary.json5
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.css57
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.html4
-rw-r--r--js/mediators/io-mediator.js35
-rwxr-xr-xscss/imports/scss/_MainWindow.scss6
19 files changed, 464 insertions, 321 deletions
diff --git a/assets/descriptor.json b/assets/descriptor.json
new file mode 100644
index 00000000..53bfb684
--- /dev/null
+++ b/assets/descriptor.json
@@ -0,0 +1,34 @@
1{
2 "copyright": "This file contains proprietary software owned by Motorola Mobility, Inc. No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder. (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.",
3 "version": "0.0.0.0",
4 "root": "/assets/",
5 "directories": [{"name": "images"}, {"name": "shaders"}],
6 "files": [
7 "images/black.png",
8 "images/blue.png",
9 "images/BoxB2_AO.png",
10 "images/BoxB2_DM.png",
11 "images/cubelight.png",
12 "images/grey.png",
13 "images/material_paint.png",
14 "images/metal.png",
15 "images/normalMap.png",
16 "images/random_normal.png",
17 "images/rocky-diffuse.jpg",
18 "images/rocky-normal.jpg",
19 "images/rocky-spec.jpg",
20 "images/silver.png",
21 "images/white.png",
22 "shaders/Basic.frag.glsl",
23 "shaders/Basic.vert.glsl",
24 "shaders/linearGradient.frag.glsl",
25 "shaders/linearGradient.vert.glsl",
26 "shaders/radialGradient.frag.glsl",
27 "shaders/radialGradient.vert.glsl",
28 "shaders/test_fshader.glsl",
29 "shaders/test_fshader_full.glsl",
30 "shaders/test_vshader.glsl",
31 "shaders/ub_fshader.glsl",
32 "shaders/ub_vshader.glsl"
33 ]
34} \ No newline at end of file
diff --git a/css/ninja.css b/css/ninja.css
index d22cfc22..0be30434 100755
--- a/css/ninja.css
+++ b/css/ninja.css
@@ -174,6 +174,8 @@ body { position: absolute; margin: 0px; width: 100%; height: 100%; background-co
174 174
175#documentBar { height: 25px; width: 1000px; position: relative; overflow: hidden; color: white; } 175#documentBar { height: 25px; width: 1000px; position: relative; overflow: hidden; color: white; }
176 176
177.montage-popup-modal-mask { opacity: 1; background: -webkit-radial-gradient(center, ellipse cover, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.8) 80%); }
178
177#middleDocArea { -webkit-box-orient: horizontal; -moz-box-orient: horizontal; box-orient: horizontal; -moz-box-flex: 1; -webkit-box-flex: 1; box-flex: 1; margin: 1px; margin-bottom: 3px; border-style: solid; border-width: 1px; } 179#middleDocArea { -webkit-box-orient: horizontal; -moz-box-orient: horizontal; box-orient: horizontal; -moz-box-flex: 1; -webkit-box-flex: 1; box-flex: 1; margin: 1px; margin-bottom: 3px; border-style: solid; border-width: 1px; }
178 180
179#mainStageIFrame { border: none; margin: 4px; } 181#mainStageIFrame { border: none; margin: 4px; }
diff --git a/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css b/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css
index 9c85c6b5..796c283f 100644
--- a/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css
+++ b/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css
@@ -6,7 +6,7 @@
6 6
7.picker{ 7.picker{
8 font-size:12px; 8 font-size:12px;
9 width:510px; 9 width:523px;
10 height:500px; 10 height:500px;
11 padding-top:15px; 11 padding-top:15px;
12 padding-left:15px; 12 padding-left:15px;
@@ -53,6 +53,7 @@
53 height:75%; 53 height:75%;
54 width:auto; 54 width:auto;
55 border-right: none; 55 border-right: none;
56 margin: 8px 0px 0px 8px;
56} 57}
57 58
58.picker .right-bottom{ 59.picker .right-bottom{
diff --git a/js/components/ui/icon-list-basic/icon.reel/icon.css b/js/components/ui/icon-list-basic/icon.reel/icon.css
index 4d71f6b8..9fb180d2 100644
--- a/js/components/ui/icon-list-basic/icon.reel/icon.css
+++ b/js/components/ui/icon-list-basic/icon.reel/icon.css
@@ -5,14 +5,14 @@
5 </copyright> */ 5 </copyright> */
6 6
7.icon{ 7.icon{
8 width:90px; 8 width:88px;
9 height:80px; 9 height:78px;
10 display: inline; 10 display: inline;
11 float: left; 11 float: left;
12 -moz-border-radius: 8px; 12 -moz-border-radius: 8px;
13 border-radius: 8px; 13 border-radius: 8px;
14 margin-bottom: 5px; 14 margin-bottom: 8px;
15 margin-right: 5px; 15 margin-right: 8px;
16 background-color: #5f5f5f; 16 background-color: #5f5f5f;
17} 17}
18 18
@@ -29,17 +29,17 @@
29.icon .iconImg{ 29.icon .iconImg{
30 width:35px; 30 width:35px;
31 height:35px; 31 height:35px;
32 margin-left: 20px; 32 margin-left: 26px;
33 margin-top: 10px; 33 margin-top: 10px;
34} 34}
35 35
36.icon .iconLabel{ 36.icon .iconLabel{
37 margin-top:8px; 37 margin-top:8px;
38 white-space: nowrap; 38 white-space: nowrap;
39 text-overflow:ellipsis; 39 text-overflow: ellipsis;
40 line-height:15px; 40 line-height:15px;
41 overflow: hidden; 41 overflow: hidden;
42 max-width:80%; 42 width: 72px;
43 padding: 0px 8px;
43 text-align: center; 44 text-align: center;
44 padding-left: 2px;
45} \ No newline at end of file 45} \ No newline at end of file
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index 84b994ce..f397ace7 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -9,8 +9,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
9var Montage = require("montage/core/core").Montage, 9var Montage = require("montage/core/core").Montage,
10 Component = require("montage/ui/component").Component, 10 Component = require("montage/ui/component").Component,
11 Uuid = require("montage/core/uuid").Uuid, 11 Uuid = require("montage/core/uuid").Uuid,
12 HTMLDocument = require("js/io/document/html-document").HTMLDocument, 12 HTMLDocument = require("js/document/html-document").HTMLDocument,
13 TextDocument = require("js/io/document/text-document").TextDocument, 13 TextDocument = require("js/document/text-document").TextDocument,
14 DocumentController; 14 DocumentController;
15//////////////////////////////////////////////////////////////////////// 15////////////////////////////////////////////////////////////////////////
16// 16//
@@ -28,13 +28,7 @@ DocumentController = exports.DocumentController = Montage.create(Component, {
28 _iframeHolder: { value: null, enumerable: false }, 28 _iframeHolder: { value: null, enumerable: false },
29 _textHolder: { value: null, enumerable: false }, 29 _textHolder: { value: null, enumerable: false },
30 _codeMirrorCounter: {value: 1, enumerable: false}, 30 _codeMirrorCounter: {value: 1, enumerable: false},
31 31
32 tmpSourceForTesting: {
33 value: "function CodeMirror(place, givenOptions) {" +
34 "// Determine effective options based on given values and defaults." +
35 "var options = {}, defaults = CodeMirror.defaults; }"
36 },
37
38 activeDocument: { 32 activeDocument: {
39 get: function() { 33 get: function() {
40 return this._activeDocument; 34 return this._activeDocument;
@@ -62,21 +56,12 @@ DocumentController = exports.DocumentController = Montage.create(Component, {
62 this.eventManager.addEventListener("executeSave", this, false); 56 this.eventManager.addEventListener("executeSave", this, false);
63 57
64 this.eventManager.addEventListener("recordStyleChanged", this, false); 58 this.eventManager.addEventListener("recordStyleChanged", this, false);
65
66 // Temporary testing opening a new file after Ninja has loaded
67 this.eventManager.addEventListener("executeNewProject", this, false);
68 } 59 }
69 }, 60 },
70 61
71 handleAppLoaded: { 62 handleAppLoaded: {
72 value: function() { 63 value: function() {
73 //this.openDocument({"type": "html"}); 64 //
74 }
75 },
76
77 handleExecuteNewProject: {
78 value: function() {
79 this.openDocument({"type": "html"});
80 } 65 }
81 }, 66 },
82 67
@@ -104,16 +89,26 @@ DocumentController = exports.DocumentController = Montage.create(Component, {
104 handleExecuteSave: { 89 handleExecuteSave: {
105 value: function(event) { 90 value: function(event) {
106 //Text and HTML document classes should return the same save object for fileSave 91 //Text and HTML document classes should return the same save object for fileSave
107 this.application.ninja.ioMediator.fileSave(this.activeDocument.save(), this.clearDocumentDirtyFlag.bind(this)); 92 this.application.ninja.ioMediator.fileSave(this.activeDocument.save(), this.fileSaveResult.bind(this));
108 } 93 }
109 }, 94 },
110