aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-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.js25
-rwxr-xr-xjs/document/controllers/base-controller.js32
-rwxr-xr-xjs/document/mediators/base-mediator.js32
-rwxr-xr-xjs/document/models/base-document.js (renamed from js/document/text-document.js)2
-rwxr-xr-xjs/document/models/base-model.js32
-rwxr-xr-xjs/document/models/html-document.js (renamed from js/document/html-document.js)4
-rwxr-xr-xjs/document/views/base-view.js32
-rwxr-xr-xjs/io/system/coreioapi.js4
10 files changed, 33 insertions, 149 deletions
diff --git a/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css b/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.css
index 796c283f..9c85c6b5 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:523px; 9 width:510px;
10 height:500px; 10 height:500px;
11 padding-top:15px; 11 padding-top:15px;
12 padding-left:15px; 12 padding-left:15px;
@@ -53,7 +53,6 @@
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;
57} 56}
58 57
59.picker .right-bottom{ 58.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 9fb180d2..4d71f6b8 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:88px; 8 width:90px;
9 height:78px; 9 height:80px;
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: 8px; 14 margin-bottom: 5px;
15 margin-right: 8px; 15 margin-right: 5px;
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: 26px; 32 margin-left: 20px;
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 width: 72px; 42 max-width:80%;
43 padding: 0px 8px;
44 text-align: center; 43 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 f397ace7..25f60cc5 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/document/html-document").HTMLDocument, 12 HTMLDocument = require("js/document/models/html-document").HTMLDocument,
13 TextDocument = require("js/document/text-document").TextDocument, 13 BaseDocument = require("js/document/models/base-document").BaseDocument,
14 DocumentController; 14 DocumentController;
15//////////////////////////////////////////////////////////////////////// 15////////////////////////////////////////////////////////////////////////
16// 16//
@@ -28,7 +28,13 @@ 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
32 activeDocument: { 38 activeDocument: {
33 get: function() { 39 get: function() {
34 return this._activeDocument; 40 return this._activeDocument;
@@ -56,12 +62,21 @@ DocumentController = exports.DocumentController = Montage.create(Component, {
56 this.eventManager.addEventListener("executeSave", this, false); 62 this.eventManager.addEventListener("executeSave", this, false);
57 63
58 this.eventManager.addEventListener("recordStyleChanged", this, false); 64 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);
59 } 68 }
60 }, 69 },
61 70
62 handleAppLoaded: { 71 handleAppLoaded: {
63 value: function() { 72 value: function() {
64 // 73 //this.openDocument({"type": "html"});
74 }
75 },
76
77 handleExecuteNewProject: {
78 value: function() {
79 this.openDocument({"type": "html"});
65 } 80 }
66 }, 81 },
67 82
@@ -188,7 +203,7 @@ DocumentController = exports.DocumentController = Montage.create(Component, {
188 break; 203 break;
189 default: 204 default:
190 //Open in code view 205 //Open in code view
191 var code = Montage.create(TextDocument, {"source": {value: doc.content}}), docuuid = Uuid.generate(), textArea; 206 var code = Montage.create(BaseDocument, {"source": {value: doc.content}}), docuuid = Uuid.generate(), textArea;
192 textArea = this.application.ninja.stage.stageView.createTextAreaElement(docuuid); 207 textArea = this.application.ninja.stage.stageView.createTextAreaElement(docuuid);
193 code.initialize(doc, docuuid, textArea, textArea.parentNode); 208 code.initialize(doc, docuuid, textArea, textArea.parentNode);
194 //code.init(doc.name, doc.uri, doc.extension, null, docuuid); 209 //code.init(doc.name, doc.uri, doc.extension, null, docuuid);
diff --git a/js/document/controllers/base-controller.js b/js/document/controllers/base-controller.js
deleted file mode 100755
index be441da2..00000000
--- a/js/document/controllers/base-controller.js
+++ /dev/null
@@ -1,32 +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//
9var Montage = require("montage/core/core").Montage,
10 Component = require("montage/ui/component").Component;
11////////////////////////////////////////////////////////////////////////
12//
13exports.ENTERNAME = Montage.create(Montage, {
14 ////////////////////////////////////////////////////////////////////
15 //
16 hasTemplate: {
17 enumerable: false,
18 value: false
19 },
20 ////////////////////////////////////////////////////////////////////
21 //
22 deserializedFromTemplate: {
23 enumerable: false,
24 value: function () {
25 //
26 }
27 }
28 ////////////////////////////////////////////////////////////////////
29 ////////////////////////////////////////////////////////////////////
30});
31////////////////////////////////////////////////////////////////////////
32//////////////////////////////////////////////////////////////////////// \ No newline at end of file
diff --git a/js/document/mediators/base-mediator.js b/js/document/mediators/base-mediator.js
deleted file mode 100755
index be441da2..00000000
--- a/js/document/mediators/base-mediator.js
+++ /dev/null
@@ -1,32 +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//
9var Montage = require("montage/core/core").Montage,
10 Component = require("montage/ui/component").Component;
11////////////////////////////////////////////////////////////////////////
12//
13exports.ENTERNAME = Montage.create(Montage, {
14 ////////////////////////////////////////////////////////////////////
15 //
16 hasTemplate: {
17 enumerable: false,
18 value: false
19 },
20 ////////////////////////////////////////////////////////////////////
21 //
22 deserializedFromTemplate: {
23 enumerable: false,
24 value: function () {
25 //
26 }
27 }
28 ////////////////////////////////////////////////////////////////////
29