diff options
author | Jose Antonio Marquez | 2012-03-06 17:02:44 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-06 17:02:44 -0800 |
commit | fca92904597895675ddd216399cd235f3c5a7cfa (patch) | |
tree | 77c30a958c0283a6aa208b93640c6008eeb943e2 /js/mediators | |
parent | ec7cbc95de031d2be667c2a8629a9d63e91f7e1a (diff) | |
parent | eebb7de4d19cddec9c763a073d8cf41d76fe70f7 (diff) | |
download | ninja-fca92904597895675ddd216399cd235f3c5a7cfa.tar.gz |
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
Diffstat (limited to 'js/mediators')
-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 23668e13..f44c182c 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js | |||
@@ -153,7 +153,7 @@ exports.IoMediator = Montage.create(Component, { | |||
153 | switch (file.mode) { | 153 | switch (file.mode) { |
154 | case 'html': | 154 | case 'html': |
155 | //Copy webGL library if needed | 155 | //Copy webGL library if needed |
156 | if (file.webgl.length > 0) { | 156 | if (file.webgl && file.webgl.length > 0) { |
157 | for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { | 157 | for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) { |
158 | //Checking for RDGE library to be available | 158 | //Checking for RDGE library to be available |
159 | if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { | 159 | if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { |
@@ -335,7 +335,11 @@ exports.IoMediator = Montage.create(Component, { | |||
335 | cleanedCss = dirtyCss.replace(/(\b(?:(?:https?|ftp|file|[A-Za-z]+):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gi, parseNinjaUrl.bind(this)); | 335 | cleanedCss = dirtyCss.replace(/(\b(?:(?:https?|ftp|file|[A-Za-z]+):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gi, parseNinjaUrl.bind(this)); |
336 | 336 | ||
337 | function parseNinjaUrl (url) { | 337 | function parseNinjaUrl (url) { |
338 | return this.getUrlfromNinjaUrl(url, fileRootUrl, fileUrl); | 338 | if (url.indexOf(this.application.ninja.coreIoApi.rootUrl) !== -1) { |
339 | return this.getUrlfromNinjaUrl(url, fileRootUrl, fileUrl); | ||
340 | } else { | ||
341 | return url; | ||
342 | } | ||
339 | } | 343 | } |
340 | 344 | ||
341 | /////////////////////////////////////////////////////////////////////////////////////////// | 345 | /////////////////////////////////////////////////////////////////////////////////////////// |
@@ -353,7 +357,7 @@ exports.IoMediator = Montage.create(Component, { | |||
353 | } | 357 | } |
354 | } | 358 | } |
355 | //Checking for webGL elements in document | 359 | //Checking for webGL elements in document |
356 | if (template.webgl.length) { | 360 | if (template.webgl && template.webgl.length) { |
357 | // | 361 | // |
358 | var json, matchingtags = [], webgltag, scripts = template.document.content.document.getElementsByTagName('script'); | 362 | var json, matchingtags = [], webgltag, scripts = template.document.content.document.getElementsByTagName('script'); |
359 | // | 363 | // |