aboutsummaryrefslogtreecommitdiff
path: root/js/document/models/base.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/document/models/base.js')
-rwxr-xr-xjs/document/models/base.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/js/document/models/base.js b/js/document/models/base.js
index 27f7d43f..0957145a 100755
--- a/js/document/models/base.js
+++ b/js/document/models/base.js
@@ -99,11 +99,20 @@ exports.BaseDocumentModel = Montage.create(Component, {
99 //////////////////////////////////////////////////////////////////// 99 ////////////////////////////////////////////////////////////////////
100 //TODO: Add API to allow other browser support 100 //TODO: Add API to allow other browser support
101 browserPreview: { 101 browserPreview: {
102 value: function (browser) { 102 value: function (browser, screen, context) {
103 //Making call to show feedback screen
104 if (screen) screen.show(context);
103 //Generating URL for document 105 //Generating URL for document
104 var url = this.application.ninja.coreIoApi.rootUrl + this.file.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]; 106 var url = this.application.ninja.coreIoApi.rootUrl + this.file.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1];
105 //TODO: Add logic to prompt user to save (all) before preview 107 //TODO: Add logic to prompt user to save (all) before preview
106 this.saveAll(null,function (result) { 108 this.saveAll(null,function (success) {
109 //Making call to show feedback screen
110 if (screen) screen.hide(context);
111 //TODO: Add error handling logic
112 if (!success) {
113 console.log('Error!');
114 return;
115 }
107 //Currently only supporting current browser (Chrome, obviously) 116 //Currently only supporting current browser (Chrome, obviously)
108 switch (this.browser) { 117 switch (this.browser) {
109 case 'chrome': 118 case 'chrome':