diff options
29 files changed, 313 insertions, 457 deletions
diff --git a/js/components/layout/document-bar.reel/document-bar.css b/js/components/layout/document-bar.reel/document-bar.css index 588b8952..2a147964 100755 --- a/js/components/layout/document-bar.reel/document-bar.css +++ b/js/components/layout/document-bar.reel/document-bar.css | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | .documentBar span{ | 34 | .documentBar span{ |
35 | text-decoration: none; | 35 | text-decoration: none; |
36 | cursor: default; | 36 | cursor: pointer; |
37 | color: #3a3a3a; | 37 | color: #3a3a3a; |
38 | } | 38 | } |
39 | 39 | ||
@@ -41,3 +41,10 @@ | |||
41 | color: white; | 41 | color: white; |
42 | } | 42 | } |
43 | 43 | ||
44 | .documentBar .enable{ | ||
45 | color: #d7d7d7; | ||
46 | } | ||
47 | |||
48 | .documentBar .disable{ | ||
49 | color: #3a3a3a; | ||
50 | } \ No newline at end of file | ||
diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html index d58f0d14..48f1423c 100755 --- a/js/components/layout/document-bar.reel/document-bar.html +++ b/js/components/layout/document-bar.reel/document-bar.html | |||
@@ -51,8 +51,8 @@ | |||
51 | <body> | 51 | <body> |
52 | <div id="documentBar"> | 52 | <div id="documentBar"> |
53 | <input class="zoomHotText label" id="zoomControlHT"/> | 53 | <input class="zoomHotText label" id="zoomControlHT"/> |
54 | <span class="design-view" id="design">Design View</span> | 54 | <span class="design-view disable" id="design">Design View</span> |
55 | <span class="code-view" id="code">Code View</span> | 55 | <span class="code-view disable" id="code">Code View</span> |
56 | </div> | 56 | </div> |
57 | </body> | 57 | </body> |
58 | </html> \ No newline at end of file | 58 | </html> \ No newline at end of file |
diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js index 3eece273..44f65804 100755 --- a/js/components/layout/document-bar.reel/document-bar.js +++ b/js/components/layout/document-bar.reel/document-bar.js | |||
@@ -86,7 +86,7 @@ exports.DocumentBar = Montage.create(Component, { | |||
86 | value: function() { | 86 | value: function() { |
87 | this.designView.addEventListener("click", this, false); | 87 | this.designView.addEventListener("click", this, false); |
88 | this.codeView.addEventListener("click", this, false); | 88 | this.codeView.addEventListener("click", this, false); |
89 | 89 | ||
90 | } | 90 | } |
91 | }, | 91 | }, |
92 | 92 | ||
@@ -95,7 +95,13 @@ exports.DocumentBar = Montage.create(Component, { | |||
95 | if(event._event.target.id === this.currentView) return; | 95 | if(event._event.target.id === this.currentView) return; |
96 | 96 | ||
97 | this.currentView = event._event.target.id; | 97 | this.currentView = event._event.target.id; |
98 | documentManagerModule.DocumentManager.switchViews(); | 98 | this.application.ninja.documentController.switchViews(event._event.target.id);//switch between design view |
99 | } | ||
100 | }, | ||
101 | |||
102 | handleOnDocumentChanged:{ | ||
103 | value:function(event){ | ||
104 | |||
99 | } | 105 | } |
100 | } | 106 | } |
101 | }); | 107 | }); |
diff --git a/js/components/layout/documents-tab.reel/documents-tab.js b/js/components/layout/documents-tab.reel/documents-tab.js index e874a73c..982f6ecd 100755 --- a/js/components/layout/documents-tab.reel/documents-tab.js +++ b/js/components/layout/documents-tab.reel/documents-tab.js | |||
@@ -7,8 +7,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
7 | var Montage = require("montage/core/core").Montage; | 7 | var Montage = require("montage/core/core").Montage; |
8 | var Component = require("montage/ui/component").Component; | 8 | var Component = require("montage/ui/component").Component; |
9 | 9 | ||
10 | var documentManagerModule = require("js/io/document/document-controller"); | ||
11 | |||
12 | exports.DocumentsTab = Montage.create(Component, { | 10 | exports.DocumentsTab = Montage.create(Component, { |
13 | 11 | ||
14 | openDocuments: { | 12 | openDocuments: { |
@@ -19,7 +17,7 @@ exports.DocumentsTab = Montage.create(Component, { | |||
19 | enumerable: false, | 17 | enumerable: false, |
20 | value: function() { | 18 | value: function() { |
21 | // console.log("Change this to be inside the Ninja Reel"); | 19 | // console.log("Change this to be inside the Ninja Reel"); |
22 | this.openDocuments = documentManagerModule.DocumentController._documents; | 20 | this.openDocuments = this.application.ninja.documentController._documents; |
23 | // this.eventManager.addEventListener( "appLoaded", this, false); | 21 | // this.eventManager.addEventListener( "appLoaded", this, false); |
24 | } | 22 | } |
25 | }, | 23 | }, |
diff --git a/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.html b/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.html index b4aee4b2..b5da0e6e 100755 --- a/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.html +++ b/js/components/ui/FilePicker/pickerNavigator.reel/pickerNavigator.html | |||
@@ -97,8 +97,8 @@ | |||
97 | <div id="right-bottom" class="right-bottom"></div> | 97 | <div id="right-bottom" class="right-bottom"></div> |
98 | </div> | 98 | </div> |
99 | <div class="buttons"> | 99 | <div class="buttons"> |
100 | <input id="cancelButton" type="button" value="CANCEL" class="cancelButton" /> | 100 | <input id="cancelButton" type="button" value="CANCEL" class="cancelButton nj-skinned" /> |
101 | <input id="okButton" disabled="true" type="button" value="OK" class="okButton" /> | 101 | <input id="okButton" disabled="true" type="button" value="OK" class="okButton nj-skinned" /> |
102 | </div> | 102 | </div> |
103 | <div id="filters" class="filters" style="display:block;"> | 103 | <div id="filters" class="filters" style="display:block;"> |
104 | <div class="dropdown hide"></div> | 104 | <div class="dropdown hide"></div> |
diff --git a/js/io/document/base-document.js b/js/io/document/base-document.js index 44f54f78..d3601de5 100755 --- a/js/io/document/base-document.js +++ b/js/io/document/base-document.js | |||
@@ -31,6 +31,11 @@ var BaseDocument = exports.BaseDocument = Montage.create(Montage, { | |||
31 | set: function(value) { this._uri = value; } | 31 | set: function(value) { this._uri = value; } |
32 | }, | 32 | }, |
33 | 33 | ||
34 | externalUri: { | ||
35 | get: function() { return this._externalUri; }, | ||
36 | set: function(value) { this._externalUri = value; } | ||
37 | }, | ||
38 | |||
34 | documentType: { | 39 | documentType: { |
35 | get: function() { return this._documentType; }, | 40 | get: function() { return this._documentType; }, |
36 | set: function(value) { this._documentType = value; } | 41 | set: function(value) { this._documentType = value; } |
diff --git a/js/io/document/document-controller.js b/js/io/document/document-controller.js index bba7e0e7..8ce43dcc 100755 --- a/js/io/document/document-controller.js +++ b/js/io/document/document-controller.js | |||
@@ -99,9 +99,8 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
99 | if(!!uriArrayObj && !!uriArrayObj.uri && (uriArrayObj.uri.length > 0)){ | 99 | if(!!uriArrayObj && !!uriArrayObj.uri && (uriArrayObj.uri.length > 0)){ |
100 | uri = uriArrayObj.uri[0]; | 100 | uri = uriArrayObj.uri[0]; |
101 | } | 101 | } |
102 | console.log("URI is: ", uri); | 102 | //console.log("URI is: ", uri); |
103 | 103 | ||
104 | // Get file from Jose Code with a callback to here | ||
105 | if(!!uri){ | 104 | if(!!uri){ |
106 | response = this.application.ninja.coreIoApi.openFile({"uri":uri}); | 105 | response = this.application.ninja.coreIoApi.openFile({"uri":uri}); |
107 | if((response.success === true) && ((response.status === 200) || (response.status === 304))){ | 106 | if((response.success === true) && ((response.status === 200) || (response.status === 304))){ |
@@ -113,7 +112,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
113 | if(uri.indexOf('.') != -1){ | 112 | if(uri.indexOf('.') != -1){ |
114 | fileType = uri.substr(uri.lastIndexOf('.') + 1); | 113 | fileType = uri.substr(uri.lastIndexOf('.') + 1); |
115 | } | 114 | } |
116 | this.openDocument({"type": ""+fileType, "name": ""+filename, "source": fileContent}); | 115 | this.openDocument({"type": ""+fileType, "name": ""+filename, "source": fileContent, "uri": uri}); |
117 | } | 116 | } |
118 | 117 | ||
119 | } | 118 | } |
@@ -124,7 +123,6 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
124 | value: function(uri) { | 123 | value: function(uri) { |
125 | console.log("URI is: ", uri); | 124 | console.log("URI is: ", uri); |
126 |