From ec68c665dee1936312842c546e1c7347f05dc555 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 9 May 2012 16:56:08 -0700 Subject: Temp removing montage clean up --- js/mediators/io-mediator.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'js/mediators') diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index cf44ab9d..dae0f359 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -203,20 +203,23 @@ exports.IoMediator = Montage.create(Component, { var regexRootUrl, rootUrl = this.application.ninja.coreIoApi.rootUrl + escape((this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1])); regexRootUrl = new RegExp(rootUrl.replace(/\//gi, '\\\/'), 'gi'); //Injecting head and body into old document - //template.file.content.document.head.innerHTML = template.head.innerHTML.replace(regexRootUrl, ''); - //template.file.content.document.body.innerHTML = template.body.innerHTML.replace(regexRootUrl, ''); + template.file.content.document.head.innerHTML = template.head.innerHTML.replace(regexRootUrl, ''); + template.file.content.document.body.innerHTML = template.body.innerHTML.replace(regexRootUrl, ''); - //Testing using montage clean up method + /* +//Testing using montage clean up method var mjscode, mjsTemp = TemplateCreator.create(); //mjscode = mjsTemp.initWithHeadAndBodyElements(template.head, template.body); - mjscode = mjsTemp.initWithDocument(template.file.content.document); + //mjscode = mjsTemp.initWithDocument(template.file.content.document); + mjscode = mjsTemp.initWithDocument(template.document); console.log(template.head, mjscode._document.head); template.file.content.document.head.innerHTML = mjscode._document.head.innerHTML.replace(regexRootUrl, ''); template.file.content.document.body.innerHTML = mjscode._document.body.innerHTML.replace(regexRootUrl, ''); +*/ @@ -229,12 +232,10 @@ exports.IoMediator = Montage.create(Component, { ////////////////////////////////////////////////// //TODO: Remove, temp hack, this is to be fixed by Montage - /* -var basetags = template.file.content.document.getElementsByTagName('base'); + var basetags = template.file.content.document.getElementsByTagName('base'); for (var g in basetags) { if (basetags[g].getAttribute) toremovetags.push(basetags[g]); } -*/ ////////////////////////////////////////////////// // -- cgit v1.2.3