From 9cb68d376870eea3db3636c30e5fa09d9f71c8cf Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sun, 18 Mar 2012 18:07:40 -0700 Subject: Tests and clean-up --- js/mediators/io-mediator.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'js/mediators') diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index 01879bac..18a517a5 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -462,17 +462,17 @@ function loadWebGL (e) {\n\ + + + // var mjsCounter = 0, mjsComponents = [], temp = TemplateCreator.create(); + // for (var m in template.mjs) { mjsComponents.push(template.mjs[m]); mjsCounter++; } - -// console.log(mjsComponents); - - //console.log(TemplateCreator.) - + // if (template.mjs && mjsCounter > 0) { var mjsDirName, mjsVersion, mjscode = temp.initWithHeadAndBodyElements(template.document.content.document.documentElement.head, template.document.content.document.documentElement.body, mjsComponents)._ownerSerialization; @@ -483,7 +483,7 @@ function loadWebGL (e) {\n\ mjsDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); mjsVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.document.root, mjsDirName); - //TODO: Fix to allow no overwrite + //TODO: Fix to allow no overwrite and nested locations var packjson = this.application.ninja.coreIoApi.createFile({uri: template.document.root+'package.json', contents: '{"mappings": {"montage": "'+mjsDirName+'/"}}'}); } else { //TODO: Error handle no available library to copy @@ -511,6 +511,8 @@ function loadWebGL (e) {\n\ + + //Cleaning URLs from HTML var cleanHTML = template.document.content.document.documentElement.outerHTML.replace(/(\b(?:(?:https?|ftp|file|[A-Za-z]+):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gi, parseNinjaRootUrl.bind(this)); // -- cgit v1.2.3