From 5de553a1b3bdd8783ab6ce017ae70369ad92a890 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 16 May 2012 11:37:05 -0700 Subject: Fixing preview bug Also setting up for Montage component serialization. --- js/mediators/io-mediator.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'js/mediators') diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index 8346c75e..e6f2cc2d 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -234,17 +234,13 @@ exports.IoMediator = Montage.create(Component, { //TODO: Add attribute copying for and /* -//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.document); + var tc = this.application.ninja.documentController.activeDocument.model.views.design.iframe.contentWindow.mjsTemplateCreator, code; + code = tc.initWithDocument(this.application.ninja.documentController.activeDocument.model.views.design.iframe.contentWindow.document); + console.log(code._ownerSerialization, code._document.getElementsByTagName('html')[0].innerHTML); - 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, ''); -*/ + */ -- cgit v1.2.3