diff options
author | Jose Antonio Marquez | 2012-02-15 23:07:00 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-15 23:07:00 -0800 |
commit | 075252ad893452df446566f01d0b26eeab08be3d (patch) | |
tree | b688e0ad1cd3ceefaa182058c85798644d28ff4a /js/mediators | |
parent | cdd36ed6c789886657c967e72ec2dcd49c6c5a76 (diff) | |
download | ninja-075252ad893452df446566f01d0b26eeab08be3d.tar.gz |
Setting up webGL library copy on save
Diffstat (limited to 'js/mediators')
-rw-r--r-- | js/mediators/io-mediator.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index 2008e40f..e9958ec3 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js | |||
@@ -86,6 +86,7 @@ exports.IoMediator = Montage.create(Component, { | |||
86 | case 204: | 86 | case 204: |
87 | //Creating and formatting result object for callbak | 87 | //Creating and formatting result object for callbak |
88 | result = read.file.details; | 88 | result = read.file.details; |
89 | result.root = read.file.details.uri.replace(read.file.details.name, ""); | ||
89 | //Checking for type of content to returns | 90 | //Checking for type of content to returns |
90 | if (result.extension !== 'html' && result.extension !== 'htm') { | 91 | if (result.extension !== 'html' && result.extension !== 'htm') { |
91 | //Simple string | 92 | //Simple string |
@@ -191,6 +192,17 @@ exports.IoMediator = Montage.create(Component, { | |||
191 | // | 192 | // |
192 | template.document.content.document.body.innerHTML = template.body; | 193 | template.document.content.document.body.innerHTML = template.body; |
193 | template.document.content.document.head.innerHTML = template.head; | 194 | template.document.content.document.head.innerHTML = template.head; |
195 | // | ||
196 | if (template.webgl.length > 0) { | ||
197 | for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { | ||
198 | if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Assets' || this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { | ||
199 | this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.document.root, (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase()); | ||
200 | } | ||
201 | } | ||
202 | |||
203 | //this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(path, libname); | ||
204 | //console.log(this.application.ninja.coreIoApi.ninjaLibrary.libs); | ||
205 | } | ||
194 | //TODO: Remove temp fix for styles | 206 | //TODO: Remove temp fix for styles |
195 | if (template.style) { | 207 | if (template.style) { |
196 | template.document.content.document.head.getElementsByTagName('style')[0].innerHTML = this.getCssFromRules(template.style.cssRules); | 208 | template.document.content.document.head.getElementsByTagName('style')[0].innerHTML = this.getCssFromRules(template.style.cssRules); |