aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-08 11:11:53 -0700
committerValerio Virgillito2012-05-08 11:11:53 -0700
commit7cdf8b969bf932ddf0604855abe106ef635f901b (patch)
treea8ec804b4624e714bc3a69e2dfc27cde2212cffb /js/document
parent13e123bdc73f1dae067978a2732469124cbd1282 (diff)
parent4504972c1f3b9bf1d02a4484a07a8a85cf9ccee2 (diff)
downloadninja-7cdf8b969bf932ddf0604855abe106ef635f901b.tar.gz
Merge pull request #202 from joseeight/Document
Chrome Preview
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/models/base.js11
-rwxr-xr-xjs/document/views/design.js2
2 files changed, 9 insertions, 4 deletions
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