ui: post judge result to parent window

master
undefined 10 months ago
parent c9fad505c5
commit e517577080
No known key found for this signature in database

@ -364,6 +364,7 @@ class RecordDetailConnectionHandler extends ConnectionHandler {
async sendUpdate(rdoc: RecordDoc) { async sendUpdate(rdoc: RecordDoc) {
this.send({ this.send({
status: rdoc.status,
status_html: await this.renderHTML('record_detail_status.html', { rdoc, pdoc: this.pdoc }), status_html: await this.renderHTML('record_detail_status.html', { rdoc, pdoc: this.pdoc }),
summary_html: await this.renderHTML('record_detail_summary.html', { rdoc, pdoc: this.pdoc }), summary_html: await this.renderHTML('record_detail_summary.html', { rdoc, pdoc: this.pdoc }),
}); });

@ -18,6 +18,7 @@ const page = new NamedPage('record_detail', async () => {
const newSummary = $(msg.summary_html); const newSummary = $(msg.summary_html);
const oldSummary = $('#summary'); const oldSummary = $('#summary');
dd.apply(oldSummary[0], dd.diff(oldSummary[0], newSummary[0])); dd.apply(oldSummary[0], dd.diff(oldSummary[0], newSummary[0]));
if (typeof msg.status === 'number' && window.parent) window.parent.postMessage({ status: msg.status });
}; };
}); });

Loading…
Cancel
Save