diff options
author | Jose Antonio Marquez | 2012-05-08 10:37:38 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-05-08 10:37:38 -0700 |
commit | 4504972c1f3b9bf1d02a4484a07a8a85cf9ccee2 (patch) | |
tree | e55fbbee42164d4d085d4ce479ce4477c03b79c9 | |
parent | 4d949f141247215b5f2a6ec0cfc7d2d31cf2bb1f (diff) | |
download | ninja-4504972c1f3b9bf1d02a4484a07a8a85cf9ccee2.tar.gz |
Adding Chrome Preview
-rwxr-xr-x | js/controllers/document-controller.js | 4 | ||||
-rwxr-xr-x | js/document/models/base.js | 11 | ||||
-rwxr-xr-x | js/document/views/design.js | 2 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.js | 9 |
4 files changed, 19 insertions, 7 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 803519a7..6a25420a 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -88,7 +88,8 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
88 | 88 | ||
89 | 89 | ||
90 | 90 | ||
91 | 91 | //TODO: Ensure these APIs are not needed | |
92 | /* | ||
92 | //////////////////////////////////////////////////////////////////// | 93 | //////////////////////////////////////////////////////////////////// |
93 | // | 94 | // |
94 | handleWebRequest: { | 95 | handleWebRequest: { |
@@ -119,6 +120,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
119 | } | 120 | } |
120 | }, | 121 | }, |
121 | //////////////////////////////////////////////////////////////////// | 122 | //////////////////////////////////////////////////////////////////// |
123 | */ | ||
122 | 124 | ||
123 | 125 | ||
124 | 126 | ||
diff --git a/js/document/models/base.js b/js/document/models/base.js index 746922ad..5667fb24 100755 --- a/js/document/models/base.js +++ b/js/document/models/base.js | |||
@@ -68,19 +68,24 @@ exports.BaseDocumentModel = Montage.create(Component, { | |||
68 | //////////////////////////////////////////////////////////////////// | 68 | //////////////////////////////////////////////////////////////////// |
69 | // | 69 | // |
70 | switchViewTo: { | 70 | switchViewTo: { |
71 | value: function () { | 71 | value: function (view) { |
72 | // | 72 | // |
73 | } | 73 | } |
74 | }, | 74 | }, |
75 | //////////////////////////////////////////////////////////////////// | 75 | //////////////////////////////////////////////////////////////////// |
76 | // | 76 | //TODO: Add API to allow other browser support |
77 | browserPreview: { | 77 | browserPreview: { |
78 | value: function (browser) { | 78 | value: function (browser) { |
79 | // | 79 | |
80 | //TODO: Add file save before previewing | ||
81 | |||
82 | //Currently only supporting current browser (Chrome, obviously) | ||
80 | switch (browser) { | 83 | switch (browser) { |
81 | case 'chrome': | 84 | case 'chrome': |
85 | window.open(this.application.ninja.coreIoApi.rootUrl + this.file.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]); | ||
82 | break; | 86 | break; |
83 | default: | 87 | default: |
88 | window.open(this.application.ninja.coreIoApi.rootUrl + this.file.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]); | ||
84 | break; | 89 | break; |
85 | } | 90 | } |
86 | } | 91 | } |
diff --git a/js/document/views/design.js b/js/document/views/design.js index b23ebe78..df6e9b53 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -230,7 +230,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
230 | initWebGl: { | 230 | initWebGl: { |
231 | value: function (scripttags) { | 231 | value: function (scripttags) { |
232 | // | 232 | // |
233 | var i, n, webgldata; | 233 | var n, webgldata; |
234 | //Setting the iFrame property for reference in helper class | 234 | //Setting the iFrame property for reference in helper class |
235 | this.model.webGlHelper.iframe = this.model.views.design.iframe; | 235 | this.model.webGlHelper.iframe = this.model.views.design.iframe; |
236 | //Checking for webGL Data | 236 | //Checking for webGL Data |
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index edc1efa4..4d7d883d 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -173,12 +173,17 @@ exports.Ninja = Montage.create(Component, { | |||
173 | } | 173 | } |
174 | }, | 174 | }, |
175 | 175 | ||
176 | |||
177 | //////////////////////////////////////////////////////////////////// | ||
178 | //TODO: Expand method to allow other browsers for preview | ||
176 | executeChromePreview: { | 179 | executeChromePreview: { |
177 | value: function () { | 180 | value: function () { |
178 | this.application.ninja.documentController.activeDocument.livePreview(); | 181 | this.application.ninja.documentController.activeDocument.model.browserPreview('chrome'); |
179 | } | 182 | } |
180 | }, | 183 | }, |
181 | 184 | //////////////////////////////////////////////////////////////////// | |
185 | |||
186 | |||
182 | handleResize: { | 187 | handleResize: { |
183 | value: function() { | 188 | value: function() { |
184 | this.stage.resizeCanvases = true; | 189 | this.stage.resizeCanvases = true; |