aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/mediators/io-mediator.js15
1 files changed, 8 insertions, 7 deletions
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, {
203 var regexRootUrl, rootUrl = this.application.ninja.coreIoApi.rootUrl + escape((this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1])); 203 var regexRootUrl, rootUrl = this.application.ninja.coreIoApi.rootUrl + escape((this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1]));
204 regexRootUrl = new RegExp(rootUrl.replace(/\//gi, '\\\/'), 'gi'); 204 regexRootUrl = new RegExp(rootUrl.replace(/\//gi, '\\\/'), 'gi');
205 //Injecting head and body into old document 205 //Injecting head and body into old document
206 //template.file.content.document.head.innerHTML = template.head.innerHTML.replace(regexRootUrl, ''); 206 template.file.content.document.head.innerHTML = template.head.innerHTML.replace(regexRootUrl, '');
207 //template.file.content.document.body.innerHTML = template.body.innerHTML.replace(regexRootUrl, ''); 207 template.file.content.document.body.innerHTML = template.body.innerHTML.replace(regexRootUrl, '');
208 208
209 209
210 210
211 //Testing using montage clean up method 211 /*
212//Testing using montage clean up method
212 var mjscode, mjsTemp = TemplateCreator.create(); 213 var mjscode, mjsTemp = TemplateCreator.create();
213 214
214 //mjscode = mjsTemp.initWithHeadAndBodyElements(template.head, template.body); 215 //mjscode = mjsTemp.initWithHeadAndBodyElements(template.head, template.body);
215 mjscode = mjsTemp.initWithDocument(template.file.content.document); 216 //mjscode = mjsTemp.initWithDocument(template.file.content.document);
217 mjscode = mjsTemp.initWithDocument(template.document);
216 218
217 console.log(template.head, mjscode._document.head); 219 console.log(template.head, mjscode._document.head);
218 template.file.content.document.head.innerHTML = mjscode._document.head.innerHTML.replace(regexRootUrl, ''); 220 template.file.content.document.head.innerHTML = mjscode._document.head.innerHTML.replace(regexRootUrl, '');
219 template.file.content.document.body.innerHTML = mjscode._document.body.innerHTML.replace(regexRootUrl, ''); 221 template.file.content.document.body.innerHTML = mjscode._document.body.innerHTML.replace(regexRootUrl, '');
222*/
220 223
221 224
222 225
@@ -229,12 +232,10 @@ exports.IoMediator = Montage.create(Component, {
229 232
230 ////////////////////////////////////////////////// 233 //////////////////////////////////////////////////
231 //TODO: Remove, temp hack, this is to be fixed by Montage 234 //TODO: Remove, temp hack, this is to be fixed by Montage
232 /* 235 var basetags = template.file.content.document.getElementsByTagName('base');
233var basetags = template.file.content.document.getElementsByTagName('base');
234 for (var g in basetags) { 236 for (var g in basetags) {
235 if (basetags[g].getAttribute) toremovetags.push(basetags[g]); 237 if (basetags[g].getAttribute) toremovetags.push(basetags[g]);
236 } 238 }
237*/
238 ////////////////////////////////////////////////// 239 //////////////////////////////////////////////////
239 240
240 // 241 //