module.exports = new Class ({ Extends: Htk.Component ,open: function (batch, body) { this.batch = batch; this.body = body; this.reportWindow = body.ownerDocument.defaultView; this.activate (batch, body); } ,activate: function (batch, body) { this.renderReport (); } ,openIframe: function (batch) { this.batch = batch; var iframe = this.iframe = this.createElement ('iframe'); iframe.src = 'js/hedera/report.html'; iframe.style.display = 'none'; this.doc.body.appendChild (iframe); this.reportWindow = iframe.contentWindow; this.reportWindow.addEventListener ('load', this._onWindowLoad.bind (this)); return true; } ,_onWindowLoad: function () { this.body = this.reportWindow.document.body; this.renderReport (); } ,print: function () { this.reportWindow.print (); } ,renderReport: function () { var builder = new Vn.Builder (); builder.signalData = this; builder.add ('batch', this.batch); builder.add ('conn', this.conn); builder.loadXml ('reports/'+ this.info.path +'/ui.xml'); var res = this.builderResultInit (builder); this.body.appendChild (res.$('report')); } });