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.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/document/models/base.js b/js/document/models/base.js
index 76a5e62b..27f7d43f 100755
--- a/js/document/models/base.js
+++ b/js/document/models/base.js
@@ -103,7 +103,7 @@ exports.BaseDocumentModel = Montage.create(Component, {
103 //Generating URL for document 103 //Generating URL for document
104 var url = this.application.ninja.coreIoApi.rootUrl + this.file.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]; 104 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 105 //TODO: Add logic to prompt user to save (all) before preview
106 this.saveAll(function (result) { 106 this.saveAll(null,function (result) {
107 //Currently only supporting current browser (Chrome, obviously) 107 //Currently only supporting current browser (Chrome, obviously)
108 switch (this.browser) { 108 switch (this.browser) {
109 case 'chrome': 109 case 'chrome':
@@ -145,7 +145,7 @@ exports.BaseDocumentModel = Montage.create(Component, {
145 //////////////////////////////////////////////////////////////////// 145 ////////////////////////////////////////////////////////////////////
146 // 146 //
147 save: { 147 save: {
148 value: function (callback) { 148 value: function (callback, libCopyCallback) {
149 // 149 //
150 if (this.needsSave) { 150 if (this.needsSave) {
151 //Save 151 //Save
@@ -165,7 +165,7 @@ exports.BaseDocumentModel = Montage.create(Component, {
165 head: this.views.design.iframe.contentWindow.document.head, 165 head: this.views.design.iframe.contentWindow.document.head,
166 body: this.views.design.iframe.contentWindow.document.body, 166 body: this.views.design.iframe.contentWindow.document.body,
167 mjsTemplateCreator: this.views.design.iframe.contentWindow.mjsTemplateCreator 167 mjsTemplateCreator: this.views.design.iframe.contentWindow.mjsTemplateCreator
168 }, this.handleSaved.bind({callback: callback, model: this})); 168 }, this.handleSaved.bind({callback: callback, model: this}), libCopyCallback);
169 } else { 169 } else {
170 //TODO: Add logic to save code view data 170 //TODO: Add logic to save code view data
171 } 171 }
@@ -174,7 +174,7 @@ exports.BaseDocumentModel = Montage.create(Component, {
174 //////////////////////////////////////////////////////////////////// 174 ////////////////////////////////////////////////////////////////////
175 // 175 //
176 saveAll: { 176 saveAll: {
177 value: function (callback) { 177 value: function (callback, libCopyCallback) {
178 // 178 //
179 if (this.needsSave) { 179 if (this.needsSave) {
180 //Save 180 //Save
@@ -194,7 +194,7 @@ exports.BaseDocumentModel = Montage.create(Component, {
194 head: this.views.design.iframe.contentWindow.document.head, 194 head: this.views.design.iframe.contentWindow.document.head,
195 body: this.views.design.iframe.contentWindow.document.body, 195 body: this.views.design.iframe.contentWindow.document.body,
196 mjsTemplateCreator: this.views.design.iframe.contentWindow.mjsTemplateCreator 196 mjsTemplateCreator: this.views.design.iframe.contentWindow.mjsTemplateCreator
197 }, this.handleSaved.bind({callback: callback, model: this})); 197 }, this.handleSaved.bind({callback: callback, model: this}), libCopyCallback);
198 } else { 198 } else {
199 //TODO: Add logic to save code view data 199 //TODO: Add logic to save code view data
200 } 200 }