diff options
author | hwc487 | 2012-06-12 15:52:35 -0700 |
---|---|---|
committer | hwc487 | 2012-06-12 15:52:35 -0700 |
commit | 9490f816924e9e9c9970ef9384241c07ec0a6e9f (patch) | |
tree | f44449a2e0055e21960a5513fb3a0738a91db528 /js/mediators/io-mediator.js | |
parent | b7a41cbd5a30d32f524ee60e2dfdf9c65c7ec55b (diff) | |
parent | 6854a72504f57903bd5de003e377f2aefb02d0da (diff) | |
download | ninja-9490f816924e9e9c9970ef9384241c07ec0a6e9f.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts:
assets/canvas-runtime.js
js/io/system/ninjalibrary.json
js/mediators/element-mediator.js
Diffstat (limited to 'js/mediators/io-mediator.js')
-rw-r--r-- | js/mediators/io-mediator.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index c9e10896..c487fef5 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js | |||
@@ -162,9 +162,9 @@ exports.IoMediator = Montage.create(Component, { | |||
162 | case 'html': | 162 | case 'html': |
163 | //Getting content from function to properly handle saving assets (as in external if flagged) | 163 | //Getting content from function to properly handle saving assets (as in external if flagged) |
164 | if (doc.template && (doc.template.type === 'banner' || doc.template.type === 'animation')) { | 164 | if (doc.template && (doc.template.type === 'banner' || doc.template.type === 'animation')) { |
165 | parsedDoc = this.tmplt.parseNinjaTemplateToHtml(doc, true, libCopyCallback); | 165 | parsedDoc = this.tmplt.parseNinjaTemplateToHtml(true, doc, true, libCopyCallback); |
166 | } else { | 166 | } else { |
167 | parsedDoc = this.tmplt.parseNinjaTemplateToHtml(doc, false, libCopyCallback); | 167 | parsedDoc = this.tmplt.parseNinjaTemplateToHtml(true, doc, false, libCopyCallback); |
168 | } | 168 | } |
169 | break; | 169 | break; |
170 | default: | 170 | default: |
@@ -176,13 +176,17 @@ exports.IoMediator = Montage.create(Component, { | |||
176 | save = this.fio.saveFile({uri: doc.file.uri, contents: parsedDoc.content}); | 176 | save = this.fio.saveFile({uri: doc.file.uri, contents: parsedDoc.content}); |
177 | //Checking for callback | 177 | //Checking for callback |
178 | if (callback) callback(save); | 178 | if (callback) callback(save); |
179 | //Checking for libraries, making callback if specified | ||
180 | if (!parsedDoc.libs && libCopyCallback) libCopyCallback(true); | ||
179 | // | 181 | // |
180 | if (!parsedDoc.libs && libCopyCallback) libCopyCallback(true); | 182 | return {montageId: parsedDoc.montageId, canvasId: parsedDoc.canvasId}; |
181 | } else { | 183 | } else { |
182 | //Making call to save file | 184 | //Making call to save file |
183 | save = this.fio.saveFile({uri: doc.file.uri, contents: content}); | 185 | save = this.fio.saveFile({uri: doc.file.uri, contents: content}); |
184 | //Checking for callback | 186 | //Checking for callback |
185 | if (callback) callback(save); | 187 | if (callback) callback(save); |
188 | // | ||
189 | return null; | ||
186 | } | 190 | } |
187 | } | 191 | } |
188 | }, | 192 | }, |